From b1b9468c3e0373bff95a3aaccf435fa4dad4153e Mon Sep 17 00:00:00 2001 From: Cameron Date: Mon, 25 Feb 2013 14:41:31 -0800 Subject: [PATCH] Admin Mailout buttons with TinyMce active. --- e107_handlers/mailout_admin_class.php | 9 +-------- e107_plugins/tinymce/e_meta.php | 27 ++++++++++++++++++++++++--- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/e107_handlers/mailout_admin_class.php b/e107_handlers/mailout_admin_class.php index 2776a3b55..375379bd5 100644 --- a/e107_handlers/mailout_admin_class.php +++ b/e107_handlers/mailout_admin_class.php @@ -977,14 +977,7 @@ class mailoutAdminClass extends e107MailManager
"; // $text .= display_help('helpb','mailout'); - - if(e_WYSIWYG) - { - $text .=" - - - "; - } + $text .="
diff --git a/e107_plugins/tinymce/e_meta.php b/e107_plugins/tinymce/e_meta.php index bc51402f6..a1491d70e 100644 --- a/e107_plugins/tinymce/e_meta.php +++ b/e107_plugins/tinymce/e_meta.php @@ -28,13 +28,27 @@ if(e_WYSIWYG || strpos(e_SELF,"tinymce/admin_config.php") ) if(ADMIN) { - define("SWITCH_TO_BB","$('#'+id).after('
Switch to bbcode
');"); - } + $insert = "$('#'+id).after('
"; + $insert .= "Switch to bbcode<\/a>"; + + if(e_PAGE == 'mailout.php') + { + $insert .= "  ".LAN_MAILOUT_16."<\/a>"; + $insert .= "".LAN_MAILOUT_14."<\/a>"; + $insert .= "".LAN_MAILOUT_17."<\/a>"; + $insert .= "".LAN_MAILOUT_18."<\/a>"; + } + + $insert .= "
');"; + + define("SWITCH_TO_BB",$insert); + + } else { define("SWITCH_TO_BB",""); } - + // print_a($_POST); //
Toggle WYSIWYG
@@ -50,6 +64,13 @@ if(e_WYSIWYG || strpos(e_SELF,"tinymce/admin_config.php") ) $('#bbcode-panel-'+id+'--preview').hide(); }); + + $('.tinyInsert').click(function() { + + var val = $(this).attr('data-value'); + tinyMCE.selectedInstance.execCommand('mceInsertContent',0,val); + return false; + }); // When new tab is added - convert textarea to TinyMce.