diff options
author | Marcel Klehr <mklehr@gmx.net> | 2014-03-16 15:14:21 +0100 |
---|---|---|
committer | Marcel Klehr <mklehr@gmx.net> | 2014-03-16 15:14:21 +0100 |
commit | da5970dda3aa9244a300968d5112eb6a016beb83 (patch) | |
tree | 99b58624c78b57138549a72161da780f6b397224 /src | |
parent | 51900cbf67d2db6e73e8e72768c9f31bfa23eab4 (diff) | |
download | etherpad-lite-da5970dda3aa9244a300968d5112eb6a016beb83.zip |
Refactor toolbar.js to use consistent naming
Diffstat (limited to 'src')
-rw-r--r-- | src/node/utils/toolbar.js | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/node/utils/toolbar.js b/src/node/utils/toolbar.js index a0a4fe01..fbd1a5da 100644 --- a/src/node/utils/toolbar.js +++ b/src/node/utils/toolbar.js @@ -12,9 +12,9 @@ var _ = require("underscore") defaultButtonAttributes = function (name, overrides) { return { - key: name, + command: name, localizationId: "pad.toolbar." + name + ".title", - icon: "buttonicon-" + name + class: "buttonicon-" + name }; }; @@ -96,11 +96,11 @@ _.extend(Button.prototype, { render: function () { var liAttributes = { "data-type": "button", - "data-key": this.attributes.key, + "data-key": this.attributes.command, }; return tag("li", liAttributes, tag("a", { "class": this.grouping, "data-l10n-id": this.attributes.localizationId }, - tag("span", { "class": "buttonicon " + this.attributes.icon }) + tag("span", { "class": "buttonicon " + this.attributes.class }) ) ); } @@ -160,43 +160,43 @@ module.exports = { strikethrough: defaultButtonAttributes("strikethrough"), orderedlist: { - key: "insertorderedlist", + command: "insertorderedlist", localizationId: "pad.toolbar.ol.title", - icon: "buttonicon-insertorderedlist" + class: "buttonicon-insertorderedlist" }, unorderedlist: { - key: "insertunorderedlist", + command: "insertunorderedlist", localizationId: "pad.toolbar.ul.title", - icon: "buttonicon-insertunorderedlist" + class: "buttonicon-insertunorderedlist" }, indent: defaultButtonAttributes("indent"), outdent: { - key: "outdent", + command: "outdent", localizationId: "pad.toolbar.unindent.title", - icon: "buttonicon-outdent" + class: "buttonicon-outdent" }, undo: defaultButtonAttributes("undo"), redo: defaultButtonAttributes("redo"), clearauthorship: { - key: "clearauthorship", + command: "clearauthorship", localizationId: "pad.toolbar.clearAuthorship.title", - icon: "buttonicon-clearauthorship" + class: "buttonicon-clearauthorship" }, importexport: { - key: "import_export", + command: "import_export", localizationId: "pad.toolbar.import_export.title", - icon: "buttonicon-import_export" + class: "buttonicon-import_export" }, timeslider: { - key: "showTimeSlider", + command: "showTimeSlider", localizationId: "pad.toolbar.timeslider.title", - icon: "buttonicon-history" + class: "buttonicon-history" }, savedrevision: defaultButtonAttributes("savedRevision"), |