bootstrap-for-ember-rails 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +6 -0
- data/.gitmodules +3 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +32 -0
- data/Rakefile +2 -0
- data/bootstrap-for-ember-rails.gemspec +36 -0
- data/lib/bootstrap-for-ember-rails.rb +9 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/.bowerrc +3 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/.gitignore +5 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/Gruntfile.js +459 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/LICENSE +191 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/README.md +80 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/index.html +176 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/components/BsAlertComponent.coffee +30 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/components/BsBadgeComponent.coffee +8 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/components/BsBreadcrumbs.coffee +65 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/components/BsBtnGroup.coffee +19 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/components/BsBtnToolbarComponent.coffee +11 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/components/BsButtonComponent.coffee +45 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/components/BsItemsActionBar.coffee +45 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/components/BsLabelComponent.coffee +8 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/components/BsListGroupComponent.coffee +34 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/components/BsModalComponent.coffee +204 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/components/BsPageHeaderComponent.coffee +6 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/components/BsPanelComponent.coffee +35 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/components/BsPill.coffee +20 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/components/BsPills.coffee +9 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/components/BsPopover.coffee +443 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/components/BsProgressComponent.coffee +19 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/components/BsProgressbarComponent.coffee +22 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/components/BsTabPane.coffee +2 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/components/BsTabs.coffee +9 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/components/BsTabsPanes.coffee +6 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/components/BsWellComponent.coffee +10 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/components/BsWizardComponent.coffee +175 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/components/GrowlNotifications.coffee +161 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/components/Notifications.coffee +88 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/init.coffee +1 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/mixins/ItemSelection.coffee +68 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/mixins/ItemValue.coffee +18 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/mixins/ItemsSelection.coffee +14 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/mixins/Nav.coffee +13 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/mixins/NavItem.coffee +7 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/mixins/Size.coffee +37 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/mixins/Type.coffee +17 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/mixins/WithRouter.coffee +8 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/showcase.coffee +16 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/showcase/controllers/ShowComponentsAlertController.coffee +11 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/showcase/controllers/ShowComponentsButtonController.coffee +24 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/showcase/controllers/ShowComponentsItemsActionBarController.coffee +39 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/showcase/controllers/ShowComponentsPanelController.coffee +8 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/showcase/controllers/ShowComponentsPopoverController.coffee +45 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/showcase/controllers/ShowComponentsProgressbarController.coffee +11 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/showcase/controllers/ShowComponentsTooltipBoxController.coffee +1 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/showcase/controllers/ShowComponentsWellController.coffee +4 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/showcase/controllers/ShowcaseComponentButtonGroupController.coffee +8 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/showcase/controllers/ShowcaseComponentPillsController.coffee +20 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/showcase/controllers/ShowcaseComponentsGrowlNotifController.coffee +11 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/showcase/controllers/ShowcaseComponentsListGroupController.coffee +12 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/showcase/controllers/ShowcaseComponentsModalController.coffee +53 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/showcase/controllers/ShowcaseComponentsNotificationsController.coffee +11 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/showcase/controllers/ShowcaseComponentsTabsController.coffee +12 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/showcase/controllers/ShowcaseComponentsTabsFooController.coffee +2 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/showcase/controllers/ShowcaseComponentsTabsPanesController.coffee +6 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/showcase/controllers/ShowcaseComponentsWizardController.coffee +45 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/showcase/controllers/UserController.coffee +7 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/showcase/router.coffee +29 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/showcase/routes/ApplicationRoute.coffee +26 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/showcase/routes/PopoverRoute.coffee +10 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/vendor/bootstrap.js +2276 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/views/ItemPaneView.coffee +29 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/views/ItemView.coffee +49 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/views/ItemsPanesView.coffee +12 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/scripts/views/ItemsView.coffee +15 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/styles/components/growl-notifications.css +58 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/styles/main.scss +7 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/components/bs-alert.hbs +4 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/components/bs-badge.hbs +1 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/components/bs-btn-toolbar.hbs +1 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/components/bs-button.hbs +4 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/components/bs-label.hbs +1 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/components/bs-modal.hbs +28 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/components/bs-page-header.hbs +6 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/components/bs-panel.hbs +26 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/components/bs-progress.hbs +5 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/components/bs-progressbar.hbs +1 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/components/bs-well.hbs +1 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/showcase/ads.hbs +1 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/showcase/application.hbs +51 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/showcase/demo-template.hbs +4 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/showcase/footer.hbs +0 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/showcase/header.hbs +0 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/showcase/index.hbs +7 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/showcase/leftnav.hbs +13 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/showcase/nav-main.hbs +24 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/showcase/show_components/alert.md +115 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/showcase/show_components/badge.md +80 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/showcase/show_components/breadcrumbs.md +28 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/showcase/show_components/button.md +247 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/showcase/show_components/buttonGroup.md +99 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/showcase/show_components/growl-notif.md +70 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/showcase/show_components/items_action_bar.md +87 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/showcase/show_components/label.md +44 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/showcase/show_components/list-group.md +70 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/showcase/show_components/modal.md +167 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/showcase/show_components/notifications.md +76 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/showcase/show_components/page-header.md +15 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/showcase/show_components/panel.md +123 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/showcase/show_components/pills.md +104 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/showcase/show_components/popover.md +213 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/showcase/show_components/progressbar.md +117 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/showcase/show_components/tabs-panes.md +42 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/showcase/show_components/tabs-with-routes.md +64 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/showcase/show_components/tabs.md +30 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/showcase/show_components/template.jst +1 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/showcase/show_components/well.md +84 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/showcase/show_components/wizard.md +109 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/showcase/social-buttons.hbs +13 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/showcase/tabs/bar-tabpane.hbs +2 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/showcase/tabs/baz-tabpane.hbs +1 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/showcase/tabs/foo-tabpane.hbs +2 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/showcase/user.hbs +3 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/showcase/user/activities.hbs +1 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/showcase/user/general.hbs +1 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/showcase/user/privacy.hbs +1 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/showcase/wizard/step1.hbs +1 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/showcase/wizard/step2.hbs +1 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/showcase/wizard/step3.hbs +1 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/app/templates/views/item-pane.hbs +3 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/bower.json +59 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/css/bs-growl-notifications.min.css +1 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-alert.max.js +158 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-alert.min.js +1 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-badge.max.js +26 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-badge.min.js +1 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-basic.max.js +230 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-basic.min.js +1 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-breadcrumbs.max.js +77 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-breadcrumbs.min.js +1 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-button.max.js +275 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-button.min.js +1 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-core.max.js +476 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-core.min.js +1 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-growl-notifications.max.js +162 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-growl-notifications.min.js +1 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-items-action-bar.max.js +45 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-items-action-bar.min.js +1 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-label.max.js +26 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-label.min.js +1 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-list-group.max.js +29 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-list-group.min.js +1 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-modal.max.js +314 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-modal.min.js +1 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-nav.max.js +51 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-nav.min.js +1 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-notifications.max.js +111 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-notifications.min.js +1 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-popover.max.js +402 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-popover.min.js +1 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-progressbar.max.js +102 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-progressbar.min.js +1 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-wizard.max.js +182 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/dist/js/bs-wizard.min.js +1 -0
- data/lib/bootstrap-for-ember-rails/bootstrap-for-ember/package.json +36 -0
- data/lib/bootstrap-for-ember-rails/version.rb +3 -0
- metadata +253 -0
|
@@ -0,0 +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(){return this.sendAction("clicked")},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),this.Ember=this.Ember||{},this.Ember.TEMPLATES=this.Ember.TEMPLATES||{},this.Ember.TEMPLATES["components/bs-page-header"]=Ember.Handlebars.template(function(a,b,c,d,e){function f(a,b){var d,e,f="";return b.buffer.push("\n <small>"),d={},e={},b.buffer.push(k(c._triageMustache.call(a,"sub",{hash:{},contexts:[a],types:["ID"],hashContexts:e,hashTypes:d,data:b}))),b.buffer.push("</small>\n "),f}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var g,h,i,j="",k=this.escapeExpression,l=this;return e.buffer.push("<h1>\n "),h={},i={},e.buffer.push(k(c._triageMustache.call(b,"title",{hash:{},contexts:[b],types:["ID"],hashContexts:i,hashTypes:h,data:e}))),e.buffer.push("\n "),h={},i={},g=c["if"].call(b,"sub",{hash:{},inverse:l.noop,fn:l.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</h1>"),j}),this.Ember.TEMPLATES["components/bs-well"]=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})))}),this.Ember.TEMPLATES["components/bs-panel"]=Ember.Handlebars.template(function(a,b,c,d,e){function f(a,b){var d,e,f,j="";return b.buffer.push('\n <div class="panel-heading">\n '),e={},f={},d=c["if"].call(a,"collapsible",{hash:{},inverse:s.program(4,h,b),fn:s.program(2,g,b),contexts:[a],types:["ID"],hashContexts:f,hashTypes:e,data:b}),(d||0===d)&&b.buffer.push(d),b.buffer.push("\n "),e={},f={},d=c["if"].call(a,"dismiss",{hash:{},inverse:s.noop,fn:s.program(6,i,b),contexts:[a],types:["ID"],hashContexts:f,hashTypes:e,data:b}),(d||0===d)&&b.buffer.push(d),b.buffer.push("\n </div>\n"),j}function g(a,b){var d,e,f,g,h="";return b.buffer.push('\n <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" '),e={href:a},f={href:"ID"},g={hash:{href:"collapsibleBodyLink"},contexts:[],types:[],hashContexts:e,hashTypes:f,data:b},b.buffer.push(r((d=c["bind-attr"]||a["bind-attr"],d?d.call(a,g):q.call(a,"bind-attr",g)))),b.buffer.push(">\n "),f={},e={},b.buffer.push(r(c._triageMustache.call(a,"heading",{hash:{},contexts:[a],types:["ID"],hashContexts:e,hashTypes:f,data:b}))),b.buffer.push("\n </a>\n "),h}function h(a,b){var d,e,f="";return b.buffer.push("\n "),d={},e={},b.buffer.push(r(c._triageMustache.call(a,"heading",{hash:{},contexts:[a],types:["ID"],hashContexts:e,hashTypes:d,data:b}))),b.buffer.push("\n "),f}function i(a,b){var d,e,f="";return b.buffer.push('\n <a class="close" data-dismiss="panel" '),d={},e={},b.buffer.push(r(c.action.call(a,"close",{hash:{},contexts:[a],types:["STRING"],hashContexts:e,hashTypes:d,data:b}))),b.buffer.push(">×</a>\n "),f}function j(a,b){var d,e,f,g,h="";return b.buffer.push("\n <div "),e={id:a},f={id:"ID"},g={hash:{id:"collapsibleBodyId"},contexts:[],types:[],hashContexts:e,hashTypes:f,data:b},b.buffer.push(r((d=c["bind-attr"]||a["bind-attr"],d?d.call(a,g):q.call(a,"bind-attr",g)))),b.buffer.push(" "),e={"class":a},f={"class":"STRING"},g={hash:{"class":":panel-collapse :collapse open:in"},contexts:[],types:[],hashContexts:e,hashTypes:f,data:b},b.buffer.push(r((d=c["bind-attr"]||a["bind-attr"],d?d.call(a,g):q.call(a,"bind-attr",g)))),b.buffer.push('>\n <div class="panel-body">'),f={},e={},b.buffer.push(r(c._triageMustache.call(a,"yield",{hash:{},contexts:[a],types:["ID"],hashContexts:e,hashTypes:f,data:b}))),b.buffer.push("</div>\n </div>\n"),h}function k(a,b){var d,e,f="";return b.buffer.push('\n <div id="collapseOne" class="panel-body">'),d={},e={},b.buffer.push(r(c._triageMustache.call(a,"yield",{hash:{},contexts:[a],types:["ID"],hashContexts:e,hashTypes:d,data:b}))),b.buffer.push("</div>\n"),f}function l(a,b){var d,e,f="";return b.buffer.push('\n <div class="panel-footer">'),d={},e={},b.buffer.push(r(c._triageMustache.call(a,"footer",{hash:{},contexts:[a],types:["ID"],hashContexts:e,hashTypes:d,data:b}))),b.buffer.push("</div>\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});
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Breadcrumbs compponent.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
(function() {
|
|
7
|
+
Bootstrap.BsBreadcrumbsItem = Bootstrap.ItemView.extend({
|
|
8
|
+
tagName: ['li'],
|
|
9
|
+
classNameBindings: ["isActive:active"],
|
|
10
|
+
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}}'),
|
|
11
|
+
isActive: (function() {
|
|
12
|
+
return this.get('content.active');
|
|
13
|
+
}).property('content.active')
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
Bootstrap.BsBreadcrumbs = Bootstrap.ItemsView.extend(Bootstrap.WithRouter, {
|
|
17
|
+
tagName: ['ol'],
|
|
18
|
+
classNames: ['breadcrumb'],
|
|
19
|
+
currentPathObserver: (function() {
|
|
20
|
+
this.get('router');
|
|
21
|
+
return this.send('updateCrumbsByRoute');
|
|
22
|
+
}).observes('router.url').on('init'),
|
|
23
|
+
content: [],
|
|
24
|
+
itemViewClass: Bootstrap.BsBreadcrumbsItem,
|
|
25
|
+
nameDictionary: void 0,
|
|
26
|
+
dictionaryNamePrefix: 'breadcrumbs',
|
|
27
|
+
actions: {
|
|
28
|
+
currentPathDidChange: function() {
|
|
29
|
+
return this.send('updateCrumbsByRoute');
|
|
30
|
+
},
|
|
31
|
+
updateCrumbsByRoute: function() {
|
|
32
|
+
var routes,
|
|
33
|
+
_this = this;
|
|
34
|
+
this.get('content').clear();
|
|
35
|
+
routes = this.get('container').lookup('router:main');
|
|
36
|
+
routes.get('router.currentHandlerInfos').forEach(function(route, i, arr) {
|
|
37
|
+
var crumb, displayName, name, routeName, _ref, _ref1, _ref2;
|
|
38
|
+
name = route.name;
|
|
39
|
+
if (name.indexOf('.index') !== -1 || name === 'application') {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
if ((_ref = route.handler.breadcrumbs) != null ? _ref.hidden : void 0) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
routeName = route.handler.routeName;
|
|
46
|
+
if ((_ref1 = route.handler.breadcrumbs) != null ? _ref1.name : void 0) {
|
|
47
|
+
displayName = route.handler.breadcrumbs.name;
|
|
48
|
+
} else if ((_ref2 = _this.get('nameDictionary')) != null ? _ref2["" + _this.dictionaryNamePrefix + "." + routeName] : void 0) {
|
|
49
|
+
displayName = _this.get('nameDictionary')["" + _this.dictionaryNamePrefix + "." + routeName];
|
|
50
|
+
} else {
|
|
51
|
+
displayName = route.handler.routeName.split('.').pop();
|
|
52
|
+
displayName = displayName[0].toUpperCase() + displayName.slice(1).toLowerCase();
|
|
53
|
+
}
|
|
54
|
+
crumb = Ember.Object.create({
|
|
55
|
+
route: route.handler.routeName,
|
|
56
|
+
name: displayName,
|
|
57
|
+
model: null
|
|
58
|
+
});
|
|
59
|
+
if (_this.get('content').length === 0) {
|
|
60
|
+
crumb.set('icon', 'fa fa-home home-icon');
|
|
61
|
+
}
|
|
62
|
+
if (route.isDynamic) {
|
|
63
|
+
crumb.setProperties({
|
|
64
|
+
model: route.handler.context,
|
|
65
|
+
name: route.handler.context.get('name')
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
return _this.get('content').pushObject(crumb);
|
|
69
|
+
});
|
|
70
|
+
return this.get('content.lastObject').set('active', true);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
Ember.Handlebars.helper('bs-breadcrumbs', Bootstrap.BsBreadcrumbs);
|
|
76
|
+
|
|
77
|
+
}).call(this);
|
|
@@ -0,0 +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);
|
|
@@ -0,0 +1,275 @@
|
|
|
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
|
+
(function() {
|
|
112
|
+
Bootstrap.BsButtonComponent = Ember.Component.extend(Bootstrap.TypeSupport, Bootstrap.SizeSupport, {
|
|
113
|
+
layoutName: 'components/bs-button',
|
|
114
|
+
tagName: 'button',
|
|
115
|
+
classNames: ['btn'],
|
|
116
|
+
classNameBindings: ['blockClass'],
|
|
117
|
+
classTypePrefix: 'btn',
|
|
118
|
+
clickedParam: null,
|
|
119
|
+
block: null,
|
|
120
|
+
attributeBindings: ['disabled', 'dismiss:data-dismiss', '_type:type', 'style'],
|
|
121
|
+
_type: 'button',
|
|
122
|
+
bubbles: true,
|
|
123
|
+
allowedProperties: ['title', 'type', 'size', 'block', 'disabled', 'clicked', 'dismiss', 'class'],
|
|
124
|
+
icon_active: void 0,
|
|
125
|
+
icon_inactive: void 0
|
|
126
|
+
}, {
|
|
127
|
+
init: function() {
|
|
128
|
+
var attr, c, key, _i, _len, _ref, _results;
|
|
129
|
+
this._super();
|
|
130
|
+
if ((this.get('content') != null) && Ember.typeOf(this.get('content')) === 'instance') {
|
|
131
|
+
c = this.get('content');
|
|
132
|
+
_ref = this.get('allowedProperties');
|
|
133
|
+
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
|
134
|
+
key = _ref[_i];
|
|
135
|
+
if (c[key] != null) {
|
|
136
|
+
this.set(key, c[key]);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
} else {
|
|
140
|
+
if (this.get('title') == null) {
|
|
141
|
+
this.set('title', this.get('content'));
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
_results = [];
|
|
145
|
+
for (attr in this) {
|
|
146
|
+
if (attr.match(/^data-[\w-]*$/) != null) {
|
|
147
|
+
_results.push(this.attributeBindings.pushObject(attr));
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
return _results;
|
|
151
|
+
},
|
|
152
|
+
blockClass: (function() {
|
|
153
|
+
if (this.block) {
|
|
154
|
+
return "" + this.classTypePrefix + "-block";
|
|
155
|
+
} else {
|
|
156
|
+
return null;
|
|
157
|
+
}
|
|
158
|
+
}).property('block').cacheable(),
|
|
159
|
+
click: function(evt) {
|
|
160
|
+
if (!this.get('bubbles')) {
|
|
161
|
+
evt.stopPropagation();
|
|
162
|
+
}
|
|
163
|
+
return this.sendAction('clicked', this.get('clickedParam'));
|
|
164
|
+
},
|
|
165
|
+
loadingChanged: (function() {
|
|
166
|
+
var loading;
|
|
167
|
+
loading = this.get('loading') !== null ? this.get('loading') : "reset";
|
|
168
|
+
return Ember.$("#" + this.elementId).button(loading);
|
|
169
|
+
}).observes('loading'),
|
|
170
|
+
icon: (function() {
|
|
171
|
+
if (this.get('isActive')) {
|
|
172
|
+
return this.get('icon_active');
|
|
173
|
+
} else {
|
|
174
|
+
return this.get('icon_inactive');
|
|
175
|
+
}
|
|
176
|
+
}).property('isActive')
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
Ember.Handlebars.helper('bs-button', Bootstrap.BsButtonComponent);
|
|
180
|
+
|
|
181
|
+
}).call(this);
|
|
182
|
+
|
|
183
|
+
/*
|
|
184
|
+
Button Group.
|
|
185
|
+
|
|
186
|
+
In its simple form, each item in the button group is a Bootstrap.Button component,
|
|
187
|
+
In case this is a Radio, each item is rendered as a label.
|
|
188
|
+
*/
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
(function() {
|
|
192
|
+
Bootstrap.BsBtnGroup = Bootstrap.ItemsView.extend(Bootstrap.SizeSupport, Bootstrap.ItemsSelection, {
|
|
193
|
+
classTypePrefix: ['btn-group'],
|
|
194
|
+
classNames: ['btn-group'],
|
|
195
|
+
classNameBindings: ['vertical:btn-group-vertical'],
|
|
196
|
+
itemViewClass: Bootstrap.BsButtonComponent.extend(Bootstrap.ItemValue, Bootstrap.ItemSelection, {
|
|
197
|
+
init: function() {
|
|
198
|
+
this._super();
|
|
199
|
+
this.set('icon_active', this.get('parentView.icon_active'));
|
|
200
|
+
return this.set('icon_inactive', this.get('parentView.icon_inactive'));
|
|
201
|
+
}
|
|
202
|
+
})
|
|
203
|
+
});
|
|
204
|
+
|
|
205
|
+
Ember.Handlebars.helper('bs-btn-group', Bootstrap.BsBtnGroup);
|
|
206
|
+
|
|
207
|
+
}).call(this);
|
|
208
|
+
|
|
209
|
+
/*
|
|
210
|
+
Button Toolbar.
|
|
211
|
+
|
|
212
|
+
A collection of button groups
|
|
213
|
+
*/
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
(function() {
|
|
217
|
+
Bootstrap.BsBtnToolbarComponent = Ember.Component.extend({
|
|
218
|
+
layoutName: 'components/bs-btn-toolbar',
|
|
219
|
+
classNames: ['btn-toolbar']
|
|
220
|
+
});
|
|
221
|
+
|
|
222
|
+
Ember.Handlebars.helper('bs-btn-toolbar', Bootstrap.BsBtnToolbarComponent);
|
|
223
|
+
|
|
224
|
+
}).call(this);
|
|
225
|
+
|
|
226
|
+
this["Ember"] = this["Ember"] || {};
|
|
227
|
+
this["Ember"]["TEMPLATES"] = this["Ember"]["TEMPLATES"] || {};
|
|
228
|
+
|
|
229
|
+
this["Ember"]["TEMPLATES"]["components/bs-button"] = Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data) {
|
|
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:{
|
|
241
|
+
'class': ("icon")
|
|
242
|
+
},contexts:[],types:[],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
|
|
243
|
+
data.buffer.push(escapeExpression(((stack1 = helpers['bind-attr'] || depth0['bind-attr']),stack1 ? stack1.call(depth0, options) : helperMissing.call(depth0, "bind-attr", options))));
|
|
244
|
+
data.buffer.push("></i>\n");
|
|
245
|
+
return buffer;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
hashTypes = {};
|
|
249
|
+
hashContexts = {};
|
|
250
|
+
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});
|
|
251
|
+
if(stack1 || stack1 === 0) { data.buffer.push(stack1); }
|
|
252
|
+
data.buffer.push("\n");
|
|
253
|
+
hashTypes = {};
|
|
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})));
|
|
259
|
+
return buffer;
|
|
260
|
+
|
|
261
|
+
});
|
|
262
|
+
this["Ember"] = this["Ember"] || {};
|
|
263
|
+
this["Ember"]["TEMPLATES"] = this["Ember"]["TEMPLATES"] || {};
|
|
264
|
+
|
|
265
|
+
this["Ember"]["TEMPLATES"]["components/bs-btn-toolbar"] = Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data) {
|
|
266
|
+
this.compilerInfo = [4,'>= 1.0.0'];
|
|
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
|
+
});
|
|
@@ -0,0 +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 <i "),e={"class":a},f={"class":"STRING"},g={hash:{"class":"icon"},contexts:[],types:[],hashContexts:e,hashTypes:f,data:b},b.buffer.push(l((d=c["bind-attr"]||a["bind-attr"],d?d.call(a,g):k.call(a,"bind-attr",g)))),b.buffer.push("></i>\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})))});
|
|
@@ -0,0 +1,476 @@
|
|
|
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
|
+
(function() {
|
|
59
|
+
var Bootstrap;
|
|
60
|
+
|
|
61
|
+
Bootstrap = window.Bootstrap = Ember.Namespace.create();
|
|
62
|
+
|
|
63
|
+
}).call(this);
|
|
64
|
+
|
|
65
|
+
(function() {
|
|
66
|
+
var Bootstrap, get;
|
|
67
|
+
|
|
68
|
+
Bootstrap = window.Bootstrap;
|
|
69
|
+
|
|
70
|
+
get = Ember.get;
|
|
71
|
+
|
|
72
|
+
Bootstrap.WithRouter = Ember.Mixin.create({
|
|
73
|
+
router: Ember.computed(function() {
|
|
74
|
+
return get(this, "controller").container.lookup("router:main");
|
|
75
|
+
})
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
}).call(this);
|
|
79
|
+
|
|
80
|
+
(function() {
|
|
81
|
+
var Bootstrap, get, set;
|
|
82
|
+
|
|
83
|
+
Bootstrap = window.Bootstrap;
|
|
84
|
+
|
|
85
|
+
get = Ember.get;
|
|
86
|
+
|
|
87
|
+
set = Ember.set;
|
|
88
|
+
|
|
89
|
+
Bootstrap.TypeSupport = Ember.Mixin.create({
|
|
90
|
+
classTypePrefix: Ember.required(String),
|
|
91
|
+
classNameBindings: ['typeClass'],
|
|
92
|
+
type: 'default',
|
|
93
|
+
typeClass: (function() {
|
|
94
|
+
var pref, type;
|
|
95
|
+
type = this.get('type');
|
|
96
|
+
if (type == null) {
|
|
97
|
+
type = 'default';
|
|
98
|
+
}
|
|
99
|
+
pref = this.get('classTypePrefix');
|
|
100
|
+
return "" + pref + "-" + type;
|
|
101
|
+
}).property('type').cacheable()
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
}).call(this);
|
|
105
|
+
|
|
106
|
+
(function() {
|
|
107
|
+
var Bootstrap, get, set;
|
|
108
|
+
|
|
109
|
+
Bootstrap = window.Bootstrap;
|
|
110
|
+
|
|
111
|
+
get = Ember.get;
|
|
112
|
+
|
|
113
|
+
set = Ember.set;
|
|
114
|
+
|
|
115
|
+
Bootstrap.SizeSupport = Ember.Mixin.create({
|
|
116
|
+
classTypePrefix: Ember.required(String),
|
|
117
|
+
classNameBindings: ['sizeClass', 'largeSizeClass', 'smallSizeClass', 'extraSmallSizeClass'],
|
|
118
|
+
size: null,
|
|
119
|
+
xs: null,
|
|
120
|
+
small: null,
|
|
121
|
+
large: null,
|
|
122
|
+
extraSmallSizeClass: (function() {
|
|
123
|
+
var pref;
|
|
124
|
+
pref = this.get('classTypePrefix');
|
|
125
|
+
if (this.xs) {
|
|
126
|
+
return "" + pref + "-xs";
|
|
127
|
+
} else {
|
|
128
|
+
return null;
|
|
129
|
+
}
|
|
130
|
+
}).property('xs').cacheable(),
|
|
131
|
+
smallSizeClass: (function() {
|
|
132
|
+
var pref;
|
|
133
|
+
pref = this.get('classTypePrefix');
|
|
134
|
+
if (this.small) {
|
|
135
|
+
return "" + pref + "-sm";
|
|
136
|
+
} else {
|
|
137
|
+
return null;
|
|
138
|
+
}
|
|
139
|
+
}).property('small').cacheable(),
|
|
140
|
+
largeSizeClass: (function() {
|
|
141
|
+
var pref;
|
|
142
|
+
pref = this.get('classTypePrefix');
|
|
143
|
+
if (this.large) {
|
|
144
|
+
return "" + pref + "-lg";
|
|
145
|
+
} else {
|
|
146
|
+
return null;
|
|
147
|
+
}
|
|
148
|
+
}).property('large').cacheable(),
|
|
149
|
+
sizeClass: (function() {
|
|
150
|
+
var pref, size;
|
|
151
|
+
size = this.get('size');
|
|
152
|
+
pref = this.get('classTypePrefix');
|
|
153
|
+
if (size) {
|
|
154
|
+
return "" + pref + "-" + size;
|
|
155
|
+
} else {
|
|
156
|
+
return null;
|
|
157
|
+
}
|
|
158
|
+
}).property('size').cacheable()
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
}).call(this);
|
|
162
|
+
|
|
163
|
+
/*
|
|
164
|
+
A mixin for Items that have a value property
|
|
165
|
+
*/
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
(function() {
|
|
169
|
+
Bootstrap.ItemValue = Ember.Mixin.create({
|
|
170
|
+
/*
|
|
171
|
+
The value of the item, currently Items content supports only an array of strings, so value is the actual 'content' property
|
|
172
|
+
of the item.
|
|
173
|
+
*/
|
|
174
|
+
|
|
175
|
+
value: (function() {
|
|
176
|
+
var itemsView, value;
|
|
177
|
+
itemsView = this.get('parentView');
|
|
178
|
+
if (itemsView == null) {
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
value = this.get('content');
|
|
182
|
+
return value;
|
|
183
|
+
}).property('content').cacheable()
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
}).call(this);
|
|
187
|
+
|
|
188
|
+
/*
|
|
189
|
+
A Mixin to enhance items enhanced with the 'IsItem' Mixin with selection capability.
|
|
190
|
+
|
|
191
|
+
When a click event is received the current item will be stored in the parent view 'selected' property,
|
|
192
|
+
An extra 'active' css class will be assigned to the Item (this) if this is a selected item.
|
|
193
|
+
*/
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
(function() {
|
|
197
|
+
Bootstrap.ItemSelection = Ember.Mixin.create(Bootstrap.ItemValue, Bootstrap.WithRouter, {
|
|
198
|
+
classNameBindings: ["isActive:active"],
|
|
199
|
+
init: function() {
|
|
200
|
+
this._super();
|
|
201
|
+
return this.didRouteChange();
|
|
202
|
+
},
|
|
203
|
+
didRouteChange: (function() {
|
|
204
|
+
var itemsView, linkTo, _ref;
|
|
205
|
+
linkTo = this.get('content.linkTo');
|
|
206
|
+
if (linkTo == null) {
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
itemsView = this.get('parentView');
|
|
210
|
+
if (itemsView == null) {
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
if ((_ref = this.get('router')) != null ? _ref.isActive(linkTo) : void 0) {
|
|
214
|
+
return itemsView.set('selected', this.get('value'));
|
|
215
|
+
}
|
|
216
|
+
}).observes('router.url'),
|
|
217
|
+
/*
|
|
218
|
+
Determine whether the current item is selected,
|
|
219
|
+
if true the 'active' css class will be associated with the this DOM's element.
|
|
220
|
+
|
|
221
|
+
This is a calculated property and will be retriggered if the 'value' property of the item has changed or the 'selected' property
|
|
222
|
+
in the parent ItemsView.
|
|
223
|
+
*/
|
|
224
|
+
|
|
225
|
+
isActive: (function() {
|
|
226
|
+
var itemsView, selected, value;
|
|
227
|
+
itemsView = this.get('parentView');
|
|
228
|
+
if (itemsView == null) {
|
|
229
|
+
return false;
|
|
230
|
+
}
|
|
231
|
+
selected = itemsView.get('selected');
|
|
232
|
+
value = this.get('value');
|
|
233
|
+
if (value == null) {
|
|
234
|
+
return false;
|
|
235
|
+
}
|
|
236
|
+
return selected === value;
|
|
237
|
+
}).property('value', 'parentView.selected', 'content.linkTo').cacheable(),
|
|
238
|
+
/*
|
|
239
|
+
Handle selection by click event.
|
|
240
|
+
|
|
241
|
+
The identifier of the selection is based on the 'content' property of this item.
|
|
242
|
+
*/
|
|
243
|
+
|
|
244
|
+
click: function(event) {
|
|
245
|
+
var content, itemsView;
|
|
246
|
+
event.preventDefault();
|
|
247
|
+
itemsView = this.get('parentView');
|
|
248
|
+
if (itemsView == null) {
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
content = this.get('content');
|
|
252
|
+
if (typeof content === 'object') {
|
|
253
|
+
if (content.get('disabled')) {
|
|
254
|
+
return;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
if (this.get('content.linkTo') != null) {
|
|
258
|
+
return;
|
|
259
|
+
}
|
|
260
|
+
return itemsView.set('selected', this.get('value'));
|
|
261
|
+
}
|
|
262
|
+
});
|
|
263
|
+
|
|
264
|
+
}).call(this);
|
|
265
|
+
|
|
266
|
+
/*
|
|
267
|
+
A Mixin to enhance views that extends from 'ItemsView' with selection capability.
|
|
268
|
+
*/
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
(function() {
|
|
272
|
+
Bootstrap.ItemsSelection = Ember.Mixin.create({
|
|
273
|
+
/*
|
|
274
|
+
If true, multiple selection is supported
|
|
275
|
+
*/
|
|
276
|
+
|
|
277
|
+
multiSelection: false,
|
|
278
|
+
/*
|
|
279
|
+
An array of selected item(s), can be also bound to a controller property via 'selectedBinding'
|
|
280
|
+
*/
|
|
281
|
+
|
|
282
|
+
selected: []
|
|
283
|
+
});
|
|
284
|
+
|
|
285
|
+
}).call(this);
|
|
286
|
+
|
|
287
|
+
/*
|
|
288
|
+
A Mixin that provides the basic configuration for rendering a Bootstrap navigation such as tabs and pills
|
|
289
|
+
*/
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
(function() {
|
|
293
|
+
Bootstrap.Nav = Ember.Mixin.create({
|
|
294
|
+
classNames: ['nav'],
|
|
295
|
+
classNameBindings: ['navTypeClass'],
|
|
296
|
+
tagName: 'ul',
|
|
297
|
+
navType: null,
|
|
298
|
+
navTypeClass: (function() {
|
|
299
|
+
if (this.navType != null) {
|
|
300
|
+
return "nav-" + this.navType;
|
|
301
|
+
} else {
|
|
302
|
+
return null;
|
|
303
|
+
}
|
|
304
|
+
}).property('navType').cacheable()
|
|
305
|
+
});
|
|
306
|
+
|
|
307
|
+
}).call(this);
|
|
308
|
+
|
|
309
|
+
/*
|
|
310
|
+
A Mixin that provides the basic configuration for rendering and interacting with Bootstrap navigation item such a pill or a tab.
|
|
311
|
+
*/
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
(function() {
|
|
315
|
+
Bootstrap.NavItem = Ember.Mixin.create(Bootstrap.SelectableView);
|
|
316
|
+
|
|
317
|
+
}).call(this);
|
|
318
|
+
|
|
319
|
+
(function() {
|
|
320
|
+
var getParentView, getProperty;
|
|
321
|
+
|
|
322
|
+
getParentView = function(view) {
|
|
323
|
+
var ok, parentView;
|
|
324
|
+
if (!(view && (parentView = view.get('parentView')))) {
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
327
|
+
ok = parentView instanceof Bootstrap.ItemsView;
|
|
328
|
+
Ember.assert("The parent view must be an instance of Bootstrap.ItemsView or any inherited class", ok);
|
|
329
|
+
if (ok) {
|
|
330
|
+
return parentView;
|
|
331
|
+
} else {
|
|
332
|
+
return void 0;
|
|
333
|
+
}
|
|
334
|
+
};
|
|
335
|
+
|
|
336
|
+
getProperty = function(obj, prop, noGetReturns) {
|
|
337
|
+
if (!(Ember.typeOf(obj) === 'instance' || Ember.canInvoke(obj, 'get'))) {
|
|
338
|
+
return noGetReturns;
|
|
339
|
+
}
|
|
340
|
+
return obj.get(prop);
|
|
341
|
+
};
|
|
342
|
+
|
|
343
|
+
/*
|
|
344
|
+
Views that are rendered as an Item of the ItemsView should extends from this view.
|
|
345
|
+
|
|
346
|
+
When a click event is received the current item will be stored in the parent view 'selected' property,
|
|
347
|
+
An extra 'active' css class will be assigned to the Item (this) if this is a selected item.
|
|
348
|
+
|
|
349
|
+
Views that extends this view can be enhanced with:
|
|
350
|
+
ItemSelection: Makes the item selectable.
|
|
351
|
+
*/
|
|
352
|
+
|
|
353
|
+
|
|
354
|
+
Bootstrap.ItemView = Ember.View.extend({
|
|
355
|
+
isItem: true,
|
|
356
|
+
classNameBindings: ['disabled'],
|
|
357
|
+
/*
|
|
358
|
+
A calculated property that defines the title of the item.
|
|
359
|
+
*/
|
|
360
|
+
|
|
361
|
+
title: (function() {
|
|
362
|
+
var content, itemTitleKey, itemsView;
|
|
363
|
+
if (!(itemsView = getParentView(this))) {
|
|
364
|
+
return;
|
|
365
|
+
}
|
|
366
|
+
itemTitleKey = itemsView.get('itemTitleKey') || 'title';
|
|
367
|
+
content = this.get('content');
|
|
368
|
+
return getProperty(content, itemTitleKey, content);
|
|
369
|
+
}).property('content').cacheable(),
|
|
370
|
+
/*
|
|
371
|
+
Determine whether the item is disabled or not
|
|
372
|
+
*/
|
|
373
|
+
|
|
374
|
+
disabled: (function() {
|
|
375
|
+
var content, disabled, itemsView;
|
|
376
|
+
if (!(itemsView = getParentView(this))) {
|
|
377
|
+
return;
|
|
378
|
+
}
|
|
379
|
+
content = this.get('content');
|
|
380
|
+
disabled = !!getProperty(content, 'disabled', false);
|
|
381
|
+
if (disabled && this.get('isActive')) {
|
|
382
|
+
itemsView.set('selected', null);
|
|
383
|
+
}
|
|
384
|
+
return disabled;
|
|
385
|
+
}).property('content', 'content.disabled').cacheable()
|
|
386
|
+
});
|
|
387
|
+
|
|
388
|
+
}).call(this);
|
|
389
|
+
|
|
390
|
+
/*
|
|
391
|
+
A parent view of views that supports multiple items rendering such as Navigations (Tabs, Pills)
|
|
392
|
+
|
|
393
|
+
Views that inherits from this view can be enhanced with:
|
|
394
|
+
- ItemsSelection: Enhances with selection capability.
|
|
395
|
+
*/
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
(function() {
|
|
399
|
+
Bootstrap.ItemsView = Ember.CollectionView.extend({
|
|
400
|
+
didInsertElement: function() {
|
|
401
|
+
var defaultTab, view, _i, _len, _ref, _ref1;
|
|
402
|
+
if (this.get('default')) {
|
|
403
|
+
defaultTab = this.get('default');
|
|
404
|
+
_ref = this._childViews;
|
|
405
|
+
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
|
406
|
+
view = _ref[_i];
|
|
407
|
+
if (((_ref1 = view.get('content')) != null ? _ref1.get('title') : void 0) === defaultTab) {
|
|
408
|
+
this.set('selected', view.get('content'));
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
return Ember.assert("Could not activate default tab " + defaultTab + " as it doesnt exist", defaultTab);
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
});
|
|
415
|
+
|
|
416
|
+
}).call(this);
|
|
417
|
+
|
|
418
|
+
(function() {
|
|
419
|
+
Bootstrap.ItemPaneView = Ember.View.extend({
|
|
420
|
+
template: Ember.Handlebars.compile(['{{#if view.content.template}}', '{{bsItemPanePartial view.content.template}}', '{{/if}}'].join("\n")),
|
|
421
|
+
corrItem: (function() {
|
|
422
|
+
var view, _i, _len, _ref;
|
|
423
|
+
if (this.get('parentView').get('corrItemsView') != null) {
|
|
424
|
+
_ref = this.get('parentView').get('corrItemsView')._childViews;
|
|
425
|
+
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
|
426
|
+
view = _ref[_i];
|
|
427
|
+
if (view.content === this.get('content')) {
|
|
428
|
+
return view;
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
}).property('parentView.corrItemsView'),
|
|
433
|
+
isVisible: (function() {
|
|
434
|
+
var _ref;
|
|
435
|
+
return (_ref = this.get('corrItem')) != null ? _ref.get('isActive') : void 0;
|
|
436
|
+
}).property('corrItem.isActive'),
|
|
437
|
+
controller: (function() {
|
|
438
|
+
var controller, itemController;
|
|
439
|
+
controller = this.get('parentView.controller');
|
|
440
|
+
if (this.get('content.controller')) {
|
|
441
|
+
itemController = this.get('container').lookup("controller:" + (this.get('content.controller')));
|
|
442
|
+
if (itemController) {
|
|
443
|
+
controller = itemController;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
return controller;
|
|
447
|
+
}).property('content')
|
|
448
|
+
});
|
|
449
|
+
|
|
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
|
+
}).call(this);
|
|
461
|
+
|
|
462
|
+
(function() {
|
|
463
|
+
Bootstrap.ItemsPanesView = Ember.CollectionView.extend({
|
|
464
|
+
viewsInserted: false,
|
|
465
|
+
corrItemsView: (function() {
|
|
466
|
+
var itemsView;
|
|
467
|
+
itemsView = Ember.View.views[this.get('items-id')];
|
|
468
|
+
return itemsView;
|
|
469
|
+
}).property('viewsInserted'),
|
|
470
|
+
didInsertElement: function() {
|
|
471
|
+
this._super();
|
|
472
|
+
return this.set('viewsInserted', true);
|
|
473
|
+
}
|
|
474
|
+
});
|
|
475
|
+
|
|
476
|
+
}).call(this);
|