backbone-toolbar
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -243,4 +243,4 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
value: function initialize(_ref) { | ||
var _ref$id = _ref.id; | ||
var id = _ref$id === undefined ? _underscore2.default.uniqueId('toolbar-') : _ref$id; | ||
var _ref$toolbarId = _ref.toolbarId; | ||
var toolbarId = _ref$toolbarId === undefined ? _underscore2.default.uniqueId('toolbar-') : _ref$toolbarId; | ||
var _ref$classes = _ref.classes; | ||
@@ -253,3 +253,3 @@ var classes = _ref$classes === undefined ? [] : _ref$classes; | ||
this._root = { type: 'toolbar', id: id, classes: classes, items: items }; | ||
this._root = { type: 'toolbar', id: toolbarId, classes: classes, items: items }; | ||
this._events = events; | ||
@@ -293,6 +293,6 @@ this._contexts = renderItemTree(this._root); | ||
var id = item.id || this.id; | ||
var id = item.id || this._root.id; | ||
var itemNew = _underscore2.default.defaults({ id: id }, item, this.get(id)); | ||
if (id === this.id) { | ||
if (id === this._root.id) { | ||
if (!itemNew.type !== 'toolbar') { | ||
@@ -327,11 +327,6 @@ throw new Error('The root item must be a toolbar'); | ||
this.undelegateEvents(); | ||
this.$el.html(this._contexts[this.id].html); | ||
this.$el.html(this._contexts[this._root.id].html); | ||
this.delegateEvents(); | ||
return this; | ||
} | ||
}, { | ||
key: 'id', | ||
get: function get() { | ||
return this._root.id; | ||
} | ||
}]); | ||
@@ -1156,3 +1151,3 @@ | ||
{ | ||
buf.push("<span" + (jade.cls(['icon-left','glyphicon',options.iconLeft], [null,null,true])) + "></span>"); | ||
buf.push("<span" + (jade.cls(['icon-left',options.iconLeft], [null,true])) + "></span>"); | ||
} | ||
@@ -1162,3 +1157,3 @@ buf.push("<span class=\"text\">" + (jade.escape(null == (jade_interp = options.text) ? "" : jade_interp)) + "</span>"); | ||
{ | ||
buf.push("<span" + (jade.cls(['icon-right','glyphicon',options.iconRight], [null,null,true])) + "></span>"); | ||
buf.push("<span" + (jade.cls(['icon-right',options.iconRight], [null,true])) + "></span>"); | ||
} | ||
@@ -1222,3 +1217,3 @@ buf.push("</button>"); | ||
iconLeft: null, | ||
iconRight: 'glyphicon-triangle-bottom' | ||
iconRight: ['glyphicon', 'glyphicon-triangle-bottom'] | ||
}), | ||
@@ -1262,3 +1257,3 @@ menu: _underscore2.default.defaults({ | ||
{ | ||
buf.push("<span" + (jade.cls(['icon-left','glyphicon',options.iconLeft], [null,null,true])) + "></span>"); | ||
buf.push("<span" + (jade.cls(['icon-left',options.iconLeft], [null,true])) + "></span>"); | ||
} | ||
@@ -1268,3 +1263,3 @@ buf.push("<span class=\"text\">" + (jade.escape(null == (jade_interp = options.text) ? "" : jade_interp)) + "</span>"); | ||
{ | ||
buf.push("<span" + (jade.cls(['icon-right','glyphicon',options.iconRight], [null,null,true])) + "></span>"); | ||
buf.push("<span" + (jade.cls(['icon-right',options.iconRight], [null,true])) + "></span>"); | ||
} | ||
@@ -1360,3 +1355,3 @@ buf.push("</button>"); | ||
{ | ||
buf.push("<span" + (jade.cls(['icon-left','glyphicon',iconLeft], [null,null,true])) + "></span>"); | ||
buf.push("<span" + (jade.cls(['icon-left',iconLeft], [null,true])) + "></span>"); | ||
} | ||
@@ -1366,3 +1361,3 @@ buf.push("<span class=\"text\">" + (jade.escape(null == (jade_interp = text) ? "" : jade_interp)) + "</span>"); | ||
{ | ||
buf.push("<span" + (jade.cls(['icon-right','glyphicon',iconRight], [null,null,true])) + "></span>"); | ||
buf.push("<span" + (jade.cls(['icon-right',iconRight], [null,true])) + "></span>"); | ||
} | ||
@@ -1482,2 +1477,3 @@ buf.push("</a></li>");}.call(this,"classes" in locals_for_with?locals_for_with.classes:typeof classes!=="undefined"?classes:undefined,"iconLeft" in locals_for_with?locals_for_with.iconLeft:typeof iconLeft!=="undefined"?iconLeft:undefined,"iconRight" in locals_for_with?locals_for_with.iconRight:typeof iconRight!=="undefined"?iconRight:undefined,"id" in locals_for_with?locals_for_with.id:typeof id!=="undefined"?id:undefined,"text" in locals_for_with?locals_for_with.text:typeof text!=="undefined"?text:undefined));;return buf.join(""); | ||
items: [], | ||
checkIcon: ['glyphicon', 'glyphicon-ok'], | ||
removeText: null, | ||
@@ -1488,3 +1484,3 @@ removeIcon: null | ||
if (!dropdownRadioGroup.removeIcon && !dropdownRadioGroup.removeText) { | ||
dropdownRadioGroup.removeIcon = 'glyphicon-remove'; | ||
dropdownRadioGroup.removeIcon = ['glyphicon', 'glyphicon-remove']; | ||
} | ||
@@ -1539,3 +1535,3 @@ | ||
var jade_interp; | ||
;var locals_for_with = (locals || {});(function (classes, id, items, removeIcon, removeText, title, undefined, value) { | ||
;var locals_for_with = (locals || {});(function (checkIcon, classes, id, items, removeIcon, removeText, title, undefined, value) { | ||
buf.push("<li" + (jade.attr("id", id, true, true)) + (jade.cls(['dropdown-radio-group',classes], [null,true])) + "><ul class=\"dropdown-menu dropdown-menu-group\"><li role=\"presentation\" class=\"dropdown-header\">" + (jade.escape(null == (jade_interp = title) ? "" : jade_interp)) + "</li>"); | ||
@@ -1553,7 +1549,7 @@ // iterate items | ||
{ | ||
buf.push("<span class=\"glyphicon glyphicon-ok selection selection-selected\"></span>"); | ||
buf.push("<span" + (jade.cls(['selection','selection-selected',checkIcon], [null,null,true])) + "></span>"); | ||
} | ||
else | ||
{ | ||
buf.push("<span class=\"glyphicon glyphicon-ok selection\"></span>"); | ||
buf.push("<span" + (jade.cls(['selection',checkIcon], [null,true])) + "></span>"); | ||
} | ||
@@ -1570,3 +1566,3 @@ buf.push("<span class=\"text\">" + (jade.escape(null == (jade_interp = item.text) ? "" : jade_interp)) + "</span>"); | ||
{ | ||
buf.push("<span" + (jade.cls(['pull-right','glyphicon','remove-icon',removeIcon], [null,null,null,true])) + "></span>"); | ||
buf.push("<span" + (jade.cls(['pull-right','remove-icon',removeIcon], [null,null,true])) + "></span>"); | ||
} | ||
@@ -1586,7 +1582,7 @@ buf.push("</span>"); | ||
{ | ||
buf.push("<span class=\"glyphicon glyphicon-ok selection selection-selected\"></span>"); | ||
buf.push("<span" + (jade.cls(['selection','selection-selected',checkIcon], [null,null,true])) + "></span>"); | ||
} | ||
else | ||
{ | ||
buf.push("<span class=\"glyphicon glyphicon-ok selection\"></span>"); | ||
buf.push("<span" + (jade.cls(['selection',checkIcon], [null,true])) + "></span>"); | ||
} | ||
@@ -1603,3 +1599,3 @@ buf.push("<span class=\"text\">" + (jade.escape(null == (jade_interp = item.text) ? "" : jade_interp)) + "</span>"); | ||
{ | ||
buf.push("<span" + (jade.cls(['pull-right','glyphicon','remove-icon',removeIcon], [null,null,null,true])) + "></span>"); | ||
buf.push("<span" + (jade.cls(['pull-right','remove-icon',removeIcon], [null,null,true])) + "></span>"); | ||
} | ||
@@ -1614,3 +1610,3 @@ buf.push("</span>"); | ||
buf.push("</ul></li>");}.call(this,"classes" in locals_for_with?locals_for_with.classes:typeof classes!=="undefined"?classes:undefined,"id" in locals_for_with?locals_for_with.id:typeof id!=="undefined"?id:undefined,"items" in locals_for_with?locals_for_with.items:typeof items!=="undefined"?items:undefined,"removeIcon" in locals_for_with?locals_for_with.removeIcon:typeof removeIcon!=="undefined"?removeIcon:undefined,"removeText" in locals_for_with?locals_for_with.removeText:typeof removeText!=="undefined"?removeText:undefined,"title" in locals_for_with?locals_for_with.title:typeof title!=="undefined"?title:undefined,"undefined" in locals_for_with?locals_for_with.undefined: false?undefined:undefined,"value" in locals_for_with?locals_for_with.value:typeof value!=="undefined"?value:undefined));;return buf.join(""); | ||
buf.push("</ul></li>");}.call(this,"checkIcon" in locals_for_with?locals_for_with.checkIcon:typeof checkIcon!=="undefined"?checkIcon:undefined,"classes" in locals_for_with?locals_for_with.classes:typeof classes!=="undefined"?classes:undefined,"id" in locals_for_with?locals_for_with.id:typeof id!=="undefined"?id:undefined,"items" in locals_for_with?locals_for_with.items:typeof items!=="undefined"?items:undefined,"removeIcon" in locals_for_with?locals_for_with.removeIcon:typeof removeIcon!=="undefined"?removeIcon:undefined,"removeText" in locals_for_with?locals_for_with.removeText:typeof removeText!=="undefined"?removeText:undefined,"title" in locals_for_with?locals_for_with.title:typeof title!=="undefined"?title:undefined,"undefined" in locals_for_with?locals_for_with.undefined: false?undefined:undefined,"value" in locals_for_with?locals_for_with.value:typeof value!=="undefined"?value:undefined));;return buf.join(""); | ||
} | ||
@@ -1617,0 +1613,0 @@ |
{ | ||
"main": "dist/backbone-toolbar.js", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"files": [ | ||
@@ -5,0 +5,0 @@ "dist" |
@@ -0,0 +0,0 @@ # backbone-toolbar |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
119007
1359