Dotclear


Ignore:
Timestamp:
11/22/18 14:10:26 (7 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Children:
3937:8783cf8c1236, 3949:47fa8f351f8a
Message:

Don't presume about jsToolBar existence!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/js/_index.js

    r3915 r3936  
    6060$(function() { 
    6161  function quickPost(f, status) { 
    62     if ($.isFunction('jsToolBar') && (contentTb.getMode() == 'wysiwyg')) { 
     62    if (typeof jsToolBar !== 'undefined' && $.isFunction(jsToolBar) && contentTb.getMode() == 'wysiwyg') { 
    6363      contentTb.syncContents('iframe'); 
    6464    } 
     
    9696        $('#post_content', f).val(''); 
    9797        $('#post_content', f).change(); 
    98         if ($.isFunction('jsToolBar') && (contentTb.getMode() == 'wysiwyg')) { 
     98        if (typeof jsToolBar !== 'undefined' && $.isFunction(jsToolBar) && contentTb.getMode() == 'wysiwyg') { 
    9999          contentTb.syncContents('textarea'); 
    100100        } 
     
    110110  const f = $('#quick-entry'); 
    111111  if (f.length > 0) { 
    112     if ($.isFunction(jsToolBar)) { 
     112    if (typeof jsToolBar !== 'undefined' && $.isFunction(jsToolBar)) { 
    113113      var contentTb = new jsToolBar($('#post_content', f)[0]); 
    114114      contentTb.switchMode($('#post_format', f).val()); 
Note: See TracChangeset for help on using the changeset viewer.

Sites map