Skip to content
Browse files

The toolbar can now span on multiple rows using the '/' separator

  • Loading branch information...
1 parent 241d285 commit 84a0fc6eca48d5a57f3a44c581b93363b424632a @olvlvl olvlvl committed
Showing with 13 additions and 3 deletions.
  1. +13 −3 Source/MooEditable/MooEditable.js
View
16 Source/MooEditable/MooEditable.js
@@ -1067,7 +1067,13 @@ MooEditable.UI.Toolbar= new Class({
this.el.adopt(this.content);
} else {
this.content = actions.map(function(action){
- return (action == '|') ? this.addSeparator() : this.addItem(action);
+ if (action == '|') {
+ return this.addSeparator();
+ }
+ else if (action == '/') {
+ return this.addLineSeparator();
+ }
+ return this.addItem(action);
}.bind(this));
}
return this;
@@ -1095,9 +1101,13 @@ MooEditable.UI.Toolbar= new Class({
},
addSeparator: function(){
- return new Element('span', {'class': 'toolbar-separator'}).inject(this.el);
+ return new Element('span.toolbar-separator').inject(this.el);
},
-
+
+ addLineSeparator: function(){
+ return new Element('div.toolbar-line-separator').inject(this.el);
+ },
+
itemAction: function(){
this.fireEvent('itemAction', arguments);
},

0 comments on commit 84a0fc6

Please sign in to comment.
Something went wrong with that request. Please try again.