Dotclear

Changeset 2749:993aebff97bb


Ignore:
Timestamp:
09/02/14 22:05:33 (11 years ago)
Author:
Nicolas <nikrou77@…>
Branch:
default
Message:

Fix call of javascript of all editors on media_item page but also popup_link and popup_posts
Closes #1983

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • admin/media_item.php

    r2723 r2749  
    208208     dcPage::jsLoad('js/_media_item.js'); 
    209209if ($popup) { 
    210      $starting_scripts .= 
    211      $core->callBehavior('adminPopupMedia'); 
     210     // perhaps better to put active editor in session 
     211     $post_format = $core->auth->getOption('post_format'); 
     212     $post_editor = $core->auth->getOption('editor'); 
     213 
     214     $starting_scripts .= $core->callBehavior('adminPopupMedia', $post_editor[$post_format]); 
    212215} 
    213216call_user_func($open_f,__('Media manager'), 
  • admin/popup_link.php

    r2614 r2749  
    1919$title = !empty($_GET['title']) ? $_GET['title'] : ''; 
    2020 
    21 dcPage::openPopup(__('Add a link'),$core->callBehavior('adminPopupLink')); 
     21// perhaps better to put active editor in session 
     22$post_format = $core->auth->getOption('post_format'); 
     23$post_editor = $core->auth->getOption('editor'); 
     24 
     25dcPage::openPopup(__('Add a link'),$core->callBehavior('adminPopupLink', $post_editor[$post_format])); 
    2226 
    2327echo '<h2 class="page-title">'.__('Add a link').'</h2>'; 
  • admin/popup_posts.php

    r2614 r2749  
    4646} 
    4747 
     48// perhaps better to put active editor in session 
     49$post_format = $core->auth->getOption('post_format'); 
     50$post_editor = $core->auth->getOption('editor'); 
     51 
    4852dcPage::openPopup(__('Add a link to an entry'), 
    4953     dcPage::jsLoad('js/_posts_list.js'). 
    50      $core->callBehavior('adminPopupPosts')); 
     54     $core->callBehavior('adminPopupPosts', $post_editor[$post_format])); 
    5155 
    5256echo '<h2 class="page-title">'.__('Add a link to an entry').'</h2>'; 
  • plugins/dcCKEditor/inc/dc.ckeditor.behaviors.php

    r2743 r2749  
    4242     } 
    4343 
    44     public static function adminPopupMedia() { 
     44    public static function adminPopupMedia($editor='') { 
     45        if (empty($editor) || $editor!='dcCKEditor') { return;} 
     46 
    4547     return dcPage::jsLoad(self::$p_url.'/js/popup_media.js'); 
    4648    } 
    4749 
    48     public static function adminPopupLink() { 
     50    public static function adminPopupLink($editor='') { 
     51        if (empty($editor) || $editor!='dcCKEditor') { return;} 
     52 
    4953     return dcPage::jsLoad(self::$p_url.'/js/popup_link.js'); 
    5054    } 
    5155 
    52     public static function adminPopupPosts() { 
     56    public static function adminPopupPosts($editor='') { 
     57        if (empty($editor) || $editor!='dcCKEditor') { return;} 
     58 
    5359     return dcPage::jsLoad(self::$p_url.'/js/popup_posts.js'); 
    5460    } 
  • plugins/dcLegacyEditor/inc/dc.legacy.editor.behaviors.php

    r2737 r2749  
    1616 
    1717     public static function adminPostEditor($editor='') { 
    18           global $core; 
    19  
    20           if (empty($editor) || $editor!='dcLegacyEditor') { 
    21                return; 
    22           } 
     18          if (empty($editor) || $editor!='dcLegacyEditor') {return;} 
    2319 
    2420          return 
     
    2723     } 
    2824 
    29      public static function adminPopupMedia() { 
     25     public static function adminPopupMedia($editor='') { 
     26          if (empty($editor) || $editor!='dcLegacyEditor') {return;} 
     27 
    3028          return dcPage::jsLoad(self::$p_url.'/js/jsToolBar/popup_media.js'); 
    3129     } 
    3230 
    33      public static function adminPopupLink() { 
     31     public static function adminPopupLink($editor='') { 
     32          if (empty($editor) || $editor!='dcLegacyEditor') {return;} 
     33 
    3434          return dcPage::jsLoad(self::$p_url.'/js/jsToolBar/popup_link.js'); 
    3535     } 
    3636 
    37      public static function adminPopupPosts() { 
     37     public static function adminPopupPosts($editor='') { 
     38          if (empty($editor) || $editor!='dcLegacyEditor') {return;} 
     39 
    3840          return dcPage::jsLoad(self::$p_url.'/js/jsToolBar/popup_posts.js'); 
    3941     } 
Note: See TracChangeset for help on using the changeset viewer.

Sites map