Dotclear

Changeset 3024:b4724a397193


Ignore:
Timestamp:
06/30/15 19:01:11 (10 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Add syntax arg to adminPostEditor behaviour (may be 'wiki', 'xhtml', 'markdown', …), fixes #2042

Files:
8 edited

Legend:

Unmodified
Added
Removed
  • admin/category.php

    r2891 r3024  
    179179     dcPage::jsConfirmClose('category-form'). 
    180180     dcPage::jsLoad('js/_category.js'). 
    181      $core->callBehavior('adminPostEditor',$category_editor['xhtml'],'category',array('#cat_desc')), 
     181     $core->callBehavior('adminPostEditor',$category_editor['xhtml'],'category',array('#cat_desc'),'xhtml'), 
    182182     dcPage::breadcrumb($elements) 
    183183); 
  • admin/comment.php

    r2857 r3024  
    183183     dcPage::jsConfirmClose('comment-form'). 
    184184     dcPage::jsLoad('js/_comment.js'). 
    185      $core->callBehavior('adminPostEditor',$comment_editor['xhtml'],'comment',array('#comment_content')). 
     185     $core->callBehavior('adminPostEditor',$comment_editor['xhtml'],'comment',array('#comment_content'),'xhtml'). 
    186186     # --BEHAVIOR-- adminCommentHeaders 
    187187     $core->callBehavior('adminCommentHeaders'), 
  • admin/index.php

    r2929 r3024  
    177177          if ($post_editor && !empty($post_editor[$post_format])) { 
    178178               // context is not post because of tags not available 
    179                $admin_post_behavior = $core->callBehavior('adminPostEditor', $post_editor[$post_format], 'quickentry', array('#post_content')); 
     179               $admin_post_behavior = $core->callBehavior('adminPostEditor', $post_editor[$post_format], 'quickentry', array('#post_content'),$post_format); 
    180180          } 
    181181     } 
  • admin/post.php

    r2974 r3024  
    385385    if ($p_edit == $c_edit) { 
    386386        $admin_post_behavior .= $core->callBehavior('adminPostEditor', 
    387             $p_edit,'post',array('#post_excerpt','#post_content','#comment_content')); 
     387            $p_edit,'post',array('#post_excerpt','#post_content','#comment_content'),$post_format); 
    388388    } else { 
    389389        $admin_post_behavior .= $core->callBehavior('adminPostEditor', 
    390             $p_edit,'post',array('#post_excerpt','#post_content')); 
     390            $p_edit,'post',array('#post_excerpt','#post_content'),$post_format); 
    391391        $admin_post_behavior .= $core->callBehavior('adminPostEditor', 
    392             $c_edit,'comment',array('#comment_content')); 
     392            $c_edit,'comment',array('#comment_content'),'xhtml'); 
    393393    } 
    394394} 
  • plugins/dcCKEditor/inc/dc.ckeditor.behaviors.php

    r2962 r3024  
    2222     * @param context  <b>string</b> page context (post,page,comment,event,...) 
    2323     * @param tags     <b>array</b>  array of ids into inject editor 
     24     * @param syntax   <b>string</b> wanted syntax (xhtml) 
    2425     */ 
    25     public static function adminPostEditor($editor='',$context='',array $tags=array()) { 
    26         if (empty($editor) || $editor!='dcCKEditor') { return;} 
     26    public static function adminPostEditor($editor='',$context='',array $tags=array(),$syntax='xhtml') { 
     27        if (empty($editor) || $editor != 'dcCKEditor' || $syntax != 'xhtml') { return;} 
    2728 
    2829        $config_js = self::$config_url; 
  • plugins/dcLegacyEditor/inc/dc.legacy.editor.behaviors.php

    r3021 r3024  
    2121      * @param context  <b>string</b> page context (post,page,comment,event,...) 
    2222      * @param tags     <b>array</b>  array of ids to inject editor 
     23      * @param syntax   <b>string</b> wanted syntax (wiki,markdown,...) 
    2324      */ 
    24      public static function adminPostEditor($editor='',$context='',array $tags=array()) { 
     25     public static function adminPostEditor($editor='',$context='',array $tags=array(),$syntax='') { 
    2526          if (empty($editor) || $editor!='dcLegacyEditor') {return;} 
    2627 
     
    3132               "//<![CDATA[\n". 
    3233               dcPage::jsVar('dotclear.legacy_editor_context', $context). 
     34               dcPage::jsVar('dotclear.legacy_editor_syntax', $syntax). 
    3335               'dotclear.legacy_editor_tags_context = '.sprintf('{%s:["%s"]};'."\n", $context, implode('","', $tags)). 
    3436               "\n//]]>\n". 
  • plugins/pages/page.php

    r2974 r3024  
    295295     if ($p_edit == $c_edit) { 
    296296          $admin_post_behavior .= $core->callBehavior('adminPostEditor', 
    297                $p_edit,'page',array('#post_excerpt','#post_content','#comment_content')); 
     297               $p_edit,'page',array('#post_excerpt','#post_content','#comment_content'),$post_format); 
    298298     } else { 
    299299          $admin_post_behavior .= $core->callBehavior('adminPostEditor', 
    300                $p_edit,'page',array('#post_excerpt','#post_content')); 
     300               $p_edit,'page',array('#post_excerpt','#post_content'),$post_format); 
    301301          $admin_post_behavior .= $core->callBehavior('adminPostEditor', 
    302                $c_edit,'comment',array('#comment_content')); 
     302               $c_edit,'comment',array('#comment_content'),'xhtml'); 
    303303     } 
    304304} 
  • plugins/tags/inc/tags.behaviors.php

    r3021 r3024  
    1414class tagsBehaviors 
    1515{ 
    16      public static function adminPostEditor($editor='',$context='',array $tags=array()) 
     16     public static function adminPostEditor($editor='',$context='',array $tags=array(),$syntax='') 
    1717     { 
    1818          if (($editor != 'dcLegacyEditor' && $editor != 'dcCKEditor') || $context != 'post') return; 
Note: See TracChangeset for help on using the changeset viewer.

Sites map