Dotclear


Ignore:
Timestamp:
12/11/13 11:35:57 (12 years ago)
Author:
Nicolas <nikrou77@…>
Branch:
default
Message:

Move legacy editor to a plugin. First step for alternate editors.
Addresses #1896

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/js/_index.js

    r1699 r2614  
    22     var f = $('#quick-entry'); 
    33     if (f.length > 0) { 
    4           var contentTb = new jsToolBar($('#post_content',f)[0]); 
    5           contentTb.switchMode($('#post_format',f).val()); 
     4          if ($.isFunction('jsToolBar')) { 
     5               var contentTb = new jsToolBar($('#post_content',f)[0]); 
     6               contentTb.switchMode($('#post_format',f).val()); 
     7          } 
    68 
    79          $('input[name=save]',f).click(function() { 
     
    2123 
    2224          function quickPost(f,status) { 
    23                if (contentTb.getMode() == 'wysiwyg') { 
     25               if ($.isFunction('jsToolBar') && (contentTb.getMode() == 'wysiwyg')) { 
    2426                    contentTb.syncContents('iframe'); 
    2527               } 
     
    5557                         $('#post_title',f).val(''); 
    5658                         $('#post_content',f).val(''); 
    57                          if (contentTb.getMode() == 'wysiwyg') { 
     59                         if ($.isFunction('jsToolBar') &&  (contentTb.getMode() == 'wysiwyg')) { 
    5860                              contentTb.syncContents('textarea'); 
    5961                         } 
Note: See TracChangeset for help on using the changeset viewer.

Sites map