aboutsummaryrefslogtreecommitdiff
path: root/mod/tinymce/views
diff options
context:
space:
mode:
Diffstat (limited to 'mod/tinymce/views')
-rw-r--r--mod/tinymce/views/default/input/longtext.php16
-rw-r--r--mod/tinymce/views/default/tinymce/css.php9
2 files changed, 16 insertions, 9 deletions
diff --git a/mod/tinymce/views/default/input/longtext.php b/mod/tinymce/views/default/input/longtext.php
index 0c912d32e..4af26d7d6 100644
--- a/mod/tinymce/views/default/input/longtext.php
+++ b/mod/tinymce/views/default/input/longtext.php
@@ -73,10 +73,16 @@ tinyMCE.init({
}
});
function toggleEditor(id) {
-if (!tinyMCE.get(id))
- tinyMCE.execCommand('mceAddControl', false, id);
-else
- tinyMCE.execCommand('mceRemoveControl', false, id);
+ if (!tinyMCE.get(id)) {
+ tinyMCE.execCommand('mceAddControl', false, id);
+ <?php $toggleEditor_linktext = elgg_echo('tinymce:remove'); ?>
+ $("a.toggle_editor").html('<?php echo $toggleEditor_linktext ?>');
+ }
+ else {
+ tinyMCE.execCommand('mceRemoveControl', false, id);
+ <?php $toggleEditor_linktext = elgg_echo('tinymce:add'); ?>
+ $("a.toggle_editor").html('<?php echo $toggleEditor_linktext ?>');
+ }
}
</script>
<?php
@@ -86,9 +92,9 @@ else
?>
+<a class="longtext_control toggle_editor small link" href="javascript:toggleEditor('<?php echo $vars['internalname']; ?>');"><?php echo elgg_echo('tinymce:remove'); ?></a>
<!-- show the textarea -->
<textarea class="input_textarea mceEditor" name="<?php echo $vars['internalname']; ?>" <?php echo $vars['js']; ?>><?php echo htmlentities($vars['value'], null, 'UTF-8'); ?></textarea>
-<div class="toggle_editor_container"><a class="toggle_editor small link" href="javascript:toggleEditor('<?php echo $vars['internalname']; ?>');"><?php echo elgg_echo('tinymce:remove'); ?></a></div>
<script type="text/javascript">
$(document).ready(function() {
diff --git a/mod/tinymce/views/default/tinymce/css.php b/mod/tinymce/views/default/tinymce/css.php
index dd9aef4a3..3e8078d09 100644
--- a/mod/tinymce/views/default/tinymce/css.php
+++ b/mod/tinymce/views/default/tinymce/css.php
@@ -1,3 +1,8 @@
+<?php
+/**
+* TinyMCE CSS
+*/
+?>
#elgg_page_contents .mceButton {
background-color: #e9e8e8;
border-color: #B2B2B2;
@@ -44,8 +49,4 @@ border: 1px solid #CCC;
#elgg_page_contents .mceIframeContainer{}
.wp_themeSkin .mceButtonDisabled {
border-color: #ccc !important;
-}
-.toggle_editor {
- float:right;
- margin-top:-15px;
} \ No newline at end of file