Fix CkEditor's toolbar initial state

This commit is contained in:
yflory 2018-03-20 15:07:20 +01:00
parent 28d13186af
commit c3f7b74baf
1 changed files with 2 additions and 1 deletions

View File

@ -280,7 +280,8 @@ define([
framework._.sfCommon.setAttribute(['pad', 'showToolbar'], visible);
};
framework._.sfCommon.getAttribute(['pad', 'showToolbar'], function (err, data) {
if ($(window).height() >= 800 && (typeof(data) === "undefined" || data)) { $('.cke_toolbox_main').show(); }
if (($(window).height() >= 800 || $(window).width >= 800) &&
(typeof(data) === "undefined" || data)) { $('.cke_toolbox_main').show(); }
else { $('.cke_toolbox_main').hide(); }
var $collapse = framework._.sfCommon.createButton('toggle', true, cfg, onClick);
framework._.toolbar.$rightside.append($collapse);