diff --git a/etherpad-1.deb b/etherpad-1.deb new file mode 100644 index 000000000..0e1ff48ba Binary files /dev/null and b/etherpad-1.deb differ diff --git a/src/node/utils/Settings.js b/src/node/utils/Settings.js index bc13a211e..2c369ddc7 100644 --- a/src/node/utils/Settings.js +++ b/src/node/utils/Settings.js @@ -104,6 +104,11 @@ exports.minify = true; */ exports.abiword = null; +/** + * The default buttons we should show on the editbar + */ +exports.toolbarItems = ["bold", "italic", "underline", "orderedList", "button", "indent", "outdent", "undo", "redo", "clearAuthorship", "importExport", "timeslider", "saveRevision", "settings", "shareEmbed", "users"]; + /** * The log level of log4js */ @@ -208,6 +213,18 @@ exports.reloadSettings = function reloadSettings() { if(exports.dbType === "dirty"){ console.warn("DirtyDB is used. This is fine for testing but not recommended for production."); } + + //checks if any toolbar items shouldn't be visible + if( settings.toolbarItems ){ // if we have them set.. + for(var i in exports.toolbarItems){ // for each setting in exports + // does it exist in the settings file? + var exists = settings.toolbarItems.indexOf(exports.toolbarItems[i] !== -1); + if(!exists){ + exports.toolbarItems.splice(i,1); // if not remove it from the array of buttons + } + } + } + }; // initially load settings diff --git a/src/templates/pad.html b/src/templates/pad.html index d03bcbe49..82ddd9671 100644 --- a/src/templates/pad.html +++ b/src/templates/pad.html @@ -56,11 +56,13 @@