Dotclear


Ignore:
Timestamp:
09/09/14 16:30:31 (11 years ago)
Author:
Nicolas <nikrou77@…>
Branch:
default
Message:

Each editor (ckeditor, legacy ones) loads its own context when it is active.
Add plugin_id parameter to transmit that context
Remove call of ckeditorExtraPlugins behavior until a good solution is found.
Closes #1983

Location:
plugins/dcCKEditor/js
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • plugins/dcCKEditor/js/ckeditor-plugins/dclink/plugin.js

    r2743 r2751  
    66                    exec: function(editor) { 
    77                         if (editor.getSelection().getNative().toString().replace(/\s*/,'')!='') { 
    8                               $.toolbarPopup('popup_link.php?editor='+editor.name); 
     8                              $.toolbarPopup('popup_link.php?plugin_id=dcCKEditor'); 
    99                         } 
    1010                    } 
     
    2626                              editor.getSelection().selectElement(element); 
    2727 
    28                               var popup_url = 'popup_link.php?editor='+editor.name; 
     28                              var popup_url = 'popup_link.php?plugin_id=dcCKEditor'; 
    2929                              if (element.getAttribute('href')) { 
    3030                                   popup_url += '&href='+element.getAttribute('href'); 
  • plugins/dcCKEditor/js/ckeditor-plugins/entrylink/plugin.js

    r2743 r2751  
    66                    exec: function(editor) { 
    77                         if (editor.getSelection().getNative().toString().replace(/\s*/,'')!='') { 
    8                               $.toolbarPopup('popup_posts.php?popup=1&editor='+editor.name); 
     8                              $.toolbarPopup('popup_posts.php?popup=1&plugin_id=dcCKEditor'); 
    99                         } 
    1010                    } 
     
    1818 
    1919               editor.on('doubleclick',function(e) { 
    20                     var element = CKEDITOR.plugins.link.getSelectedLink( editor ) || e.data.element; 
     20                    var element = CKEDITOR.plugins.link.getSelectedLink(editor) || e.data.element; 
    2121                    if (!element.isReadOnly()) { 
    2222                         if (element.is('a') 
     
    2525                              editor.getSelection().selectElement(element); 
    2626 
    27                               $.toolbarPopup('popup_posts.php?popup=1&editor='+editor.name); 
     27                              $.toolbarPopup('popup_posts.php?popup=1&plugin_id=dcCKEditor'); 
    2828                              return false; 
    2929                         } 
  • plugins/dcCKEditor/js/ckeditor-plugins/media/plugin.js

    r2743 r2751  
    55               editor.addCommand('mediaCommand', { 
    66                    exec: function(editor) { 
    7                          $.toolbarPopup('media.php?popup=1&editor='+editor.name); 
     7                         $.toolbarPopup('media.php?popup=1&plugin_id=dcCKEditor'); 
    88                    } 
    99               }); 
     
    1919                    if (!element.isReadOnly()) { 
    2020                         if (element.is('img') || (element.is('a') && element.hasClass('media-link'))) { 
    21                               $.toolbarPopup('media.php?popup=1&editor='+editor.name); 
     21                              $.toolbarPopup('media.php?popup=1&plugin_id=dcCKEditor'); 
    2222                              return false; 
    2323                         } 
  • plugins/dcCKEditor/js/popup_link.js

    r2738 r2751  
    66     $('#link-insert-ok').click(function() { 
    77          var insert_form = $('#link-insert-form').get(0); 
    8           if (insert_form == undefined) {  
    9                return;  
     8          if (insert_form == undefined) { 
     9               return; 
    1010          } 
    1111 
    12           var editor_name = window.opener.$.getEditorName(document.location.search), 
     12          var editor_name = window.opener.$.getEditorName(), 
    1313          editor = window.opener.CKEDITOR.instances[editor_name], 
    14           link = '',      
     14          link = '', 
    1515          selected_text = editor.getSelection().getNative().toString(); 
    1616 
  • plugins/dcCKEditor/js/popup_media.js

    r2738 r2751  
    33          window.close(); 
    44     }); 
    5       
     5 
    66     $('#media-insert-ok').click(function() { 
    77          var insert_form = $('#media-insert-form').get(0); 
    8           if (insert_form === undefined) {  
    9                return;  
     8          if (insert_form === undefined) { 
     9               return; 
    1010          } 
    1111 
    12           var editor_name = window.opener.$.getEditorName(document.location.search), 
     12          var editor_name = window.opener.$.getEditorName(), 
    1313          editor = window.opener.CKEDITOR.instances[editor_name], 
    1414          type = insert_form.elements.type.value, 
     
    4747                         element = window.opener.CKEDITOR.dom.element.createFromHtml(img); 
    4848                    } 
    49                           
     49 
    5050                    editor.insertElement(element); 
    5151               } 
  • plugins/dcCKEditor/js/popup_posts.js

    r2738 r2751  
    66     $('#form-entries tr>td.maximal>a').click(function(e) { 
    77          e.preventDefault(); 
    8           var editor_name = window.opener.$.getEditorName(document.location.search), 
     8          var editor_name = window.opener.$.getEditorName(), 
    99          editor = window.opener.CKEDITOR.instances[editor_name], 
    1010          link = '', 
Note: See TracChangeset for help on using the changeset viewer.

Sites map