Index: linktocontent.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/linktocontent/linktocontent.info,v
retrieving revision 1.4
diff -u -p -r1.4 linktocontent.info
--- linktocontent.info 8 Oct 2007 15:18:09 -0000 1.4
+++ linktocontent.info 11 Jan 2009 16:42:03 -0000
@@ -1,5 +1,5 @@
; $Id: linktocontent.info,v 1.4 2007/10/08 15:18:09 stborchert Exp $
-name = "Linktocontent"
-description = "Provides a small 'API' for TinyMCE plugins to work with drupal data and functionality."
-package = Content
-dependencies = tinymce
+name = Linktocontent
+description = Provides a small API for TinyMCE plugins to work with Drupal data and functionality.
+package = User interface
+dependencies = wysiwyg
Index: contrib/linktocontent_category/linktocontent_category.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/linktocontent/contrib/linktocontent_category/linktocontent_category.info,v
retrieving revision 1.3
diff -u -p -r1.3 linktocontent_category.info
--- contrib/linktocontent_category/linktocontent_category.info 8 Oct 2007 15:18:09 -0000 1.3
+++ contrib/linktocontent_category/linktocontent_category.info 11 Jan 2009 16:42:42 -0000
@@ -1,5 +1,5 @@
; $Id: linktocontent_category.info,v 1.3 2007/10/08 15:18:09 stborchert Exp $
-name = "Linktocontent Category"
-description = "Enhances linktocontent_node.module to use it with category.module."
+name = Linktocontent Category
+description = Enhances Linktocontent Node to use it with Category.
dependencies = linktocontent_node category
-package = Content
+package = User interface
Index: contrib/linktocontent_menu/linktocontent_menu.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/linktocontent/contrib/linktocontent_menu/linktocontent_menu.info,v
retrieving revision 1.3
diff -u -p -r1.3 linktocontent_menu.info
--- contrib/linktocontent_menu/linktocontent_menu.info 8 Oct 2007 15:18:09 -0000 1.3
+++ contrib/linktocontent_menu/linktocontent_menu.info 11 Jan 2009 16:42:54 -0000
@@ -1,5 +1,5 @@
; $Id: linktocontent_menu.info,v 1.3 2007/10/08 15:18:09 stborchert Exp $
-name = "Linktocontent Menu"
-description = "Add links to menu items via a TinyMCE plugin"
+name = Linktocontent Menu
+description = Add links to menu items via a TinyMCE plugin.
dependencies = linktocontent
-package = Content
+package = User interface
Index: contrib/linktocontent_node/linktocontent_node.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/linktocontent/contrib/linktocontent_node/linktocontent_node.info,v
retrieving revision 1.4
diff -u -p -r1.4 linktocontent_node.info
--- contrib/linktocontent_node/linktocontent_node.info 8 Oct 2007 15:18:09 -0000 1.4
+++ contrib/linktocontent_node/linktocontent_node.info 11 Jan 2009 16:43:04 -0000
@@ -1,5 +1,5 @@
; $Id: linktocontent_node.info,v 1.4 2007/10/08 15:18:09 stborchert Exp $
-name = "Linktocontent Node"
-description = "Add links to nodes via a TinyMCE plugin"
+name = Linktocontent Node
+description = Add links to nodes via a TinyMCE plugin.
dependencies = linktocontent taxonomy
-package = Content
+package = User interface
Index: tinymce_plugins/linktomenu/editor_plugin.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/linktocontent/tinymce_plugins/linktomenu/editor_plugin.js,v
retrieving revision 1.2
diff -u -p -r1.2 editor_plugin.js
--- tinymce_plugins/linktomenu/editor_plugin.js 8 Oct 2007 15:20:16 -0000 1.2
+++ tinymce_plugins/linktomenu/editor_plugin.js 11 Jan 2009 16:29:38 -0000
@@ -1 +1,40 @@
-tinyMCE.importPluginLanguagePack('linktomenu','en,de,fr');var TinyMCE_LinkToMenuPlugin={getInfo:function(){return{longname:'Link to menu'}},getControlHTML:function(cn){switch(cn){case"linktomenu":return tinyMCE.getButtonHTML(cn,'lang_linktomenu_image_desc','{$pluginurl}/images/linktomenu.gif','mceLinktomenu')}return""},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceLinktomenu":var anySelection=false;var inst=tinyMCE.getInstanceById(editor_id);var focusElm=inst.getFocusElement();var selectedText=inst.selection.getSelectedText();var template=new Array();template['file']='../../plugins/linktomenu/popup.php';template['width']=400;template['height']=295;template['width']+=tinyMCE.getLang('lang_linktomenu_delta_width',0);template['height']+=tinyMCE.getLang('lang_linktomenu_delta_height',0);tinyMCE.openWindow(template,{editor_id:editor_id,inline:"no",resizable:"no"});return true}return false},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){if(node==null){return}do{if(node.nodeName=="A"&&tinyMCE.getAttrib(node,'href')!=""){tinyMCE.switchClass(editor_id+'_linktomenu','mceButtonSelected');return true}}while((node=node.parentNode));if(any_selection){tinyMCE.switchClass(editor_id+'_linktomenu','mceButtonNormal');return true}return true}};tinyMCE.addPlugin("linktomenu",TinyMCE_LinkToMenuPlugin);
\ No newline at end of file
+/**
+* $Id: editor_plugin_src.js,v 1.2 2007/10/08 15:20:16 stborchert Exp $
+*/
+
+(function() {
+ /* Import plugin specific language pack */
+ tinymce.PluginManager.requireLangPack('linktomenu', 'en,de,fr');
+
+ tinymce.create('tinymce.plugins.LinkToMenuPlugin', {
+ getInfo : function() {
+ return {
+ longname : 'Link to menu'
+ }
+ },
+
+ init : function(ed, url) {
+ ed.addCommand('mceLinktomenu', function() {
+ ed.windowManager.open({
+ file : url + '/popup.php',
+ width : 400 + parseInt(ed.getLang('linktomenu.delta_width', 0)),
+ height : 295 + parseInt(ed.getLang('linktomenu.delta_height', 0))
+ }, {
+ plugin_url : url // Plugin absolute URL
+ });
+ });
+
+ ed.addButton('linktomenu', {
+ title : 'linktomenu.image_desc',
+ cmd : 'mceLinktomenu',
+ image : url + '/images/linktomenu.gif'
+ });
+
+ ed.onNodeChange.add(function(ed, cm, n, co) {
+ cm.setDisabled('linktomenu', co && n.nodeName != 'A');
+ cm.setActive('linktomenu', n.nodeName == 'A' && !n.name);
+ });
+ }
+ });
+ tinymce.PluginManager.add("linktomenu", tinymce.plugins.LinkToMenuPlugin);
+})();
Index: tinymce_plugins/linktomenu/editor_plugin_src.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/linktocontent/tinymce_plugins/linktomenu/editor_plugin_src.js,v
retrieving revision 1.2
diff -u -p -r1.2 editor_plugin_src.js
--- tinymce_plugins/linktomenu/editor_plugin_src.js 8 Oct 2007 15:20:16 -0000 1.2
+++ tinymce_plugins/linktomenu/editor_plugin_src.js 11 Jan 2009 16:29:38 -0000
@@ -2,71 +2,39 @@
* $Id: editor_plugin_src.js,v 1.2 2007/10/08 15:20:16 stborchert Exp $
*/
-/* Import plugin specific language pack */
-tinyMCE.importPluginLanguagePack('linktomenu', 'en,de,fr');
-var TinyMCE_LinkToMenuPlugin = {
- getInfo : function() {
- return {
- longname : 'Link to menu'
- }
- },
-
- getControlHTML : function(cn) {
- switch (cn) {
- case "linktomenu":
- return tinyMCE.getButtonHTML(cn,
- 'lang_linktomenu_image_desc',
- '{$pluginurl}/images/linktomenu.gif',
- 'mceLinktomenu');
- }
- return "";
- },
-
- execCommand : function(editor_id, element, command, user_interface, value) {
- switch (command) {
- case "mceLinktomenu":
- var anySelection = false;
- var inst = tinyMCE.getInstanceById(editor_id);
- var focusElm = inst.getFocusElement();
- var selectedText = inst.selection.getSelectedText();
-
- var template = new Array();
-
- template['file'] = '../../plugins/linktomenu/popup.php';
- template['width'] = 400;
- template['height'] = 295;
-
- // Language specific width and height addons
- template['width'] += tinyMCE.getLang('lang_linktomenu_delta_width', 0);
- template['height'] += tinyMCE.getLang('lang_linktomenu_delta_height', 0);
-
- tinyMCE.openWindow(template, {editor_id: editor_id, inline: "no", resizable: "no"});
-
- return true;
- } // switch
- return false;
- },
-
- handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
- if (node == null) {
- return;
- }
-
- do {
- if (node.nodeName == "A" && tinyMCE.getAttrib(node, 'href') != "") {
- tinyMCE.switchClass(editor_id + '_linktomenu', 'mceButtonSelected');
- return true;
+(function() {
+ /* Import plugin specific language pack */
+ tinymce.PluginManager.requireLangPack('linktomenu', 'en,de,fr');
+
+ tinymce.create('tinymce.plugins.LinkToMenuPlugin', {
+ getInfo : function() {
+ return {
+ longname : 'Link to menu'
}
- } while ((node = node.parentNode));
+ },
- if (any_selection) {
- tinyMCE.switchClass(editor_id + '_linktomenu', 'mceButtonNormal');
- return true;
+ init : function(ed, url) {
+ ed.addCommand('mceLinktomenu', function() {
+ ed.windowManager.open({
+ file : url + '/popup.php',
+ width : 400 + parseInt(ed.getLang('linktomenu.delta_width', 0)),
+ height : 295 + parseInt(ed.getLang('linktomenu.delta_height', 0))
+ }, {
+ plugin_url : url // Plugin absolute URL
+ });
+ });
+
+ ed.addButton('linktomenu', {
+ title : 'linktomenu.image_desc',
+ cmd : 'mceLinktomenu',
+ image : url + '/images/linktomenu.gif'
+ });
+
+ ed.onNodeChange.add(function(ed, cm, n, co) {
+ cm.setDisabled('linktomenu', co && n.nodeName != 'A');
+ cm.setActive('linktomenu', n.nodeName == 'A' && !n.name);
+ });
}
-
- return true;
- }
-
-};
-// Adds the plugin class to the list of available TinyMCE plugins
-tinyMCE.addPlugin("linktomenu", TinyMCE_LinkToMenuPlugin);
\ No newline at end of file
+ });
+ tinymce.PluginManager.add("linktomenu", tinymce.plugins.LinkToMenuPlugin);
+})();
Index: tinymce_plugins/linktomenu/popup.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/linktocontent/tinymce_plugins/linktomenu/popup.php,v
retrieving revision 1.2
diff -u -p -r1.2 popup.php
--- tinymce_plugins/linktomenu/popup.php 8 Oct 2007 15:20:16 -0000 1.2
+++ tinymce_plugins/linktomenu/popup.php 11 Jan 2009 16:29:38 -0000
@@ -12,7 +12,7 @@ header('Pragma: no-cache');
- {$lang_linktomenu_title}
+ {#linktomenu.title}
@@ -43,19 +43,19 @@ header('Pragma: no-cache');
-
+
@@ -63,12 +63,12 @@ header('Pragma: no-cache');
-
+