Hide editor toolbars by default when using a small screen

This commit is contained in:
yflory
2018-03-07 17:34:55 +01:00
parent f45023ed1f
commit 7a70d69d8e
4 changed files with 6 additions and 3 deletions

View File

@@ -282,7 +282,7 @@ define([
framework._.sfCommon.setAttribute(['pad', 'showToolbar'], visible);
};
framework._.sfCommon.getAttribute(['pad', 'showToolbar'], function (err, data) {
if (typeof(data) === "undefined" || data) { $('.cke_toolbox_main').show(); }
if ($(window).height() >= 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);