Dotclear

Changeset 2856:b9ae6bf9bd6e for admin


Ignore:
Timestamp:
12/17/14 11:40:49 (11 years ago)
Author:
Nicolas <nikrou77@…>
Branch:
2.7
Message:

Load wanted editor for each context
Closes #2011, Closes #2014

Location:
admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • admin/js/_index.js

    r2614 r2856  
    22     var f = $('#quick-entry'); 
    33     if (f.length > 0) { 
    4           if ($.isFunction('jsToolBar')) { 
     4          if (typeof(jsToolBar)!==undefined) { 
    55               var contentTb = new jsToolBar($('#post_content',f)[0]); 
    66               contentTb.switchMode($('#post_format',f).val()); 
  • admin/post.php

    r2854 r2856  
    377377 
    378378$admin_post_behavior = ''; 
    379 if ($post_editor && !empty($post_editor[$post_format])) { 
    380      $admin_post_behavior = $core->callBehavior('adminPostEditor', $post_editor[$post_format], 'post', array('#post_excerpt','#post_content,#comment_content')); 
     379if ($post_editor) { 
     380    $p_edit = $c_edit = ''; 
     381    if (!empty($post_editor[$post_format])) { 
     382        $p_edit = $post_editor[$post_format]; 
     383    } 
     384    if (!empty($post_editor['xhtml'])) { 
     385        $c_edit = $post_editor['xhtml']; 
     386    } 
     387    if ($p_edit == $c_edit) { 
     388        $admin_post_behavior .= $core->callBehavior('adminPostEditor', 
     389            $p_edit,'post',array('#post_excerpt','#post_content','#comment_content')); 
     390    } else { 
     391        $admin_post_behavior .= $core->callBehavior('adminPostEditor', 
     392            $p_edit,'post',array('#post_excerpt','#post_content')); 
     393        $admin_post_behavior .= $core->callBehavior('adminPostEditor', 
     394            $c_edit,'comment',array('#comment_content')); 
     395    } 
    381396} 
    382397 
Note: See TracChangeset for help on using the changeset viewer.

Sites map