]> code.citadel.org Git - citadel.git/blobdiff - webcit/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js
* Deleted tiny_mce - update is coming in the next commit
[citadel.git] / webcit / tiny_mce / plugins / xhtmlxtras / editor_plugin_src.js
diff --git a/webcit/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js b/webcit/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js
deleted file mode 100755 (executable)
index 7e73466..0000000
+++ /dev/null
@@ -1,199 +0,0 @@
- /**\r
- * $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $\r
- *\r
- * @author Moxiecode - based on work by Andrew Tetlaw\r
- * @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.\r
- */\r
-\r
-/* Import plugin specific language pack */\r
-tinyMCE.importPluginLanguagePack('xhtmlxtras');\r
-\r
-var TinyMCE_XHTMLXtrasPlugin = {\r
-       getInfo : function() {\r
-               return {\r
-                       longname : 'XHTML Xtras Plugin',\r
-                       author : 'Moxiecode Systems AB',\r
-                       authorurl : 'http://tinymce.moxiecode.com',\r
-                       infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/xhtmlxtras',\r
-                       version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion\r
-               };\r
-       },\r
-\r
-       initInstance : function(inst) {\r
-               tinyMCE.importCSS(inst.getDoc(), tinyMCE.baseURL + "/plugins/xhtmlxtras/css/xhtmlxtras.css");\r
-       },\r
-\r
-       getControlHTML : function(cn) {\r
-               switch (cn) {\r
-                       case "cite":\r
-                               return tinyMCE.getButtonHTML(cn, 'lang_xhtmlxtras_cite_desc', '{$pluginurl}/images/cite.gif', 'mceCite', true);\r
-\r
-                       case "acronym":\r
-                               return tinyMCE.getButtonHTML(cn, 'lang_xhtmlxtras_acronym_desc', '{$pluginurl}/images/acronym.gif', 'mceAcronym', true);\r
-\r
-                       case "abbr":\r
-                               return tinyMCE.getButtonHTML(cn, 'lang_xhtmlxtras_abbr_desc', '{$pluginurl}/images/abbr.gif', 'mceAbbr', true);\r
-\r
-                       case "del":\r
-                               return tinyMCE.getButtonHTML(cn, 'lang_xhtmlxtras_del_desc', '{$pluginurl}/images/del.gif', 'mceDel', true);\r
-\r
-                       case "ins":\r
-                               return tinyMCE.getButtonHTML(cn, 'lang_xhtmlxtras_ins_desc', '{$pluginurl}/images/ins.gif', 'mceIns', true);\r
-\r
-                       case "attribs":\r
-                               return tinyMCE.getButtonHTML(cn, 'lang_xhtmlxtras_attribs_desc', '{$pluginurl}/images/attribs.gif', 'mceAttributes', true);\r
-               }\r
-\r
-               return "";\r
-       },\r
-\r
-       execCommand : function(editor_id, element, command, user_interface, value) {\r
-               var template, inst, elm;\r
-\r
-               switch (command) {\r
-                       case "mceCite":\r
-                               if (!this._anySel(editor_id))\r
-                                       return true;\r
-\r
-                               template = new Array();\r
-                               template['file'] = '../../plugins/xhtmlxtras/cite.htm';\r
-                               template['width'] = 350;\r
-                               template['height'] = 250;\r
-                               tinyMCE.openWindow(template, {editor_id : editor_id});\r
-                               return true;\r
-\r
-                       case "mceAcronym":\r
-                               if (!this._anySel(editor_id))\r
-                                       return true;\r
-\r
-                               template = new Array();\r
-                               template['file'] = '../../plugins/xhtmlxtras/acronym.htm';\r
-                               template['width'] = 350;\r
-                               template['height'] = 250;\r
-                               tinyMCE.openWindow(template, {editor_id : editor_id});\r
-                               return true;\r
-\r
-                       case "mceAbbr":\r
-                               if (!this._anySel(editor_id))\r
-                                       return true;\r
-\r
-                               template = new Array();\r
-                               template['file'] = '../../plugins/xhtmlxtras/abbr.htm';\r
-                               template['width'] = 350;\r
-                               template['height'] = 250;\r
-                               tinyMCE.openWindow(template, {editor_id : editor_id});\r
-                               return true;\r
-\r
-                       case "mceIns":\r
-                               if (!this._anySel(editor_id))\r
-                                       return true;\r
-\r
-                               template = new Array();\r
-                               template['file'] = '../../plugins/xhtmlxtras/ins.htm';\r
-                               template['width'] = 350;\r
-                               template['height'] = 310;\r
-                               tinyMCE.openWindow(template, {editor_id : editor_id});\r
-                               return true;\r
-\r
-                       case "mceDel":\r
-                               if (!this._anySel(editor_id))\r
-                                       return true;\r
-\r
-                               template = new Array();\r
-                               template['file'] = '../../plugins/xhtmlxtras/del.htm';\r
-                               template['width'] = 350;\r
-                               template['height'] = 310;\r
-                               tinyMCE.openWindow(template, {editor_id : editor_id});\r
-                               return true;\r
-\r
-                       case "mceAttributes":\r
-                               inst = tinyMCE.getInstanceById(editor_id);\r
-                               elm = inst.getFocusElement();\r
-\r
-                               if (elm && elm.nodeName !== 'BODY' && elm.className.indexOf('mceItem') == -1) {\r
-                                       tinyMCE.openWindow({\r
-                                               file : '../../plugins/xhtmlxtras/attributes.htm',\r
-                                               width : 380,\r
-                                               height : 370\r
-                                       }, {editor_id : editor_id});\r
-                               }\r
-\r
-                               return true;\r
-               }\r
-\r
-               return false;\r
-       },\r
-\r
-       cleanup : function(type, content, inst) {\r
-               if (type == 'insert_to_editor' && tinyMCE.isIE && !tinyMCE.isOpera) {\r
-                       content = content.replace(/<abbr([^>]+)>/gi, '<html:ABBR $1>');\r
-                       content = content.replace(/<\/abbr>/gi, '</html:ABBR>');\r
-               }\r
-\r
-               return content;\r
-       },\r
-\r
-       handleNodeChange : function(editor_id, node, undo_index,undo_levels, visual_aid, any_selection) {\r
-               var elm = tinyMCE.getParentElement(node);\r
-\r
-               if (node == null)\r
-                       return;\r
-\r
-               tinyMCE.switchClass(editor_id + '_attribs', 'mceButtonDisabled');\r
-\r
-               if (!any_selection) {\r
-                       // Disable the buttons\r
-                       tinyMCE.switchClass(editor_id + '_cite', 'mceButtonDisabled');\r
-                       tinyMCE.switchClass(editor_id + '_acronym', 'mceButtonDisabled');\r
-                       tinyMCE.switchClass(editor_id + '_abbr', 'mceButtonDisabled');\r
-                       tinyMCE.switchClass(editor_id + '_del', 'mceButtonDisabled');\r
-                       tinyMCE.switchClass(editor_id + '_ins', 'mceButtonDisabled');\r
-               } else {\r
-                       // A selection means the buttons should be active.\r
-                       tinyMCE.switchClass(editor_id + '_cite', 'mceButtonNormal');\r
-                       tinyMCE.switchClass(editor_id + '_acronym', 'mceButtonNormal');\r
-                       tinyMCE.switchClass(editor_id + '_abbr', 'mceButtonNormal');\r
-                       tinyMCE.switchClass(editor_id + '_del', 'mceButtonNormal');\r
-                       tinyMCE.switchClass(editor_id + '_ins', 'mceButtonNormal');\r
-               }\r
-\r
-               if (elm && elm.nodeName != 'BODY' && elm.className.indexOf('mceItem') == -1)\r
-                       tinyMCE.switchClass(editor_id + '_attribs', 'mceButtonNormal');\r
-\r
-               switch (node.nodeName) {\r
-                       case "CITE":\r
-                               tinyMCE.switchClass(editor_id + '_cite', 'mceButtonSelected');\r
-                               return true;\r
-\r
-                       case "ACRONYM":\r
-                               tinyMCE.switchClass(editor_id + '_acronym', 'mceButtonSelected');\r
-                               return true;\r
-\r
-                       case "abbr": // IE\r
-                       case "HTML:ABBR": // FF\r
-                       case "ABBR":\r
-                               tinyMCE.switchClass(editor_id + '_abbr', 'mceButtonSelected');\r
-                               return true;\r
-\r
-                       case "DEL":\r
-                               tinyMCE.switchClass(editor_id + '_del', 'mceButtonSelected');\r
-                               return true;\r
-\r
-                       case "INS":\r
-                               tinyMCE.switchClass(editor_id + '_ins', 'mceButtonSelected');\r
-                               return true;\r
-               }\r
-\r
-               return true;\r
-       },\r
-\r
-       _anySel : function(editor_id) {\r
-               var inst = tinyMCE.getInstanceById(editor_id), t = inst.selection.getSelectedText(), pe;\r
-\r
-               pe = tinyMCE.getParentElement(inst.getFocusElement(), 'CITE,ACRONYM,ABBR,HTML:ABBR,DEL,INS');\r
-\r
-               return pe || inst.getFocusElement().nodeName == "IMG" || (t && t.length > 0);\r
-       }\r
-};\r
-\r
-tinyMCE.addPlugin("xhtmlxtras", TinyMCE_XHTMLXtrasPlugin);\r