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	1 Nov 2008 16:10:39 -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	1 Nov 2008 16:10:52 -0000
@@ -12,7 +12,7 @@ header('Pragma: no-cache');
 <html lang="de" xml:lang="de" xmlns="http://www.w3.org/1999/xhtml">
  <head>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-  <title>{$lang_linktomenu_title}</title>
+  <title>{#linktomenu.title}</title>
   <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
   <script type="text/javascript" src="../../utils/mctabs.js"></script>
   <script type="text/javascript" src="../../utils/form_utils.js"></script>
@@ -43,19 +43,19 @@ header('Pragma: no-cache');
   </style>
   <base target="_self" />
  </head>
- <body onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none;">
+ <body onload="init();" style="display: none;">
   <div id="mcBodyWrapper">
    <!-- insert tabs -->
    <div class="tabs">
     <ul>
-     <li id="browse_tab" class="current"><span><a href="javascript:mcTabs.displayTab('browse_tab','browse_panel');" onmousedown="return false;">{$lang_linktomenu_browse_tab}</a></span></li>
+     <li id="browse_tab" class="current"><span><a href="javascript:mcTabs.displayTab('browse_tab','browse_panel');" onmousedown="return false;">{#linktomenu.browse_tab}</a></span></li>
     </ul>
    </div>
    <!-- insert panels -->
    <div class="panel_wrap">
     <div id="browse_panel" class="panel current">
      <form id="form_browse" action="#" onsubmit="return false;">
-      <label>{$lang_linktomenu_browse_title}</label>
+      <label>{#linktomenu.browse_title}</label>
      </form>
     </div>
    </div>
@@ -63,12 +63,12 @@ header('Pragma: no-cache');
     <!-- node list -->
     <div class="panel_wrap" id="list">
      <div class="nodes">
-      <label>{$lang_linktomenu_label_documents}</label>
+      <label>{#linktomenu.label_documents}</label>
       <div id="nodelist" class="scrollable accessible">
        <table cellspacing="0" summary="item list">
         <thead>
          <tr>
-          <th>{$lang_linktomenu_thead_title}</th>
+          <th>{#linktomenu.thead_title}</th>
          </tr>
         </thead>
         <tbody>
@@ -80,14 +80,14 @@ header('Pragma: no-cache');
     <!-- form buttons -->
     <div class="mceActionPanel">
      <div style="float: left">
-      <input type="button" id="insert" name="insert" value="{$lang_insert}" onclick="insertAction();" />
+      <input type="button" id="insert" name="insert" value="{#insert}" onclick="insertAction();" />
      </div>
      <div style="float: right">
-      <input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
+      <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
      </div>
     </div>
    </form>
-   <div id="statusImg" style="display: block; position: absolute; left: 125px; background: #ffffff; border: 1px solid #dadfe9; font-size: 14px; color: #333333; width: auto; padding-right: .5em; line-height: 42px; vertical-align: middle;"><img alt="loading" border="0" style="margin: 5px 10px; float: left;" src="images/loading.gif" />{$lang_linktomenu_loading}</div>
+   <div id="statusImg" style="display: block; position: absolute; left: 125px; background: #ffffff; border: 1px solid #dadfe9; font-size: 14px; color: #333333; width: auto; padding-right: .5em; line-height: 42px; vertical-align: middle;"><img alt="loading" border="0" style="margin: 5px 10px; float: left;" src="images/loading.gif" />{#linktomenu.loading}</div>
   </div>
  </body>
 </html>
Index: tinymce_plugins/linktomenu/jscripts/functions.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/linktocontent/tinymce_plugins/linktomenu/jscripts/functions.js,v
retrieving revision 1.3
diff -u -p -r1.3 functions.js
--- tinymce_plugins/linktomenu/jscripts/functions.js	8 Oct 2007 15:18:09 -0000	1.3
+++ tinymce_plugins/linktomenu/jscripts/functions.js	1 Nov 2008 16:09:51 -0000
@@ -67,36 +67,35 @@ function insertAction() {
   if (selectedNode == null) {
     return;
   }
-	var inst = tinyMCE.getInstanceById(tinyMCE.getWindowArg('editor_id'));
-	var elm = inst.getFocusElement();
+  var inst = tinyMCEPopup.editor;
+  var elm = inst.selection.getNode();
 
-	elm = tinyMCE.getParentElement(elm, "a");
+  elm = inst.dom.getParent(elm, "A");
 
-	tinyMCEPopup.execCommand("mceBeginUndoLevel");
+  tinyMCEPopup.execCommand("mceBeginUndoLevel");
 
-	// Create new anchor elements
-	var path = selectedNode.cells[0].firstChild.nodeValue;
-	if (elm == null) {
-		var insertText = selectedNode.cells[1].firstChild.nodeValue;
-    if (inst.selection.getSelectedText().length == 0) {
+  // Create new anchor elements
+  if (elm == null) {
+    var nid = selectedNode.cells[0].firstChild.nodeValue;
+    var insertText = selectedNode.cells[1].firstChild.nodeValue;
+    if (inst.selection.getNode().length == 0) {
       tinyMCEPopup.execCommand("mceInsertContent", false,
-        '<a href="' + path + '">' + insertText + '</a>');
-		}
+        '<a href="' + nid + '">' + insertText + '</a>');
+    }
     else {
-   	  tinyMCEPopup.execCommand("mceInsertContent", false,
-        '<a href="' + path + '">' + inst.selection.getSelectedHTML() + '</a>');
+       tinyMCEPopup.execCommand("mceInsertContent", false,
+        '<a href="' + nid + '">' + inst.selection.getContent() + '</a>');
     } // end (getSelectedText == 0)
-	}
+  }
   else {
-    elm.setAttribute("mce_href", path);
-  	// Refresh in old MSIE
-  	if (tinyMCE.isMSIE5)
-  		elm.outerHTML = elm.outerHTML;
-	}
+    elm.setAttribute("mce_href", selectedNode.cells[0].firstChild.nodeValue);
+    // Refresh in old MSIE
+    if (tinyMCE.isMSIE5)
+      elm.outerHTML = elm.outerHTML;
+  }
 
-	tinyMCE._setEventsEnabled(inst.getBody(), false);
-	tinyMCEPopup.execCommand("mceEndUndoLevel");
-	tinyMCEPopup.close();
+  tinyMCEPopup.execCommand("mceEndUndoLevel");
+  tinyMCEPopup.close();
 }
 
 function loadScript(url) {
@@ -180,7 +179,7 @@ function _createDropdown(obj){
 function _fillDropdown(obj, results){
   if (results.menus != false) {
     var select = _createDropdown(obj);
-    $(select).addOption(-1, tinyMCELang['lang_linktomenu_choose_category']);
+    $(select).addOption(-1, tinyMCEPopup.getLang('linktomenu.choose_category'));
     for (key in results.menus) {
       if (results.menus[key].hasChildren) {
         $(select).addOption(results.menus[key].mid, results.menus[key].title);
Index: tinymce_plugins/linktomenu/langs/de.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/linktocontent/tinymce_plugins/linktomenu/langs/de.js,v
retrieving revision 1.3
diff -u -p -r1.3 de.js
--- tinymce_plugins/linktomenu/langs/de.js	8 Oct 2007 15:18:09 -0000	1.3
+++ tinymce_plugins/linktomenu/langs/de.js	1 Nov 2008 16:10:01 -0000
@@ -1,7 +1,7 @@
 // $Id: de.js,v 1.3 2007/10/08 15:18:09 stborchert Exp $
 // German lang variables
 
-tinyMCE.addToLang('linktomenu', {
+tinyMCE.addI18n('de.linktomenu', {
     title : 'Verweis zu Men&uuml;punkt',
     loading : 'Daten laden...',
     insert_title : 'Verweis zu Men&uuml;punkt einf&uuml;gen',
Index: tinymce_plugins/linktomenu/langs/en.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/linktocontent/tinymce_plugins/linktomenu/langs/en.js,v
retrieving revision 1.3
diff -u -p -r1.3 en.js
--- tinymce_plugins/linktomenu/langs/en.js	8 Oct 2007 15:18:09 -0000	1.3
+++ tinymce_plugins/linktomenu/langs/en.js	1 Nov 2008 16:10:08 -0000
@@ -1,7 +1,7 @@
 // $Id: en.js,v 1.3 2007/10/08 15:18:09 stborchert Exp $
 // English lang variables
 
-tinyMCE.addToLang('linktomenu',
+tinyMCE.addI18n('en.linktomenu',
 {
     title : 'link to menu item',
     loading : 'loading...',
Index: tinymce_plugins/linktomenu/langs/fr.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/linktocontent/tinymce_plugins/linktomenu/langs/fr.js,v
retrieving revision 1.4
diff -u -p -r1.4 fr.js
--- tinymce_plugins/linktomenu/langs/fr.js	29 Aug 2008 02:11:49 -0000	1.4
+++ tinymce_plugins/linktomenu/langs/fr.js	1 Nov 2008 16:10:12 -0000
@@ -1,7 +1,7 @@
 // $Id: fr.js,v 1.4 2008/08/29 02:11:49 sun Exp $
 // French lang variables
 
-tinyMCE.addToLang('linktomenu',
+tinyMCE.addI18n('fr.linktomenu',
 {
     title : 'lien vers noeud',
     loading : 'chargement...',
Index: tinymce_plugins/linktomenu/langs/he.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/linktocontent/tinymce_plugins/linktomenu/langs/he.js,v
retrieving revision 1.3
diff -u -p -r1.3 he.js
--- tinymce_plugins/linktomenu/langs/he.js	8 Oct 2007 15:18:09 -0000	1.3
+++ tinymce_plugins/linktomenu/langs/he.js	1 Nov 2008 16:10:16 -0000
@@ -1,7 +1,7 @@
 // $Id: he.js,v 1.3 2007/10/08 15:18:09 stborchert Exp $
 // Hebrew lang variables
 
-tinyMCE.addToLang('linktomenu',
+tinyMCE.addI18n('he.linktomenu',
 {
     title : '????? ??????',
     loading : '????...',
Index: tinymce_plugins/linktomenu/langs/nl.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/linktocontent/tinymce_plugins/linktomenu/langs/nl.js,v
retrieving revision 1.2
diff -u -p -r1.2 nl.js
--- tinymce_plugins/linktomenu/langs/nl.js	8 Oct 2007 15:20:16 -0000	1.2
+++ tinymce_plugins/linktomenu/langs/nl.js	1 Nov 2008 16:10:21 -0000
@@ -1,6 +1,6 @@
 // Dutch lang variables
 
-tinyMCE.addToLang('linktomenu',
+tinyMCE.addI18n('nl.linktomenu',
 {
     title : 'Link naar menu item',
     loading : 'Laden...',
Index: tinymce_plugins/linktonode/editor_plugin_src.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/linktocontent/tinymce_plugins/linktonode/editor_plugin_src.js,v
retrieving revision 1.2
diff -u -p -r1.2 editor_plugin_src.js
--- tinymce_plugins/linktonode/editor_plugin_src.js	8 Oct 2007 15:20:16 -0000	1.2
+++ tinymce_plugins/linktonode/editor_plugin_src.js	1 Nov 2008 16:11:44 -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('linktonode', 'en,de,fr');
-var TinyMCE_LinkToNodePlugin = {
-  getInfo : function() {
-    return {
-      longname : 'Link to node'
-    }
-  },
-
-  getControlHTML : function(cn) {
-    switch (cn) {
-      case "linktonode":
-        return tinyMCE.getButtonHTML(cn,
-          'lang_linktonode_image_desc',
-          '{$pluginurl}/images/linktonode.gif',
-          'mceLinktonode');
-    }
-    return "";
-  },
-
-  execCommand : function(editor_id, element, command, user_interface, value) {
-    switch (command) {
-      case "mceLinktonode":
-        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/linktonode/popup.php';
-        template['width']  = 400;
-        template['height'] = 295;
-
-        // Language specific width and height addons
-        template['width']  += tinyMCE.getLang('lang_linktonode_delta_width', 0);
-        template['height'] += tinyMCE.getLang('lang_linktonode_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 + '_linktonode', 'mceButtonSelected');
-        return true;
+(function() {
+  /* Import plugin specific language pack */
+  tinymce.PluginManager.requireLangPack('linktonode', 'en,de,fr');
+
+  tinymce.create('tinymce.plugins.LinkToNodePlugin', {
+    getInfo : function() {
+      return {
+        longname : 'Link to node'
       }
-    } while ((node = node.parentNode));
+    },
 
-    if (any_selection) {
-      tinyMCE.switchClass(editor_id + '_linktonode', 'mceButtonNormal');
-      return true;
+    init : function(ed, url) {
+      ed.addCommand('mceLinktonode', function() {
+        ed.windowManager.open({
+          file : url + '/popup.php',
+          width : 400 + parseInt(ed.getLang('linktonode.delta_width', 0)),
+          height : 295 + parseInt(ed.getLang('linktonode.delta_height', 0))
+        }, {
+          plugin_url : url // Plugin absolute URL
+        });
+      });
+        
+      ed.addButton('linktonode', {
+        title : 'linktonode.image_desc',
+        cmd : 'mceLinktonode',
+        image : url + '/images/linktonode.gif'
+      });
+
+      ed.onNodeChange.add(function(ed, cm, n, co) {
+        cm.setDisabled('linktonode', co && n.nodeName != 'A');
+        cm.setActive('linktonode', n.nodeName == 'A' && !n.name);
+      });
     }
-
-    return true;
-  }
-
-};
-// Adds the plugin class to the list of available TinyMCE plugins
-tinyMCE.addPlugin("linktonode", TinyMCE_LinkToNodePlugin);
+  });
+  tinymce.PluginManager.add("linktonode", tinymce.plugins.LinkToNodePlugin);
+})();
Index: tinymce_plugins/linktonode/popup.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/linktocontent/tinymce_plugins/linktonode/popup.php,v
retrieving revision 1.7
diff -u -p -r1.7 popup.php
--- tinymce_plugins/linktonode/popup.php	8 Oct 2007 15:18:09 -0000	1.7
+++ tinymce_plugins/linktonode/popup.php	1 Nov 2008 16:11:56 -0000
@@ -12,7 +12,7 @@ header('Pragma: no-cache');
 <html lang="de" xml:lang="de" xmlns="http://www.w3.org/1999/xhtml">
  <head>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-  <title>{$lang_linktonode_title}</title>
+  <title>{#linktonode.title}</title>
   <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
   <script type="text/javascript" src="../../utils/mctabs.js"></script>
   <script type="text/javascript" src="../../utils/form_utils.js"></script>
@@ -43,19 +43,19 @@ header('Pragma: no-cache');
   </style>
   <base target="_self" />
  </head>
- <body onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none;">
+ <body onload="init();" style="display: none;">
   <div id="mcBodyWrapper">
    <!-- insert tabs -->
    <div class="tabs">
     <ul>
-     <li id="browse_tab" class="current"><span><a href="javascript:mcTabs.displayTab('browse_tab','browse_panel');" onmousedown="return false;">{$lang_linktonode_browse_tab}</a></span></li>
+     <li id="browse_tab" class="current"><span><a href="javascript:mcTabs.displayTab('browse_tab','browse_panel');" onmousedown="return false;">{#linktonode.browse_tab}</a></span></li>
     </ul>
    </div>
    <!-- insert panels -->
    <div class="panel_wrap">
     <div id="browse_panel" class="panel current">
      <form id="form_browse" action="#" onsubmit="return false;">
-      <label>{$lang_linktonode_browse_title}</label>
+      <label>{#linktonode.browse_title}</label>
      </form>
     </div>
    </div>
@@ -63,14 +63,14 @@ header('Pragma: no-cache');
     <!-- node list -->
     <div class="panel_wrap" id="list">
      <div class="nodes">
-      <label>{$lang_linktonode_label_documents}</label>
+      <label>{#linktonode.label_documents}</label>
       <div id="nodelist" class="scrollable accessible">
        <table cellspacing="0" summary="nodelist">
         <thead>
          <tr>
-          <th>{$lang_linktonode_thead_title}</th>
-          <th>{$lang_linktonode_thead_date}</th>
-          <th>{$lang_linktonode_thead_author}</th>
+          <th>{#linktonode.thead_title}</th>
+          <th>{#linktonode.thead_date}</th>
+          <th>{#linktonode.thead_author}</th>
          </tr>
         </thead>
         <tbody>
@@ -82,14 +82,14 @@ header('Pragma: no-cache');
     <!-- form buttons -->
     <div class="mceActionPanel">
      <div style="float: left">
-      <input type="button" id="insert" name="insert" value="{$lang_insert}" onclick="insertAction();" />
+      <input type="button" id="insert" name="insert" value="{#insert}" onclick="insertAction();" />
      </div>
      <div style="float: right">
-      <input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
+      <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
      </div>
     </div>
    </form>
-   <div id="statusImg" style="display: block; position: absolute; left: 125px; background: #ffffff; border: 1px solid #dadfe9; font-size: 14px; color: #333333; width: auto; padding-right: .5em; line-height: 42px; vertical-align: middle;"><img alt="loading" border="0" style="margin: 5px 10px; float: left;" src="images/loading.gif" />{$lang_linktonode_loading}</div>
+   <div id="statusImg" style="display: block; position: absolute; left: 125px; background: #ffffff; border: 1px solid #dadfe9; font-size: 14px; color: #333333; width: auto; padding-right: .5em; line-height: 42px; vertical-align: middle;"><img alt="loading" border="0" style="margin: 5px 10px; float: left;" src="images/loading.gif" />{#linktonode.loading}</div>
   </div>
  </body>
 </html>
Index: tinymce_plugins/linktonode/jscripts/functions.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/linktocontent/tinymce_plugins/linktonode/jscripts/functions.js,v
retrieving revision 1.12
diff -u -p -r1.12 functions.js
--- tinymce_plugins/linktonode/jscripts/functions.js	8 Oct 2007 15:18:10 -0000	1.12
+++ tinymce_plugins/linktonode/jscripts/functions.js	1 Nov 2008 16:11:06 -0000
@@ -73,10 +73,10 @@ function insertAction() {
   if (selectedNode == null) {
     return;
   }
-  var inst = tinyMCE.getInstanceById(tinyMCE.getWindowArg('editor_id'));
-  var elm = inst.getFocusElement();
+  var inst = tinyMCEPopup.editor;
+  var elm = inst.selection.getNode();
 
-  elm = tinyMCE.getParentElement(elm, "a");
+  elm = inst.dom.getParent(elm, "A");
 
   tinyMCEPopup.execCommand("mceBeginUndoLevel");
 
@@ -84,13 +84,13 @@ function insertAction() {
   if (elm == null) {
     var nid = selectedNode.cells[0].firstChild.nodeValue;
     var insertText = selectedNode.cells[1].firstChild.nodeValue;
-    if (inst.selection.getSelectedText().length == 0) {
+    if (inst.selection.getNode().length == 0) {
       tinyMCEPopup.execCommand("mceInsertContent", false,
         '<a href="' + nid + '">' + insertText + '</a>');
     }
     else {
        tinyMCEPopup.execCommand("mceInsertContent", false,
-        '<a href="' + nid + '">' + inst.selection.getSelectedHTML() + '</a>');
+        '<a href="' + nid + '">' + inst.selection.getContent() + '</a>');
     } // end (getSelectedText == 0)
   }
   else {
@@ -100,7 +100,6 @@ function insertAction() {
       elm.outerHTML = elm.outerHTML;
   }
 
-  tinyMCE._setEventsEnabled(inst.getBody(), false);
   tinyMCEPopup.execCommand("mceEndUndoLevel");
   tinyMCEPopup.close();
 }
@@ -186,7 +185,7 @@ function _createDropdown(obj){
 function _fillDropdown(obj, results){
   if (results.categories != false) {
     var select = _createDropdown(obj);
-    $(select).addOption(-1, tinyMCELang['lang_linktonode_choose_category']);
+    $(select).addOption(-1, tinyMCEPopup.getLang('linktonode.choose_category'));
     for (key in results.categories)
       $(select).addOption(results.categories[key].tid, results.categories[key].title);
     return true;
Index: tinymce_plugins/linktonode/langs/de.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/linktocontent/tinymce_plugins/linktonode/langs/de.js,v
retrieving revision 1.5
diff -u -p -r1.5 de.js
--- tinymce_plugins/linktonode/langs/de.js	8 Oct 2007 15:18:10 -0000	1.5
+++ tinymce_plugins/linktonode/langs/de.js	1 Nov 2008 16:11:13 -0000
@@ -1,7 +1,7 @@
 // $Id: de.js,v 1.5 2007/10/08 15:18:10 stborchert Exp $
 // German lang variables
 
-tinyMCE.addToLang('linktonode', {
+tinyMCE.addI18n('de.linktonode', {
     title : 'Verweis zu Dokument',
     loading : 'Daten laden...',
     insert_title : 'Verweis zu Dokument einf&uuml;gen',
Index: tinymce_plugins/linktonode/langs/el.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/linktocontent/tinymce_plugins/linktonode/langs/el.js,v
retrieving revision 1.3
diff -u -p -r1.3 el.js
--- tinymce_plugins/linktonode/langs/el.js	8 Oct 2007 15:18:10 -0000	1.3
+++ tinymce_plugins/linktonode/langs/el.js	1 Nov 2008 16:11:19 -0000
@@ -2,7 +2,7 @@
 // Greek lang variables
 // thanks to <a href="http://drupal.org/user/112813">dcoun</a>
 
-tinyMCE.addToLang('linktonode',
+tinyMCE.addI18n('el.linktonode',
 {
     title : '&#931;&#973;&#957;&#948;&#949;&#963;&#951; &#963;&#949; &#963;&#949;&#955;&#943;&#948;&#945;',
     loading : '&#913;&#957;&#945;&#956;&#959;&#957;&#942;...',
Index: tinymce_plugins/linktonode/langs/en.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/linktocontent/tinymce_plugins/linktonode/langs/en.js,v
retrieving revision 1.5
diff -u -p -r1.5 en.js
--- tinymce_plugins/linktonode/langs/en.js	8 Oct 2007 15:18:10 -0000	1.5
+++ tinymce_plugins/linktonode/langs/en.js	1 Nov 2008 16:11:22 -0000
@@ -1,7 +1,7 @@
 // $Id: en.js,v 1.5 2007/10/08 15:18:10 stborchert Exp $
 // English lang variables
 
-tinyMCE.addToLang('linktonode',
+tinyMCE.addI18n('en.linktonode',
 {
     title : 'link to node',
     loading : 'loading...',
Index: tinymce_plugins/linktonode/langs/he.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/linktocontent/tinymce_plugins/linktonode/langs/he.js,v
retrieving revision 1.3
diff -u -p -r1.3 he.js
--- tinymce_plugins/linktonode/langs/he.js	8 Oct 2007 15:18:10 -0000	1.3
+++ tinymce_plugins/linktonode/langs/he.js	1 Nov 2008 16:11:27 -0000
@@ -1,7 +1,7 @@
 // $Id: he.js,v 1.3 2007/10/08 15:18:10 stborchert Exp $
 // Hebrew lang variables
 
-tinyMCE.addToLang('linktonode',
+tinyMCE.addI18n('he.linktonode',
 {
     title : '????? ??? ????',
     loading : '????...',
Index: tinymce_plugins/linktonode/langs/nl.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/linktocontent/tinymce_plugins/linktonode/langs/nl.js,v
retrieving revision 1.2
diff -u -p -r1.2 nl.js
--- tinymce_plugins/linktonode/langs/nl.js	8 Oct 2007 15:20:16 -0000	1.2
+++ tinymce_plugins/linktonode/langs/nl.js	1 Nov 2008 16:11:32 -0000
@@ -1,6 +1,6 @@
 // Dutch lang variables
 
-tinyMCE.addToLang('linktonode',
+tinyMCE.addI18n('nl.linktonode',
 {
     title : 'Link naar node',
     loading : 'Laden...',
