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,117 @@
|
|
|
1
|
+
# Progress Bar
|
|
2
|
+
|
|
3
|
+
> Provide up-to-date feedback on the progress of a workflow or action with simple yet flexible progress bars.
|
|
4
|
+
<small>By Bootstrap</small>
|
|
5
|
+
|
|
6
|
+
## Basic usage
|
|
7
|
+
|
|
8
|
+
<div class="bs-example">
|
|
9
|
+
{{bs-progress progress=60}}
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
``` html
|
|
13
|
+
\{\{bs-progress progress=60\}\}
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
**Simple as that! a single short line, compared to [Bootstarp Tags](http://getbootstrap.com/components/#progress) 5 long lines that
|
|
17
|
+
produces the same result.**
|
|
18
|
+
|
|
19
|
+
The progress component respects all _aria_ tags mentioned in _Bootstrap_ documentation.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
> Progress bars use some of the same button and alert classes for consistent styles
|
|
24
|
+
<small>By Bootstrap</small>
|
|
25
|
+
|
|
26
|
+
<div class="bs-example">
|
|
27
|
+
{{bs-progress progress=40 type="success"}}
|
|
28
|
+
{{bs-progress progress=20 type="info"}}
|
|
29
|
+
{{bs-progress progress=60 type="warning"}}
|
|
30
|
+
{{bs-progress progress=80 type="danger"}}
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
``` html
|
|
35
|
+
\{\{bs-progress progress=40 type="success"\}\}
|
|
36
|
+
\{\{bs-progress progress=20 type="info"\}\}
|
|
37
|
+
\{\{bs-progress progress=60 type="warning"\}\}
|
|
38
|
+
\{\{bs-progress progress=80 type="danger"\}\}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
The _progress_ property can be bound to a controller property:
|
|
45
|
+
|
|
46
|
+
<div class="bs-example">
|
|
47
|
+
{{bs-progress progressBinding="prog"}}
|
|
48
|
+
{{bs-button clicked="increment" title="Increment!"}}
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
``` html
|
|
52
|
+
\{\{bs-progress progressBinding="prog"\}\}
|
|
53
|
+
\{\{bs-button clicked="increment" content="Increment!"\}\}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Controller sample code:
|
|
57
|
+
|
|
58
|
+
``` javascript
|
|
59
|
+
Showcase.ShowComponentsProgressbarController = Ember.Controller.extend({
|
|
60
|
+
prog: 0,
|
|
61
|
+
incrementBy: 20,
|
|
62
|
+
increment: function() {
|
|
63
|
+
if (this.prog < 100) {
|
|
64
|
+
return this.incrementProperty("prog", this.incrementBy);
|
|
65
|
+
} else {
|
|
66
|
+
return this.set("prog", this.incrementBy);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Striped
|
|
73
|
+
|
|
74
|
+
> Uses a gradient to create a striped effect. Not available in IE8.
|
|
75
|
+
<small>By Bootstrap</small>
|
|
76
|
+
|
|
77
|
+
This is simply done by setting the _stripped=true_ property.
|
|
78
|
+
|
|
79
|
+
<div class="bs-example">
|
|
80
|
+
{{bs-progress progress=40 type="success" stripped=true}}
|
|
81
|
+
{{bs-progress progress=20 type="info" stripped=true}}
|
|
82
|
+
{{bs-progress progress=60 type="warning" stripped=true}}
|
|
83
|
+
{{bs-progress progress=80 type="danger" stripped=true}}
|
|
84
|
+
</div>
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
## Animated
|
|
88
|
+
|
|
89
|
+
In addition to _stripped=true_, add _animated=true_ property to animate the stripes right to left.
|
|
90
|
+
|
|
91
|
+
<div class="bs-example">
|
|
92
|
+
{{bs-progress progress=45 stripped=true animated=true}}
|
|
93
|
+
</div>
|
|
94
|
+
|
|
95
|
+
``` html
|
|
96
|
+
\{\{bs-progress progress=45 stripped=true animated=true\}\}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Stacked
|
|
100
|
+
|
|
101
|
+
Multiple bars can be placed into the same _bs-progress_ to stack them:
|
|
102
|
+
|
|
103
|
+
<div class="bs-example">
|
|
104
|
+
{{#bs-progress}}
|
|
105
|
+
{{bs-progressbar type="success" progress="35"}}
|
|
106
|
+
{{bs-progressbar type="warning" progress="20"}}
|
|
107
|
+
{{bs-progressbar type="danger" progress="10"}}
|
|
108
|
+
{{/bs-progress}}
|
|
109
|
+
</div>
|
|
110
|
+
|
|
111
|
+
``` html
|
|
112
|
+
\{\{#bs-progress\}\}
|
|
113
|
+
\{\{bs-progressbar type="success" progress="35"\}\}
|
|
114
|
+
\{\{bs-progressbar type="warning" progress="20"\}\}
|
|
115
|
+
\{\{bs-progressbar type="danger" progress="10"\}\}
|
|
116
|
+
\{\{/bs-progress\}\}
|
|
117
|
+
```
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Tab Panes
|
|
2
|
+
|
|
3
|
+
Defining {{#link-to "show_components.tabs"}}Tab Component{{/link-to}} covers the Tabs rendering and help you to interact with the selected tab. But usually some content should be rendered as a response for a tab click right?
|
|
4
|
+
|
|
5
|
+
This is where _Tab Panes_ come into play, a tab pane is the content area of each rendered tab, when a tab is selected, the corresponding _tab pane_ becomes visible, see below for the possible options.
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Tab Panes expects a `contentBinding` property just like the _bs-tabs_ component, the _Tabs Panes_ component also must be aware of the _bs-tabs_ component it is bound to by specifying the _items-id_ property set to the _id_ of the corresponding _bs-tabs_
|
|
9
|
+
|
|
10
|
+
<div class="bs-example">
|
|
11
|
+
{{bs-tabs id="tabs1" contentBinding="tabsMeta" default="Foo"}}
|
|
12
|
+
{{bs-tabs-panes items-id="tabs1" contentBinding="tabsMeta"}}
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
``` html
|
|
16
|
+
\{\{bs-tabs id="tabs1" contentBinding="tabsMeta" default="Foo"\}\}
|
|
17
|
+
\{\{bs-tabs-panes items-id="tabs1" contentBinding="tabsMeta"\}\}
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
* An `id` property is required for the _bs-tabs_.
|
|
21
|
+
* The _bs-tabs-panes_ generates a tab pane per element in the _content_ array.
|
|
22
|
+
* The `items-id` property must refer to the `id` of the `bs-tabs` component.
|
|
23
|
+
* If you like one tab to be activated by default, set the `default` property of the _bs-tabs_ component to a title of the tab you would like to be activated by default.
|
|
24
|
+
|
|
25
|
+
Here is the controller _tabsPanesOptions_ property:
|
|
26
|
+
|
|
27
|
+
``` javascript
|
|
28
|
+
SomeController = Ember.Controller.extend({
|
|
29
|
+
tabsMeta: Ember.A([
|
|
30
|
+
Ember.Object.create({ title: 'Foo', template: 'tabs/foo-tabpane', controller: 'ShowcaseComponentsTabsFoo'}),
|
|
31
|
+
Ember.Object.create({ title: 'Bar', template: 'tabs/bar-tabpane'})
|
|
32
|
+
]);
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
The `template: 'some-template'` defines what template to render in the corresponding _Tab Pane_ when the Tab is selected.
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
Note that for the `Foo` tab, a `controller` property was defined, calling `\{\{controller\}\}` within the tab pane template `tabs/foo-tabpane` will point to the specified `ShowcaseComponentsTabsFoo` controller instead of the default controller
|
|
39
|
+
which is the controller of the template the `\{\{bs-tabs-panes\}\}` was called from.
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
Thats all needed! awesome isn't it?
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Tabs in conjuction with Routes
|
|
2
|
+
|
|
3
|
+
Rendering tab content can be simply done by providing a template per tab using the _bs-tabs-panes_ component,
|
|
4
|
+
Another possiblity is to have a _route per tab_ for rendering tabs contents, Choose this approach if:
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
* **You need your tabs to be bookmarkable, this is possible because each route is bound to some URL path.**
|
|
8
|
+
* **Your tabs are complicated and have a lot of logic and you need a controller per tab.**
|
|
9
|
+
|
|
10
|
+
If one or more of the reasons above makes sense to you, read on, otherwise use _bs-tabs-panes_ because its setup is much simpler.
|
|
11
|
+
|
|
12
|
+
## Users Profile Example
|
|
13
|
+
|
|
14
|
+
This is much easier to explain by example, so for the sake of example, we'll build a User profile with 3 tabs.
|
|
15
|
+
|
|
16
|
+
## Defining routes
|
|
17
|
+
|
|
18
|
+
First, lets define the routes of the User profile:
|
|
19
|
+
|
|
20
|
+
``` javascript
|
|
21
|
+
this.resource('user', function() {
|
|
22
|
+
this.route('general');
|
|
23
|
+
this.route('privacy');
|
|
24
|
+
return this.route('activities');
|
|
25
|
+
});
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
A resource is required per tabs component, here we define the resource as _user_ because tabs deals with managing a _User_ and a _@route_ is required per tab.
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
## Putting the Tabs component in the Resource template.
|
|
32
|
+
|
|
33
|
+
In Ember.js, every resource page has its own main template, nested routes are rendered within the _resource_ page, with such hierarchy, it makes sense to put the _tabs component_ in the resource page so it will be available for any nested route that the user visits.
|
|
34
|
+
|
|
35
|
+
Content goes into the `user` template.
|
|
36
|
+
|
|
37
|
+
``` html
|
|
38
|
+
\{\{bs-tabs contentBinding="tabsMeta"\}\}
|
|
39
|
+
\{\{outlet\}\}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
The `tabsMeta` is an array of the Tabs metadata in the `UserController`:
|
|
43
|
+
|
|
44
|
+
``` javascript
|
|
45
|
+
|
|
46
|
+
App.UserController = Ember.Controller.extend({
|
|
47
|
+
tabsMeta: [
|
|
48
|
+
Ember.Object.create({title: 'General', linkTo: 'user.general'}),
|
|
49
|
+
Ember.Object.create({title: 'Privacy', linkTo: 'user.privacy'}),
|
|
50
|
+
Ember.Object.create({title: 'Activities', linkTo: 'user.activities'})
|
|
51
|
+
]
|
|
52
|
+
});
|
|
53
|
+
````
|
|
54
|
+
|
|
55
|
+
The _outlet_ is important so the content of each tab will be rendered beneath the tabs component.
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
## Defining Templates
|
|
59
|
+
|
|
60
|
+
Simply define a template per nested route, just like you would do if each nested route wouldnt be apart of the tab component.
|
|
61
|
+
|
|
62
|
+
## Live example
|
|
63
|
+
|
|
64
|
+
Want to see it alive? take a look here: {{#link-to "user.general"}}User Profile{{/link-to}}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Tabs
|
|
2
|
+
|
|
3
|
+
Tabs are like Pills but styled differently,
|
|
4
|
+
The share exactly the same concepts, so this page doesn't repeat everything, visit Pills for the complete details.
|
|
5
|
+
|
|
6
|
+
## Simple Tabs
|
|
7
|
+
|
|
8
|
+
<div class="bs-example">
|
|
9
|
+
{{bs-tabs contentBinding="content" selectedBinding="selected"}}
|
|
10
|
+
|
|
11
|
+
<br/>
|
|
12
|
+
**Selected**: {{selected}}
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
``` html
|
|
17
|
+
\{\{bs-tabs contentBinding="content" selectedBinding="selected"\}\}
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Controller's code:
|
|
21
|
+
|
|
22
|
+
``` javascript
|
|
23
|
+
Showcase.ShowComponentsTabsController = Ember.Controller.extend({
|
|
24
|
+
content: ['Home', 'Profile', 'Messages']
|
|
25
|
+
});
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Panes
|
|
29
|
+
|
|
30
|
+
Please see {{#link-to "show_components.tabs-panes"}}Tab Panes{{/link-to}} for more info about Tab Panes.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<%=content%>
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Well
|
|
2
|
+
|
|
3
|
+
## Default Well
|
|
4
|
+
|
|
5
|
+
<p>Here is a default well, but **pay attention** that it is clickable, the click will be propagated to the **controller**.</p>
|
|
6
|
+
|
|
7
|
+
<div class="bs-example">
|
|
8
|
+
{{#bs-well clicked="wellClick"}}
|
|
9
|
+
I am in a well, click me!
|
|
10
|
+
{{/bs-well}}
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
``` html
|
|
14
|
+
\{\{#bs-well clicked="wellClick"\}\}
|
|
15
|
+
I am in a well!
|
|
16
|
+
\{\{/bs-well\}\}
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
<code>wellClick</code> is the function name in the **controller**.
|
|
21
|
+
|
|
22
|
+
## Optional classes
|
|
23
|
+
|
|
24
|
+
As explained by Bootstrap:
|
|
25
|
+
> Control padding and rounded corners with two optional modifier classes.
|
|
26
|
+
|
|
27
|
+
### Large Well
|
|
28
|
+
|
|
29
|
+
<div class="bs-example">
|
|
30
|
+
{{#bs-well large=true}}
|
|
31
|
+
Look, I'm in a large well!
|
|
32
|
+
{{/bs-well}}
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
``` html
|
|
36
|
+
\{\{#bs-well large=true\}\}
|
|
37
|
+
Look, I'm in a large well!
|
|
38
|
+
\{\{/bs-well\}\}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
<b>You can set large well by adding <code>class="well-lg"</code> or just set the <code>large</code> property to true</b>
|
|
42
|
+
|
|
43
|
+
### Small Well
|
|
44
|
+
|
|
45
|
+
<div class="bs-example">
|
|
46
|
+
{{#bs-well small=true}}
|
|
47
|
+
Look, I'm in a small well!
|
|
48
|
+
{{/bs-well}}
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
``` html
|
|
52
|
+
\{\{#bs-well small=true\}\}
|
|
53
|
+
Look, I'm in a small well!
|
|
54
|
+
\{\{/bs-well\}\}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
<b>You can set large well by adding <code>class="well-sm"</code> or just set the <code>small</code> property to true</b>
|
|
58
|
+
|
|
59
|
+
## Component Properties
|
|
60
|
+
|
|
61
|
+
<div class="table-responsive">
|
|
62
|
+
<table class="table table-bordered table-striped">
|
|
63
|
+
<thead>
|
|
64
|
+
<tr>
|
|
65
|
+
<th style="width: 150px;">Property</th>
|
|
66
|
+
<th>Description</th>
|
|
67
|
+
</tr>
|
|
68
|
+
</thead>
|
|
69
|
+
<tbody>
|
|
70
|
+
<tr>
|
|
71
|
+
<td>large</td>
|
|
72
|
+
<td>If true, a large well _will_ be rendered by adding the **well-lg** class.</td>
|
|
73
|
+
</tr>
|
|
74
|
+
<tr>
|
|
75
|
+
<td>small</td>
|
|
76
|
+
<td>If true, a small _well_ will be rendered by adding the **well-sm** class.</td>
|
|
77
|
+
</tr>
|
|
78
|
+
<tr>
|
|
79
|
+
<td>clicked</td>
|
|
80
|
+
<td>Triggers the specified function name on the **controller** immediately when user clicks the area of the well.</td>
|
|
81
|
+
</tr>
|
|
82
|
+
</tbody>
|
|
83
|
+
</table>
|
|
84
|
+
</div>
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# Wizard
|
|
2
|
+
|
|
3
|
+
Wizard is a multi step view component with transitioning workflow,
|
|
4
|
+
Wizard has a lot in common with the Tabs component as you can think about each Wizard step as a tab & pane, the main different is that with the Wizard component the transitioning order of the steps is defined a head.
|
|
5
|
+
|
|
6
|
+
## Wizard Sample
|
|
7
|
+
|
|
8
|
+
Defining an inline content Wizard with blocks is the simplest form of using the wizard component.
|
|
9
|
+
|
|
10
|
+
<div class="bs-example">
|
|
11
|
+
{{bs-wizard contentBinding="steps"}}
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
``` html
|
|
16
|
+
\{\{bs-wizard contentBinding="steps"\}\}
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
`contentBinding="steps"` defines a property named _steps_ in the current controll that defines the wizard steps,
|
|
20
|
+
Here is the current controll of this example:
|
|
21
|
+
|
|
22
|
+
``` javascript
|
|
23
|
+
Showcase.ShowComponentsWizardController = Ember.Controller.extend({
|
|
24
|
+
init: function() {
|
|
25
|
+
this._super();
|
|
26
|
+
this.set('steps', Ember.A([
|
|
27
|
+
Ember.Object.create({title: 'Foo', template: 'tabs/foo-tabpane'}),
|
|
28
|
+
Ember.Object.create({title: 'Bar', template: 'tabs/bar-tabpane'}),
|
|
29
|
+
Ember.Object.create({title: 'Baz', template: 'tabs/baz-tabpane'})
|
|
30
|
+
]));
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Disable Step Selection
|
|
36
|
+
|
|
37
|
+
Sometimes it makes sense to create a wizard with fixed step flow, this can be done by disabling the steps by providing `disabled=true` per step.
|
|
38
|
+
|
|
39
|
+
It is also possible to disallow moving to previous step if needed.
|
|
40
|
+
|
|
41
|
+
<div class="bs-example">
|
|
42
|
+
{{bs-wizard prevAllowed=false contentBinding="stepsNoPrev"}}
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
``` html
|
|
46
|
+
\{\{bs-wizard prevAllowed=false contentBinding="stepsNoPrev"\}\}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
``` javascript
|
|
50
|
+
Showcase.ShowComponentsWizardController = Ember.Controller.extend({
|
|
51
|
+
init: function() {
|
|
52
|
+
this._super();
|
|
53
|
+
this.set('steps', Ember.A([
|
|
54
|
+
Ember.Object.create({title: 'Step1', template: 'tabs/foo-tabpane', disabled="true"}),
|
|
55
|
+
Ember.Object.create({title: 'Step2', template: 'tabs/bar-tabpane', disabled="true"}),
|
|
56
|
+
Ember.Object.create({title: 'Step3', template: 'tabs/baz-tabpane', disabled="true"})
|
|
57
|
+
]));
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Programatically Created Wizard
|
|
63
|
+
|
|
64
|
+
Creating a wizard programatically should be used if rendering a Wizard is based on some action such as a button click, for example, a modal can be rendered by pressing a button that will render a Wizard within a modal as the example shown below:
|
|
65
|
+
|
|
66
|
+
<div class="bs-example">
|
|
67
|
+
{{bs-button title="Start Wizard" type="primary" clicked="createWizard"}}
|
|
68
|
+
</div>
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
``` html
|
|
72
|
+
\{\{bs-button title="Start Wizard" type="primary" clicked="createWizard"\}\}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
_Controller's code:_
|
|
76
|
+
|
|
77
|
+
``` javascript
|
|
78
|
+
Showcase.ShowComponentsWizardController = Ember.Controller.extend({
|
|
79
|
+
actions: {
|
|
80
|
+
createWizard: function() {
|
|
81
|
+
var body;
|
|
82
|
+
body = Bootstrap.BsWizardComponent.extend({
|
|
83
|
+
content: [
|
|
84
|
+
Ember.Object.create({title: 'Step1', template: 'wizard/step1', disabled: true}),
|
|
85
|
+
Ember.Object.create({title: 'Step2', template: 'wizard/step2', disabled: true}),
|
|
86
|
+
Ember.Object.create({title: 'Step3', template: 'wizard/step3', disabled: true})
|
|
87
|
+
],
|
|
88
|
+
targetObject: this,
|
|
89
|
+
onNext: "onNext",
|
|
90
|
+
onPrev: "onPrev",
|
|
91
|
+
onFinish: 'onFinish'
|
|
92
|
+
});
|
|
93
|
+
Bootstrap.ModalManager.open('manualModal', 'Wizard Title...', body, null, this);
|
|
94
|
+
},
|
|
95
|
+
onNext: function() {
|
|
96
|
+
return console.log('NEXT');
|
|
97
|
+
},
|
|
98
|
+
onPrev: function() {
|
|
99
|
+
return console.log('PREV');
|
|
100
|
+
},
|
|
101
|
+
onFinish: function() {
|
|
102
|
+
Bootstrap.ModalManager.close('manualModal');
|
|
103
|
+
return Bootstrap.NM.push('Wizard completed!');
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
The controller is responsible for creating the Modal and the Wizard components, our controller listens to the Wizard _onFinish_ event and close the modal as a response plus send an application notification.
|