Replace the expand/collapse ckeditor button by our own to save space

pull/1/head
yflory 8 years ago
parent 914c442615
commit 3af7c9cff8

@ -620,6 +620,23 @@ define([
} }
// Expand / collapse the toolbar
var $existingButton = $bar.find('#cke_1_toolbar_collapser');
var $collapse = Cryptpad.createButton(null, true);
$existingButton.hide();
$collapse.removeClass('fa-question');
var updateIcon = function () {
$collapse.removeClass('fa-caret-down').removeClass('fa-caret-up');
var isCollapsed = !$bar.find('.cke_toolbox_main').is(':visible');
if (isCollapsed) { $collapse.addClass('fa-caret-down') }
else { $collapse.addClass('fa-caret-up') }
};
updateIcon();
$collapse.click(function () {
$existingButton.click();
updateIcon();
});
$rightside.append($collapse);
/* add an export button */ /* add an export button */
var $export = Cryptpad.createButton('export', true, {}, exportFile); var $export = Cryptpad.createButton('export', true, {}, exportFile);

Loading…
Cancel
Save