\n"),f}function l(a,b){var d,e,f="";return b.buffer.push('\n \n"),f}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var m,n,o,p="",q=c.helperMissing,r=this.escapeExpression,s=this;return n={},o={},m=c["if"].call(b,"heading",{hash:{},inverse:s.noop,fn:s.program(1,f,e),contexts:[b],types:["ID"],hashContexts:o,hashTypes:n,data:e}),(m||0===m)&&e.buffer.push(m),e.buffer.push("\n\n"),n={},o={},m=c["if"].call(b,"collapsible",{hash:{},inverse:s.program(10,k,e),fn:s.program(8,j,e),contexts:[b],types:["ID"],hashContexts:o,hashTypes:n,data:e}),(m||0===m)&&e.buffer.push(m),e.buffer.push("\n\n"),n={},o={},m=c["if"].call(b,"footer",{hash:{},inverse:s.noop,fn:s.program(12,l,e),contexts:[b],types:["ID"],hashContexts:o,hashTypes:n,data:e}),(m||0===m)&&e.buffer.push(m),e.buffer.push("\n"),p});
\ No newline at end of file
+(function(){Bootstrap.BsWellComponent=Ember.Component.extend({layoutName:"components/bs-well",classNameBindings:["small:well-sm","large:well-lg"],classNames:["well"],click:function(){return this.sendAction("clicked")}}),Ember.Handlebars.helper("bs-well",Bootstrap.BsWellComponent)}).call(this),function(){Bootstrap.BsPageHeaderComponent=Ember.Component.extend({layoutName:"components/bs-page-header",classNames:["page-header"]}),Ember.Handlebars.helper("bs-page-header",Bootstrap.BsPageHeaderComponent)}.call(this),function(){Bootstrap.BsPanelComponent=Ember.Component.extend(Bootstrap.TypeSupport,{layoutName:"components/bs-panel",classNames:["panel"],classTypePrefix:["panel"],classNameBindings:["fade","fade:in"],clicked:null,onClose:null,fade:!0,collapsible:!1,open:!0,actions:{close:function(a){return this.sendAction("onClose"),this.$().removeClass("in"),setTimeout(function(){return this.destroy()}.bind(this),250)}},click:function(a){return this.sendAction("clicked",a)},collapsibleBodyId:function(){return""+this.get("elementId")+"_body"}.property("collapsible"),collapsibleBodyLink:function(){return"#"+this.get("elementId")+"_body"}.property("collapsibleBodyId")}),Ember.Handlebars.helper("bs-panel",Bootstrap.BsPanelComponent)}.call(this),Ember.TEMPLATES["components/bs-page-header"]=Ember.HTMLBars.template(function(){var a=function(){return{isHTMLBars:!0,revision:"Ember@1.11.0",blockParams:0,cachedFragment:null,hasRendered:!1,build:function(a){var b=a.createDocumentFragment(),c=a.createTextNode(" ");a.appendChild(b,c);var c=a.createElement("small"),d=a.createComment("");a.appendChild(c,d),a.appendChild(b,c);var c=a.createTextNode("\n");return a.appendChild(b,c),b},render:function(a,b,c){var d=b.dom,e=b.hooks,f=e.content;d.detectNamespace(c);var g;b.useFragmentCache&&d.canClone?(null===this.cachedFragment&&(g=this.build(d),this.hasRendered?this.cachedFragment=g:this.hasRendered=!0),this.cachedFragment&&(g=d.cloneNode(this.cachedFragment,!0))):g=this.build(d);var h=d.createMorphAt(d.childAt(g,[1]),0,0);return f(b,h,a,"sub"),g}}}();return{isHTMLBars:!0,revision:"Ember@1.11.0",blockParams:0,cachedFragment:null,hasRendered:!1,build:function(a){var b=a.createDocumentFragment(),c=a.createElement("h1"),d=a.createTextNode("\n ");a.appendChild(c,d);var d=a.createComment("");a.appendChild(c,d);var d=a.createTextNode("\n");a.appendChild(c,d);var d=a.createComment("");return a.appendChild(c,d),a.appendChild(b,c),b},render:function(b,c,d){var e=c.dom,f=c.hooks,g=f.content,h=f.get,i=f.block;e.detectNamespace(d);var j;c.useFragmentCache&&e.canClone?(null===this.cachedFragment&&(j=this.build(e),this.hasRendered?this.cachedFragment=j:this.hasRendered=!0),this.cachedFragment&&(j=e.cloneNode(this.cachedFragment,!0))):j=this.build(e);var k=e.childAt(j,[0]),l=e.createMorphAt(k,1,1),m=e.createMorphAt(k,3,3);return g(c,l,b,"title"),i(c,m,b,"if",[h(c,b,"sub")],{},a,null),j}}}()),Ember.TEMPLATES["components/bs-well"]=Ember.HTMLBars.template(function(){return{isHTMLBars:!0,revision:"Ember@1.11.0",blockParams:0,cachedFragment:null,hasRendered:!1,build:function(a){var b=a.createDocumentFragment(),c=a.createComment("");return a.appendChild(b,c),b},render:function(a,b,c){var d=b.dom,e=b.hooks,f=e.content;d.detectNamespace(c);var g;b.useFragmentCache&&d.canClone?(null===this.cachedFragment&&(g=this.build(d),this.hasRendered?this.cachedFragment=g:this.hasRendered=!0),this.cachedFragment&&(g=d.cloneNode(this.cachedFragment,!0))):g=this.build(d);var h=d.createMorphAt(g,0,0,c);return d.insertBoundary(g,null),d.insertBoundary(g,0),f(b,h,a,"yield"),g}}}()),Ember.TEMPLATES["components/bs-panel"]=Ember.HTMLBars.template(function(){var a=function(){var a=function(){return{isHTMLBars:!0,revision:"Ember@1.11.0",blockParams:0,cachedFragment:null,hasRendered:!1,build:function(a){var b=a.createDocumentFragment(),c=a.createTextNode(" ");a.appendChild(b,c);var c=a.createElement("a");a.setAttribute(c,"class","accordion-toggle"),a.setAttribute(c,"data-toggle","collapse"),a.setAttribute(c,"data-parent","#accordion");var d=a.createTextNode("\n ");a.appendChild(c,d);var d=a.createComment("");a.appendChild(c,d);var d=a.createTextNode("\n ");a.appendChild(c,d),a.appendChild(b,c);var c=a.createTextNode("\n");return a.appendChild(b,c),b},render:function(a,b,c){var d=b.dom,e=b.hooks,f=e.get,g=e.element,h=e.content;d.detectNamespace(c);var i;b.useFragmentCache&&d.canClone?(null===this.cachedFragment&&(i=this.build(d),this.hasRendered?this.cachedFragment=i:this.hasRendered=!0),this.cachedFragment&&(i=d.cloneNode(this.cachedFragment,!0))):i=this.build(d);var j=d.childAt(i,[1]),k=d.createMorphAt(j,1,1);return g(b,j,a,"bind-attr",[],{href:f(b,a,"collapsibleBodyLink")}),h(b,k,a,"heading"),i}}}(),b=function(){return{isHTMLBars:!0,revision:"Ember@1.11.0",blockParams:0,cachedFragment:null,hasRendered:!1,build:function(a){var b=a.createDocumentFragment(),c=a.createTextNode(" ");a.appendChild(b,c);var c=a.createComment("");a.appendChild(b,c);var c=a.createTextNode("\n");return a.appendChild(b,c),b},render:function(a,b,c){var d=b.dom,e=b.hooks,f=e.content;d.detectNamespace(c);var g;b.useFragmentCache&&d.canClone?(null===this.cachedFragment&&(g=this.build(d),this.hasRendered?this.cachedFragment=g:this.hasRendered=!0),this.cachedFragment&&(g=d.cloneNode(this.cachedFragment,!0))):g=this.build(d);var h=d.createMorphAt(g,1,1,c);return f(b,h,a,"heading"),g}}}(),c=function(){return{isHTMLBars:!0,revision:"Ember@1.11.0",blockParams:0,cachedFragment:null,hasRendered:!1,build:function(a){var b=a.createDocumentFragment(),c=a.createTextNode(" ");a.appendChild(b,c);var c=a.createElement("a");a.setAttribute(c,"class","close"),a.setAttribute(c,"data-dismiss","panel");var d=a.createTextNode("×");a.appendChild(c,d),a.appendChild(b,c);var c=a.createTextNode("\n");return a.appendChild(b,c),b},render:function(a,b,c){var d=b.dom,e=b.hooks,f=e.element;d.detectNamespace(c);var g;b.useFragmentCache&&d.canClone?(null===this.cachedFragment&&(g=this.build(d),this.hasRendered?this.cachedFragment=g:this.hasRendered=!0),this.cachedFragment&&(g=d.cloneNode(this.cachedFragment,!0))):g=this.build(d);var h=d.childAt(g,[1]);return f(b,h,a,"action",["close"],{}),g}}}();return{isHTMLBars:!0,revision:"Ember@1.11.0",blockParams:0,cachedFragment:null,hasRendered:!1,build:function(a){var b=a.createDocumentFragment(),c=a.createTextNode(" ");a.appendChild(b,c);var c=a.createElement("div");a.setAttribute(c,"class","panel-heading");var d=a.createTextNode("\n");a.appendChild(c,d);var d=a.createComment("");a.appendChild(c,d);var d=a.createComment("");a.appendChild(c,d);var d=a.createTextNode(" ");a.appendChild(c,d),a.appendChild(b,c);var c=a.createTextNode("\n");return a.appendChild(b,c),b},render:function(d,e,f){var g=e.dom,h=e.hooks,i=h.get,j=h.block;g.detectNamespace(f);var k;e.useFragmentCache&&g.canClone?(null===this.cachedFragment&&(k=this.build(g),this.hasRendered?this.cachedFragment=k:this.hasRendered=!0),this.cachedFragment&&(k=g.cloneNode(this.cachedFragment,!0))):k=this.build(g);var l=g.childAt(k,[1]),m=g.createMorphAt(l,1,1),n=g.createMorphAt(l,2,2);return j(e,m,d,"if",[i(e,d,"collapsible")],{},a,b),j(e,n,d,"if",[i(e,d,"dismiss")],{},c,null),k}}}(),b=function(){return{isHTMLBars:!0,revision:"Ember@1.11.0",blockParams:0,cachedFragment:null,hasRendered:!1,build:function(a){var b=a.createDocumentFragment(),c=a.createTextNode(" ");a.appendChild(b,c);var c=a.createElement("div"),d=a.createTextNode("\n ");a.appendChild(c,d);var d=a.createElement("div");a.setAttribute(d,"class","panel-body");var e=a.createComment("");a.appendChild(d,e),a.appendChild(c,d);var d=a.createTextNode("\n ");a.appendChild(c,d),a.appendChild(b,c);var c=a.createTextNode("\n");return a.appendChild(b,c),b},render:function(a,b,c){var d=b.dom,e=b.hooks,f=e.get,g=e.element,h=e.content;d.detectNamespace(c);var i;b.useFragmentCache&&d.canClone?(null===this.cachedFragment&&(i=this.build(d),this.hasRendered?this.cachedFragment=i:this.hasRendered=!0),this.cachedFragment&&(i=d.cloneNode(this.cachedFragment,!0))):i=this.build(d);var j=d.childAt(i,[1]),k=d.createMorphAt(d.childAt(j,[1]),0,0);return g(b,j,a,"bind-attr",[],{id:f(b,a,"collapsibleBodyId")}),g(b,j,a,"bind-attr",[],{"class":":panel-collapse :collapse open:in"}),h(b,k,a,"yield"),i}}}(),c=function(){return{isHTMLBars:!0,revision:"Ember@1.11.0",blockParams:0,cachedFragment:null,hasRendered:!1,build:function(a){var b=a.createDocumentFragment(),c=a.createTextNode(" ");a.appendChild(b,c);var c=a.createElement("div");a.setAttribute(c,"id","collapseOne"),a.setAttribute(c,"class","panel-body");var d=a.createComment("");a.appendChild(c,d),a.appendChild(b,c);var c=a.createTextNode("\n");return a.appendChild(b,c),b},render:function(a,b,c){var d=b.dom,e=b.hooks,f=e.content;d.detectNamespace(c);var g;b.useFragmentCache&&d.canClone?(null===this.cachedFragment&&(g=this.build(d),this.hasRendered?this.cachedFragment=g:this.hasRendered=!0),this.cachedFragment&&(g=d.cloneNode(this.cachedFragment,!0))):g=this.build(d);var h=d.createMorphAt(d.childAt(g,[1]),0,0);return f(b,h,a,"yield"),g}}}(),d=function(){return{isHTMLBars:!0,revision:"Ember@1.11.0",blockParams:0,cachedFragment:null,hasRendered:!1,build:function(a){var b=a.createDocumentFragment(),c=a.createTextNode(" ");a.appendChild(b,c);var c=a.createElement("div");a.setAttribute(c,"class","panel-footer");var d=a.createComment("");a.appendChild(c,d),a.appendChild(b,c);var c=a.createTextNode("\n");return a.appendChild(b,c),b},render:function(a,b,c){var d=b.dom,e=b.hooks,f=e.content;d.detectNamespace(c);var g;b.useFragmentCache&&d.canClone?(null===this.cachedFragment&&(g=this.build(d),this.hasRendered?this.cachedFragment=g:this.hasRendered=!0),this.cachedFragment&&(g=d.cloneNode(this.cachedFragment,!0))):g=this.build(d);var h=d.createMorphAt(d.childAt(g,[1]),0,0);return f(b,h,a,"footer"),g}}}();return{isHTMLBars:!0,revision:"Ember@1.11.0",blockParams:0,cachedFragment:null,hasRendered:!1,build:function(a){var b=a.createDocumentFragment(),c=a.createComment("");a.appendChild(b,c);var c=a.createTextNode("\n");a.appendChild(b,c);var c=a.createComment("");a.appendChild(b,c);var c=a.createTextNode("\n");a.appendChild(b,c);var c=a.createComment("");return a.appendChild(b,c),b},render:function(e,f,g){var h=f.dom,i=f.hooks,j=i.get,k=i.block;h.detectNamespace(g);var l;f.useFragmentCache&&h.canClone?(null===this.cachedFragment&&(l=this.build(h),this.hasRendered?this.cachedFragment=l:this.hasRendered=!0),this.cachedFragment&&(l=h.cloneNode(this.cachedFragment,!0))):l=this.build(h);var m=h.createMorphAt(l,0,0,g),n=h.createMorphAt(l,2,2,g),o=h.createMorphAt(l,4,4,g);return h.insertBoundary(l,null),h.insertBoundary(l,0),k(f,m,e,"if",[j(f,e,"heading")],{},a,null),k(f,n,e,"if",[j(f,e,"collapsible")],{},b,c),k(f,o,e,"if",[j(f,e,"footer")],{},d,null),l}}}());
\ No newline at end of file
diff --git a/dist/js/bs-breadcrumbs.max.js b/dist/js/bs-breadcrumbs.max.js
index b028938..169f6a3 100644
--- a/dist/js/bs-breadcrumbs.max.js
+++ b/dist/js/bs-breadcrumbs.max.js
@@ -1,5 +1,5 @@
/*
-Breadcrumbs compponent.
+Breadcrumbs component.
*/
diff --git a/dist/js/bs-breadcrumbs.min.js b/dist/js/bs-breadcrumbs.min.js
index c5b5d23..4775de5 100644
--- a/dist/js/bs-breadcrumbs.min.js
+++ b/dist/js/bs-breadcrumbs.min.js
@@ -1 +1 @@
-!function(){Bootstrap.BsBreadcrumbsItem=Bootstrap.ItemView.extend({tagName:["li"],classNameBindings:["isActive:active"],template:Ember.Handlebars.compile("{{#unless view.isActive}}{{#if view.content.model}}{{#link-to view.content.route model.id}}{{view.content.name}}{{/link-to}}{{else}}{{#link-to view.content.route}}{{view.content.name}}{{/link-to}}{{/if}}{{else}}{{view.content.name}}{{/unless}}"),isActive:function(){return this.get("content.active")}.property("content.active")}),Bootstrap.BsBreadcrumbs=Bootstrap.ItemsView.extend(Bootstrap.WithRouter,{tagName:["ol"],classNames:["breadcrumb"],currentPathObserver:function(){return this.get("router"),this.send("updateCrumbsByRoute")}.observes("router.url").on("init"),content:[],itemViewClass:Bootstrap.BsBreadcrumbsItem,nameDictionary:void 0,dictionaryNamePrefix:"breadcrumbs",actions:{currentPathDidChange:function(){return this.send("updateCrumbsByRoute")},updateCrumbsByRoute:function(){var a,b=this;return this.get("content").clear(),a=this.get("container").lookup("router:main"),a.get("router.currentHandlerInfos").forEach(function(a){var c,d,e,f,g,h,i;return e=a.name,-1!==e.indexOf(".index")||"application"===e||(null!=(g=a.handler.breadcrumbs)?g.hidden:0)?void 0:(f=a.handler.routeName,(null!=(h=a.handler.breadcrumbs)?h.name:void 0)?d=a.handler.breadcrumbs.name:(null!=(i=b.get("nameDictionary"))?i[""+b.dictionaryNamePrefix+"."+f]:void 0)?d=b.get("nameDictionary")[""+b.dictionaryNamePrefix+"."+f]:(d=a.handler.routeName.split(".").pop(),d=d[0].toUpperCase()+d.slice(1).toLowerCase()),c=Ember.Object.create({route:a.handler.routeName,name:d,model:null}),0===b.get("content").length&&c.set("icon","fa fa-home home-icon"),a.isDynamic&&c.setProperties({model:a.handler.context,name:a.handler.context.get("name")}),b.get("content").pushObject(c))}),this.get("content.lastObject").set("active",!0)}}}),Ember.Handlebars.helper("bs-breadcrumbs",Bootstrap.BsBreadcrumbs)}.call(this);
\ No newline at end of file
+(function(){Bootstrap.BsBreadcrumbsItem=Bootstrap.ItemView.extend({tagName:["li"],classNameBindings:["isActive:active"],template:Ember.Handlebars.compile("{{#unless view.isActive}}{{#if view.content.model}}{{#link-to view.content.route model.id}}{{view.content.name}}{{/link-to}}{{else}}{{#link-to view.content.route}}{{view.content.name}}{{/link-to}}{{/if}}{{else}}{{view.content.name}}{{/unless}}"),isActive:function(){return this.get("content.active")}.property("content.active")}),Bootstrap.BsBreadcrumbs=Bootstrap.ItemsView.extend(Bootstrap.WithRouter,{tagName:["ol"],classNames:["breadcrumb"],currentPathObserver:function(){return this.get("router"),this.send("updateCrumbsByRoute")}.observes("router.url").on("init"),content:[],itemViewClass:Bootstrap.BsBreadcrumbsItem,nameDictionary:void 0,dictionaryNamePrefix:"breadcrumbs",actions:{currentPathDidChange:function(){return this.send("updateCrumbsByRoute")},updateCrumbsByRoute:function(){var a,b=this;return this.get("content").clear(),a=this.get("container").lookup("router:main"),a.get("router.currentHandlerInfos").forEach(function(a,c,d){var e,f,g,h,i,j,k;return g=a.name,-1!==g.indexOf(".index")||"application"===g||(null!=(i=a.handler.breadcrumbs)?i.hidden:0)?void 0:(h=a.handler.routeName,(null!=(j=a.handler.breadcrumbs)?j.name:void 0)?f=a.handler.breadcrumbs.name:(null!=(k=b.get("nameDictionary"))?k[""+b.dictionaryNamePrefix+"."+h]:void 0)?f=b.get("nameDictionary")[""+b.dictionaryNamePrefix+"."+h]:(f=a.handler.routeName.split(".").pop(),f=f[0].toUpperCase()+f.slice(1).toLowerCase()),e=Ember.Object.create({route:a.handler.routeName,name:f,model:null}),0===b.get("content").length&&e.set("icon","fa fa-home home-icon"),a.isDynamic&&e.setProperties({model:a.handler.context,name:a.handler.context.get("name")}),b.get("content").pushObject(e))}),this.get("content.lastObject").set("active",!0)}}}),Ember.Handlebars.helper("bs-breadcrumbs",Bootstrap.BsBreadcrumbs)}).call(this);
\ No newline at end of file
diff --git a/dist/js/bs-button.max.js b/dist/js/bs-button.max.js
index 81e1c37..08f471e 100644
--- a/dist/js/bs-button.max.js
+++ b/dist/js/bs-button.max.js
@@ -109,7 +109,7 @@
}(window.jQuery);
(function() {
- Bootstrap.BsButtonComponent = Ember.Component.extend(Bootstrap.TypeSupport, Bootstrap.SizeSupport, {
+ Bootstrap.BsButtonComponent = Ember.Component.extend(Ember._ProxyMixin, Bootstrap.TypeSupport, Bootstrap.SizeSupport, {
layoutName: 'components/bs-button',
tagName: 'button',
classNames: ['btn'],
@@ -117,37 +117,60 @@
classTypePrefix: 'btn',
clickedParam: null,
block: null,
- attributeBindings: ['disabled', 'dismiss:data-dismiss', '_type:type', 'style'],
+ attributeBindings: ['disabled', 'dismiss:data-dismiss', 'contentDismiss:data-dismiss', '_type:type', 'style'],
_type: 'button',
bubbles: true,
allowedProperties: ['title', 'type', 'size', 'block', 'disabled', 'clicked', 'dismiss', 'class'],
icon_active: void 0,
- icon_inactive: void 0
- }, {
+ icon_inactive: void 0,
+ getPojoProperties: function(pojo) {
+ if (Ember.isEmpty(pojo)) {
+ return [];
+ }
+ return Object.keys(pojo);
+ },
+ getProxiedProperties: function(proxyObject) {
+ var contentProperties, objectProperties, prototypeProperties;
+ contentProperties = this.getObjectProperties(proxyObject.get('content'));
+ prototypeProperties = Object.keys(proxyObject.constructor.prototype);
+ objectProperties = this.getPojoProperties(proxyObject);
+ return contentProperties.concat(prototypeProperties).concat(objectProperties).uniq();
+ },
+ getEmberObjectProperties: function(emberObject) {
+ var objectProperties, prototypeProperties;
+ prototypeProperties = Object.keys(emberObject.constructor.prototype);
+ objectProperties = this.getPojoProperties(emberObject);
+ return prototypeProperties.concat(objectProperties).uniq();
+ },
+ getEmberDataProperties: function(emberDataObject) {
+ var attributes, keys;
+ attributes = Ember.get(emberDataObject.constructor, 'attributes');
+ keys = Ember.get(attributes, 'keys.list');
+ return Ember.getProperties(emberDataObject, keys);
+ },
+ getObjectProperties: function(object) {
+ if (object instanceof DS.Model) {
+ return this.getEmberDataProperties(object);
+ } else if (object instanceof Ember.ObjectProxy || Ember._ProxyMixin.detect(object)) {
+ return this.getProxiedProperties(object);
+ } else if (object instanceof Ember.Object) {
+ return this.getEmberObjectProperties(object);
+ } else {
+ return this.getPojoProperties(object);
+ }
+ },
init: function() {
- var attr, c, key, _i, _len, _ref, _results;
+ var me, properties;
this._super();
+ me = this;
if ((this.get('content') != null) && Ember.typeOf(this.get('content')) === 'instance') {
- c = this.get('content');
- _ref = this.get('allowedProperties');
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- key = _ref[_i];
- if (c[key] != null) {
- this.set(key, c[key]);
- }
- }
+ properties = this.getObjectProperties(this.get('content'));
+ return this.getProperties(properties);
} else {
if (this.get('title') == null) {
- this.set('title', this.get('content'));
- }
- }
- _results = [];
- for (attr in this) {
- if (attr.match(/^data-[\w-]*$/) != null) {
- _results.push(this.attributeBindings.pushObject(attr));
+ return this.set('title', this.get('content'));
}
}
- return _results;
},
blockClass: (function() {
if (this.block) {
@@ -155,7 +178,10 @@
} else {
return null;
}
- }).property('block').cacheable(),
+ }).property('block'),
+ contentDismiss: (function() {
+ return this.get('content.dismiss');
+ }).property('content.dismiss'),
click: function(evt) {
if (!this.get('bubbles')) {
evt.stopPropagation();
@@ -165,7 +191,15 @@
loadingChanged: (function() {
var loading;
loading = this.get('loading') !== null ? this.get('loading') : "reset";
- return Ember.$("#" + this.elementId).button(loading);
+ if (loading !== 'reset' && Ember.isEmpty(this.get('reset'))) {
+ this.set('reset', this.$().html());
+ }
+ this.set('disabled', true);
+ this.$().html(this.get(loading));
+ if (loading === 'reset') {
+ this.set('disabled', false);
+ return this.set('reset', null);
+ }
}).observes('loading'),
icon: (function() {
if (this.get('isActive')) {
@@ -223,53 +257,136 @@ A collection of button groups
}).call(this);
-this["Ember"] = this["Ember"] || {};
-this["Ember"]["TEMPLATES"] = this["Ember"]["TEMPLATES"] || {};
-
-this["Ember"]["TEMPLATES"]["components/bs-button"] = Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data) {
-this.compilerInfo = [4,'>= 1.0.0'];
-helpers = this.merge(helpers, Ember.Handlebars.helpers); data = data || {};
- var buffer = '', stack1, hashTypes, hashContexts, helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, self=this;
-
-function program1(depth0,data) {
-
- var buffer = '', stack1, hashContexts, hashTypes, options;
- data.buffer.push("\n \n");
- return buffer;
- }
-
- hashTypes = {};
- hashContexts = {};
- stack1 = helpers['if'].call(depth0, "icon", {hash:{},inverse:self.noop,fn:self.program(1, program1, data),contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data});
- if(stack1 || stack1 === 0) { data.buffer.push(stack1); }
- data.buffer.push("\n");
- hashTypes = {};
- hashContexts = {};
- data.buffer.push(escapeExpression(helpers._triageMustache.call(depth0, "title", {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data})));
- hashTypes = {};
- hashContexts = {};
- data.buffer.push(escapeExpression(helpers._triageMustache.call(depth0, "yield", {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data})));
- return buffer;
-
-});
-this["Ember"] = this["Ember"] || {};
-this["Ember"]["TEMPLATES"] = this["Ember"]["TEMPLATES"] || {};
-
-this["Ember"]["TEMPLATES"]["components/bs-btn-toolbar"] = Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data) {
-this.compilerInfo = [4,'>= 1.0.0'];
-helpers = this.merge(helpers, Ember.Handlebars.helpers); data = data || {};
- var hashTypes, hashContexts, escapeExpression=this.escapeExpression;
-
-
- hashTypes = {};
- hashContexts = {};
- data.buffer.push(escapeExpression(helpers._triageMustache.call(depth0, "yield", {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data})));
-
-});
\ No newline at end of file
+Ember.TEMPLATES["components/bs-button"] = Ember.HTMLBars.template((function() {
+ var child0 = (function() {
+ return {
+ isHTMLBars: true,
+ revision: "Ember@1.11.0",
+ blockParams: 0,
+ cachedFragment: null,
+ hasRendered: false,
+ build: function build(dom) {
+ var el0 = dom.createDocumentFragment();
+ var el1 = dom.createTextNode(" ");
+ dom.appendChild(el0, el1);
+ var el1 = dom.createElement("i");
+ dom.appendChild(el0, el1);
+ var el1 = dom.createTextNode("\n");
+ dom.appendChild(el0, el1);
+ return el0;
+ },
+ render: function render(context, env, contextualElement) {
+ var dom = env.dom;
+ var hooks = env.hooks, element = hooks.element;
+ dom.detectNamespace(contextualElement);
+ var fragment;
+ if (env.useFragmentCache && dom.canClone) {
+ if (this.cachedFragment === null) {
+ fragment = this.build(dom);
+ if (this.hasRendered) {
+ this.cachedFragment = fragment;
+ } else {
+ this.hasRendered = true;
+ }
+ }
+ if (this.cachedFragment) {
+ fragment = dom.cloneNode(this.cachedFragment, true);
+ }
+ } else {
+ fragment = this.build(dom);
+ }
+ var element0 = dom.childAt(fragment, [1]);
+ element(env, element0, context, "bind-attr", [], {"class": "icon"});
+ return fragment;
+ }
+ };
+ }());
+ return {
+ isHTMLBars: true,
+ revision: "Ember@1.11.0",
+ blockParams: 0,
+ cachedFragment: null,
+ hasRendered: false,
+ build: function build(dom) {
+ var el0 = dom.createDocumentFragment();
+ var el1 = dom.createComment("");
+ dom.appendChild(el0, el1);
+ var el1 = dom.createComment("");
+ dom.appendChild(el0, el1);
+ var el1 = dom.createComment("");
+ dom.appendChild(el0, el1);
+ return el0;
+ },
+ render: function render(context, env, contextualElement) {
+ var dom = env.dom;
+ var hooks = env.hooks, get = hooks.get, block = hooks.block, content = hooks.content;
+ dom.detectNamespace(contextualElement);
+ var fragment;
+ if (env.useFragmentCache && dom.canClone) {
+ if (this.cachedFragment === null) {
+ fragment = this.build(dom);
+ if (this.hasRendered) {
+ this.cachedFragment = fragment;
+ } else {
+ this.hasRendered = true;
+ }
+ }
+ if (this.cachedFragment) {
+ fragment = dom.cloneNode(this.cachedFragment, true);
+ }
+ } else {
+ fragment = this.build(dom);
+ }
+ var morph0 = dom.createMorphAt(fragment,0,0,contextualElement);
+ var morph1 = dom.createMorphAt(fragment,1,1,contextualElement);
+ var morph2 = dom.createMorphAt(fragment,2,2,contextualElement);
+ dom.insertBoundary(fragment, null);
+ dom.insertBoundary(fragment, 0);
+ block(env, morph0, context, "if", [get(env, context, "icon")], {}, child0, null);
+ content(env, morph1, context, "title");
+ content(env, morph2, context, "yield");
+ return fragment;
+ }
+ };
+}()));
+Ember.TEMPLATES["components/bs-btn-toolbar"] = Ember.HTMLBars.template((function() {
+ return {
+ isHTMLBars: true,
+ revision: "Ember@1.11.0",
+ blockParams: 0,
+ cachedFragment: null,
+ hasRendered: false,
+ build: function build(dom) {
+ var el0 = dom.createDocumentFragment();
+ var el1 = dom.createComment("");
+ dom.appendChild(el0, el1);
+ return el0;
+ },
+ render: function render(context, env, contextualElement) {
+ var dom = env.dom;
+ var hooks = env.hooks, content = hooks.content;
+ dom.detectNamespace(contextualElement);
+ var fragment;
+ if (env.useFragmentCache && dom.canClone) {
+ if (this.cachedFragment === null) {
+ fragment = this.build(dom);
+ if (this.hasRendered) {
+ this.cachedFragment = fragment;
+ } else {
+ this.hasRendered = true;
+ }
+ }
+ if (this.cachedFragment) {
+ fragment = dom.cloneNode(this.cachedFragment, true);
+ }
+ } else {
+ fragment = this.build(dom);
+ }
+ var morph0 = dom.createMorphAt(fragment,0,0,contextualElement);
+ dom.insertBoundary(fragment, null);
+ dom.insertBoundary(fragment, 0);
+ content(env, morph0, context, "yield");
+ return fragment;
+ }
+ };
+}()));
\ No newline at end of file
diff --git a/dist/js/bs-button.min.js b/dist/js/bs-button.min.js
index 795af74..674c6d8 100644
--- a/dist/js/bs-button.min.js
+++ b/dist/js/bs-button.min.js
@@ -1 +1 @@
-+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d)};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(a){var b="disabled",c=this.$element,d=c.is("input")?"val":"html",e=c.data();a+="Text",e.resetText||c.data("resetText",c[d]()),c[d](e[a]||this.options[a]),setTimeout(function(){"loadingText"==a?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},b.prototype.toggle=function(){var a=this.$element.closest('[data-toggle="buttons"]');if(a.length){var b=this.$element.find("input").prop("checked",!this.$element.hasClass("active")).trigger("change");"radio"===b.prop("type")&&a.find(".active").removeClass("active")}this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(window.jQuery),function(){Bootstrap.BsButtonComponent=Ember.Component.extend(Bootstrap.TypeSupport,Bootstrap.SizeSupport,{layoutName:"components/bs-button",tagName:"button",classNames:["btn"],classNameBindings:["blockClass"],classTypePrefix:"btn",clickedParam:null,block:null,attributeBindings:["disabled","dismiss:data-dismiss","_type:type","style"],_type:"button",bubbles:!0,allowedProperties:["title","type","size","block","disabled","clicked","dismiss","class"],icon_active:void 0,icon_inactive:void 0},{init:function(){var a,b,c,d,e,f,g;if(this._super(),null!=this.get("content")&&"instance"===Ember.typeOf(this.get("content")))for(b=this.get("content"),f=this.get("allowedProperties"),d=0,e=f.length;e>d;d++)c=f[d],null!=b[c]&&this.set(c,b[c]);else null==this.get("title")&&this.set("title",this.get("content"));g=[];for(a in this)null!=a.match(/^data-[\w-]*$/)&&g.push(this.attributeBindings.pushObject(a));return g},blockClass:function(){return this.block?""+this.classTypePrefix+"-block":null}.property("block").cacheable(),click:function(a){return this.get("bubbles")||a.stopPropagation(),this.sendAction("clicked",this.get("clickedParam"))},loadingChanged:function(){var a;return a=null!==this.get("loading")?this.get("loading"):"reset",Ember.$("#"+this.elementId).button(a)}.observes("loading"),icon:function(){return this.get("isActive")?this.get("icon_active"):this.get("icon_inactive")}.property("isActive")}),Ember.Handlebars.helper("bs-button",Bootstrap.BsButtonComponent)}.call(this),function(){Bootstrap.BsBtnGroup=Bootstrap.ItemsView.extend(Bootstrap.SizeSupport,Bootstrap.ItemsSelection,{classTypePrefix:["btn-group"],classNames:["btn-group"],classNameBindings:["vertical:btn-group-vertical"],itemViewClass:Bootstrap.BsButtonComponent.extend(Bootstrap.ItemValue,Bootstrap.ItemSelection,{init:function(){return this._super(),this.set("icon_active",this.get("parentView.icon_active")),this.set("icon_inactive",this.get("parentView.icon_inactive"))}})}),Ember.Handlebars.helper("bs-btn-group",Bootstrap.BsBtnGroup)}.call(this),function(){Bootstrap.BsBtnToolbarComponent=Ember.Component.extend({layoutName:"components/bs-btn-toolbar",classNames:["btn-toolbar"]}),Ember.Handlebars.helper("bs-btn-toolbar",Bootstrap.BsBtnToolbarComponent)}.call(this),this.Ember=this.Ember||{},this.Ember.TEMPLATES=this.Ember.TEMPLATES||{},this.Ember.TEMPLATES["components/bs-button"]=Ember.Handlebars.template(function(a,b,c,d,e){function f(a,b){var d,e,f,g,h="";return b.buffer.push("\n \n"),h}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var g,h,i,j="",k=c.helperMissing,l=this.escapeExpression,m=this;return h={},i={},g=c["if"].call(b,"icon",{hash:{},inverse:m.noop,fn:m.program(1,f,e),contexts:[b],types:["ID"],hashContexts:i,hashTypes:h,data:e}),(g||0===g)&&e.buffer.push(g),e.buffer.push("\n"),h={},i={},e.buffer.push(l(c._triageMustache.call(b,"title",{hash:{},contexts:[b],types:["ID"],hashContexts:i,hashTypes:h,data:e}))),h={},i={},e.buffer.push(l(c._triageMustache.call(b,"yield",{hash:{},contexts:[b],types:["ID"],hashContexts:i,hashTypes:h,data:e}))),j}),this.Ember=this.Ember||{},this.Ember.TEMPLATES=this.Ember.TEMPLATES||{},this.Ember.TEMPLATES["components/bs-btn-toolbar"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f,g,h=this.escapeExpression;f={},g={},e.buffer.push(h(c._triageMustache.call(b,"yield",{hash:{},contexts:[b],types:["ID"],hashContexts:g,hashTypes:f,data:e})))});
\ No newline at end of file
++function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d)};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(a){var b="disabled",c=this.$element,d=c.is("input")?"val":"html",e=c.data();a+="Text",e.resetText||c.data("resetText",c[d]()),c[d](e[a]||this.options[a]),setTimeout(function(){"loadingText"==a?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},b.prototype.toggle=function(){var a=this.$element.closest('[data-toggle="buttons"]');if(a.length){var b=this.$element.find("input").prop("checked",!this.$element.hasClass("active")).trigger("change");"radio"===b.prop("type")&&a.find(".active").removeClass("active")}this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(window.jQuery),function(){Bootstrap.BsButtonComponent=Ember.Component.extend(Ember._ProxyMixin,Bootstrap.TypeSupport,Bootstrap.SizeSupport,{layoutName:"components/bs-button",tagName:"button",classNames:["btn"],classNameBindings:["blockClass"],classTypePrefix:"btn",clickedParam:null,block:null,attributeBindings:["disabled","dismiss:data-dismiss","contentDismiss:data-dismiss","_type:type","style"],_type:"button",bubbles:!0,allowedProperties:["title","type","size","block","disabled","clicked","dismiss","class"],icon_active:void 0,icon_inactive:void 0,getPojoProperties:function(a){return Ember.isEmpty(a)?[]:Object.keys(a)},getProxiedProperties:function(a){var b,c,d;return b=this.getObjectProperties(a.get("content")),d=Object.keys(a.constructor.prototype),c=this.getPojoProperties(a),b.concat(d).concat(c).uniq()},getEmberObjectProperties:function(a){var b,c;return c=Object.keys(a.constructor.prototype),b=this.getPojoProperties(a),c.concat(b).uniq()},getEmberDataProperties:function(a){var b,c;return b=Ember.get(a.constructor,"attributes"),c=Ember.get(b,"keys.list"),Ember.getProperties(a,c)},getObjectProperties:function(a){return a instanceof DS.Model?this.getEmberDataProperties(a):a instanceof Ember.ObjectProxy||Ember._ProxyMixin.detect(a)?this.getProxiedProperties(a):a instanceof Ember.Object?this.getEmberObjectProperties(a):this.getPojoProperties(a)},init:function(){var a,b;return this._super(),a=this,null!=this.get("content")&&"instance"===Ember.typeOf(this.get("content"))?(b=this.getObjectProperties(this.get("content")),this.getProperties(b)):null==this.get("title")?this.set("title",this.get("content")):void 0},blockClass:function(){return this.block?""+this.classTypePrefix+"-block":null}.property("block"),contentDismiss:function(){return this.get("content.dismiss")}.property("content.dismiss"),click:function(a){return this.get("bubbles")||a.stopPropagation(),this.sendAction("clicked",this.get("clickedParam"))},loadingChanged:function(){var a;return a=null!==this.get("loading")?this.get("loading"):"reset","reset"!==a&&Ember.isEmpty(this.get("reset"))&&this.set("reset",this.$().html()),this.set("disabled",!0),this.$().html(this.get(a)),"reset"===a?(this.set("disabled",!1),this.set("reset",null)):void 0}.observes("loading"),icon:function(){return this.get(this.get("isActive")?"icon_active":"icon_inactive")}.property("isActive")}),Ember.Handlebars.helper("bs-button",Bootstrap.BsButtonComponent)}.call(this),function(){Bootstrap.BsBtnGroup=Bootstrap.ItemsView.extend(Bootstrap.SizeSupport,Bootstrap.ItemsSelection,{classTypePrefix:["btn-group"],classNames:["btn-group"],classNameBindings:["vertical:btn-group-vertical"],itemViewClass:Bootstrap.BsButtonComponent.extend(Bootstrap.ItemValue,Bootstrap.ItemSelection,{init:function(){return this._super(),this.set("icon_active",this.get("parentView.icon_active")),this.set("icon_inactive",this.get("parentView.icon_inactive"))}})}),Ember.Handlebars.helper("bs-btn-group",Bootstrap.BsBtnGroup)}.call(this),function(){Bootstrap.BsBtnToolbarComponent=Ember.Component.extend({layoutName:"components/bs-btn-toolbar",classNames:["btn-toolbar"]}),Ember.Handlebars.helper("bs-btn-toolbar",Bootstrap.BsBtnToolbarComponent)}.call(this),Ember.TEMPLATES["components/bs-button"]=Ember.HTMLBars.template(function(){var a=function(){return{isHTMLBars:!0,revision:"Ember@1.11.0",blockParams:0,cachedFragment:null,hasRendered:!1,build:function(a){var b=a.createDocumentFragment(),c=a.createTextNode(" ");a.appendChild(b,c);var c=a.createElement("i");a.appendChild(b,c);var c=a.createTextNode("\n");return a.appendChild(b,c),b},render:function(a,b,c){var d=b.dom,e=b.hooks,f=e.element;d.detectNamespace(c);var g;b.useFragmentCache&&d.canClone?(null===this.cachedFragment&&(g=this.build(d),this.hasRendered?this.cachedFragment=g:this.hasRendered=!0),this.cachedFragment&&(g=d.cloneNode(this.cachedFragment,!0))):g=this.build(d);var h=d.childAt(g,[1]);return f(b,h,a,"bind-attr",[],{"class":"icon"}),g}}}();return{isHTMLBars:!0,revision:"Ember@1.11.0",blockParams:0,cachedFragment:null,hasRendered:!1,build:function(a){var b=a.createDocumentFragment(),c=a.createComment("");a.appendChild(b,c);var c=a.createComment("");a.appendChild(b,c);var c=a.createComment("");return a.appendChild(b,c),b},render:function(b,c,d){var e=c.dom,f=c.hooks,g=f.get,h=f.block,i=f.content;e.detectNamespace(d);var j;c.useFragmentCache&&e.canClone?(null===this.cachedFragment&&(j=this.build(e),this.hasRendered?this.cachedFragment=j:this.hasRendered=!0),this.cachedFragment&&(j=e.cloneNode(this.cachedFragment,!0))):j=this.build(e);var k=e.createMorphAt(j,0,0,d),l=e.createMorphAt(j,1,1,d),m=e.createMorphAt(j,2,2,d);return e.insertBoundary(j,null),e.insertBoundary(j,0),h(c,k,b,"if",[g(c,b,"icon")],{},a,null),i(c,l,b,"title"),i(c,m,b,"yield"),j}}}()),Ember.TEMPLATES["components/bs-btn-toolbar"]=Ember.HTMLBars.template(function(){return{isHTMLBars:!0,revision:"Ember@1.11.0",blockParams:0,cachedFragment:null,hasRendered:!1,build:function(a){var b=a.createDocumentFragment(),c=a.createComment("");return a.appendChild(b,c),b},render:function(a,b,c){var d=b.dom,e=b.hooks,f=e.content;d.detectNamespace(c);var g;b.useFragmentCache&&d.canClone?(null===this.cachedFragment&&(g=this.build(d),this.hasRendered?this.cachedFragment=g:this.hasRendered=!0),this.cachedFragment&&(g=d.cloneNode(this.cachedFragment,!0))):g=this.build(d);var h=d.createMorphAt(g,0,0,c);return d.insertBoundary(g,null),d.insertBoundary(g,0),f(b,h,a,"yield"),g}}}());
\ No newline at end of file
diff --git a/dist/js/bs-core.max.js b/dist/js/bs-core.max.js
index 6dbb9fe..54e3dc1 100644
--- a/dist/js/bs-core.max.js
+++ b/dist/js/bs-core.max.js
@@ -92,13 +92,16 @@
type: 'default',
typeClass: (function() {
var pref, type;
- type = this.get('type');
+ type = this.get('content.type');
+ if ((type == null) || typeof type === 'undefined') {
+ type = this.get('type');
+ }
if (type == null) {
type = 'default';
}
pref = this.get('classTypePrefix');
return "" + pref + "-" + type;
- }).property('type').cacheable()
+ }).property('type', 'content.type').cacheable()
});
}).call(this);
@@ -417,7 +420,7 @@ Views that inherits from this view can be enhanced with:
(function() {
Bootstrap.ItemPaneView = Ember.View.extend({
- template: Ember.Handlebars.compile(['{{#if view.content.template}}', '{{bsItemPanePartial view.content.template}}', '{{/if}}'].join("\n")),
+ templateName: 'views/item-pane',
corrItem: (function() {
var view, _i, _len, _ref;
if (this.get('parentView').get('corrItemsView') != null) {
@@ -474,3 +477,88 @@ Views that inherits from this view can be enhanced with:
});
}).call(this);
+
+Ember.TEMPLATES["app/templates/views/item-pane"] = Ember.HTMLBars.template((function() {
+ var child0 = (function() {
+ return {
+ isHTMLBars: true,
+ revision: "Ember@1.11.0",
+ blockParams: 0,
+ cachedFragment: null,
+ hasRendered: false,
+ build: function build(dom) {
+ var el0 = dom.createDocumentFragment();
+ var el1 = dom.createTextNode(" ");
+ dom.appendChild(el0, el1);
+ var el1 = dom.createComment("");
+ dom.appendChild(el0, el1);
+ var el1 = dom.createTextNode("\n");
+ dom.appendChild(el0, el1);
+ return el0;
+ },
+ render: function render(context, env, contextualElement) {
+ var dom = env.dom;
+ var hooks = env.hooks, get = hooks.get, inline = hooks.inline;
+ dom.detectNamespace(contextualElement);
+ var fragment;
+ if (env.useFragmentCache && dom.canClone) {
+ if (this.cachedFragment === null) {
+ fragment = this.build(dom);
+ if (this.hasRendered) {
+ this.cachedFragment = fragment;
+ } else {
+ this.hasRendered = true;
+ }
+ }
+ if (this.cachedFragment) {
+ fragment = dom.cloneNode(this.cachedFragment, true);
+ }
+ } else {
+ fragment = this.build(dom);
+ }
+ var morph0 = dom.createMorphAt(fragment,1,1,contextualElement);
+ inline(env, morph0, context, "bsItemPanePartial", [get(env, context, "view.content.template")], {});
+ return fragment;
+ }
+ };
+ }());
+ return {
+ isHTMLBars: true,
+ revision: "Ember@1.11.0",
+ blockParams: 0,
+ cachedFragment: null,
+ hasRendered: false,
+ build: function build(dom) {
+ var el0 = dom.createDocumentFragment();
+ var el1 = dom.createComment("");
+ dom.appendChild(el0, el1);
+ return el0;
+ },
+ render: function render(context, env, contextualElement) {
+ var dom = env.dom;
+ var hooks = env.hooks, get = hooks.get, block = hooks.block;
+ dom.detectNamespace(contextualElement);
+ var fragment;
+ if (env.useFragmentCache && dom.canClone) {
+ if (this.cachedFragment === null) {
+ fragment = this.build(dom);
+ if (this.hasRendered) {
+ this.cachedFragment = fragment;
+ } else {
+ this.hasRendered = true;
+ }
+ }
+ if (this.cachedFragment) {
+ fragment = dom.cloneNode(this.cachedFragment, true);
+ }
+ } else {
+ fragment = this.build(dom);
+ }
+ var morph0 = dom.createMorphAt(fragment,0,0,contextualElement);
+ dom.insertBoundary(fragment, null);
+ dom.insertBoundary(fragment, 0);
+ block(env, morph0, context, "if", [get(env, context, "view.content.template")], {}, child0, null);
+ return fragment;
+ }
+ };
+}()));
\ No newline at end of file
diff --git a/dist/js/bs-core.min.js b/dist/js/bs-core.min.js
index 37d145d..be7971b 100644
--- a/dist/js/bs-core.min.js
+++ b/dist/js/bs-core.min.js
@@ -1 +1 @@
-+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]}}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(window.jQuery),function(){var a;a=window.Bootstrap=Ember.Namespace.create()}.call(this),function(){var a,b;a=window.Bootstrap,b=Ember.get,a.WithRouter=Ember.Mixin.create({router:Ember.computed(function(){return b(this,"controller").container.lookup("router:main")})})}.call(this),function(){var a,b,c;a=window.Bootstrap,b=Ember.get,c=Ember.set,a.TypeSupport=Ember.Mixin.create({classTypePrefix:Ember.required(String),classNameBindings:["typeClass"],type:"default",typeClass:function(){var a,b;return b=this.get("type"),null==b&&(b="default"),a=this.get("classTypePrefix"),""+a+"-"+b}.property("type").cacheable()})}.call(this),function(){var a,b,c;a=window.Bootstrap,b=Ember.get,c=Ember.set,a.SizeSupport=Ember.Mixin.create({classTypePrefix:Ember.required(String),classNameBindings:["sizeClass","largeSizeClass","smallSizeClass","extraSmallSizeClass"],size:null,xs:null,small:null,large:null,extraSmallSizeClass:function(){var a;return a=this.get("classTypePrefix"),this.xs?""+a+"-xs":null}.property("xs").cacheable(),smallSizeClass:function(){var a;return a=this.get("classTypePrefix"),this.small?""+a+"-sm":null}.property("small").cacheable(),largeSizeClass:function(){var a;return a=this.get("classTypePrefix"),this.large?""+a+"-lg":null}.property("large").cacheable(),sizeClass:function(){var a,b;return b=this.get("size"),a=this.get("classTypePrefix"),b?""+a+"-"+b:null}.property("size").cacheable()})}.call(this),function(){Bootstrap.ItemValue=Ember.Mixin.create({value:function(){var a,b;return a=this.get("parentView"),null!=a?b=this.get("content"):void 0}.property("content").cacheable()})}.call(this),function(){Bootstrap.ItemSelection=Ember.Mixin.create(Bootstrap.ItemValue,Bootstrap.WithRouter,{classNameBindings:["isActive:active"],init:function(){return this._super(),this.didRouteChange()},didRouteChange:function(){var a,b,c;return b=this.get("content.linkTo"),null!=b&&(a=this.get("parentView"),null!=a)?(null!=(c=this.get("router"))?c.isActive(b):void 0)?a.set("selected",this.get("value")):void 0:void 0}.observes("router.url"),isActive:function(){var a,b,c;return a=this.get("parentView"),null==a?!1:(b=a.get("selected"),c=this.get("value"),null==c?!1:b===c)}.property("value","parentView.selected","content.linkTo").cacheable(),click:function(a){var b,c;return a.preventDefault(),c=this.get("parentView"),null==c||(b=this.get("content"),"object"==typeof b&&b.get("disabled")||null!=this.get("content.linkTo"))?void 0:c.set("selected",this.get("value"))}})}.call(this),function(){Bootstrap.ItemsSelection=Ember.Mixin.create({multiSelection:!1,selected:[]})}.call(this),function(){Bootstrap.Nav=Ember.Mixin.create({classNames:["nav"],classNameBindings:["navTypeClass"],tagName:"ul",navType:null,navTypeClass:function(){return null!=this.navType?"nav-"+this.navType:null}.property("navType").cacheable()})}.call(this),function(){Bootstrap.NavItem=Ember.Mixin.create(Bootstrap.SelectableView)}.call(this),function(){var a,b;a=function(a){var b,c;if(a&&(c=a.get("parentView")))return b=c instanceof Bootstrap.ItemsView,Ember.assert("The parent view must be an instance of Bootstrap.ItemsView or any inherited class",b),b?c:void 0},b=function(a,b,c){return"instance"===Ember.typeOf(a)||Ember.canInvoke(a,"get")?a.get(b):c},Bootstrap.ItemView=Ember.View.extend({isItem:!0,classNameBindings:["disabled"],title:function(){var c,d,e;if(e=a(this))return d=e.get("itemTitleKey")||"title",c=this.get("content"),b(c,d,c)}.property("content").cacheable(),disabled:function(){var c,d,e;if(e=a(this))return c=this.get("content"),d=!!b(c,"disabled",!1),d&&this.get("isActive")&&e.set("selected",null),d}.property("content","content.disabled").cacheable()})}.call(this),function(){Bootstrap.ItemsView=Ember.CollectionView.extend({didInsertElement:function(){var a,b,c,d,e,f;if(this.get("default")){for(a=this.get("default"),e=this._childViews,c=0,d=e.length;d>c;c++)b=e[c],(null!=(f=b.get("content"))?f.get("title"):void 0)===a&&this.set("selected",b.get("content"));return Ember.assert("Could not activate default tab "+a+" as it doesnt exist",a)}}})}.call(this),function(){Bootstrap.ItemPaneView=Ember.View.extend({template:Ember.Handlebars.compile(["{{#if view.content.template}}","{{bsItemPanePartial view.content.template}}","{{/if}}"].join("\n")),corrItem:function(){var a,b,c,d;if(null!=this.get("parentView").get("corrItemsView"))for(d=this.get("parentView").get("corrItemsView")._childViews,b=0,c=d.length;c>b;b++)if(a=d[b],a.content===this.get("content"))return a}.property("parentView.corrItemsView"),isVisible:function(){var a;return null!=(a=this.get("corrItem"))?a.get("isActive"):void 0}.property("corrItem.isActive"),controller:function(){var a,b;return a=this.get("parentView.controller"),this.get("content.controller")&&(b=this.get("container").lookup("controller:"+this.get("content.controller")),b&&(a=b)),a}.property("content")}),Ember.Handlebars.helper("bsItemPanePartial",function(a,b){var c,d;return d=b.data.view,c=d.templateForName(a),Ember.assert("Unable to find template with name '"+a+"'",c),c(this,{data:b.data})})}.call(this),function(){Bootstrap.ItemsPanesView=Ember.CollectionView.extend({viewsInserted:!1,corrItemsView:function(){var a;return a=Ember.View.views[this.get("items-id")]}.property("viewsInserted"),didInsertElement:function(){return this._super(),this.set("viewsInserted",!0)}})}.call(this);
\ No newline at end of file
++function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]}}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(window.jQuery),function(){var a;a=window.Bootstrap=Ember.Namespace.create()}.call(this),function(){var a,b;a=window.Bootstrap,b=Ember.get,a.WithRouter=Ember.Mixin.create({router:Ember.computed(function(){return b(this,"controller").container.lookup("router:main")})})}.call(this),function(){var a,b,c;a=window.Bootstrap,b=Ember.get,c=Ember.set,a.TypeSupport=Ember.Mixin.create({classTypePrefix:Ember.required(String),classNameBindings:["typeClass"],type:"default",typeClass:function(){var a,b;return b=this.get("content.type"),(null==b||"undefined"==typeof b)&&(b=this.get("type")),null==b&&(b="default"),a=this.get("classTypePrefix"),""+a+"-"+b}.property("type","content.type").cacheable()})}.call(this),function(){var a,b,c;a=window.Bootstrap,b=Ember.get,c=Ember.set,a.SizeSupport=Ember.Mixin.create({classTypePrefix:Ember.required(String),classNameBindings:["sizeClass","largeSizeClass","smallSizeClass","extraSmallSizeClass"],size:null,xs:null,small:null,large:null,extraSmallSizeClass:function(){var a;return a=this.get("classTypePrefix"),this.xs?""+a+"-xs":null}.property("xs").cacheable(),smallSizeClass:function(){var a;return a=this.get("classTypePrefix"),this.small?""+a+"-sm":null}.property("small").cacheable(),largeSizeClass:function(){var a;return a=this.get("classTypePrefix"),this.large?""+a+"-lg":null}.property("large").cacheable(),sizeClass:function(){var a,b;return b=this.get("size"),a=this.get("classTypePrefix"),b?""+a+"-"+b:null}.property("size").cacheable()})}.call(this),function(){Bootstrap.ItemValue=Ember.Mixin.create({value:function(){var a,b;return a=this.get("parentView"),null!=a?b=this.get("content"):void 0}.property("content").cacheable()})}.call(this),function(){Bootstrap.ItemSelection=Ember.Mixin.create(Bootstrap.ItemValue,Bootstrap.WithRouter,{classNameBindings:["isActive:active"],init:function(){return this._super(),this.didRouteChange()},didRouteChange:function(){var a,b,c;return b=this.get("content.linkTo"),null!=b&&(a=this.get("parentView"),null!=a)&&(null!=(c=this.get("router"))?c.isActive(b):void 0)?a.set("selected",this.get("value")):void 0}.observes("router.url"),isActive:function(){var a,b,c;return a=this.get("parentView"),null==a?!1:(b=a.get("selected"),c=this.get("value"),null==c?!1:b===c)}.property("value","parentView.selected","content.linkTo").cacheable(),click:function(a){var b,c;return a.preventDefault(),c=this.get("parentView"),null==c||(b=this.get("content"),"object"==typeof b&&b.get("disabled")||null!=this.get("content.linkTo"))?void 0:c.set("selected",this.get("value"))}})}.call(this),function(){Bootstrap.ItemsSelection=Ember.Mixin.create({multiSelection:!1,selected:[]})}.call(this),function(){Bootstrap.Nav=Ember.Mixin.create({classNames:["nav"],classNameBindings:["navTypeClass"],tagName:"ul",navType:null,navTypeClass:function(){return null!=this.navType?"nav-"+this.navType:null}.property("navType").cacheable()})}.call(this),function(){Bootstrap.NavItem=Ember.Mixin.create(Bootstrap.SelectableView)}.call(this),function(){var a,b;a=function(a){var b,c;if(a&&(c=a.get("parentView")))return b=c instanceof Bootstrap.ItemsView,Ember.assert("The parent view must be an instance of Bootstrap.ItemsView or any inherited class",b),b?c:void 0},b=function(a,b,c){return"instance"===Ember.typeOf(a)||Ember.canInvoke(a,"get")?a.get(b):c},Bootstrap.ItemView=Ember.View.extend({isItem:!0,classNameBindings:["disabled"],title:function(){var c,d,e;if(e=a(this))return d=e.get("itemTitleKey")||"title",c=this.get("content"),b(c,d,c)}.property("content").cacheable(),disabled:function(){var c,d,e;if(e=a(this))return c=this.get("content"),d=!!b(c,"disabled",!1),d&&this.get("isActive")&&e.set("selected",null),d}.property("content","content.disabled").cacheable()})}.call(this),function(){Bootstrap.ItemsView=Ember.CollectionView.extend({didInsertElement:function(){var a,b,c,d,e,f;if(this.get("default")){for(a=this.get("default"),e=this._childViews,c=0,d=e.length;d>c;c++)b=e[c],(null!=(f=b.get("content"))?f.get("title"):void 0)===a&&this.set("selected",b.get("content"));return Ember.assert("Could not activate default tab "+a+" as it doesnt exist",a)}}})}.call(this),function(){Bootstrap.ItemPaneView=Ember.View.extend({templateName:"views/item-pane",corrItem:function(){var a,b,c,d;if(null!=this.get("parentView").get("corrItemsView"))for(d=this.get("parentView").get("corrItemsView")._childViews,b=0,c=d.length;c>b;b++)if(a=d[b],a.content===this.get("content"))return a}.property("parentView.corrItemsView"),isVisible:function(){var a;return null!=(a=this.get("corrItem"))?a.get("isActive"):void 0}.property("corrItem.isActive"),controller:function(){var a,b;return a=this.get("parentView.controller"),this.get("content.controller")&&(b=this.get("container").lookup("controller:"+this.get("content.controller")),b&&(a=b)),a}.property("content")}),Ember.Handlebars.helper("bsItemPanePartial",function(a,b){var c,d;return d=b.data.view,c=d.templateForName(a),Ember.assert("Unable to find template with name '"+a+"'",c),c(this,{data:b.data})})}.call(this),function(){Bootstrap.ItemsPanesView=Ember.CollectionView.extend({viewsInserted:!1,corrItemsView:function(){var a;return a=Ember.View.views[this.get("items-id")]}.property("viewsInserted"),didInsertElement:function(){return this._super(),this.set("viewsInserted",!0)}})}.call(this),Ember.TEMPLATES["app/templates/views/item-pane"]=Ember.HTMLBars.template(function(){var a=function(){return{isHTMLBars:!0,revision:"Ember@1.11.0",blockParams:0,cachedFragment:null,hasRendered:!1,build:function(a){var b=a.createDocumentFragment(),c=a.createTextNode(" ");a.appendChild(b,c);var c=a.createComment("");a.appendChild(b,c);var c=a.createTextNode("\n");return a.appendChild(b,c),b},render:function(a,b,c){var d=b.dom,e=b.hooks,f=e.get,g=e.inline;d.detectNamespace(c);var h;b.useFragmentCache&&d.canClone?(null===this.cachedFragment&&(h=this.build(d),this.hasRendered?this.cachedFragment=h:this.hasRendered=!0),this.cachedFragment&&(h=d.cloneNode(this.cachedFragment,!0))):h=this.build(d);var i=d.createMorphAt(h,1,1,c);return g(b,i,a,"bsItemPanePartial",[f(b,a,"view.content.template")],{}),h}}}();return{isHTMLBars:!0,revision:"Ember@1.11.0",blockParams:0,cachedFragment:null,hasRendered:!1,build:function(a){var b=a.createDocumentFragment(),c=a.createComment("");return a.appendChild(b,c),b},render:function(b,c,d){var e=c.dom,f=c.hooks,g=f.get,h=f.block;e.detectNamespace(d);var i;c.useFragmentCache&&e.canClone?(null===this.cachedFragment&&(i=this.build(e),this.hasRendered?this.cachedFragment=i:this.hasRendered=!0),this.cachedFragment&&(i=e.cloneNode(this.cachedFragment,!0))):i=this.build(e);var j=e.createMorphAt(i,0,0,d);return e.insertBoundary(i,null),e.insertBoundary(i,0),h(c,j,b,"if",[g(c,b,"view.content.template")],{},a,null),i}}}());
\ No newline at end of file
diff --git a/dist/js/bs-growl-notifications.min.js b/dist/js/bs-growl-notifications.min.js
index 0ba20d8..0d82ff3 100644
--- a/dist/js/bs-growl-notifications.min.js
+++ b/dist/js/bs-growl-notifications.min.js
@@ -1 +1 @@
-!function(){Bootstrap.GrowlNotifications=Ember.CollectionView.extend({classNames:["growl-notifications"],contentBinding:"Bootstrap.GNM.notifications",attributeBindings:["style"],showTime:1e4,itemViewClass:Ember.View.extend({classNames:["growl-notification"],template:Ember.Handlebars.compile('\n\n \n\n\n {{view.content.title}}\n\n
\n {{view.content.sub}}\n
'),classNameBindings:[":growl-notification","content.closed","isOpaque"],attributeBindings:["style"],timeoutId:null,isOpaque:!1,init:function(){var a,b=this;return this._super(),a=function(){return b.notifyPropertyChange("style")},this.set("_recomputeStyle",a),$(window).bind("resize",a)},didInsertElement:function(){var a=this;return this.set("timeoutId",setTimeout(function(){return a.send("close")},this.get("parentView.showTime"))),Ember.run.later(this,function(){return this.set("isOpaque",!0)},1)},willDestroyElement:function(){return $(window).unbind("resize",this.get("_recomputeStyle"))},style:function(){var a,b,c,d,e,f,g,h,i,j;return c=this.get("parentView.content").rejectProperty("closed",!0),b=c.indexOf(this.get("content")),j=$(window).height(),g=80,h=320,i=Math.floor(j/g),a=Math.floor(b/i),e=b%i,-1===b?"":(f=e*g,d=a*h,"top: "+f+"px; right: "+d+"px;")}.property("parentView.content.@each.closed"),iconType:function(){var a,b;return b=this.get("content.type"),a={info:"fa-bullhorn",success:"fa-check",warning:"fa-exclamation",danger:"fa-times"},a[b]||""}.property("content.type"),actions:{close:function(){var a=this;return this.set("isOpaque",!1),setTimeout(function(){return a.get("parentView.content").removeObject(a.get("content")),clearTimeout(a.get("timeoutId"))},300)}}})}),Ember.Handlebars.helper("bs-growl-notifications",Bootstrap.GrowlNotifications),Bootstrap.GNM=Bootstrap.GrowlNotificationManager=Ember.Object.create({notifications:Ember.A(),push:function(a,b,c){var d;return c=null!=c?c:c="info",d=Bootstrap.Notification.create({title:a,sub:b,type:c,closed:!1}),this.get("notifications").pushObject(d)}}),Bootstrap.GrowlNotification=Ember.Object.extend()}.call(this);
\ No newline at end of file
+(function(){Bootstrap.GrowlNotifications=Ember.CollectionView.extend({classNames:["growl-notifications"],contentBinding:"Bootstrap.GNM.notifications",attributeBindings:["style"],showTime:1e4,itemViewClass:Ember.View.extend({classNames:["growl-notification"],template:Ember.Handlebars.compile('\n\n \n\n\n {{view.content.title}}\n\n
\n {{view.content.sub}}\n
'),classNameBindings:[":growl-notification","content.closed","isOpaque"],attributeBindings:["style"],timeoutId:null,isOpaque:!1,init:function(){var a,b=this;return this._super(),a=function(){return b.notifyPropertyChange("style")},this.set("_recomputeStyle",a),$(window).bind("resize",a)},didInsertElement:function(){var a=this;return this.set("timeoutId",setTimeout(function(){return a.send("close")},this.get("parentView.showTime"))),Ember.run.later(this,function(){return this.set("isOpaque",!0)},1)},willDestroyElement:function(){return $(window).unbind("resize",this.get("_recomputeStyle"))},style:function(){var a,b,c,d,e,f,g,h,i,j;return c=this.get("parentView.content").rejectProperty("closed",!0),b=c.indexOf(this.get("content")),j=$(window).height(),g=80,h=320,i=Math.floor(j/g),a=Math.floor(b/i),e=b%i,-1===b?"":(f=e*g,d=a*h,"top: "+f+"px; right: "+d+"px;")}.property("parentView.content.@each.closed"),iconType:function(){var a,b;return b=this.get("content.type"),a={info:"fa-bullhorn",success:"fa-check",warning:"fa-exclamation",danger:"fa-times"},a[b]||""}.property("content.type"),actions:{close:function(){var a=this;return this.set("isOpaque",!1),setTimeout(function(){return a.get("parentView.content").removeObject(a.get("content")),clearTimeout(a.get("timeoutId"))},300)}}})}),Ember.Handlebars.helper("bs-growl-notifications",Bootstrap.GrowlNotifications),Bootstrap.GNM=Bootstrap.GrowlNotificationManager=Ember.Object.create({notifications:Ember.A(),push:function(a,b,c){var d;return c=null!=c?c:c="info",d=Bootstrap.Notification.create({title:a,sub:b,type:c,closed:!1}),this.get("notifications").pushObject(d)}}),Bootstrap.GrowlNotification=Ember.Object.extend()}).call(this);
\ No newline at end of file
diff --git a/dist/js/bs-items-action-bar.min.js b/dist/js/bs-items-action-bar.min.js
index c11126b..f1c058b 100644
--- a/dist/js/bs-items-action-bar.min.js
+++ b/dist/js/bs-items-action-bar.min.js
@@ -1 +1 @@
-!function(){Bootstrap.ItemsActionBar=Ember.CollectionView.extend({classNames:"btn-toolbar",classNameBindings:"rtl:pull-right",role:"toolbar",selectedItems:[],rtl:!1,selection:function(){var a;return a=this.get("selectedItems"),null==a?[]:Array.isArray(a)?a:[a]}.property("selectedItems"),itemViewClass:Ember.CollectionView.extend({tagName:["div"],classNames:["btn-group"],itemViewClass:Ember.View.extend({tagName:"button",classNames:["btn","btn-default"],attributeBindings:["disabled"],template:Ember.Handlebars.compile(" {{#if view.content.transitionTo}} {{link-to view.content.title view.content.transitionTo tagName='div'}} {{else}} {{view.content.title}} {{/if}} "),disabled:function(){var a;return"function"==typeof(a=this.get("content.disabled"))?a(this.get("parentView.parentView.selection")):void 0}.property("parentView.parentView.selection.@each","parentView.parentView.selection"),click:function(){return null!=this.get("content.clickActionName")?this.get("controller").send(this.get("content.clickActionName"),this.get("parentView.parentView.selection")):this.get("content.click")?this.get("content.click")(this.get("parentView.parentView.selection")):void 0}})})}),Ember.Handlebars.helper("bs-items-action-bar",Bootstrap.ItemsActionBar)}.call(this);
\ No newline at end of file
+(function(){Bootstrap.ItemsActionBar=Ember.CollectionView.extend({classNames:"btn-toolbar",classNameBindings:"rtl:pull-right",role:"toolbar",selectedItems:[],rtl:!1,selection:function(){var a;return a=this.get("selectedItems"),null==a?[]:Array.isArray(a)?a:[a]}.property("selectedItems"),itemViewClass:Ember.CollectionView.extend({tagName:["div"],classNames:["btn-group"],itemViewClass:Ember.View.extend({tagName:"button",classNames:["btn","btn-default"],attributeBindings:["disabled"],template:Ember.Handlebars.compile(" {{#if view.content.transitionTo}} {{link-to view.content.title view.content.transitionTo tagName='div'}} {{else}} {{view.content.title}} {{/if}} "),disabled:function(){var a;return"function"==typeof(a=this.get("content.disabled"))?a(this.get("parentView.parentView.selection")):void 0}.property("parentView.parentView.selection.@each","parentView.parentView.selection"),click:function(){return null!=this.get("content.clickActionName")?this.get("controller").send(this.get("content.clickActionName"),this.get("parentView.parentView.selection")):this.get("content.click")?this.get("content.click")(this.get("parentView.parentView.selection")):void 0}})})}),Ember.Handlebars.helper("bs-items-action-bar",Bootstrap.ItemsActionBar)}).call(this);
\ No newline at end of file
diff --git a/dist/js/bs-label.max.js b/dist/js/bs-label.max.js
index 6b2e30b..3490c98 100644
--- a/dist/js/bs-label.max.js
+++ b/dist/js/bs-label.max.js
@@ -10,17 +10,44 @@
}).call(this);
-this["Ember"] = this["Ember"] || {};
-this["Ember"]["TEMPLATES"] = this["Ember"]["TEMPLATES"] || {};
-
-this["Ember"]["TEMPLATES"]["components/bs-label"] = Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data) {
-this.compilerInfo = [4,'>= 1.0.0'];
-helpers = this.merge(helpers, Ember.Handlebars.helpers); data = data || {};
- var hashTypes, hashContexts, escapeExpression=this.escapeExpression;
-
-
- hashTypes = {};
- hashContexts = {};
- data.buffer.push(escapeExpression(helpers._triageMustache.call(depth0, "content", {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data})));
-
-});
\ No newline at end of file
+Ember.TEMPLATES["components/bs-label"] = Ember.HTMLBars.template((function() {
+ return {
+ isHTMLBars: true,
+ revision: "Ember@1.11.0",
+ blockParams: 0,
+ cachedFragment: null,
+ hasRendered: false,
+ build: function build(dom) {
+ var el0 = dom.createDocumentFragment();
+ var el1 = dom.createComment("");
+ dom.appendChild(el0, el1);
+ return el0;
+ },
+ render: function render(context, env, contextualElement) {
+ var dom = env.dom;
+ var hooks = env.hooks, content = hooks.content;
+ dom.detectNamespace(contextualElement);
+ var fragment;
+ if (env.useFragmentCache && dom.canClone) {
+ if (this.cachedFragment === null) {
+ fragment = this.build(dom);
+ if (this.hasRendered) {
+ this.cachedFragment = fragment;
+ } else {
+ this.hasRendered = true;
+ }
+ }
+ if (this.cachedFragment) {
+ fragment = dom.cloneNode(this.cachedFragment, true);
+ }
+ } else {
+ fragment = this.build(dom);
+ }
+ var morph0 = dom.createMorphAt(fragment,0,0,contextualElement);
+ dom.insertBoundary(fragment, null);
+ dom.insertBoundary(fragment, 0);
+ content(env, morph0, context, "content");
+ return fragment;
+ }
+ };
+}()));
\ No newline at end of file
diff --git a/dist/js/bs-label.min.js b/dist/js/bs-label.min.js
index 1e1fef6..c20e79c 100644
--- a/dist/js/bs-label.min.js
+++ b/dist/js/bs-label.min.js
@@ -1 +1 @@
-!function(){Bootstrap.BsLabelComponent=Ember.Component.extend(Bootstrap.TypeSupport,{layoutName:"components/bs-label",tagName:"span",classNames:["label"],classTypePrefix:"label"}),Ember.Handlebars.helper("bs-label",Bootstrap.BsLabelComponent)}.call(this),this.Ember=this.Ember||{},this.Ember.TEMPLATES=this.Ember.TEMPLATES||{},this.Ember.TEMPLATES["components/bs-label"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f,g,h=this.escapeExpression;f={},g={},e.buffer.push(h(c._triageMustache.call(b,"content",{hash:{},contexts:[b],types:["ID"],hashContexts:g,hashTypes:f,data:e})))});
\ No newline at end of file
+(function(){Bootstrap.BsLabelComponent=Ember.Component.extend(Bootstrap.TypeSupport,{layoutName:"components/bs-label",tagName:"span",classNames:["label"],classTypePrefix:"label"}),Ember.Handlebars.helper("bs-label",Bootstrap.BsLabelComponent)}).call(this),Ember.TEMPLATES["components/bs-label"]=Ember.HTMLBars.template(function(){return{isHTMLBars:!0,revision:"Ember@1.11.0",blockParams:0,cachedFragment:null,hasRendered:!1,build:function(a){var b=a.createDocumentFragment(),c=a.createComment("");return a.appendChild(b,c),b},render:function(a,b,c){var d=b.dom,e=b.hooks,f=e.content;d.detectNamespace(c);var g;b.useFragmentCache&&d.canClone?(null===this.cachedFragment&&(g=this.build(d),this.hasRendered?this.cachedFragment=g:this.hasRendered=!0),this.cachedFragment&&(g=d.cloneNode(this.cachedFragment,!0))):g=this.build(d);var h=d.createMorphAt(g,0,0,c);return d.insertBoundary(g,null),d.insertBoundary(g,0),f(b,h,a,"content"),g}}}());
\ No newline at end of file
diff --git a/dist/js/bs-list-group.min.js b/dist/js/bs-list-group.min.js
index b706f21..4399d8d 100644
--- a/dist/js/bs-list-group.min.js
+++ b/dist/js/bs-list-group.min.js
@@ -1 +1 @@
-!function(){Bootstrap.BsListGroupComponent=Bootstrap.ItemsView.extend({tagName:"ul",classNames:["list-group"],itemViewClass:Bootstrap.ItemView.extend(Bootstrap.ItemSelection,{classNames:["list-group-item"],template:Ember.Handlebars.compile('{{#if view.badge}}\n {{bs-badge contentBinding="view.badge"}}\n{{/if}}\n{{#if view.sub}}\n
{{view.title}}
\n
{{view.sub}}
\n{{else}}\n {{view.title}}\n{{/if}}'),badge:function(){var a;return a=this.get("content"),"instance"===Ember.typeOf(a)||Ember.canInvoke(a,"get")?a.get("badge"):null}.property("content"),sub:function(){var a;return a=this.get("content"),"instance"===Ember.typeOf(a)||Ember.canInvoke(a,"get")?a.get("sub"):null}.property("content")})}),Ember.Handlebars.helper("bs-list-group",Bootstrap.BsListGroupComponent)}.call(this);
\ No newline at end of file
+(function(){Bootstrap.BsListGroupComponent=Bootstrap.ItemsView.extend({tagName:"ul",classNames:["list-group"],itemViewClass:Bootstrap.ItemView.extend(Bootstrap.ItemSelection,{classNames:["list-group-item"],template:Ember.Handlebars.compile('{{#if view.badge}}\n {{bs-badge contentBinding="view.badge"}}\n{{/if}}\n{{#if view.sub}}\n
\n '),d.buffer.push(g((b["bs-alert"]||a&&a["bs-alert"]||f).call(a,{name:"bs-alert",hash:{type:"warning",message:"A warning alert with simple message."},hashTypes:{type:"STRING",message:"STRING"},hashContexts:{type:a,message:a},types:[],contexts:[],data:d}))),d.buffer.push('\n
\n\n
{{bs-alert message="A warning alert with simple message." type="warning"}}
\n
\n '),d.buffer.push(g((b["bs-alert"]||a&&a["bs-alert"]||f).call(a,{name:"bs-alert",hash:{dismiss:!0,type:"warning",message:"With close button"},hashTypes:{dismiss:"BOOLEAN",type:"STRING",message:"STRING"},hashContexts:{dismiss:a,type:a,message:a},types:[],contexts:[],data:d}))),d.buffer.push('\n
\n\n
{{bs-alert message="With close button" type="warning" dismiss=true}}
\n
\n '),d.buffer.push(g((b["bs-alert"]||a&&a["bs-alert"]||f).call(a,{name:"bs-alert",hash:{fade:!0,dismiss:!0,type:"warning",message:"Close button will fade"},hashTypes:{fade:"BOOLEAN",dismiss:"BOOLEAN",type:"STRING",message:"STRING"},hashContexts:{fade:a,dismiss:a,type:a,message:a},types:[],contexts:[],data:d}))),d.buffer.push('\n
\n\n
{{bs-alert message="Close button will fade" type="warning" dismiss=true fade=true}}
\n
\n '),d.buffer.push(g((b["bs-alert"]||a&&a["bs-alert"]||f).call(a,{name:"bs-alert",hash:{dismissAfter:5,fade:!0,type:"info",message:"Dismissed after 5 seconds!!"},hashTypes:{dismissAfter:"NUMBER",fade:"BOOLEAN",type:"STRING",message:"STRING"},hashContexts:{dismissAfter:a,fade:a,type:a,message:a},types:[],contexts:[],data:d}))),d.buffer.push('\n
\n\n
{{bs-alert message="Dismissed after 5 seconds" type="info" dismissAfter=5}}
\n
\n '),d.buffer.push(g((b["bs-alert"]||a&&a["bs-alert"]||f).call(a,{name:"bs-alert",hash:{type:"success",message:"Other types such as Sucess"},hashTypes:{type:"STRING",message:"STRING"},hashContexts:{type:a,message:a},types:[],contexts:[],data:d}))),d.buffer.push('\n
\n\n
{{bs-alert message="Other types such as Sucess" type="success"}}
{{#bs-alert type="danger"}}\n<h4 class="alert-heading">Oh snap! You got an error!</h4>\n<p>Alert can also be used in a <strong>block form</strong>.</p>\n<p>\n<button class="btn btn-danger" {{action "submit"}}>Take this action</button> <a class="btn btn-default">Or do this</a>\n</p>\n{{/bs-alert}}
\n
\n '),d.buffer.push(g((b["bs-alert"]||a&&a["bs-alert"]||f).call(a,{name:"bs-alert",hash:{close:"didAlertClose",closed:"didAlertClosed",dismiss:!0,type:"warning",message:"Close will trigger a function in controller"},hashTypes:{close:"STRING",closed:"STRING",dismiss:"BOOLEAN",type:"STRING",message:"STRING"},hashContexts:{close:a,closed:a,dismiss:a,type:a,message:a},types:[],contexts:[],data:d}))),d.buffer.push('\n
\n\n
{{bs-alert message="Close will trigger a function in controller" type="warning" dismiss=true closed="didAlertClosed" close="didAlertClose"}}
\n
Component Properties
\n
\n
\n \n
\n
Property
\n
Description
\n
\n \n \n
\n
message
\n
The string to display in the alert.
\n
\n
\n
type
\n
Alert types: success | info | warning | danger
\n
\n
\n
dismiss
\n
if true an X link is set to dismiss the alert.
\n
\n
\n
dismissAfter
\n
If set the alert will be automatically dismissed after the specified amount of seconds
\n
\n
\n
fade
\n
If true, the dialog will be faded out when closed.
\n
\n
\n
close
\n
Triggers the specified function name on the controller immediately when the close instance method is called.
\n
\n
\n
closed
\n
Triggers the specified function name on the controller when the alert has been closed (will wait for CSS transitions to complete).
\n')},useData:!0}),Ember.TEMPLATES["show_components/button"]=Ember.HTMLBars.template({1:function(a,b,c,d){d.buffer.push("Content")},3:function(a,b,c,d){d.buffer.push("Primary")},5:function(a,b,c,d){d.buffer.push("Link")},7:function(a,b,c,d){d.buffer.push("Default Large button")},9:function(a,b,c,d){d.buffer.push("Block Button")},11:function(a,b,c,d){d.buffer.push("Disabled Button")},13:function(a,b,c,d){d.buffer.push("Button with Param")},compiler:[6,">= 2.0.0-beta.1"],main:function(a,b,c,d){var e,f,g,h="function",i=b.helperMissing,j=b.blockHelperMissing,k=this.escapeExpression,l="";return d.buffer.push('
All other types such as info, warning, danger are supported.
\n
\n\n\n
<!-- Standard gray default button with gradient -->\n{{#bs-button}}Content{{/bs-button}}\n\n<!--Inline text as button content-->\n{{bs-button title="Inline Text"}}\n\n<!-- Provides extra visual weight and identifies the primary action in a set of buttons -->\n{{#bs-button type="primary"}}Primary{{/bs-button}}\n\n<!-- Deemphasize a button by making it look like a link while maintaining button behavior -->\n{{#bs-button type="link"}}Link{{/bs-button}}
\n
Sizes
\n
In correspondence with bootstrap css class button sizes .btn-lg, .btn-sm, or .btn-xs, size can simply defined by the size property or use one of the size properties: small=true, large=true, xs=true
\n
\n
\n '),d.buffer.push(k((b["bs-button"]||a&&a["bs-button"]||i).call(a,{name:"bs-button",hash:{title:"Primary Extra Small Button",size:"xs",type:"primary"},hashTypes:{title:"STRING",size:"STRING",type:"STRING"},hashContexts:{title:a,size:a,type:a},types:[],contexts:[],data:d}))),d.buffer.push("\n "),d.buffer.push(k((b["bs-button"]||a&&a["bs-button"]||i).call(a,{name:"bs-button",hash:{title:"Info Small Button",small:!0,type:"info"},hashTypes:{title:"STRING",small:"BOOLEAN",type:"STRING"},hashContexts:{title:a,small:a,type:a},types:[],contexts:[],data:d}))),d.buffer.push("\n "),d.buffer.push(k((b["bs-button"]||a&&a["bs-button"]||i).call(a,{name:"bs-button",hash:{title:"Danger Default size button",type:"danger"},hashTypes:{title:"STRING",type:"STRING"},hashContexts:{title:a,type:a},types:[],contexts:[],data:d}))),d.buffer.push("\n "),e=(b["bs-button"]||a&&a["bs-button"]||i).call(a,{name:"bs-button",hash:{size:"lg"},hashTypes:{size:"STRING"},hashContexts:{size:a},fn:this.program(7,d),inverse:this.noop,types:[],contexts:[],data:d}),null!=e&&d.buffer.push(e),d.buffer.push('\n
\n
\n\n
{{bs-button type="primary" size="xs" title="Primary Extra Small Button"}}\n{{bs-button type="info" small=true title="Info Small Button"}}\n{{bs-button type="danger" title="Danger Default size button"}}\n{{#bs-button size="lg"}}Default Large button{{/bs-button}}
\n
Icon
\n
\n
\n '),d.buffer.push(k((b["bs-button"]||a&&a["bs-button"]||i).call(a,{name:"bs-button",hash:{title:"Button with Icon",icon:"fa fa-check"},hashTypes:{title:"STRING",icon:"STRING"},hashContexts:{title:a,icon:a},types:[],contexts:[],data:d}))),d.buffer.push('\n
\n
\n\n
Simply add an icon property to the button meta data, such:
Disabled state can also be hooked to a controller property
\n
\n '),d.buffer.push(k((b["bs-button"]||a&&a["bs-button"]||i).call(a,{name:"bs-button",hash:{clicked:"disableButton",disabled:"isButtonDisabled",title:"Click to disable",type:"primary"},hashTypes:{clicked:"STRING",disabled:"ID",title:"STRING",type:"STRING"},hashContexts:{clicked:a,disabled:a,title:a,type:a},types:[],contexts:[],data:d}))),d.buffer.push('\n
\n\n
{{bs-button type="primary" title="Click to disable" disabled=isButtonDisabled clicked="disableButton"}}
\n
\n
isButtonDisabled is a boolean property on the controller
\n
disableButton is a function on the controller that sets isButtonDisabled to false
\n
\n
Param
\n
It is possible to pass a parameter to the action in the controller that is bound to the click event by using the clickedParam property.
{{#bs-button type="primary" clicked="buttonWithParam" clickedParamBinding="controller"}}Button with Param{{/bs-button}}
\n
Action in controller:
\n
MyController = Ember.Controller.extend({\n actions: {\n buttonWithParam: function(expectedMyself) {\n alert("Passed controller as a param: " + expectedMyself);\n }\n }\n)}
\n
State
\n
By Bootstrap:
\n
\n
Add data-loading-text="Loading..." to use a loading state on a button.
\n
\n
Then extra loading=loadingState is needed where loadingState is a property in the controller that returns a string which\ndefines the current state of the button:
\n
\n
If loadingState property equals loading then the button will be disabled and its text will change to the value of the data-loading-text button property.
\n
If its value is null then the button will be re-enabled and its text will be modified to the original value defined in the title button property.
The loading property may also return any string that matches one of the data-foo-text button property to render other text\nbut the original text of the button when the loading state completes.
Pay attention that this time the loadingState is set to completed and not null.
\n
Component Properties
\n
\n
\n \n
\n
Property
\n
Description
\n
\n \n \n
\n
type
\n
Alert types: success | info | warning | danger
\n
\n
\n
title
\n
A string representing the text of the button (not required if component is used as a block component)
\n
\n
\n
clicked
\n
Triggers the specified function name on the controller immediately when the button is clicked.
\n
\n
\n
clickedParam
\n
A parameter to pass the action to be invoked immediately when the button is clicked
\n
\n
\n
size
\n
Can be: xs | sm | lg
\n
\n
\n
xs
\n
If set to true it is equivalent to size=xs
\n
\n
\n
small
\n
If set to true it is equivalent to size=small
\n
\n
\n
large
\n
If set to true it is equivalent to size=large
\n
\n
\n
block
\n
If true the button is a block level and will span the full width of its parent
\n
\n
\n
disabled
\n
If true the button will be disabled, can also be bound to a controller property
\n
\n
\n
loading
\n
Bound to a controller property that defines the state of the button.
\n
\n
\n
data-loading-text
\n
If loading=foo and foo is a property in the controller and foo property returns loading, then the text of the button will be changed to the value of this property.
\n
\n
\n
data-xxx-text
\n
If loading=foo and foo is a property in the controller and foo property returns xxx, then the text of the button will be changed to the value of this property.
To wrap a series of buttons, use the bs-btn-group component.
\n
Standard
\n
\n '),d.buffer.push(i((b["bs-btn-group"]||a&&a["bs-btn-group"]||h).call(a,{name:"bs-btn-group",hash:{selectedBinding:"selected",contentBinding:"options"},hashTypes:{selectedBinding:"STRING",contentBinding:"STRING"},hashContexts:{selectedBinding:a,contentBinding:a},types:[],contexts:[],data:d}))),d.buffer.push("\n \n Controller say selected item is: "),e=b._triageMustache.call(a,"selected",{name:"_triageMustache",hash:{},hashTypes:{},hashContexts:{},types:["ID"],contexts:[a],data:d}),null!=e&&d.buffer.push(e),d.buffer.push('\n
\n\n
content is an array of options, each option is rendered as a button tag.
\n
TODO: SHOW CODE
\n
Icons
\n
It is possible to set an icon for the selected button in a group or/and an icon for the in-active buttons by\nsetting the icon_active and/or icon_inactive properties to the icon class name.
\n
\n '),d.buffer.push(i((b["bs-btn-group"]||a&&a["bs-btn-group"]||h).call(a,{name:"bs-btn-group",hash:{selectedBinding:"selected",contentBinding:"options",icon_active:"fa fa-check-square-o",icon_inactive:"fa fa-square-o"},hashTypes:{selectedBinding:"STRING",contentBinding:"STRING",icon_active:"STRING",icon_inactive:"STRING"},hashContexts:{selectedBinding:a,contentBinding:a,icon_active:a,icon_inactive:a},types:[],contexts:[],data:d}))),d.buffer.push("\n \n Controller say selected item is: "),e=b._triageMustache.call(a,"selected",{name:"_triageMustache",hash:{},hashTypes:{},hashContexts:{},types:["ID"],contexts:[a],data:d}),null!=e&&d.buffer.push(e),d.buffer.push('\n
\n\n
<div class="bs-example">\n {{bs-btn-group icon_inactive="fa fa-square-o" icon_active="fa fa-check-square-o" contentBinding="options" selectedBinding="selected"}}\n <br/>\n Controller say selected item is: {{selected}}\n</div>
\n
Button Toolbar
\n
Combine sets of bs-btn-groups into a bs-btn-toolbar for more complex components.
Growl Notifications is not a Bootstrap component but is mandatory for almost every web application.
\n
Growl Notifications are just like the Notification component but messages that are rendered as small boxes on the right top of the screen, they fade in for a short period of time with a title, sub text and icon and then fade out.
\n
To use growl notifications, put somewhere in your application template the bs-growl-notifications component.
\n
{{bs-growl-notifications}}
\n
Then use the GrowlNotificationManager / GNM to push new notifications with a message and type.
When listing items that support selection, it usually make sense to perform some actions on the selected item(s).
\n
The Items action bar component make it possible to build an bar of buttons where each button visibility may behave differently according to the selection,
\n
For example an 'Edit' button may be disabled unless 1 item is selected, or a 'Delete' button may be enabled only\nwhen there is 1 or more items selected.
\n
In the template, only 1 expression is needed, the content property is expected to be an array of array, where each array represents a section in the action bar and contains objects that represent a button defintion in the bar, the selectedItems property is expected to be an array of the currently selected items on a list.
For the sake of simplicity in this example we use the bs-pills component to list items with signle itemselection support,\nbut this can be replaced with a table or any other visual form that supports selection.
Per action defined in the controller (see below), it is possible to define whether the action should be disabled or not\nand what should happen when an enabled action is clicked,
\n
\n
Implement the disabled function per action and return true if the action should be disabled, the method recieve the current selection so logic may take the selection into consideration whether the action should be disabled or not.
\n
Define transitionTo property with a route name if you want the action to transition to another route when pressed.
\n
Define the clickActionName property with an action name to be invoked on the controller when action is clicked.
Heading with label '),d.buffer.push(f((b["bs-label"]||a&&a["bs-label"]||e).call(a,{name:"bs-label",hash:{content:"Label"},hashTypes:{content:"STRING"},hashContexts:{content:a},types:[],contexts:[],data:d}))),d.buffer.push('\n
\n\n
<h3>Heading with label {{bs-label content="Label"}}</h3>
\n
With Type
\n
\n
Heading with danger '),d.buffer.push(f((b["bs-label"]||a&&a["bs-label"]||e).call(a,{name:"bs-label",hash:{type:"danger",content:"Careful!"},hashTypes:{type:"STRING",content:"STRING"},hashContexts:{type:a,content:a},types:[],contexts:[],data:d}))),d.buffer.push('
\n
\n\n
<h3>Heading with <strong>danger</strong> {{bs-label content="Careful!" type="danger"}}</h3>
List groups are a flexible and powerful component for displaying not only simple lists of elements, but complex ones with custom content.\nBy Bootstrap
\n
\n
All list items are linkable and selection can easily be observed
\n
Simple
\n
The most basic list group is simply an unordered list with list items.
Showcase.ShowComponentsModalController = Ember.Controller.extend({\n myModalButtons: [\n Ember.Object.create({title: 'Submit', clicked:"submit"})\n Ember.Object.create({title: 'Cancel', clicked:"cancel", dismiss: 'modal'})\n ],\n\n actions: {\n //Submit the modal\n submit: function() {\n Bootstrap.NM.push('Successfully submitted modal', 'success');\n return Bootstrap.ModalManager.hide('myModal');\n },\n\n //Cancel the modal, we don't need to hide the model manually because we set {..., dismiss: 'modal'} on the button meta data\n cancel: function() {\n return Bootstrap.NM.push('Modal was cancelled', 'info');\n },\n\n //Show the modal\n show: function() {\n return Bootstrap.ModalManager.show('myModal');\n }\n }\n});
\n
NOTE: The buttons defined in the array object can contain the same attributes as the button component. For example: for a 'danger' button, add "type='danger'" to the object defining the button.
\n
Confirmation Modal
\n
For a simple confirmation modal, you can simply invoke Bootstrap.ModalManager.confirm(this);
Showcase.ShowComponentsModalController = Ember.Controller.extend({\n confirm: {\n confirm: {\n Bootstrap.ModalManager.confirm(@);\n },\n //invoked when user press "confirm"\n modalConfirmed: {\n Bootstrap.NM.push('Confirmed!', 'success')\n },\n //invoked when user press "cancel"\n modalCanceled: {\n Bootstrap.NM.push('Cancelled!', 'info')\n }\n }\n})
\n
The Bootstrap.ModalManager.confirm method accept the following parameters:
\n
\n
\n \n
\n
Property
\n
Description
\n
Optional?
\n
\n \n \n
\n
controller
\n
A reference to the controller that the confirm/cancel actions will be triggered on
\n
no
\n
\n
\n
title
\n
The title of the modal that.
\n
yes
\n
\n
\n
message
\n
The body text of the modal.
\n
yes
\n
\n
\n
confirmButtonTitle
\n
The title of the confirm button
\n
yes
\n
\n
\n
cancelButtonTitle
\n
The title of the cancel button
\n
yes
\n
\n \n
\n
\n\n\n
Programatically Modal Creation
\n
It is also possible to programatically create a modal, this approach is useful if the modal contains a lot of elements and it makes sense to push the modal elements into the DOM programatically and totally destroy the modal when it is closed.
//we only render a button which will programatically create the modal\n{{bs-button title="Create Modal" clicked="createModalProgramatically"}}
\n
Controller's code:
\n
Showcase.ShowComponentsModalController = Ember.Controller.extend({\n manualButtons: [\n Ember.Object.create({title: 'Submit', clicked:"submitManual"})\n Ember.Object.create({title: 'Cancel', dismiss: 'modal'})\n ],\n\n actions: {\n submitManual: function() {\n Bootstrap.NM.push('Modal destroyed!', 'success');\n return Bootstrap.ModalManager.close('manualModal');\n },\n createModalProgramatically: function() {\n //@property {string} The name of the modal, required later to close the modal (see submitManual function above)\n //@property {string} The title of the modal.\n //@property {string} The template name to render within the modal body, a View class may also be specified.\n //@property {array} Array of Button meta data\n //@property {object} The controller instance that instantiate the modal.\n Bootstrap.ModalManager.open('manualModal', 'Hello', 'demo-template', this.manualButtons, this);\n }\n }\n});
Notifications is not a Bootstrap component but is mandatory for almost every web application.
\n
Notifications are messages that are rendered as Alerts, they fade in for a short period of time with some message and type and then they fade out.
\n
Notifications are pushed into an array, so different parts of the application may push notifications to the user\nand each will be displayed one after another.
\n
To use notifications, put somewhere in your application template the bs-notifications component.
Showcase.ShowComponentsNotificationsController = Ember.Controller.extend({\n pushInfo: function() {\n return Bootstrap.NM.push('Hello, this is just an info message.', 'info');\n },\n pushWarn: function() {\n return Bootstrap.NM.push('Could not perform operation!', 'warning');\n },\n pushSuccess: function() {\n return Bootstrap.NM.push('Successfully performed operation!', 'success');\n },\n pushDanger: function() {\n return Bootstrap.NM.push('Danger! system is halting!', 'danger');\n }\n});
\n
During fade out, If user hover with the mouse in the notification area, it will cancel the fade in animation so the user can have more time to read the message, moving the mouse out will retrigger the fade out.
\n
You can control the duration messages are displayed, the fade out and fade in time by providing properties for each, for more info see the properties options below.
\n
Component Properties
\n
\n
\n \n
\n
Property
\n
Description
\n
\n \n \n
\n
showTime
\n
A number in ms that defines how long the notification is displayed before it starts to fade out.
\n
\n
\n
fadeInTime
\n
A number in ms that defines how long it takes a notification to fades in.
\n
\n
\n
fadeOutTime
\n
A number in ms that defines how long it takes a notification to fade out.
A simple shell for an h1 to appropriately space out and segment sections of content on a page. It can utilize the h1's default small element, as well as most other components (with additional styles).\nBy Bootstrap
\n
\n
\n '),d.buffer.push(f((b["bs-page-header"]||a&&a["bs-page-header"]||e).call(a,{name:"bs-page-header",hash:{sub:"Subtext for header",title:"Example page header"},hashTypes:{sub:"STRING",title:"STRING"},hashContexts:{sub:a,title:a},types:[],contexts:[],data:d}))),d.buffer.push('\n
\n\n
{{bs-page-header title="Example page header" sub="Subtext for header"}}
Bootstrap doesn't dictate nor assist with how you respond when an item is selected in the Pills navigation,\nBut using bs-pills helps by making the navigation more interactive by providing selection bindings and styling the\nactive element, see examples below.
Bootstrap doesn't stop the propagation of the redirection of disabled links for you:
\n
\n
This class will only change the anchor's appearance, not its functionality. Use custom JavaScript to disable links here.\nBy Bootstrap
\n
\n
But using bs-pills ease your pain by giving you the opportunity to bind the disable state of each item by providing extra metadata per item, clicking a disabled item disables the links too.
\n
To define links (items) as disabed, you need to provide extra metadata per defined item in the contentBinding property.
For Popover support, it is required to adapt the application route and add a named outlet to your main template and reference a controller that extends from Bootstrap.TooltipBoxController
\n
//Create some controller in your app that references _Bootstrap.TooltipBoxController_\nApp.TooltipBoxController = Bootstrap.TooltipBoxController\n\n//Application route\nApp.ApplicationRoute = Ember.Route.extend({\n renderTemplate: function() {\n // Render default outlet\n this.render();\n // render extra outlets\n var controller = this.controllerFor('tooltip-box');\n this.render("bs-tooltip-box", {\n outlet: "bs-tooltip-box",\n controller: controller,\n into: "application" // important when using at root level\n });\n }\n});
\n
Tooltips
\n
Simple content
\n
\n
Here is a very link with a tooltip,.\n You can mix as many tooltips as you wish.\n
\n
\n\n
<p class="muted" style="margin-bottom: 0;">\n Here is <a href="#" {{bs-bind-tooltip content="A tooltip!"}}>a very</a> link with a tooltip,.\n You can mix as many <a href="#" {{bs-bind-tooltip title="Another tooltip!"}}>tooltips</a> as you wish.\n</p>
\n
Bindings & Sticky
\n
You can bind the value of the tooltip to an object and make the tooltip sticky by:
<a href="#" {{bs-bind-tooltip testObject.sticky}}>Hover me for a sticky tooltip!</a>
\n
In controller:
\n
stickyTooltip: Ember.Object.createWithMixins({\n popover: (function() {\n return Ember.Object.create({\n user: this,\n content: 'know this is a sticky tooltip! You can hover over it.',\n trigger: 'hover',\n sticky: true\n });\n }).property()\n })
\n
Popovers
\n
Examples
\n
Here are some examples for popovers:
\n
\n
\n
\n Hover for a sticky popup\n
\n
\n Click for a popup\n
\n
\n Click for a popup with template\n
\n
\n
\n\n
In template:
\n
<ul class="list-group" style="width:250px">\n <li class="list-group-item" {{bs-bind-popover hoverPop}}>\n Hover for a sticky popup\n </li>\n <li class="list-group-item" {{bs-bind-popover clickPop}}>\n Click for a popup\n </li>\n <li class="list-group-item" {{bs-bind-popover templPop}}>\n Click for a popup with template\n </li>\n</ul>
\n
In controller:
\n
hoverPop: Ember.Object.create({\n title: "I'm a title!",\n content: "And i'm a content!",\n trigger: "hover",\n placement: "right",\n sticky: true\n }),\n\n clickPop: Ember.Object.create({\n title: "Clickable!",\n content: "This is a clickable popover",\n placement: "left"\n }),\n\n templPop: Ember.Object.create({\n firstName: 'numbers',\n title: 'Popover with Template',\n template: 'numbers:<ul>' +\n '{{#each val in content.numbers}}' +\n ' <li>{{val}}</li>' + '{{/each}}' +\n '</ul>',\n content: {\n numbers: [1, 2, 3]\n }\n })
\n
Object Options
\n
Following are the options that back a tooltip/popover entry:
\n
\n
\n \n
\n
Property Name
\n
Type
\n
Default
\n
Description
\n
\n \n \n
\n
html
\n
boolean
\n
false
\n
Insert HTML into the popover.
\n
\n
\n
placement
\n
string | function
\n
'right'
\n
how to position the popover - top | bottom | left | right | auto. When "auto" is specified, it will dynamically reorient the popover. For example, if placement is "auto left", the popover will display to the left when possible, otherwise it will display right.
\n
\n
\n
trigger
\n
string
\n
'click' for popover| 'hover' for tooltip
\n
how popover is triggered - click | hover | focus | manual
\n
\n
\n
sticky
\n
boolean
\n
false
\n
To be used when trigger is 'hover'.\n When the tooltip appears you have 100ms to hover over it and only after you leave the popover/tooltip it will disappear
\n
\n
\n
show
\n
boolean
\n
false
\n
To be used when trigger is 'manual'.\n Will show the tip when true, hide when false.\n The property will be observed for changes with "addObserver"\n
\n
\n
\n
title
\n
string
\n
''
\n
\n
\n
\n
content
\n
string | function
\n
''
\n
\n
\n
\n
template
\n
string
\n
null
\n
Use this template to display. The context will be the popover/tooltip. The data is available in content.*
Defining '),e=(b["link-to"]||a&&a["link-to"]||f).call(a,"show_components.tabs",{name:"link-to",hash:{},hashTypes:{},hashContexts:{},fn:this.program(1,d),inverse:this.noop,types:["STRING"],contexts:[a],data:d}),null!=e&&d.buffer.push(e),d.buffer.push(' covers the Tabs rendering and help you to interact with the selected tab. But usually some content should be rendered as a response for a tab click right?
\n
This is where Tab Panes come into play, a tab pane is the content area of each rendered tab, when a tab is selected, the corresponding tab pane becomes visible, see below for the possible options.
\n
Tab Panes expects a contentBinding property just like the bs-tabs component, the Tabs Panes component also must be aware of the bs-tabs component it is bound to by specifying the items-id property set to the id of the corresponding bs-tabs
The bs-tabs-panes generates a tab pane per element in the content array.
\n
The items-id property must refer to the id of the bs-tabs component.
\n
If you like one tab to be activated by default, set the default property of the bs-tabs component to a title of the tab you would like to be activated by default.
\n
\n
Here is the controller tabsPanesOptions property:
\n
SomeController = Ember.Controller.extend({\n tabsMeta: Ember.A([\n Ember.Object.create({ title: 'Foo', template: 'tabs/foo-tabpane', controller: 'ShowcaseComponentsTabsFoo'}),\n Ember.Object.create({ title: 'Bar', template: 'tabs/bar-tabpane'})\n ]);\n});\n\nThe `template: 'some-template'` defines what template to render in the corresponding _Tab Pane_ when the Tab is selected.
\n
Note that for the Foo tab, a controller property was defined, calling {{controller}} within the tab pane template tabs/foo-tabpane will point to the specified ShowcaseComponentsTabsFoo controller instead of the default controller\nwhich is the controller of the template the {{bs-tabs-panes}} was called from.
Rendering tab content can be simply done by providing a template per tab using the bs-tabs-panes component,\nAnother possiblity is to have a route per tab for rendering tabs contents, Choose this approach if:
\n
\n
You need your tabs to be bookmarkable, this is possible because each route is bound to some URL path.
\n
Your tabs are complicated and have a lot of logic and you need a controller per tab.
\n
\n
If one or more of the reasons above makes sense to you, read on, otherwise use bs-tabs-panes because its setup is much simpler.
\n
Users Profile Example
\n
This is much easier to explain by example, so for the sake of example, we'll build a User profile with 3 tabs.
\n
Defining routes
\n
First, lets define the routes of the User profile:
A resource is required per tabs component, here we define the resource as user because tabs deals with managing a User and a @route is required per tab.
\n
Putting the Tabs component in the Resource template.
\n
In Ember.js, every resource page has its own main template, nested routes are rendered within the resource page, with such hierarchy, it makes sense to put the tabs component in the resource page so it will be available for any nested route that the user visits.
The outlet is important so the content of each tab will be rendered beneath the tabs component.
\n
Defining Templates
\n
Simply define a template per nested route, just like you would do if each nested route wouldnt be apart of the tab component.
\n
Live example
\n
Want to see it alive? take a look here: '),e=(b["link-to"]||a&&a["link-to"]||f).call(a,"user.general",{name:"link-to",hash:{},hashTypes:{},hashContexts:{},fn:this.program(1,d),inverse:this.noop,types:["STRING"],contexts:[a],data:d}),null!=e&&d.buffer.push(e),d.buffer.push("
Tabs are like Pills but styled differently,\nThe share exactly the same concepts, so this page doesn't repeat everything, visit Pills for the complete details.
Please see '),e=(b["link-to"]||a&&a["link-to"]||f).call(a,"show_components.tabs-panes",{name:"link-to",hash:{},hashTypes:{},hashContexts:{},fn:this.program(1,d),inverse:this.noop,types:["STRING"],contexts:[a],data:d}),null!=e&&d.buffer.push(e),d.buffer.push(" for more info about Tab Panes.
\n"),h},useData:!0}),Ember.TEMPLATES["show_components/well"]=Ember.HTMLBars.template({1:function(a,b,c,d){d.buffer.push(" I am in a well, click me!\n")},3:function(a,b,c,d){d.buffer.push(" Look, I'm in a large well!\n")},5:function(a,b,c,d){d.buffer.push(" Look, I'm in a small well!\n")},compiler:[6,">= 2.0.0-beta.1"],main:function(a,b,c,d){var e,f=b.helperMissing,g="";return d.buffer.push('
Well
\n
Default Well
\n
Here is a default well, but pay attention that it is clickable, the click will be propagated to the controller.
Wizard is a multi step view component with transitioning workflow,\nWizard has a lot in common with the Tabs component as you can think about each Wizard step as a tab & pane, the main different is that with the Wizard component the transitioning order of the steps is defined a head.
\n
Wizard Sample
\n
Defining an inline content Wizard with blocks is the simplest form of using the wizard component.
contentBinding="steps" defines a property named steps in the current controll that defines the wizard steps,\nHere is the current controll of this example:
Creating a wizard programatically should be used if rendering a Wizard is based on some action such as a button click, for example, a modal can be rendered by pressing a button that will render a Wizard within a modal as the example shown below:
The controller is responsible for creating the Modal and the Wizard components, our controller listens to the Wizard onFinish event and close the modal as a response plus send an application notification.
")},useData:!0}),function(){!function(){var a,b;a=window.Bootstrap,b=window.Showcase=Ember.Application.create({LOG_TRANSITIONS:!0,LOG_VIEW_LOOKUPS:!0,LOG_ACTIVE_GENERATION:!0}),Ember.ENV={HELPER_PARAM_LOOKUPS:!0},Ember.Handlebars.registerHelper("raw",function(a){return a.fn(a)})}(),function(){(function(){Showcase.Router.map(function(){return this.resource("show_components",function(){return this.route("alert"),this.route("breadcrumbs"),this.route("modal"),this.route("label"),this.route("badge"),this.route("well"),this.route("list-group"),this.route("panel"),this.route("page-header"),this.route("button"),this.route("buttonGroup"),this.route("progressbar"),this.route("pills"),this.route("tabs"),this.route("tabs-panes"),this.route("wizard"),this.route("items_action_bar"),this.route("tabs-with-routes"),this.route("notifications"),this.route("growl-notif"),this.route("popover"),this.resource("user",function(){return this.route("general"),this.route("privacy"),this.route("activities")})})})}).call(this)}(),function(){(function(){Showcase.ApplicationRoute=Ember.Route.extend({model:function(){return[Ember.Object.create({title:"Alert",route:"show_components.alert"}),Ember.Object.create({title:"Breadcrumbs",route:"show_components.breadcrumbs","new":!0}),Ember.Object.create({title:"Modal",route:"show_components.modal"}),Ember.Object.create({title:"Label",route:"show_components.label"}),Ember.Object.create({title:"Badge",route:"show_components.badge"}),Ember.Object.create({title:"Well",route:"show_components.well"}),Ember.Object.create({title:"List Group",route:"show_components.list-group"}),Ember.Object.create({title:"Panel",route:"show_components.panel"}),Ember.Object.create({title:"Page Header",route:"show_components.page-header"}),Ember.Object.create({title:"Button",route:"show_components.button"}),Ember.Object.create({title:"Button Group",route:"show_components.buttonGroup"}),Ember.Object.create({title:"Progressbar",route:"show_components.progressbar"}),Ember.Object.create({title:"Tooltips & Popover","new":!0,route:"show_components.popover"}),Ember.Object.create({title:"Nav - Pills",route:"show_components.pills"}),Ember.Object.create({title:"Nav - Tabs",route:"show_components.tabs"}),Ember.Object.create({title:"Nav - Tabs Panes",route:"show_components.tabs-panes"}),Ember.Object.create({title:"Nav - Tabs with Routes",special:!0,route:"show_components.tabs-with-routes"}),Ember.Object.create({title:"Wizard",special:!0,route:"show_components.wizard"}),Ember.Object.create({title:"Notifications",special:!0,route:"show_components.notifications"}),Ember.Object.create({title:"Items Action Bar","new":!0,route:"show_components.items_action_bar"}),Ember.Object.create({title:"Growl Notifications",special:!0,route:"show_components.growl-notif"})]}})}).call(this)}(),function(){(function(){Showcase.ShowComponentsPopoverRoute=Ember.Route.extend({renderTemplate:function(){var a;return this.render(),a=this.controllerFor("ShowComponentsTooltipBox"),this.render("bs-tooltip-box",{outlet:"bs-tooltip-box",controller:a,into:"application"})}})}).call(this)}(),function(){(function(){Showcase.ShowComponentsAlertController=Ember.Controller.extend({actions:{submit:function(){return alert("Action taken by controller!")},didAlertClosed:function(){return alert("From controller: The -closed- event was triggered.")},didAlertClose:function(){return alert("From controller: The -close- event was triggered.")}}})}).call(this)}(),function(){(function(){Showcase.ShowComponentsButtonController=Ember.Controller.extend({isButtonDisabled:!1,loadingState:null,loadingState1:null,actions:{disableButton:function(){return this.set("isButtonDisabled",!0)},startLoading:function(){var a=this;return this.set("loadingState","loading"),Ember.run.later(function(){return a.set("loadingState",null)},2e3)},startLoading1:function(){var a=this;return this.set("loadingState1","loading"),Ember.run.later(function(){return a.set("loadingState1","completed")},2e3)},buttonWithParam:function(a){return alert("Passed controller as a param: "+a)}}})}).call(this)}(),function(){(function(){Showcase.ShowComponentsItemsActionBarController=Ember.Controller.extend({actionsInBar:[[{title:"To Alerts",disabled:function(a){var b;return a.size<1||"Alerts"!==(null!=a&&null!=(b=a[0])?b.title:void 0)?!0:void 0},transitionTo:"show_components.alert"},{title:"To Panels",transitionTo:"show_components.panel",disabled:function(a){var b;return a.size<1||"Panels"!==(null!=a&&null!=(b=a[0])?b.title:void 0)?!0:void 0}}],[{title:"To Wizard",disabled:function(a){var b;return a.size<1||"Wizards"!==(null!=a&&null!=(b=a[0])?b.title:void 0)?!0:void 0},clickActionName:"wizard"}]],actions:{wizard:function(a){return alert("Wizard pressed!")}},items:[Ember.Object.create({title:"Alerts"}),Ember.Object.create({title:"Panels"}),Ember.Object.create({title:"Wizards"})]})}).call(this)}(),function(){(function(){Showcase.ShowComponentsPanelController=Ember.Controller.extend({actions:{panelClicked:function(){return alert("Hello from controller: A click in a panel!")},panelClosed:function(){return alert("Hello from controller: The panel was closed!")}}})}).call(this)}(),function(){(function(){Showcase.ShowComponentsPopoverController=Ember.Controller.extend({testObject:Ember.Object.createWithMixins({sticky:function(){return Ember.Object.create({user:this,content:"know this is a sticky tooltip! You can hover over it.",trigger:"hover",sticky:!0})}.property()}),user:Ember.Object.create({firstNameBinding:"content.name",title:"rename",template:'name: {{input type="text" value=content.name}}',content:{name:"John"},trigger:"hover",sticky:!0}),hoverPop:Ember.Object.create({title:"I'm a title!",content:"And i'm a content!",trigger:"hover",placement:"right",sticky:!0}),clickPop:Ember.Object.create({title:"Clickable!",content:"
Hello
This is a clickable popover with html content!",placement:"left",html:!0}),templPop:Ember.Object.create({firstName:"numbers",title:"Popover with Template",template:"numbers: