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.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(){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.Handlebars.template({1:function(a,b,c,d){var e,f="";return d.buffer.push(" <small>"),e=b._triageMustache.call(a,"sub",{name:"_triageMustache",hash:{},hashTypes:{},hashContexts:{},types:["ID"],contexts:[a],data:d}),null!=e&&d.buffer.push(e),d.buffer.push("</small>\n"),f},compiler:[6,">= 2.0.0-beta.1"],main:function(a,b,c,d){var e,f="";return d.buffer.push("<h1>\n "),e=b._triageMustache.call(a,"title",{name:"_triageMustache",hash:{},hashTypes:{},hashContexts:{},types:["ID"],contexts:[a],data:d}),null!=e&&d.buffer.push(e),d.buffer.push("\n"),e=b["if"].call(a,"sub",{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("</h1>"),f},useData:!0}),Ember.TEMPLATES["components/bs-well"]=Ember.Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(a,b,c,d){var e;e=b._triageMustache.call(a,"yield",{name:"_triageMustache",hash:{},hashTypes:{},hashContexts:{},types:["ID"],contexts:[a],data:d}),d.buffer.push(null!=e?e:"")},useData:!0}),Ember.TEMPLATES["components/bs-panel"]=Ember.Handlebars.template({1:function(a,b,c,d){var e,f="";return d.buffer.push(' <div class="panel-heading">\n'),e=b["if"].call(a,"collapsible",{name:"if",hash:{},hashTypes:{},hashContexts:{},fn:this.program(2,d),inverse:this.program(4,d),types:["ID"],contexts:[a],data:d}),null!=e&&d.buffer.push(e),e=b["if"].call(a,"dismiss",{name:"if",hash:{},hashTypes:{},hashContexts:{},fn:this.program(6,d),inverse:this.noop,types:["ID"],contexts:[a],data:d}),null!=e&&d.buffer.push(e),d.buffer.push(" </div>\n"),f},2:function(a,b,c,d){var e,f=this.escapeExpression,g="";return d.buffer.push(' <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" '),d.buffer.push(f(b["bind-attr"].call(a,{name:"bind-attr",hash:{href:"collapsibleBodyLink"},hashTypes:{href:"ID"},hashContexts:{href:a},types:[],contexts:[],data:d}))),d.buffer.push(">\n "),e=b._triageMustache.call(a,"heading",{name:"_triageMustache",hash:{},hashTypes:{},hashContexts:{},types:["ID"],contexts:[a],data:d}),null!=e&&d.buffer.push(e),d.buffer.push("\n </a>\n"),g},4:function(a,b,c,d){var e,f="";return d.buffer.push(" "),e=b._triageMustache.call(a,"heading",{name:"_triageMustache",hash:{},hashTypes:{},hashContexts:{},types:["ID"],contexts:[a],data:d}),null!=e&&d.buffer.push(e),d.buffer.push("\n"),f},6:function(a,b,c,d){var e=this.escapeExpression,f="";return d.buffer.push(' <a class="close" data-dismiss="panel" '),d.buffer.push(e(b.action.call(a,"close",{name:"action",hash:{},hashTypes:{},hashContexts:{},types:["STRING"],contexts:[a],data:d}))),d.buffer.push(">×</a>\n"),f},8:function(a,b,c,d){var e,f=this.escapeExpression,g="";return d.buffer.push(" <div "),d.buffer.push(f(b["bind-attr"].call(a,{name:"bind-attr",hash:{id:"collapsibleBodyId"},hashTypes:{id:"ID"},hashContexts:{id:a},types:[],contexts:[],data:d}))),d.buffer.push(" "),d.buffer.push(f(b["bind-attr"].call(a,{name:"bind-attr",hash:{"class":":panel-collapse :collapse open:in"},hashTypes:{"class":"STRING"},hashContexts:{"class":a},types:[],contexts:[],data:d}))),d.buffer.push('>\n <div class="panel-body">'),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("</div>\n </div>\n"),g},10:function(a,b,c,d){var e,f="";return d.buffer.push(' <div id="collapseOne" class="panel-body">'),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("</div>\n"),f},12:function(a,b,c,d){var e,f="";return d.buffer.push(' <div class="panel-footer">'),e=b._triageMustache.call(a,"footer",{name:"_triageMustache",hash:{},hashTypes:{},hashContexts:{},types:["ID"],contexts:[a],data:d}),null!=e&&d.buffer.push(e),d.buffer.push("</div>\n"),f},compiler:[6,">= 2.0.0-beta.1"],main:function(a,b,c,d){var e,f="";return e=b["if"].call(a,"heading",{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("\n"),e=b["if"].call(a,"collapsible",{name:"if",hash:{},hashTypes:{},hashContexts:{},fn:this.program(8,d),inverse:this.program(10,d),types:["ID"],contexts:[a],data:d}),null!=e&&d.buffer.push(e),d.buffer.push("\n"),e=b["if"].call(a,"footer",{name:"if",hash:{},hashTypes:{},hashContexts:{},fn:this.program(12,d),inverse:this.noop,types:["ID"],contexts:[a],data:d}),null!=e&&d.buffer.push(e),f},useData:!0});
|
@@ -1 +1 @@
|
|
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);
|
@@ -1,113 +1,3 @@
|
|
1
|
-
/* ========================================================================
|
2
|
-
* Bootstrap: button.js v3.0.0
|
3
|
-
* http://twbs.github.com/bootstrap/javascript.html#buttons
|
4
|
-
* ========================================================================
|
5
|
-
* Copyright 2013 Twitter, Inc.
|
6
|
-
*
|
7
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
-
* you may not use this file except in compliance with the License.
|
9
|
-
* You may obtain a copy of the License at
|
10
|
-
*
|
11
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
12
|
-
*
|
13
|
-
* Unless required by applicable law or agreed to in writing, software
|
14
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
-
* See the License for the specific language governing permissions and
|
17
|
-
* limitations under the License.
|
18
|
-
* ======================================================================== */
|
19
|
-
|
20
|
-
|
21
|
-
+function ($) { "use strict";
|
22
|
-
|
23
|
-
// BUTTON PUBLIC CLASS DEFINITION
|
24
|
-
// ==============================
|
25
|
-
|
26
|
-
var Button = function (element, options) {
|
27
|
-
this.$element = $(element)
|
28
|
-
this.options = $.extend({}, Button.DEFAULTS, options)
|
29
|
-
}
|
30
|
-
|
31
|
-
Button.DEFAULTS = {
|
32
|
-
loadingText: 'loading...'
|
33
|
-
}
|
34
|
-
|
35
|
-
Button.prototype.setState = function (state) {
|
36
|
-
var d = 'disabled'
|
37
|
-
var $el = this.$element
|
38
|
-
var val = $el.is('input') ? 'val' : 'html'
|
39
|
-
var data = $el.data()
|
40
|
-
|
41
|
-
state = state + 'Text'
|
42
|
-
|
43
|
-
if (!data.resetText) $el.data('resetText', $el[val]())
|
44
|
-
|
45
|
-
$el[val](data[state] || this.options[state])
|
46
|
-
|
47
|
-
// push to event loop to allow forms to submit
|
48
|
-
setTimeout(function () {
|
49
|
-
state == 'loadingText' ?
|
50
|
-
$el.addClass(d).attr(d, d) :
|
51
|
-
$el.removeClass(d).removeAttr(d);
|
52
|
-
}, 0)
|
53
|
-
}
|
54
|
-
|
55
|
-
Button.prototype.toggle = function () {
|
56
|
-
var $parent = this.$element.closest('[data-toggle="buttons"]')
|
57
|
-
|
58
|
-
if ($parent.length) {
|
59
|
-
var $input = this.$element.find('input')
|
60
|
-
.prop('checked', !this.$element.hasClass('active'))
|
61
|
-
.trigger('change')
|
62
|
-
if ($input.prop('type') === 'radio') $parent.find('.active').removeClass('active')
|
63
|
-
}
|
64
|
-
|
65
|
-
this.$element.toggleClass('active')
|
66
|
-
}
|
67
|
-
|
68
|
-
|
69
|
-
// BUTTON PLUGIN DEFINITION
|
70
|
-
// ========================
|
71
|
-
|
72
|
-
var old = $.fn.button
|
73
|
-
|
74
|
-
$.fn.button = function (option) {
|
75
|
-
return this.each(function () {
|
76
|
-
var $this = $(this)
|
77
|
-
var data = $this.data('bs.button')
|
78
|
-
var options = typeof option == 'object' && option
|
79
|
-
|
80
|
-
if (!data) $this.data('bs.button', (data = new Button(this, options)))
|
81
|
-
|
82
|
-
if (option == 'toggle') data.toggle()
|
83
|
-
else if (option) data.setState(option)
|
84
|
-
})
|
85
|
-
}
|
86
|
-
|
87
|
-
$.fn.button.Constructor = Button
|
88
|
-
|
89
|
-
|
90
|
-
// BUTTON NO CONFLICT
|
91
|
-
// ==================
|
92
|
-
|
93
|
-
$.fn.button.noConflict = function () {
|
94
|
-
$.fn.button = old
|
95
|
-
return this
|
96
|
-
}
|
97
|
-
|
98
|
-
|
99
|
-
// BUTTON DATA-API
|
100
|
-
// ===============
|
101
|
-
|
102
|
-
$(document).on('click.bs.button.data-api', '[data-toggle^=button]', function (e) {
|
103
|
-
var $btn = $(e.target)
|
104
|
-
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
|
105
|
-
$btn.button('toggle')
|
106
|
-
e.preventDefault()
|
107
|
-
})
|
108
|
-
|
109
|
-
}(window.jQuery);
|
110
|
-
|
111
1
|
(function() {
|
112
2
|
Bootstrap.BsButtonComponent = Ember.Component.extend(Bootstrap.TypeSupport, Bootstrap.SizeSupport, {
|
113
3
|
layoutName: 'components/bs-button',
|
@@ -223,53 +113,27 @@ A collection of button groups
|
|
223
113
|
|
224
114
|
}).call(this);
|
225
115
|
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
this.compilerInfo = [4,'>= 1.0.0'];
|
231
|
-
helpers = this.merge(helpers, Ember.Handlebars.helpers); data = data || {};
|
232
|
-
var buffer = '', stack1, hashTypes, hashContexts, helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, self=this;
|
233
|
-
|
234
|
-
function program1(depth0,data) {
|
235
|
-
|
236
|
-
var buffer = '', stack1, hashContexts, hashTypes, options;
|
237
|
-
data.buffer.push("\n <i ");
|
238
|
-
hashContexts = {'class': depth0};
|
239
|
-
hashTypes = {'class': "STRING"};
|
240
|
-
options = {hash:{
|
116
|
+
Ember.TEMPLATES["components/bs-button"] = Ember.Handlebars.template({"1":function(depth0,helpers,partials,data) {
|
117
|
+
var escapeExpression=this.escapeExpression, buffer = '';
|
118
|
+
data.buffer.push(" <i ");
|
119
|
+
data.buffer.push(escapeExpression(helpers['bind-attr'].call(depth0, {"name":"bind-attr","hash":{
|
241
120
|
'class': ("icon")
|
242
|
-
},
|
243
|
-
data.buffer.push(escapeExpression(((stack1 = helpers['bind-attr'] || depth0['bind-attr']),stack1 ? stack1.call(depth0, options) : helperMissing.call(depth0, "bind-attr", options))));
|
121
|
+
},"hashTypes":{'class': "STRING"},"hashContexts":{'class': depth0},"types":[],"contexts":[],"data":data})));
|
244
122
|
data.buffer.push("></i>\n");
|
245
123
|
return buffer;
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
stack1 = helpers
|
251
|
-
if(stack1
|
252
|
-
|
253
|
-
|
254
|
-
hashContexts = {};
|
255
|
-
data.buffer.push(escapeExpression(helpers._triageMustache.call(depth0, "title", {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data})));
|
256
|
-
hashTypes = {};
|
257
|
-
hashContexts = {};
|
258
|
-
data.buffer.push(escapeExpression(helpers._triageMustache.call(depth0, "yield", {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data})));
|
124
|
+
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
|
125
|
+
var stack1, buffer = '';
|
126
|
+
stack1 = helpers['if'].call(depth0, "icon", {"name":"if","hash":{},"hashTypes":{},"hashContexts":{},"fn":this.program(1, data),"inverse":this.noop,"types":["ID"],"contexts":[depth0],"data":data});
|
127
|
+
if (stack1 != null) { data.buffer.push(stack1); }
|
128
|
+
stack1 = helpers._triageMustache.call(depth0, "title", {"name":"_triageMustache","hash":{},"hashTypes":{},"hashContexts":{},"types":["ID"],"contexts":[depth0],"data":data});
|
129
|
+
if (stack1 != null) { data.buffer.push(stack1); }
|
130
|
+
stack1 = helpers._triageMustache.call(depth0, "yield", {"name":"_triageMustache","hash":{},"hashTypes":{},"hashContexts":{},"types":["ID"],"contexts":[depth0],"data":data});
|
131
|
+
if (stack1 != null) { data.buffer.push(stack1); }
|
259
132
|
return buffer;
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
helpers = this.merge(helpers, Ember.Handlebars.helpers); data = data || {};
|
268
|
-
var hashTypes, hashContexts, escapeExpression=this.escapeExpression;
|
269
|
-
|
270
|
-
|
271
|
-
hashTypes = {};
|
272
|
-
hashContexts = {};
|
273
|
-
data.buffer.push(escapeExpression(helpers._triageMustache.call(depth0, "yield", {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data})));
|
274
|
-
|
275
|
-
});
|
133
|
+
},"useData":true});
|
134
|
+
Ember.TEMPLATES["components/bs-btn-toolbar"] = Ember.Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
|
135
|
+
var stack1;
|
136
|
+
stack1 = helpers._triageMustache.call(depth0, "yield", {"name":"_triageMustache","hash":{},"hashTypes":{},"hashContexts":{},"types":["ID"],"contexts":[depth0],"data":data});
|
137
|
+
if (stack1 != null) { data.buffer.push(stack1); }
|
138
|
+
else { data.buffer.push(''); }
|
139
|
+
},"useData":true});
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
(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(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.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":"icon"},hashTypes:{"class":"STRING"},hashContexts:{"class":a},types:[],contexts:[],data:d}))),d.buffer.push("></i>\n"),f},compiler:[6,">= 2.0.0-beta.1"],main:function(a,b,c,d){var e,f="";return e=b["if"].call(a,"icon",{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),e=b._triageMustache.call(a,"title",{name:"_triageMustache",hash:{},hashTypes:{},hashContexts:{},types:["ID"],contexts:[a],data:d}),null!=e&&d.buffer.push(e),e=b._triageMustache.call(a,"yield",{name:"_triageMustache",hash:{},hashTypes:{},hashContexts:{},types:["ID"],contexts:[a],data:d}),null!=e&&d.buffer.push(e),f},useData:!0}),Ember.TEMPLATES["components/bs-btn-toolbar"]=Ember.Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(a,b,c,d){var e;e=b._triageMustache.call(a,"yield",{name:"_triageMustache",hash:{},hashTypes:{},hashContexts:{},types:["ID"],contexts:[a],data:d}),d.buffer.push(null!=e?e:"")},useData:!0});
|
@@ -1,60 +1,3 @@
|
|
1
|
-
/* ========================================================================
|
2
|
-
* Bootstrap: transition.js v3.0.0
|
3
|
-
* http://twbs.github.com/bootstrap/javascript.html#transitions
|
4
|
-
* ========================================================================
|
5
|
-
* Copyright 2013 Twitter, Inc.
|
6
|
-
*
|
7
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
-
* you may not use this file except in compliance with the License.
|
9
|
-
* You may obtain a copy of the License at
|
10
|
-
*
|
11
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
12
|
-
*
|
13
|
-
* Unless required by applicable law or agreed to in writing, software
|
14
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
-
* See the License for the specific language governing permissions and
|
17
|
-
* limitations under the License.
|
18
|
-
* ======================================================================== */
|
19
|
-
|
20
|
-
|
21
|
-
+function ($) { "use strict";
|
22
|
-
|
23
|
-
// CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
|
24
|
-
// ============================================================
|
25
|
-
|
26
|
-
function transitionEnd() {
|
27
|
-
var el = document.createElement('bootstrap')
|
28
|
-
|
29
|
-
var transEndEventNames = {
|
30
|
-
'WebkitTransition' : 'webkitTransitionEnd'
|
31
|
-
, 'MozTransition' : 'transitionend'
|
32
|
-
, 'OTransition' : 'oTransitionEnd otransitionend'
|
33
|
-
, 'transition' : 'transitionend'
|
34
|
-
}
|
35
|
-
|
36
|
-
for (var name in transEndEventNames) {
|
37
|
-
if (el.style[name] !== undefined) {
|
38
|
-
return { end: transEndEventNames[name] }
|
39
|
-
}
|
40
|
-
}
|
41
|
-
}
|
42
|
-
|
43
|
-
// http://blog.alexmaccaw.com/css-transitions
|
44
|
-
$.fn.emulateTransitionEnd = function (duration) {
|
45
|
-
var called = false, $el = this
|
46
|
-
$(this).one($.support.transition.end, function () { called = true })
|
47
|
-
var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
|
48
|
-
setTimeout(callback, duration)
|
49
|
-
return this
|
50
|
-
}
|
51
|
-
|
52
|
-
$(function () {
|
53
|
-
$.support.transition = transitionEnd()
|
54
|
-
})
|
55
|
-
|
56
|
-
}(window.jQuery);
|
57
|
-
|
58
1
|
(function() {
|
59
2
|
var Bootstrap;
|
60
3
|
|
@@ -417,7 +360,7 @@ Views that inherits from this view can be enhanced with:
|
|
417
360
|
|
418
361
|
(function() {
|
419
362
|
Bootstrap.ItemPaneView = Ember.View.extend({
|
420
|
-
template: Ember.Handlebars.compile(
|
363
|
+
template: Ember.Handlebars.compile('{{#if view.content.template}}{{partial view.content.template}}{{/if}}'),
|
421
364
|
corrItem: (function() {
|
422
365
|
var view, _i, _len, _ref;
|
423
366
|
if (this.get('parentView').get('corrItemsView') != null) {
|
@@ -447,16 +390,6 @@ Views that inherits from this view can be enhanced with:
|
|
447
390
|
}).property('content')
|
448
391
|
});
|
449
392
|
|
450
|
-
Ember.Handlebars.helper("bsItemPanePartial", function(templateName, options) {
|
451
|
-
var template, view;
|
452
|
-
view = options.data.view;
|
453
|
-
template = view.templateForName(templateName);
|
454
|
-
Ember.assert("Unable to find template with name '" + templateName + "'", template);
|
455
|
-
return template(this, {
|
456
|
-
data: options.data
|
457
|
-
});
|
458
|
-
});
|
459
|
-
|
460
393
|
}).call(this);
|
461
394
|
|
462
395
|
(function() {
|
@@ -474,3 +407,16 @@ Views that inherits from this view can be enhanced with:
|
|
474
407
|
});
|
475
408
|
|
476
409
|
}).call(this);
|
410
|
+
|
411
|
+
Ember.TEMPLATES["app/templates/views/item-pane"] = Ember.Handlebars.template({"1":function(depth0,helpers,partials,data) {
|
412
|
+
var helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = '';
|
413
|
+
data.buffer.push(" ");
|
414
|
+
data.buffer.push(escapeExpression(((helpers.partial || (depth0 && depth0.partial) || helperMissing).call(depth0, "view.content.template", {"name":"partial","hash":{},"hashTypes":{},"hashContexts":{},"types":["ID"],"contexts":[depth0],"data":data}))));
|
415
|
+
data.buffer.push("\n");
|
416
|
+
return buffer;
|
417
|
+
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
|
418
|
+
var stack1, buffer = '';
|
419
|
+
stack1 = helpers['if'].call(depth0, "view.content.template", {"name":"if","hash":{},"hashTypes":{},"hashContexts":{},"fn":this.program(1, data),"inverse":this.noop,"types":["ID"],"contexts":[depth0],"data":data});
|
420
|
+
if (stack1 != null) { data.buffer.push(stack1); }
|
421
|
+
return buffer;
|
422
|
+
},"useData":true});
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
(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}.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}}{{partial view.content.template}}{{/if}}"),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")})}.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.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.partial||a&&a.partial||e).call(a,"view.content.template",{name:"partial",hash:{},hashTypes:{},hashContexts:{},types:["ID"],contexts:[a],data:d}))),d.buffer.push("\n"),g},compiler:[6,">= 2.0.0-beta.1"],main:function(a,b,c,d){var e,f="";return e=b["if"].call(a,"view.content.template",{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),f},useData:!0});
|
data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-growl-notifications.min.js
CHANGED
@@ -1 +1 @@
|
|
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('<span class="icon"><i class="fa {{unbound view.iconType}}"></i></span>\n<a class="close-notification" {{action "close" target="view"}}>\n <span style="font-size: 15px;"><i class="fa fa-times"></i></span>\n</a>\n<strong>\n {{view.content.title}}\n</strong>\n<p>\n {{view.content.sub}}\n</p>'),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);
|
@@ -1 +1 @@
|
|
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);
|
@@ -10,17 +10,9 @@
|
|
10
10
|
|
11
11
|
}).call(this);
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
var hashTypes, hashContexts, escapeExpression=this.escapeExpression;
|
20
|
-
|
21
|
-
|
22
|
-
hashTypes = {};
|
23
|
-
hashContexts = {};
|
24
|
-
data.buffer.push(escapeExpression(helpers._triageMustache.call(depth0, "content", {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data})));
|
25
|
-
|
26
|
-
});
|
13
|
+
Ember.TEMPLATES["components/bs-label"] = Ember.Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
|
14
|
+
var stack1;
|
15
|
+
stack1 = helpers._triageMustache.call(depth0, "content", {"name":"_triageMustache","hash":{},"hashTypes":{},"hashContexts":{},"types":["ID"],"contexts":[depth0],"data":data});
|
16
|
+
if (stack1 != null) { data.buffer.push(stack1); }
|
17
|
+
else { data.buffer.push(''); }
|
18
|
+
},"useData":true});
|
@@ -1 +1 @@
|
|
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),Ember.TEMPLATES["components/bs-label"]=Ember.Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(a,b,c,d){var e;e=b._triageMustache.call(a,"content",{name:"_triageMustache",hash:{},hashTypes:{},hashContexts:{},types:["ID"],contexts:[a],data:d}),d.buffer.push(null!=e?e:"")},useData:!0});
|
@@ -1 +1 @@
|
|
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 <h4 class="list-group-item-heading">{{view.title}}</h4>\n <p class="list-group-item-text">{{view.sub}}</p>\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);
|
@@ -7,6 +7,7 @@ Modal component.
|
|
7
7
|
Bootstrap.BsModalComponent = Ember.Component.extend(Ember.Evented, {
|
8
8
|
layoutName: 'components/bs-modal',
|
9
9
|
classNames: ['modal'],
|
10
|
+
classNameBindings: ['fade', 'isVis:in'],
|
10
11
|
attributeBindings: ['role', 'aria-labelledby', 'isAriaHidden:aria-hidden', "ariaLabelledBy:aria-labelledby"],
|
11
12
|
isAriaHidden: (function() {
|
12
13
|
return "" + (this.get('isVisible'));
|
@@ -18,6 +19,9 @@ Modal component.
|
|
18
19
|
title: null,
|
19
20
|
isVisible: false,
|
20
21
|
manual: false,
|
22
|
+
isVis: false,
|
23
|
+
fullSizeButtons: false,
|
24
|
+
fade: true,
|
21
25
|
didInsertElement: function() {
|
22
26
|
var name;
|
23
27
|
this._super();
|
@@ -33,11 +37,13 @@ Modal component.
|
|
33
37
|
}
|
34
38
|
},
|
35
39
|
becameVisible: function() {
|
40
|
+
Em.$('body').addClass('modal-open');
|
36
41
|
if (this.get("backdrop")) {
|
37
42
|
return this.appendBackdrop();
|
38
43
|
}
|
39
44
|
},
|
40
45
|
becameHidden: function() {
|
46
|
+
Em.$('body').removeClass('modal-open');
|
41
47
|
if (this._backdrop) {
|
42
48
|
return this._backdrop.remove();
|
43
49
|
}
|
@@ -48,10 +54,21 @@ Modal component.
|
|
48
54
|
return this._backdrop = Em.$(this.modalBackdrop).appendTo(parentElement);
|
49
55
|
},
|
50
56
|
show: function() {
|
51
|
-
|
57
|
+
var current;
|
58
|
+
this.set('isVisible', true);
|
59
|
+
current = this;
|
60
|
+
setTimeout((function() {
|
61
|
+
current.set('isVis', true);
|
62
|
+
}), 15);
|
52
63
|
},
|
53
64
|
hide: function() {
|
54
|
-
|
65
|
+
var current;
|
66
|
+
this.set('isVis', false);
|
67
|
+
current = this;
|
68
|
+
this.$().one('webkitTransitionEnd', function(e) {
|
69
|
+
current.set('isVisible', false);
|
70
|
+
});
|
71
|
+
return false;
|
55
72
|
},
|
56
73
|
toggle: function() {
|
57
74
|
return this.toggleProperty('isVisible');
|
@@ -70,15 +87,21 @@ Modal component.
|
|
70
87
|
}
|
71
88
|
},
|
72
89
|
close: function(event) {
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
90
|
+
var current;
|
91
|
+
this.set('isVis', false);
|
92
|
+
current = this;
|
93
|
+
this.$().one('webkitTransitionEnd', function(e) {
|
94
|
+
if (current.get('manual')) {
|
95
|
+
current.destroy();
|
96
|
+
} else {
|
97
|
+
current.hide();
|
98
|
+
}
|
99
|
+
});
|
78
100
|
return this.trigger('closed');
|
79
101
|
},
|
80
102
|
willDestroyElement: function() {
|
81
103
|
var name;
|
104
|
+
Em.$('body').removeClass('modal-open');
|
82
105
|
this.removeHandlers();
|
83
106
|
name = this.get('name');
|
84
107
|
if (name == null) {
|
@@ -137,29 +160,86 @@ Modal component.
|
|
137
160
|
toggle: function(name) {
|
138
161
|
return this.get(name).toggle();
|
139
162
|
},
|
140
|
-
confirm: function(controller, title, message, confirmButtonTitle, cancelButtonTitle) {
|
163
|
+
confirm: function(controller, title, message, confirmButtonTitle, confirmButtonEvent, confirmButtonType, cancelButtonTitle, cancelButtonEvent, cancelButtonType, targetObj, fade, fullSizeButtons) {
|
141
164
|
var body, buttons;
|
142
165
|
if (confirmButtonTitle == null) {
|
143
166
|
confirmButtonTitle = "Confirm";
|
144
167
|
}
|
168
|
+
if (confirmButtonEvent == null) {
|
169
|
+
confirmButtonEvent = "modalConfirmed";
|
170
|
+
}
|
171
|
+
if (confirmButtonType == null) {
|
172
|
+
confirmButtonType = null;
|
173
|
+
}
|
145
174
|
if (cancelButtonTitle == null) {
|
146
175
|
cancelButtonTitle = "Cancel";
|
147
176
|
}
|
177
|
+
if (cancelButtonEvent == null) {
|
178
|
+
cancelButtonEvent = "modalCanceled";
|
179
|
+
}
|
180
|
+
if (cancelButtonType == null) {
|
181
|
+
cancelButtonType = null;
|
182
|
+
}
|
183
|
+
if (targetObj == null) {
|
184
|
+
targetObj = controller;
|
185
|
+
}
|
186
|
+
if (fade == null) {
|
187
|
+
fade = true;
|
188
|
+
}
|
189
|
+
if (fullSizeButtons == null) {
|
190
|
+
fullSizeButtons = false;
|
191
|
+
}
|
148
192
|
body = Ember.View.extend({
|
149
193
|
template: Ember.Handlebars.compile(message || "Are you sure you would like to perform this action?")
|
150
194
|
});
|
151
195
|
buttons = [
|
152
196
|
Ember.Object.create({
|
153
197
|
title: confirmButtonTitle,
|
154
|
-
clicked:
|
198
|
+
clicked: confirmButtonEvent,
|
199
|
+
type: confirmButtonType,
|
155
200
|
dismiss: 'modal'
|
156
201
|
}), Ember.Object.create({
|
157
202
|
title: cancelButtonTitle,
|
158
|
-
clicked:
|
203
|
+
clicked: cancelButtonEvent,
|
204
|
+
type: cancelButtonType,
|
205
|
+
dismiss: 'modal'
|
206
|
+
})
|
207
|
+
];
|
208
|
+
return this.open('confirm-modal', title || 'Confirmation required!', body, buttons, controller, fade, fullSizeButtons, targetObj);
|
209
|
+
}
|
210
|
+
}, {
|
211
|
+
okModal: function(controller, title, message, okButtonTitle, okButtonEvent, okButtonType, targetObj, fade, fullSizeButtons) {
|
212
|
+
var body, buttons;
|
213
|
+
if (okButtonTitle == null) {
|
214
|
+
okButtonTitle = "OK";
|
215
|
+
}
|
216
|
+
if (okButtonEvent == null) {
|
217
|
+
okButtonEvent = "okModal";
|
218
|
+
}
|
219
|
+
if (okButtonType == null) {
|
220
|
+
okButtonType = null;
|
221
|
+
}
|
222
|
+
if (targetObj == null) {
|
223
|
+
targetObj = controller;
|
224
|
+
}
|
225
|
+
if (fade == null) {
|
226
|
+
fade = true;
|
227
|
+
}
|
228
|
+
if (fullSizeButtons == null) {
|
229
|
+
fullSizeButtons = false;
|
230
|
+
}
|
231
|
+
body = Ember.View.extend({
|
232
|
+
template: Ember.Handlebars.compile(message || "Are you sure you would like to perform this action?")
|
233
|
+
});
|
234
|
+
buttons = [
|
235
|
+
Ember.Object.create({
|
236
|
+
title: okButtonTitle,
|
237
|
+
clicked: okButtonEvent,
|
238
|
+
type: okButtonType,
|
159
239
|
dismiss: 'modal'
|
160
240
|
})
|
161
241
|
];
|
162
|
-
return this.open('
|
242
|
+
return this.open('ok-modal', title || 'Confirmation required!', body, buttons, controller, fade, fullSizeButtons, targetObj);
|
163
243
|
},
|
164
244
|
openModal: function(modalView, options) {
|
165
245
|
var instance, rootElement;
|
@@ -170,8 +250,14 @@ Modal component.
|
|
170
250
|
instance = modalView.create(options);
|
171
251
|
return instance.appendTo(rootElement);
|
172
252
|
},
|
173
|
-
open: function(name, title, view, footerButtons, controller) {
|
253
|
+
open: function(name, title, view, footerButtons, controller, fade, fullSizeButtons, targetObj) {
|
174
254
|
var cl, modalComponent, template;
|
255
|
+
if (fullSizeButtons == null) {
|
256
|
+
fullSizeButtons = false;
|
257
|
+
}
|
258
|
+
if (targetObj == null) {
|
259
|
+
targetObj = controller;
|
260
|
+
}
|
175
261
|
cl = controller.container.lookup('component-lookup:main');
|
176
262
|
modalComponent = cl.lookupFactory('bs-modal', controller.get('container')).create();
|
177
263
|
modalComponent.setProperties({
|
@@ -179,7 +265,9 @@ Modal component.
|
|
179
265
|
title: title,
|
180
266
|
manual: true,
|
181
267
|
footerButtons: footerButtons,
|
182
|
-
targetObject:
|
268
|
+
targetObject: targetObj,
|
269
|
+
fade: fade,
|
270
|
+
fullSizeButtons: fullSizeButtons
|
183
271
|
});
|
184
272
|
if (Ember.typeOf(view) === 'string') {
|
185
273
|
template = controller.container.lookup("template:" + view);
|
@@ -211,104 +299,67 @@ Modal component.
|
|
211
299
|
|
212
300
|
}).call(this);
|
213
301
|
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
this.compilerInfo = [4,'>= 1.0.0'];
|
219
|
-
helpers = this.merge(helpers, Ember.Handlebars.helpers); data = data || {};
|
220
|
-
var buffer = '', stack1, hashTypes, hashContexts, helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, self=this;
|
221
|
-
|
222
|
-
function program1(depth0,data) {
|
223
|
-
|
224
|
-
var buffer = '', stack1, hashContexts, hashTypes, options;
|
225
|
-
data.buffer.push("\n <i ");
|
226
|
-
hashContexts = {'class': depth0};
|
227
|
-
hashTypes = {'class': "STRING"};
|
228
|
-
options = {hash:{
|
302
|
+
Ember.TEMPLATES["components/bs-modal"] = Ember.Handlebars.template({"1":function(depth0,helpers,partials,data) {
|
303
|
+
var escapeExpression=this.escapeExpression, buffer = '';
|
304
|
+
data.buffer.push(" <i ");
|
305
|
+
data.buffer.push(escapeExpression(helpers['bind-attr'].call(depth0, {"name":"bind-attr","hash":{
|
229
306
|
'class': ("titleIconClasses")
|
230
|
-
},
|
231
|
-
data.buffer.push(
|
232
|
-
data.buffer.push("></i>\n ");
|
307
|
+
},"hashTypes":{'class': "STRING"},"hashContexts":{'class': depth0},"types":[],"contexts":[],"data":data})));
|
308
|
+
data.buffer.push("></i>\n");
|
233
309
|
return buffer;
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
data.buffer.push("\n ");
|
240
|
-
hashTypes = {};
|
241
|
-
hashContexts = {};
|
242
|
-
data.buffer.push(escapeExpression(helpers.view.call(depth0, "view.body", {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data})));
|
243
|
-
data.buffer.push("\n ");
|
310
|
+
},"3":function(depth0,helpers,partials,data) {
|
311
|
+
var escapeExpression=this.escapeExpression, buffer = '';
|
312
|
+
data.buffer.push(" ");
|
313
|
+
data.buffer.push(escapeExpression(helpers.view.call(depth0, "view.body", {"name":"view","hash":{},"hashTypes":{},"hashContexts":{},"types":["ID"],"contexts":[depth0],"data":data})));
|
314
|
+
data.buffer.push("\n");
|
244
315
|
return buffer;
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
data.buffer.push("\n
|
251
|
-
hashTypes = {};
|
252
|
-
hashContexts = {};
|
253
|
-
data.buffer.push(escapeExpression(helpers._triageMustache.call(depth0, "yield", {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data})));
|
254
|
-
data.buffer.push("\n ");
|
316
|
+
},"5":function(depth0,helpers,partials,data) {
|
317
|
+
var stack1, buffer = '';
|
318
|
+
data.buffer.push(" ");
|
319
|
+
stack1 = helpers._triageMustache.call(depth0, "yield", {"name":"_triageMustache","hash":{},"hashTypes":{},"hashContexts":{},"types":["ID"],"contexts":[depth0],"data":data});
|
320
|
+
if (stack1 != null) { data.buffer.push(stack1); }
|
321
|
+
data.buffer.push("\n");
|
255
322
|
return buffer;
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
options = {hash:{
|
265
|
-
'content': (""),
|
266
|
-
'targetObjectBinding': ("view.targetObject")
|
267
|
-
},contexts:[],types:[],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
|
268
|
-
data.buffer.push(escapeExpression(((stack1 = helpers['bs-button'] || depth0['bs-button']),stack1 ? stack1.call(depth0, options) : helperMissing.call(depth0, "bs-button", options))));
|
269
|
-
data.buffer.push("\n ");
|
323
|
+
},"7":function(depth0,helpers,partials,data) {
|
324
|
+
var helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = '';
|
325
|
+
data.buffer.push(" ");
|
326
|
+
data.buffer.push(escapeExpression(((helpers['bs-button'] || (depth0 && depth0['bs-button']) || helperMissing).call(depth0, {"name":"bs-button","hash":{
|
327
|
+
'targetObjectBinding': ("view.targetObject"),
|
328
|
+
'content': ("")
|
329
|
+
},"hashTypes":{'targetObjectBinding': "STRING",'content': "ID"},"hashContexts":{'targetObjectBinding': depth0,'content': depth0},"types":[],"contexts":[],"data":data}))));
|
330
|
+
data.buffer.push("\n");
|
270
331
|
return buffer;
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
data.buffer.push("\n ");
|
277
|
-
hashTypes = {};
|
278
|
-
hashContexts = {};
|
279
|
-
data.buffer.push(escapeExpression(helpers.view.call(depth0, "", {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data})));
|
280
|
-
data.buffer.push("\n ");
|
332
|
+
},"9":function(depth0,helpers,partials,data) {
|
333
|
+
var escapeExpression=this.escapeExpression, buffer = '';
|
334
|
+
data.buffer.push(" ");
|
335
|
+
data.buffer.push(escapeExpression(helpers.view.call(depth0, "", {"name":"view","hash":{},"hashTypes":{},"hashContexts":{},"types":["ID"],"contexts":[depth0],"data":data})));
|
336
|
+
data.buffer.push("\n");
|
281
337
|
return buffer;
|
282
|
-
|
283
|
-
|
284
|
-
data.buffer.push("<div class=\"modal-dialog\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <button type=\"button\"
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
338
|
+
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
|
339
|
+
var stack1, escapeExpression=this.escapeExpression, buffer = '';
|
340
|
+
data.buffer.push("<div class=\"modal-dialog\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <button type=\"button\" ");
|
341
|
+
data.buffer.push(escapeExpression(helpers['bind-attr'].call(depth0, {"name":"bind-attr","hash":{
|
342
|
+
'class': (":close allowClose::hide")
|
343
|
+
},"hashTypes":{'class': "STRING"},"hashContexts":{'class': depth0},"types":[],"contexts":[],"data":data})));
|
344
|
+
data.buffer.push(" data-dismiss=\"modal\" aria-hidden=\"true\">×</button>\n <h4 class=\"modal-title\">\n");
|
345
|
+
stack1 = helpers['if'].call(depth0, "titleIconClasses", {"name":"if","hash":{},"hashTypes":{},"hashContexts":{},"fn":this.program(1, data),"inverse":this.noop,"types":["ID"],"contexts":[depth0],"data":data});
|
346
|
+
if (stack1 != null) { data.buffer.push(stack1); }
|
347
|
+
data.buffer.push(" ");
|
348
|
+
data.buffer.push(escapeExpression(helpers._triageMustache.call(depth0, "title", {"name":"_triageMustache","hash":{
|
293
349
|
'unescaped': ("true")
|
294
|
-
},
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
stack1
|
305
|
-
|
306
|
-
data.buffer.push(
|
307
|
-
|
308
|
-
hashContexts = {};
|
309
|
-
stack1 = helpers.each.call(depth0, "footerViews", {hash:{},inverse:self.noop,fn:self.program(9, program9, data),contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data});
|
310
|
-
if(stack1 || stack1 === 0) { data.buffer.push(stack1); }
|
311
|
-
data.buffer.push("\n </div>\n </div>\n</div>");
|
350
|
+
},"hashTypes":{'unescaped': "STRING"},"hashContexts":{'unescaped': depth0},"types":["ID"],"contexts":[depth0],"data":data})));
|
351
|
+
data.buffer.push("\n </h4>\n </div>\n <div class=\"modal-body\">\n");
|
352
|
+
stack1 = helpers['if'].call(depth0, "body", {"name":"if","hash":{},"hashTypes":{},"hashContexts":{},"fn":this.program(3, data),"inverse":this.program(5, data),"types":["ID"],"contexts":[depth0],"data":data});
|
353
|
+
if (stack1 != null) { data.buffer.push(stack1); }
|
354
|
+
data.buffer.push(" </div>\n <div ");
|
355
|
+
data.buffer.push(escapeExpression(helpers['bind-attr'].call(depth0, {"name":"bind-attr","hash":{
|
356
|
+
'class': (":modal-footer fullSizeButtons:modal-footer-full")
|
357
|
+
},"hashTypes":{'class': "STRING"},"hashContexts":{'class': depth0},"types":[],"contexts":[],"data":data})));
|
358
|
+
data.buffer.push(">\n");
|
359
|
+
stack1 = helpers.each.call(depth0, "footerButtons", {"name":"each","hash":{},"hashTypes":{},"hashContexts":{},"fn":this.program(7, data),"inverse":this.noop,"types":["ID"],"contexts":[depth0],"data":data});
|
360
|
+
if (stack1 != null) { data.buffer.push(stack1); }
|
361
|
+
stack1 = helpers.each.call(depth0, "footerViews", {"name":"each","hash":{},"hashTypes":{},"hashContexts":{},"fn":this.program(9, data),"inverse":this.noop,"types":["ID"],"contexts":[depth0],"data":data});
|
362
|
+
if (stack1 != null) { data.buffer.push(stack1); }
|
363
|
+
data.buffer.push(" </div>\n </div>\n</div>");
|
312
364
|
return buffer;
|
313
|
-
|
314
|
-
});
|
365
|
+
},"useData":true});
|