bootstrap-for-ember-rails 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitmodules +1 -1
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/.gitignore +2 -2
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/Gruntfile.js +10 -12
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/README.md +13 -1
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/views/ItemPaneView.coffee +1 -8
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/bower.json +1 -1
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-alert.max.js +11 -126
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-alert.min.js +1 -1
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-badge.max.js +6 -14
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-badge.min.js +1 -1
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-basic.max.js +80 -151
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-basic.min.js +1 -1
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-breadcrumbs.max.js +1 -1
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-breadcrumbs.min.js +1 -1
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-button.max.js +20 -156
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-button.min.js +1 -1
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-core.max.js +14 -68
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-core.min.js +1 -1
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-growl-notifications.min.js +1 -1
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-items-action-bar.min.js +1 -1
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-label.max.js +6 -14
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-label.min.js +1 -1
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-list-group.min.js +1 -1
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-modal.max.js +157 -106
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-modal.min.js +1 -1
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-nav.min.js +1 -1
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-notifications.min.js +1 -1
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-popover.max.js +21 -3
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-popover.min.js +1 -1
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-progressbar.max.js +22 -47
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-progressbar.min.js +1 -1
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-wizard.min.js +1 -1
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/package.json +1 -1
- data/lib/bootstrap-for-ember-rails/version.rb +1 -1
- metadata +2 -2
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
(function(){Bootstrap.BsModalComponent=Ember.Component.extend(Ember.Evented,{layoutName:"components/bs-modal",classNames:["modal"],classNameBindings:["fade","isVis:in"],attributeBindings:["role","aria-labelledby","isAriaHidden:aria-hidden","ariaLabelledBy:aria-labelledby"],isAriaHidden:function(){return""+this.get("isVisible")}.property("isVisible"),modalBackdrop:'<div class="modal-backdrop fade in"></div>',role:"dialog",footerViews:[],backdrop:!0,title:null,isVisible:!1,manual:!1,isVis:!1,fullSizeButtons:!1,fade:!0,didInsertElement:function(){var a;return this._super(),this.setupBinders(),a=this.get("name"),Ember.assert("Modal name is required for modal view "+this.get("elementId"),this.get("name")),null==a&&(a=this.get("elementId")),Bootstrap.ModalManager.add(a,this),this.manual?this.show():void 0},becameVisible:function(){return Em.$("body").addClass("modal-open"),this.get("backdrop")?this.appendBackdrop():void 0},becameHidden:function(){return Em.$("body").removeClass("modal-open"),this._backdrop?this._backdrop.remove():void 0},appendBackdrop:function(){var a;return a=this.$().parent(),this._backdrop=Em.$(this.modalBackdrop).appendTo(a)},show:function(){var a;this.set("isVisible",!0),a=this,setTimeout(function(){a.set("isVis",!0)},15)},hide:function(){var a;return this.set("isVis",!1),a=this,this.$().one("webkitTransitionEnd",function(){a.set("isVisible",!1)}),!1},toggle:function(){return this.toggleProperty("isVisible")},click:function(a){var b,c;return b=a.target,c=b.getAttribute("data-dismiss"),"modal"===c?this.close():void 0},keyPressed:function(a){return 27===a.keyCode?this.close(a):void 0},close:function(){var a;return this.set("isVis",!1),a=this,this.$().one("webkitTransitionEnd",function(){a.get("manual")?a.destroy():a.hide()}),this.trigger("closed")},willDestroyElement:function(){var a;return Em.$("body").removeClass("modal-open"),this.removeHandlers(),a=this.get("name"),null==a&&(a=this.get("elementId")),Bootstrap.ModalManager.remove(a,this),this._backdrop?this._backdrop.remove():void 0},removeHandlers:function(){return jQuery(window.document).unbind("keyup",this._keyUpHandler)},setupBinders:function(){var a,b=this;return a=function(a){return b.keyPressed(a)},jQuery(window.document).bind("keyup",a),this._keyUpHandler=a}}),Bootstrap.ModalManager=Ember.Object.create({add:function(a,b){return this.set(a,b)},register:function(a,b){return this.add(a,b),b.appendTo(b.get("targetObject").namespace.rootElement)},remove:function(a){return this.set(a,null)},close:function(a){return this.get(a).close()},hide:function(a){return this.get(a).hide()},show:function(a){return this.get(a).show()},toggle:function(a){return this.get(a).toggle()},confirm:function(a,b,c,d,e,f,g,h,i,j,k,l){var m,n;return null==d&&(d="Confirm"),null==e&&(e="modalConfirmed"),null==f&&(f=null),null==g&&(g="Cancel"),null==h&&(h="modalCanceled"),null==i&&(i=null),null==j&&(j=a),null==k&&(k=!0),null==l&&(l=!1),m=Ember.View.extend({template:Ember.Handlebars.compile(c||"Are you sure you would like to perform this action?")}),n=[Ember.Object.create({title:d,clicked:e,type:f,dismiss:"modal"}),Ember.Object.create({title:g,clicked:h,type:i,dismiss:"modal"})],this.open("confirm-modal",b||"Confirmation required!",m,n,a,k,l,j)}},{okModal:function(a,b,c,d,e,f,g,h,i){var j,k;return null==d&&(d="OK"),null==e&&(e="okModal"),null==f&&(f=null),null==g&&(g=a),null==h&&(h=!0),null==i&&(i=!1),j=Ember.View.extend({template:Ember.Handlebars.compile(c||"Are you sure you would like to perform this action?")}),k=[Ember.Object.create({title:d,clicked:e,type:f,dismiss:"modal"})],this.open("ok-modal",b||"Confirmation required!",j,k,a,h,i,g)},openModal:function(a,b){var c,d;return null==b&&(b={}),d=b.rootElement||".ember-application",c=a.create(b),c.appendTo(d)},open:function(a,b,c,d,e,f,g,h){var i,j,k;return null==g&&(g=!1),null==h&&(h=e),i=e.container.lookup("component-lookup:main"),j=i.lookupFactory("bs-modal",e.get("container")).create(),j.setProperties({name:a,title:b,manual:!0,footerButtons:d,targetObject:h,fade:f,fullSizeButtons:g}),"string"===Ember.typeOf(c)?(k=e.container.lookup("template:"+c),Ember.assert("Template "+c+" was specified for Modal but template could not be found.",k),k&&j.setProperties({body:Ember.View.extend({template:k,controller:e})})):"class"===Ember.typeOf(c)&&j.setProperties({body:c,controller:e}),j.appendTo(e.namespace.rootElement)}}),Ember.Application.initializer({name:"bs-modal",initialize:function(a){return a.register("component:bs-modal",Bootstrap.BsModalComponent)}})}).call(this),Ember.TEMPLATES["components/bs-modal"]=Ember.Handlebars.template({1:function(a,b,c,d){var e=this.escapeExpression,f="";return d.buffer.push(" <i "),d.buffer.push(e(b["bind-attr"].call(a,{name:"bind-attr",hash:{"class":"titleIconClasses"},hashTypes:{"class":"STRING"},hashContexts:{"class":a},types:[],contexts:[],data:d}))),d.buffer.push("></i>\n"),f},3:function(a,b,c,d){var e=this.escapeExpression,f="";return d.buffer.push(" "),d.buffer.push(e(b.view.call(a,"view.body",{name:"view",hash:{},hashTypes:{},hashContexts:{},types:["ID"],contexts:[a],data:d}))),d.buffer.push("\n"),f},5:function(a,b,c,d){var e,f="";return d.buffer.push(" "),e=b._triageMustache.call(a,"yield",{name:"_triageMustache",hash:{},hashTypes:{},hashContexts:{},types:["ID"],contexts:[a],data:d}),null!=e&&d.buffer.push(e),d.buffer.push("\n"),f},7:function(a,b,c,d){var e=b.helperMissing,f=this.escapeExpression,g="";return d.buffer.push(" "),d.buffer.push(f((b["bs-button"]||a&&a["bs-button"]||e).call(a,{name:"bs-button",hash:{targetObjectBinding:"view.targetObject",content:""},hashTypes:{targetObjectBinding:"STRING",content:"ID"},hashContexts:{targetObjectBinding:a,content:a},types:[],contexts:[],data:d}))),d.buffer.push("\n"),g},9:function(a,b,c,d){var e=this.escapeExpression,f="";return d.buffer.push(" "),d.buffer.push(e(b.view.call(a,"",{name:"view",hash:{},hashTypes:{},hashContexts:{},types:["ID"],contexts:[a],data:d}))),d.buffer.push("\n"),f},compiler:[6,">= 2.0.0-beta.1"],main:function(a,b,c,d){var e,f=this.escapeExpression,g="";return d.buffer.push('<div class="modal-dialog">\n <div class="modal-content">\n <div class="modal-header">\n <button type="button" '),d.buffer.push(f(b["bind-attr"].call(a,{name:"bind-attr",hash:{"class":":close allowClose::hide"},hashTypes:{"class":"STRING"},hashContexts:{"class":a},types:[],contexts:[],data:d}))),d.buffer.push(' data-dismiss="modal" aria-hidden="true">×</button>\n <h4 class="modal-title">\n'),e=b["if"].call(a,"titleIconClasses",{name:"if",hash:{},hashTypes:{},hashContexts:{},fn:this.program(1,d),inverse:this.noop,types:["ID"],contexts:[a],data:d}),null!=e&&d.buffer.push(e),d.buffer.push(" "),d.buffer.push(f(b._triageMustache.call(a,"title",{name:"_triageMustache",hash:{unescaped:"true"},hashTypes:{unescaped:"STRING"},hashContexts:{unescaped:a},types:["ID"],contexts:[a],data:d}))),d.buffer.push('\n </h4>\n </div>\n <div class="modal-body">\n'),e=b["if"].call(a,"body",{name:"if",hash:{},hashTypes:{},hashContexts:{},fn:this.program(3,d),inverse:this.program(5,d),types:["ID"],contexts:[a],data:d}),null!=e&&d.buffer.push(e),d.buffer.push(" </div>\n <div "),d.buffer.push(f(b["bind-attr"].call(a,{name:"bind-attr",hash:{"class":":modal-footer fullSizeButtons:modal-footer-full"},hashTypes:{"class":"STRING"},hashContexts:{"class":a},types:[],contexts:[],data:d}))),d.buffer.push(">\n"),e=b.each.call(a,"footerButtons",{name:"each",hash:{},hashTypes:{},hashContexts:{},fn:this.program(7,d),inverse:this.noop,types:["ID"],contexts:[a],data:d}),null!=e&&d.buffer.push(e),e=b.each.call(a,"footerViews",{name:"each",hash:{},hashTypes:{},hashContexts:{},fn:this.program(9,d),inverse:this.noop,types:["ID"],contexts:[a],data:d}),null!=e&&d.buffer.push(e),d.buffer.push(" </div>\n </div>\n</div>"),g},useData:!0});
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
(function(){Bootstrap.BsPill=Bootstrap.ItemView.extend(Bootstrap.NavItem,Bootstrap.ItemSelection,{template:Ember.Handlebars.compile("{{#if view.content.linkTo}}\n {{#if view.parentView.dynamicLink}}\n {{#link-to view.content.linkTo model}}{{view.title}}{{/link-to}}\n {{else}}\n {{#link-to view.content.linkTo}}{{view.title}}{{/link-to}}\n {{/if}}\n{{else}}\n {{view view.pillAsLinkView}}\n{{/if}}"),pillAsLinkView:Ember.View.extend({tagName:"a",template:Ember.Handlebars.compile("{{view.parentView.title}}"),attributeBindings:["href"],href:"#"})})}).call(this),function(){Bootstrap.BsPills=Bootstrap.ItemsView.extend(Bootstrap.Nav,{navType:"pills",classNameBindings:["stacked:nav-stacked","justified:nav-justified"],attributeBindings:["style"],itemViewClass:Bootstrap.BsPill}),Ember.Handlebars.helper("bs-pills",Bootstrap.BsPills)}.call(this),function(){Bootstrap.BsTabPane=Bootstrap.ItemPaneView.extend()}.call(this),function(){Bootstrap.BsTabsPanes=Bootstrap.ItemsPanesView.extend({classNames:["tab-content"],itemViewClass:Bootstrap.BsTabPane}),Ember.Handlebars.helper("bs-tabs-panes",Bootstrap.BsTabsPanes)}.call(this),function(){Bootstrap.BsTabs=Bootstrap.ItemsView.extend(Bootstrap.Nav,{navType:"tabs",classNameBindings:["justified:nav-justified"],attributeBindings:["style"],itemViewClass:Bootstrap.BsPill}),Ember.Handlebars.helper("bs-tabs",Bootstrap.BsTabs)}.call(this);
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
(function(){Bootstrap.NotificationsView=Ember.CollectionView.extend({classNames:["notifications"],attributeBindings:["style"],contentBinding:"Bootstrap.NM.content",showTime:2e3,fadeInTime:500,fadeOutTime:3e3,showTimeTimeoutId:null,itemViewClass:Ember.View.extend({classNames:["alert","notification"],template:Ember.Handlebars.compile("{{view.content.message}}"),classNameBindings:["alertType"],isVisible:!1,alertType:function(){return this.get("content").get("classType")}.property("content"),didInsertElement:function(){return this.$().fadeIn(this.get("fadeInTime"))}}),contentChanged:function(){return this.get("content").length>0?this.resetShowTime():void 0}.observes("content.length"),resetShowTime:function(){var a=this;return this.$().css({display:"block"}),this.$().is(":animated")&&this.$().stop().animate({opacity:"100"}),null!=this.showTimeTimeoutId&&clearTimeout(this.showTimeTimeoutId),this.showTimeTimeoutId=setTimeout(function(){return a.fadeOut(a)},this.showTime)},fadeOut:function(a){return a.$().fadeOut(a.fadeOutTime,function(){return a.get("content").clear()})},mouseEnter:function(){return this.$().is(":animated")?this.$().stop().animate({opacity:"100"}):void 0},mouseLeave:function(){return this.resetShowTime()}}),Ember.Handlebars.helper("bs-notifications",Bootstrap.NotificationsView),Bootstrap.NM=Bootstrap.NotificationManager=Ember.Object.create({content:Ember.A(),push:function(a,b){var c;return b=null!=b?b:b="info",c=Bootstrap.Notification.create({message:a,type:b}),this.get("content").pushObject(c)}}),Bootstrap.Notification=Ember.Object.extend({classType:function(){return null!=this.type?"alert-"+this.type:null}.property("type").cacheable()})}).call(this);
|
@@ -12,14 +12,30 @@
|
|
12
12
|
Bootstrap.BsPopoverComponent = Ember.Component.extend({
|
13
13
|
layoutName: 'components/bs-popover',
|
14
14
|
classNames: "popover",
|
15
|
-
classNameBindings: ["fade", "in", "
|
15
|
+
classNameBindings: ["fade", "in", "top", "left", "right", "bottom"],
|
16
|
+
top: (function() {
|
17
|
+
return this.get("realPlacement") === "top";
|
18
|
+
}).property("realPlacement"),
|
19
|
+
left: (function() {
|
20
|
+
return this.get("realPlacement") === "left";
|
21
|
+
}).property("realPlacement"),
|
22
|
+
right: (function() {
|
23
|
+
return this.get("realPlacement") === "right";
|
24
|
+
}).property("realPlacement"),
|
25
|
+
bottom: (function() {
|
26
|
+
return this.get("realPlacement") === "bottom";
|
27
|
+
}).property("realPlacement"),
|
16
28
|
titleBinding: "data.title",
|
17
29
|
content: Ember.computed.alias('data.content'),
|
18
30
|
html: false,
|
19
31
|
delay: 0,
|
20
32
|
animation: true,
|
21
|
-
fade:
|
22
|
-
|
33
|
+
fade: (function() {
|
34
|
+
return this.get("animation");
|
35
|
+
}).property("animation"),
|
36
|
+
"in": (function() {
|
37
|
+
return this.get("isVisible");
|
38
|
+
}).property("isVisible"),
|
23
39
|
placement: (function() {
|
24
40
|
return this.get("data.placement") || "top";
|
25
41
|
}).property("data.placement"),
|
@@ -374,6 +390,8 @@
|
|
374
390
|
object[name] = "";
|
375
391
|
binding = Ember.Binding.from(p).to(name);
|
376
392
|
binding.connect(object);
|
393
|
+
} else {
|
394
|
+
object.set(name, value);
|
377
395
|
}
|
378
396
|
}
|
379
397
|
}
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
(function(){var a,b,c;a='<div class="arrow"></div>{{#if title}}<h3 class="popover-title">{{title}}</h3>{{/if}}<div class="popover-content">{{#if template}} {{partial partialTemplateName}}{{else}} {{#if content}} {{#if html}} {{{content}}} {{else}} {{content}} {{/if}} {{else}} {{yield}} {{/if}}{{/if}} </div>',Ember.TEMPLATES["components/bs-popover"]=Ember.Handlebars.compile(a),c='<div class="tooltip-arrow"></div><div class="tooltip-inner">{{#if html}} {{{content}}}{{else}} {{content}}{{/if}}</div>',Ember.TEMPLATES["components/bs-tooltip"]=Ember.Handlebars.compile(c),Bootstrap.BsPopoverComponent=Ember.Component.extend({layoutName:"components/bs-popover",classNames:"popover",classNameBindings:["fade","in","top","left","right","bottom"],top:function(){return"top"===this.get("realPlacement")}.property("realPlacement"),left:function(){return"left"===this.get("realPlacement")}.property("realPlacement"),right:function(){return"right"===this.get("realPlacement")}.property("realPlacement"),bottom:function(){return"bottom"===this.get("realPlacement")}.property("realPlacement"),titleBinding:"data.title",content:Ember.computed.alias("data.content"),html:!1,delay:0,animation:!0,fade:function(){return this.get("animation")}.property("animation"),"in":function(){return this.get("isVisible")}.property("isVisible"),placement:function(){return this.get("data.placement")||"top"}.property("data.placement"),$element:null,$tip:null,inserted:!1,styleUpdater:function(){var a,b,c,d,e;if(this.$tip&&this.get("isVisible"))return this.$tip.css({top:0,left:0,display:"block"}).addClass(this.get("realPlacement")),d=this.get("realPlacement"),e=this.getPosition(),b=this.$tip[0].offsetWidth,a=this.$tip[0].offsetHeight,c=this.getCalculatedOffset(d,e,b,a),this.$tip.css("top",c.top),this.$tip.css("left",c.left),this.firstTime?(this.firstTime=!1,this.styleUpdater(),this.firstTime=!0):void 0}.observes("content","realPlacement","inserted","isVisible"),init:function(){var a,b;return this._super(),this.set("html",this.get("data.html")||!1),this.set("template",void 0!==this.get("data.template")),this.get("template")?(a="components/bs-popover/_partial-content-"+this.get("tip_id"),b=this.get("data.template"),Ember.TEMPLATES[a]="function"==typeof b?b:Ember.Handlebars.compile(b),this.set("partialTemplateName",a)):void 0},didInsertElement:function(){var a,b=this;return this.$tip=this.$(),a=Bootstrap.TooltipBoxManager.attribute,a="["+a+"='"+this.get("tip_id")+"']",this.$element=$(a),this.set("inserted",!0),"hover"===this.get("data.trigger")&&this.get("data.sticky")&&this.$().on("mouseenter",function(){return clearTimeout(Bootstrap.TooltipBoxManager.timeout)}),this.$().on("mouseleave",function(){return Bootstrap.TooltipBoxManager.removeTip(b.get("tip_id"))}),this.$().find("img").load(function(){return b.afterRender()})},afterRender:function(){return this.notifyPropertyChange("content")},realPlacement:function(){var a,b,c,d,e,f,g,h,i,j,k,l;return this.$tip?(k=this.get("placement")||"",e=/\s?auto?\s?/i,d=e.test(k),d&&(k=k.replace(e,"")||"top"),l=this.getPosition(),c=this.$tip[0].offsetWidth,b=this.$tip[0].offsetHeight,d&&(a=this.$element.parent(),g=k,f=document.documentElement.scrollTop||document.body.scrollTop,j=window.innerWidth,h=window.innerHeight,i=0,k="bottom"===k&&l.top+l.height+b-f>h?"top":"top"===k&&l.top-f-b<0?"bottom":"right"===k&&l.right+c>j?"left":"left"===k&&l.left-c<i?"right":k),k):null}.property("placement","inserted"),hasContent:function(){return this.get("title")},getPosition:function(){var a;return a=this.$element[0],$.extend({},"function"==typeof a.getBoundingClientRect?a.getBoundingClientRect():{width:a.offsetWidth,height:a.offsetHeight},this.$element.offset())},getCalculatedOffset:function(a,b,c,d){return"bottom"===a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"===a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"===a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},actions:{close:function(){return Bootstrap.TooltipBoxManager.removeTip(this.get("tip_id"))}}}),Ember.Handlebars.helper("bs-popover",Bootstrap.BsPopoverComponent),Bootstrap.BsTooltipComponent=Bootstrap.BsPopoverComponent.extend({classNames:"tooltip",layoutName:"components/bs-tooltip",init:function(){return this._super(),this.classNames.removeObject("popover"),this.set("content",this.get("content")||this.get("title"))}}),Ember.Handlebars.helper("bs-tooltip",Bootstrap.BsTooltipComponent),Bootstrap.TooltipBoxController=Ember.Controller.extend({popoversBinding:"Bootstrap.TooltipBoxManager.popovers",tooltipsBinding:"Bootstrap.TooltipBoxManager.tooltips"}),b="{{#each pop in popovers}} {{bs-popover tip_id=pop.tip_id data=pop.data }}{{/each}}{{#each pop in tooltips}} {{bs-tooltip tip_id=pop.tip_id data=pop.data }}{{/each}}",Ember.TEMPLATES["bs-tooltip-box"]=Ember.Handlebars.compile(b),Bootstrap.TooltipBoxManager=Ember.Object.create({uuid:0,attribute:"bootstrap-tip-id",willSetup:!1,registeredTips:{},registerTip:function(a,b,c){var d,e;return d=++this.uuid,e=this,this.registeredTips[d]={id:d,data:b,eventName:b.trigger||("popover"===a?"click":"hover"),bound:!1,type:a,sticky:b.sticky,show:function(){e.showTip(d)},hide:function(){e.hideTip(d,!0)},toggle:function(){e.toggleTip(d)}},this.willSetup||(this.willSetup=!0,Ember.run.scheduleOnce("afterRender",this,function(){e.setupBindings()})),c.data.view.on("willClearRender",function(){Bootstrap.TooltipBoxManager.removeTip(d),$("["+e.attribute+"='"+d+"']").unbind(),delete Bootstrap.TooltipBoxManager.registeredTips[d]}),d},setupBindings:function(){var a,b,c;for(b in this.registeredTips)if(c=this.registeredTips[b],c.bound===!1)switch(c.bound=!0,a=$("["+this.attribute+"='"+b+"']"),c.eventName){case"click":a.on("click",$.proxy(c.toggle,c));break;case"hover":a.on("mouseenter",$.proxy(c.show,c)),a.on("mouseleave",$.proxy(c.hide,c));break;case"focus":a.on("focusin",$.proxy(c.show,c)),a.on("focusout",$.proxy(c.hide,c));break;case"manual":c.data.addObserver("show",c,function(a,b){var c;c=a.get(b),c?this.show():this.hide()}),c.data.show&&this.show()}this.willSetup=!1},popovers:[],tooltips:[],showing:{},timeout:null,showTip:function(a){var b,c,d;b=this.registeredTips[a].data,d=this.registeredTips[a].type,this.showing[a]||(this.showing[a]=!0,c=Ember.Object.create({data:b,tip_id:a}),"tooltip"===d?this.tooltips.pushObject(c):this.popovers.pushObject(c))},hideTip:function(a,b){var c;this.showing[a]&&(c=this.registeredTips[a].data,b&&c.sticky?this.timedRemove(a):this.removeTip(a))},toggleTip:function(a){this.showing[a]?this.hideTip(a):this.showTip(a)},timedRemove:function(a){var b;b=this,this.timeout=setTimeout(function(){b.removeTip(a)},100)},removeTip:function(a){var b;b=this.popovers.findProperty("tip_id",a)||this.tooltips.findProperty("tip_id"),this.popovers.removeObject(b),this.tooltips.removeObject(b),delete this.showing[a]},addFromView:function(a,b,c){var d,e;return a.attributeBindings.contains(Bootstrap.TooltipBoxManager.attribute)?(e={data:{view:a}},d=Bootstrap.TooltipBoxManager.registerTip(b,c,e),void a.set(Bootstrap.TooltipBoxManager.attribute,d)):void console.warn('TooltipBoxManager.addFromView: You need to add "TooltipBoxManager.attribute" to the attributeBindings!')},helper:function(a,b,c){var d,e,f,g,h,i,j;if("string"==typeof a&&""!==a&&(h=a.split("."),e=h[0],g=c.data.keywords[e],g?(h.removeAt(0),h.insertAt(0,"this"),h=h.join("."),b=g.get(h)):b=this.get(a)),a instanceof Object){b=Ember.Object.create({});for(f in a.hash)j=a.hash[f],i=c.hashTypes[f],"STRING"===i?b.set(f,j):"ID"===i?(h=j.split("."),e=h[0],g=c.data.keywords[e],g?h.removeAt(0):g=this,b._bindings||(b._bindings=g),h.insertAt(0,"_bindings"),h=h.join("."),b[f]="",d=Ember.Binding.from(h).to(f),d.connect(b)):b.set(f,j)}return b}}),Ember.Handlebars.registerHelper("bs-bind-popover",function(a){var b,c,d;return d=arguments[arguments.length-1],c=this,c=Bootstrap.TooltipBoxManager.helper.call(this,a,c,d),b=Bootstrap.TooltipBoxManager.registerTip("popover",c,d),new Ember.Handlebars.SafeString(Bootstrap.TooltipBoxManager.attribute+"='"+b+"'")}),Ember.Handlebars.registerHelper("bs-bind-tooltip",function(a){var b,c,d;return d=arguments[arguments.length-1],c=this,c=Bootstrap.TooltipBoxManager.helper.call(this,a,c,d),b=Bootstrap.TooltipBoxManager.registerTip("tooltip",c,d),new Ember.Handlebars.SafeString(Bootstrap.TooltipBoxManager.attribute+"='"+b+"'")})}).call(this);
|
@@ -44,59 +44,34 @@ Parent component of a progressbar component
|
|
44
44
|
|
45
45
|
}).call(this);
|
46
46
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
function program1(depth0,data) {
|
56
|
-
|
57
|
-
var buffer = '', stack1, hashContexts, hashTypes, options;
|
58
|
-
data.buffer.push("\n ");
|
59
|
-
hashContexts = {'progress': depth0,'type': depth0};
|
60
|
-
hashTypes = {'progress': "ID",'type': "ID"};
|
61
|
-
options = {hash:{
|
62
|
-
'progress': ("progress"),
|
63
|
-
'type': ("type")
|
64
|
-
},contexts:[],types:[],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
|
65
|
-
data.buffer.push(escapeExpression(((stack1 = helpers['bs-progressbar'] || depth0['bs-progressbar']),stack1 ? stack1.call(depth0, options) : helperMissing.call(depth0, "bs-progressbar", options))));
|
47
|
+
Ember.TEMPLATES["components/bs-progress"] = Ember.Handlebars.template({"1":function(depth0,helpers,partials,data) {
|
48
|
+
var helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = '';
|
49
|
+
data.buffer.push(" ");
|
50
|
+
data.buffer.push(escapeExpression(((helpers['bs-progressbar'] || (depth0 && depth0['bs-progressbar']) || helperMissing).call(depth0, {"name":"bs-progressbar","hash":{
|
51
|
+
'type': ("type"),
|
52
|
+
'progress': ("progress")
|
53
|
+
},"hashTypes":{'type': "ID",'progress': "ID"},"hashContexts":{'type': depth0,'progress': depth0},"types":[],"contexts":[],"data":data}))));
|
66
54
|
data.buffer.push("\n");
|
67
55
|
return buffer;
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
data.buffer.push("\n ");
|
74
|
-
hashTypes = {};
|
75
|
-
hashContexts = {};
|
76
|
-
data.buffer.push(escapeExpression(helpers._triageMustache.call(depth0, "yield", {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data})));
|
56
|
+
},"3":function(depth0,helpers,partials,data) {
|
57
|
+
var stack1, buffer = '';
|
58
|
+
data.buffer.push(" ");
|
59
|
+
stack1 = helpers._triageMustache.call(depth0, "yield", {"name":"_triageMustache","hash":{},"hashTypes":{},"hashContexts":{},"types":["ID"],"contexts":[depth0],"data":data});
|
60
|
+
if (stack1 != null) { data.buffer.push(stack1); }
|
77
61
|
data.buffer.push("\n");
|
78
62
|
return buffer;
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
stack1 = helpers['if'].call(depth0, "default", {hash:{},inverse:self.program(3, program3, data),fn:self.program(1, program1, data),contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data});
|
84
|
-
if(stack1 || stack1 === 0) { data.buffer.push(stack1); }
|
63
|
+
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
|
64
|
+
var stack1;
|
65
|
+
stack1 = helpers['if'].call(depth0, "default", {"name":"if","hash":{},"hashTypes":{},"hashContexts":{},"fn":this.program(1, data),"inverse":this.program(3, data),"types":["ID"],"contexts":[depth0],"data":data});
|
66
|
+
if (stack1 != null) { data.buffer.push(stack1); }
|
85
67
|
else { data.buffer.push(''); }
|
86
|
-
|
87
|
-
});
|
88
|
-
|
89
|
-
this["Ember"]["TEMPLATES"]["components/bs-progressbar"] = Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data) {
|
90
|
-
this.compilerInfo = [4,'>= 1.0.0'];
|
91
|
-
helpers = this.merge(helpers, Ember.Handlebars.helpers); data = data || {};
|
92
|
-
var buffer = '', hashTypes, hashContexts, escapeExpression=this.escapeExpression;
|
93
|
-
|
68
|
+
},"useData":true});
|
94
69
|
|
70
|
+
Ember.TEMPLATES["components/bs-progressbar"] = Ember.Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
|
71
|
+
var stack1, buffer = '';
|
95
72
|
data.buffer.push("<span class=\"sr-only\">");
|
96
|
-
|
97
|
-
|
98
|
-
data.buffer.push(escapeExpression(helpers._triageMustache.call(depth0, "progress", {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data})));
|
73
|
+
stack1 = helpers._triageMustache.call(depth0, "progress", {"name":"_triageMustache","hash":{},"hashTypes":{},"hashContexts":{},"types":["ID"],"contexts":[depth0],"data":data});
|
74
|
+
if (stack1 != null) { data.buffer.push(stack1); }
|
99
75
|
data.buffer.push("% Complete</span>");
|
100
76
|
return buffer;
|
101
|
-
|
102
|
-
});
|
77
|
+
},"useData":true});
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
(function(){Bootstrap.BsProgressComponent=Ember.Component.extend({layoutName:"components/bs-progress",classNames:["progress"],classNameBindings:["animated:active","stripped:progress-striped"],progress:null,stripped:!1,animated:!1,"default":function(){return this.progress}.property("progress")}),Ember.Handlebars.helper("bs-progress",Bootstrap.BsProgressComponent)}).call(this),function(){Bootstrap.BsProgressbarComponent=Ember.Component.extend(Bootstrap.TypeSupport,{layoutName:"components/bs-progressbar",classNames:["progress-bar"],attributeBindings:["style","role","aria-valuemin","ariaValueNow:aria-valuenow","aria-valuemax"],classTypePrefix:"progress-bar",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,init:function(){return this._super()},style:function(){return"width:"+this.progress+"%;"}.property("progress").cacheable(),ariaValueNow:function(){return this.progress}.property("progress").cacheable()}),Ember.Handlebars.helper("bs-progressbar",Bootstrap.BsProgressbarComponent)}.call(this),Ember.TEMPLATES["components/bs-progress"]=Ember.Handlebars.template({1:function(a,b,c,d){var e=b.helperMissing,f=this.escapeExpression,g="";return d.buffer.push(" "),d.buffer.push(f((b["bs-progressbar"]||a&&a["bs-progressbar"]||e).call(a,{name:"bs-progressbar",hash:{type:"type",progress:"progress"},hashTypes:{type:"ID",progress:"ID"},hashContexts:{type:a,progress:a},types:[],contexts:[],data:d}))),d.buffer.push("\n"),g},3:function(a,b,c,d){var e,f="";return d.buffer.push(" "),e=b._triageMustache.call(a,"yield",{name:"_triageMustache",hash:{},hashTypes:{},hashContexts:{},types:["ID"],contexts:[a],data:d}),null!=e&&d.buffer.push(e),d.buffer.push("\n"),f},compiler:[6,">= 2.0.0-beta.1"],main:function(a,b,c,d){var e;e=b["if"].call(a,"default",{name:"if",hash:{},hashTypes:{},hashContexts:{},fn:this.program(1,d),inverse:this.program(3,d),types:["ID"],contexts:[a],data:d}),d.buffer.push(null!=e?e:"")},useData:!0}),Ember.TEMPLATES["components/bs-progressbar"]=Ember.Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(a,b,c,d){var e,f="";return d.buffer.push('<span class="sr-only">'),e=b._triageMustache.call(a,"progress",{name:"_triageMustache",hash:{},hashTypes:{},hashContexts:{},types:["ID"],contexts:[a],data:d}),null!=e&&d.buffer.push(e),d.buffer.push("% Complete</span>"),f},useData:!0});
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
(function(){Bootstrap.BsWizardStep=Bootstrap.ItemView.extend(Bootstrap.ItemSelection,Bootstrap.NavItem,{classNames:["wizard-step"],classNameBindings:["completed"],completed:!1,template:Ember.Handlebars.compile(["{{view view.stepAsLink}}"].join("\n")),stepAsLink:Ember.View.extend({tagName:"a",template:Ember.Handlebars.compile("{{view.parentView.title}}"),attributeBindings:["href"],href:"#"})}),Bootstrap.BsWizardSteps=Bootstrap.ItemsView.extend(Bootstrap.Nav,{navType:"pills",classNames:["wizard-steps"],itemViewClass:Bootstrap.BsWizardStep,currentItemIdx:function(){var a,b,c,d,e,f,g;for(b=this.get("selected"),a=0,g=this._childViews,e=0,f=g.length;f>e;e++){if(d=g[e],d.get("content")===b){c=d;break}a++}return c?a:null}.property("selected")}),Bootstrap.BsWizardStepPane=Bootstrap.ItemPaneView.extend(),Bootstrap.BsWizardStepsPanes=Bootstrap.ItemsPanesView.extend({classNames:["wizard-panes"],itemViewClass:Bootstrap.BsWizardStepPane}),Bootstrap.BsWizardComponent=Ember.ContainerView.extend(Ember.TargetActionSupport,{classNames:["wizard"],childViews:["steps","panes","controls"],prevAllowed:!0,items:function(){var a;return null!=(a=this._childViews)?a[0]:void 0}.property("content"),panes:function(){return this._childViews[1]}.property("content"),steps:Bootstrap.BsWizardSteps.extend({contentBinding:"parentView.content",selectedBinding:"parentView.selected"}),panes:Bootstrap.BsWizardStepsPanes.extend({contentBinding:"parentView.content"}),controls:Ember.ContainerView.extend({childViews:["prev","next","finish"],prev:Bootstrap.BsButtonComponent.extend({layoutName:"components/bs-button",title:"Prev",size:"xs","data-rel":"PREV",isVisible:function(){return this.get("parentView").get("parentView").get("hasPrev")}.property("parentView.parentView.items.selected")}),next:Bootstrap.BsButtonComponent.extend({layoutName:"components/bs-button",title:"Next",size:"xs","data-rel":"NEXT",isVisible:function(){return this.get("parentView").get("parentView").get("hasNext")}.property("parentView.parentView.items.selected")}),finish:Bootstrap.BsButtonComponent.extend({layoutName:"components/bs-button",title:"Finish",size:"xs","data-rel":"FINISH",isVisible:function(){return this.get("parentView").get("parentView").get("isLast")}.property("parentView.parentView.items.selected")})}),currentStepIdx:function(){return this.get("items").get("currentItemIdx")}.property("items.selected"),willInsertElement:function(){return this.get("panes").set("items-id",this.get("items").get("elementId")),this.get("items").set("default",this.get("items")._childViews[0].get("content").get("title"))},click:function(a){var b;return b=a.target.getAttribute("data-rel"),"PREV"===b&&this.prev(),"NEXT"===b&&this.next(),"FINISH"===b?this.close():void 0},next:function(){var a;return this.get("hasNext")?(this.stepCompleted(this.get("currentStepIdx")),a=this.get("currentStepIdx")+1,this.move(a),this.triggerAction({action:"onNext",actionContext:this.get("targetObject")})):void 0},prev:function(){var a;return this.get("hasPrev")?(a=this.get("currentStepIdx")-1,this.stepCompleted(a,!1),this.move(a),this.triggerAction({action:"onPrev",actionContext:this.get("targetObject")})):void 0},move:function(a){var b,c;return null!=(b=this._childViews[0])?b.set("selected",null!=(c=this._childViews[0]._childViews[a])?c.get("content"):void 0):void 0},hasNext:function(){return this.get("items")._childViews.length>this.get("currentStepIdx")+1}.property("currentStepIdx"),hasPrev:function(){return this.get("currentStepIdx")>0,this.get("currentStepIdx")>0&&this.get("prevAllowed")}.property("currentStepIdx"),isLast:function(){return this.get("items")._childViews.length===this.get("currentStepIdx")+1}.property("currentStepIdx"),close:function(){return this.triggerAction({action:"onFinish",actionContext:this.get("targetObject")}),this.destroy()},stepCompleted:function(a,b){return null==b&&(b=!0),this._childViews[0]._childViews[a].set("completed",b)}}),Bootstrap.BsWizardComponent=Bootstrap.BsWizardComponent.reopenClass({build:function(a){var b;return a||(a={}),a.manual=!0,b=this.create(a),b.append()}}),Ember.Handlebars.helper("bs-wizard",Bootstrap.BsWizardComponent)}).call(this);
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bootstrap-for-ember-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dave Spurr
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|