Changeset 1279
- Timestamp:
- 11/18/10 10:28:35 (2 years ago)
- Files:
-
- 1 modified
-
trunk/plugins/DefinitionList/DefinitionList.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/DefinitionList/DefinitionList.js
r1278 r1279 10 10 var self = this; 11 11 // register the toolbar buttons provided by this plugin 12 var toolbar = ["linebreak"];13 12 for (var i = 0; i < bl.length; ++i) { 14 13 var btn = bl[i]; 15 14 if (!btn) { 16 toolbar.push("separator"); 17 } else { 18 var id = btn[0]; 19 cfg.registerButton(id, this._lc(btn[1]), editor.imgURL("ed_" + btn[0] + ".gif", "DefinitionList"), false, 20 function(editor, id) { 21 // dispatch button press event 22 self.buttonPress(editor, id); 23 }); 24 toolbar.push(id); 15 continue; 25 16 } 17 var id = btn[0]; 18 cfg.registerButton(id, this._lc(btn[1]), editor.imgURL("ed_" + btn[0] + ".gif", "DefinitionList"), false, 19 function(editor, id) { 20 // dispatch button press event 21 self.buttonPress(editor, id); 22 }); 26 23 } 27 24 … … 29 26 // If neither of those buttons exists, addToolbarElement puts our buttons 30 27 // at the beginning of the toolbar, which is good enough. 31 for( var i = 0; i < toolbar.length; ++i ) {32 cfg.addToolbarElement(toolbar[i], ["insertunorderedlist", "insertorderedlist"], 1);33 }28 cfg.addToolbarElement("dl", ["insertunorderedlist", "insertorderedlist"], 1); 29 cfg.addToolbarElement("dt", "dl", 1); 30 cfg.addToolbarElement("dd", "dt", 1); 34 31 } 35 32
