bootstrap-for-ember-rails 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- 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,70 @@
|
|
1
|
+
# Growl like Notifications
|
2
|
+
|
3
|
+
|
4
|
+
_Growl Notifications_ is not a Bootstrap component but is mandatory for almost every web application.
|
5
|
+
|
6
|
+
_Growl Notifications_ are just like the _Notification_ component but messages that are rendered as small boxes on the right top of the screen, they fade in for a short period of time with a title, sub text and icon and then fade out.
|
7
|
+
|
8
|
+
To use growl notifications, put somewhere in your _application_ template the _bs-growl-notifications_ component.
|
9
|
+
|
10
|
+
``` html
|
11
|
+
\{\{bs-growl-notifications\}\}
|
12
|
+
```
|
13
|
+
|
14
|
+
Then use the _GrowlNotificationManager_ / _GNM_ to push new notifications with a message and type.
|
15
|
+
|
16
|
+
<div class="bs-example">
|
17
|
+
{{bs-button clicked="pushInfo" title="Push Info"}}
|
18
|
+
{{bs-button clicked="pushWarn" title="Push Warning"}}
|
19
|
+
{{bs-button clicked="pushSuccess" title="Push Success"}}
|
20
|
+
{{bs-button clicked="pushDanger" title="Push Danger"}}
|
21
|
+
</div>
|
22
|
+
|
23
|
+
Controller code:
|
24
|
+
|
25
|
+
|
26
|
+
``` javascript
|
27
|
+
Showcase.ShowComponentsGrowlNotifController = Ember.Controller.extend({
|
28
|
+
pushInfo: function() {
|
29
|
+
Bootstrap.GNM.push('INFO!', 'Hello, this is just an info message.', 'info');
|
30
|
+
},
|
31
|
+
pushSuccess: function() {
|
32
|
+
Bootstrap.GNM.push('SUCCESS!', 'Successfully performed operation!', 'success');
|
33
|
+
},
|
34
|
+
pushWarn: function() {
|
35
|
+
Bootstrap.GNM.push('WARN!', 'Could not perform operation!', 'warning');
|
36
|
+
},
|
37
|
+
pushDanger: function() {
|
38
|
+
Bootstrap.GNM.push('Danger!', 'System is halting!', 'danger');
|
39
|
+
}
|
40
|
+
});
|
41
|
+
```
|
42
|
+
|
43
|
+
You can control the visibility duration of each message by specifying the _showTime_ property.
|
44
|
+
|
45
|
+
|
46
|
+
## Component Files
|
47
|
+
|
48
|
+
* _css/bs-growl-notifications.min.css_
|
49
|
+
* _js/bs-growl-notifications.min.js_
|
50
|
+
|
51
|
+
## Component Properties
|
52
|
+
|
53
|
+
<div class="table-responsive">
|
54
|
+
<table class="table table-bordered table-striped">
|
55
|
+
<thead>
|
56
|
+
<tr>
|
57
|
+
<th style="width: 150px;">Property</th>
|
58
|
+
<th>Description</th>
|
59
|
+
<th>Default</th>
|
60
|
+
</tr>
|
61
|
+
</thead>
|
62
|
+
<tbody>
|
63
|
+
<tr>
|
64
|
+
<td>showTime</td>
|
65
|
+
<td>A number in _ms_ that defines how long the notification is displayed before it starts to fade out.</td>
|
66
|
+
<td>10 seconds</td>
|
67
|
+
</tr>
|
68
|
+
</tbody>
|
69
|
+
</table>
|
70
|
+
</div>
|
@@ -0,0 +1,87 @@
|
|
1
|
+
#Item action bar
|
2
|
+
|
3
|
+
When listing items that support selection, it usually make sense to perform some actions on the selected item(s).
|
4
|
+
|
5
|
+
The Items action bar component make it possible to build an bar of buttons where each button visibility may behave differently according to the selection,
|
6
|
+
|
7
|
+
For example an 'Edit' button may be disabled unless 1 item is selected, or a 'Delete' button may be enabled only
|
8
|
+
when there is 1 or more items selected.
|
9
|
+
|
10
|
+
In the template, only 1 expression is needed, the `content` property is expected to be an array of array, where each array represents a section in the action bar and contains objects that represent a button defintion in the bar, the `selectedItems` property is expected to be an array of the currently selected items on a list.
|
11
|
+
|
12
|
+
<div class="bs-example">
|
13
|
+
{{bs-items-action-bar contentBinding="actionsInBar" selectedItemsBinding="selection"}}
|
14
|
+
<br/>
|
15
|
+
{{bs-pills contentBinding="items" selectedBinding="selection"}}
|
16
|
+
</div>
|
17
|
+
|
18
|
+
For the sake of simplicity in this example we use the `bs-pills` component to list items with signle itemselection support,
|
19
|
+
but this can be replaced with a table or any other visual form that supports selection.
|
20
|
+
|
21
|
+
``` html
|
22
|
+
\{\{bs-items-action-bar contentBinding="actionsInBar" selectedItemsBinding="selection"\}\}
|
23
|
+
\{\{bs-pills contentBinding="items" selectedBinding="selection"\}\}
|
24
|
+
```
|
25
|
+
|
26
|
+
Per action defined in the controller (see below), it is possible to define whether the action should be disabled or not
|
27
|
+
and what should happen when an enabled action is clicked,
|
28
|
+
|
29
|
+
* Implement the `disabled` function per action and return `true` if the action should be disabled, the method recieve the current selection so logic may take the selection into consideration whether the action should be disabled or not.
|
30
|
+
* Define `transitionTo` property with a route name if you want the action to transition to another route when pressed.
|
31
|
+
* Define the `clickActionName` property with an action name to be invoked on the controller when action is clicked.
|
32
|
+
|
33
|
+
|
34
|
+
Controller's code:
|
35
|
+
|
36
|
+
``` javascript
|
37
|
+
Showcase.ShowComponentsItemsActionBarController = Ember.Controller.extend({
|
38
|
+
actionsInBar: [
|
39
|
+
[
|
40
|
+
{
|
41
|
+
title: 'To Alerts',
|
42
|
+
disabled: function(selection) {
|
43
|
+
var _ref;
|
44
|
+
if (selection.size < 1 || (selection != null ? (_ref = selection[0]) != null ? _ref.title : void 0 : void 0) !== 'Alerts') {
|
45
|
+
return true;
|
46
|
+
}
|
47
|
+
},
|
48
|
+
transitionTo: 'show_components.alert'
|
49
|
+
}, {
|
50
|
+
title: 'To Panels',
|
51
|
+
transitionTo: 'show_components.panel',
|
52
|
+
disabled: function(selection) {
|
53
|
+
var _ref;
|
54
|
+
if (selection.size < 1 || (selection != null ? (_ref = selection[0]) != null ? _ref.title : void 0 : void 0) !== 'Panels') {
|
55
|
+
return true;
|
56
|
+
}
|
57
|
+
}
|
58
|
+
}
|
59
|
+
], [
|
60
|
+
{
|
61
|
+
title: 'To Wizard',
|
62
|
+
disabled: function(selection) {
|
63
|
+
var _ref;
|
64
|
+
if (selection.size < 1 || (selection != null ? (_ref = selection[0]) != null ? _ref.title : void 0 : void 0) !== 'Wizards') {
|
65
|
+
return true;
|
66
|
+
}
|
67
|
+
},
|
68
|
+
clickActionName: 'wizard'
|
69
|
+
}
|
70
|
+
]
|
71
|
+
],
|
72
|
+
actions: {
|
73
|
+
wizard: function(selection) {
|
74
|
+
return alert("Wizard pressed!");
|
75
|
+
}
|
76
|
+
},
|
77
|
+
items: [
|
78
|
+
Ember.Object.create({
|
79
|
+
title: 'Alerts'
|
80
|
+
}), Ember.Object.create({
|
81
|
+
title: 'Panels'
|
82
|
+
}), Ember.Object.create({
|
83
|
+
title: 'Wizards'
|
84
|
+
})
|
85
|
+
]
|
86
|
+
});
|
87
|
+
```
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# Label
|
2
|
+
|
3
|
+
## Basic
|
4
|
+
|
5
|
+
<div class="bs-example">
|
6
|
+
<h4>Heading with label {{bs-label content="Label"}}</h3>
|
7
|
+
</div>
|
8
|
+
|
9
|
+
``` html
|
10
|
+
<h3>Heading with label \{\{bs-label content="Label"\}\}</h3>
|
11
|
+
```
|
12
|
+
|
13
|
+
## With Type
|
14
|
+
|
15
|
+
<div class="bs-example">
|
16
|
+
<h3>Heading with <strong>danger</strong> {{bs-label content="Careful!" type="danger"}}</h3>
|
17
|
+
</div>
|
18
|
+
|
19
|
+
``` html
|
20
|
+
<h3>Heading with <strong>danger</strong> \{\{bs-label content="Careful!" type="danger"\}\}</h3>
|
21
|
+
```
|
22
|
+
|
23
|
+
## Component Properties
|
24
|
+
|
25
|
+
<div class="table-responsive">
|
26
|
+
<table class="table table-bordered table-striped">
|
27
|
+
<thead>
|
28
|
+
<tr>
|
29
|
+
<th style="width: 150px;">Property</th>
|
30
|
+
<th>Description</th>
|
31
|
+
</tr>
|
32
|
+
</thead>
|
33
|
+
<tbody>
|
34
|
+
<tr>
|
35
|
+
<td>content</td>
|
36
|
+
<td>string: the label content.</td>
|
37
|
+
</tr>
|
38
|
+
<tr>
|
39
|
+
<td>type</td>
|
40
|
+
<td>Label types: success | info | warning | danger</td>
|
41
|
+
</tr>
|
42
|
+
</tbody>
|
43
|
+
</table>
|
44
|
+
</div>
|
@@ -0,0 +1,70 @@
|
|
1
|
+
# List Group
|
2
|
+
>List groups are a flexible and powerful component for displaying not only simple lists of elements, but complex ones with custom content.
|
3
|
+
<small>By Bootstrap</small>
|
4
|
+
|
5
|
+
All list items are linkable and selection can easily be observed
|
6
|
+
|
7
|
+
|
8
|
+
## Simple
|
9
|
+
The most basic list group is simply an unordered list with list items.
|
10
|
+
|
11
|
+
<div class="bs-example">
|
12
|
+
{{bs-list-group contentBinding="listSimple" selectedBinding="selected"}}
|
13
|
+
|
14
|
+
Selected: {{selected}}
|
15
|
+
</div>
|
16
|
+
|
17
|
+
``` html
|
18
|
+
\{\{bs-list-group contentBinding="listSimple"\}\}
|
19
|
+
```
|
20
|
+
Controller's code:
|
21
|
+
|
22
|
+
``` javascript
|
23
|
+
Showcase.ShowComponentsListGroupController = Ember.Controller.extend({
|
24
|
+
listSimple: Ember.A(['Cras justo odio', 'Dapibus ac facilisis in', 'Morbi leo risus'])
|
25
|
+
})
|
26
|
+
```
|
27
|
+
|
28
|
+
## Badges
|
29
|
+
|
30
|
+
Each item in the list can have badge component that will automatically be positioned on the right.
|
31
|
+
|
32
|
+
<div class="bs-example">
|
33
|
+
{{bs-list-group contentBinding="listWithBadges"}}
|
34
|
+
</div>
|
35
|
+
|
36
|
+
``` html
|
37
|
+
\{\{bs-list-group contentBinding="listWithBadges"\}\}
|
38
|
+
```
|
39
|
+
|
40
|
+
Controller's code:
|
41
|
+
``` javascript
|
42
|
+
Showcase.ShowComponentsListGroupController = Ember.Controller.extend({
|
43
|
+
listWithBadges: Ember.A([
|
44
|
+
Ember.Object.create({title: 'Inbox', badge: '45'}),
|
45
|
+
Ember.Object.create({ title: 'Sent', badge: '33'})
|
46
|
+
])
|
47
|
+
});
|
48
|
+
```
|
49
|
+
|
50
|
+
## List with Sub Text
|
51
|
+
|
52
|
+
Items can have a sub text enabled if an item metadata has the 'sub' property.
|
53
|
+
|
54
|
+
<div class="bs-example">
|
55
|
+
{{bs-list-group contentBinding="listWithSub"}}
|
56
|
+
</div>
|
57
|
+
|
58
|
+
``` html
|
59
|
+
\{\{bs-list-group contentBinding="listWithSub"\}\}
|
60
|
+
```
|
61
|
+
|
62
|
+
Controller's code:
|
63
|
+
``` javascript
|
64
|
+
Showcase.ShowComponentsListGroupController = Ember.Controller.extend({
|
65
|
+
listWithSub: Ember.A([
|
66
|
+
Ember.Object.create({title: 'Inbox', badge: '45'}),
|
67
|
+
Ember.Object.create({ title: 'Sent', badge: '33'})
|
68
|
+
])
|
69
|
+
});
|
70
|
+
```
|
@@ -0,0 +1,167 @@
|
|
1
|
+
# Modal
|
2
|
+
|
3
|
+
> Modals are streamlined, but flexible, dialog prompts with the minimum required functionality and smart defaults.
|
4
|
+
<small>by Bootstrap</small>
|
5
|
+
|
6
|
+
## Blocked Modal
|
7
|
+
|
8
|
+
A rendered modal with header, body, and set of actions in the footer.
|
9
|
+
|
10
|
+
<div class="bs-example">
|
11
|
+
{{bs-button title="Show Modal" clicked="show"}}
|
12
|
+
{{#bs-modal name="myModal" fade=true footerButtonsBinding="myModalButtons" title="My Modal"}}
|
13
|
+
<p>Modal content!</p>
|
14
|
+
{{/bs-modal}}
|
15
|
+
</div>
|
16
|
+
|
17
|
+
``` html
|
18
|
+
\{\{bs-button title="Show Modal" clicked="show"\}\}
|
19
|
+
\{\{#bs-modal name="myModal" fade=true footerButtonsBinding="myModalButtons" title="My Modal"\}\}
|
20
|
+
<p>Modal content!</p>
|
21
|
+
\{\{/bs-modal\}\}
|
22
|
+
```
|
23
|
+
|
24
|
+
_Controller's code_:
|
25
|
+
|
26
|
+
``` javascript
|
27
|
+
Showcase.ShowComponentsModalController = Ember.Controller.extend({
|
28
|
+
myModalButtons: [
|
29
|
+
Ember.Object.create({title: 'Submit', clicked:"submit"})
|
30
|
+
Ember.Object.create({title: 'Cancel', clicked:"cancel", dismiss: 'modal'})
|
31
|
+
],
|
32
|
+
|
33
|
+
actions: {
|
34
|
+
//Submit the modal
|
35
|
+
submit: function() {
|
36
|
+
Bootstrap.NM.push('Successfully submitted modal', 'success');
|
37
|
+
return Bootstrap.ModalManager.hide('myModal');
|
38
|
+
},
|
39
|
+
|
40
|
+
//Cancel the modal, we don't need to hide the model manually because we set {..., dismiss: 'modal'} on the button meta data
|
41
|
+
cancel: function() {
|
42
|
+
return Bootstrap.NM.push('Modal was cancelled', 'info');
|
43
|
+
},
|
44
|
+
|
45
|
+
//Show the modal
|
46
|
+
show: function() {
|
47
|
+
return Bootstrap.ModalManager.show('myModal');
|
48
|
+
}
|
49
|
+
}
|
50
|
+
});
|
51
|
+
```
|
52
|
+
NOTE: The buttons defined in the array object can contain the same attributes as the button component. For example: for a 'danger' button, add "type='danger'" to the object defining the button.
|
53
|
+
|
54
|
+
|
55
|
+
## Confirmation Modal
|
56
|
+
For a simple confirmation modal, you can simply invoke `Bootstrap.ModalManager.confirm(this);`
|
57
|
+
|
58
|
+
<div class="bs-example">
|
59
|
+
{{bs-button title="Delete" clicked="confirm"}}
|
60
|
+
</div>
|
61
|
+
|
62
|
+
``` html
|
63
|
+
\{\{bs-button title="Delete" clicked="confirm"\}\}
|
64
|
+
```
|
65
|
+
|
66
|
+
_Controller's code_:
|
67
|
+
|
68
|
+
``` javascript
|
69
|
+
Showcase.ShowComponentsModalController = Ember.Controller.extend({
|
70
|
+
confirm: {
|
71
|
+
confirm: {
|
72
|
+
Bootstrap.ModalManager.confirm(@);
|
73
|
+
},
|
74
|
+
//invoked when user press "confirm"
|
75
|
+
modalConfirmed: {
|
76
|
+
Bootstrap.NM.push('Confirmed!', 'success')
|
77
|
+
},
|
78
|
+
//invoked when user press "cancel"
|
79
|
+
modalCanceled: {
|
80
|
+
Bootstrap.NM.push('Cancelled!', 'info')
|
81
|
+
}
|
82
|
+
}
|
83
|
+
})
|
84
|
+
```
|
85
|
+
|
86
|
+
|
87
|
+
The `Bootstrap.ModalManager.confirm` method accept the following parameters:
|
88
|
+
|
89
|
+
<div class="table-responsive">
|
90
|
+
<table class="table table-bordered table-striped">
|
91
|
+
<thead>
|
92
|
+
<tr>
|
93
|
+
<th style="width: 150px;">Property</th>
|
94
|
+
<th>Description</th>
|
95
|
+
<th>Optional?</th>
|
96
|
+
</tr>
|
97
|
+
</thead>
|
98
|
+
<tbody>
|
99
|
+
<tr>
|
100
|
+
<td>controller</td>
|
101
|
+
<td>A reference to the controller that the confirm/cancel actions will be triggered on</td>
|
102
|
+
<td>no</td>
|
103
|
+
</tr>
|
104
|
+
<tr>
|
105
|
+
<td>title</td>
|
106
|
+
<td>The title of the modal that.</td>
|
107
|
+
<td>yes</td>
|
108
|
+
</tr>
|
109
|
+
<tr>
|
110
|
+
<td>message</td>
|
111
|
+
<td>The body text of the modal.</td>
|
112
|
+
<td>yes</td>
|
113
|
+
</tr>
|
114
|
+
<tr>
|
115
|
+
<td>confirmButtonTitle</td>
|
116
|
+
<td>The title of the confirm button</td>
|
117
|
+
<td>yes</td>
|
118
|
+
</tr>
|
119
|
+
<tr>
|
120
|
+
<td>cancelButtonTitle</td>
|
121
|
+
<td>The title of the cancel button</td>
|
122
|
+
<td>yes</td>
|
123
|
+
</tr>
|
124
|
+
</tbody>
|
125
|
+
</table>
|
126
|
+
</div>
|
127
|
+
|
128
|
+
|
129
|
+
## Programatically Modal Creation
|
130
|
+
|
131
|
+
It is also possible to programatically create a modal, this approach is useful if the modal contains a lot of elements and it makes sense to push the modal elements into the DOM programatically and totally destroy the modal when it is closed.
|
132
|
+
|
133
|
+
|
134
|
+
<div class="bs-example">
|
135
|
+
{{bs-button title="Create Modal" clicked="createModalProgramatically"}}
|
136
|
+
</div>
|
137
|
+
|
138
|
+
``` html
|
139
|
+
//we only render a button which will programatically create the modal
|
140
|
+
\{\{bs-button title="Create Modal" clicked="createModalProgramatically"\}\}
|
141
|
+
```
|
142
|
+
|
143
|
+
_Controller's code_:
|
144
|
+
|
145
|
+
``` javascript
|
146
|
+
Showcase.ShowComponentsModalController = Ember.Controller.extend({
|
147
|
+
manualButtons: [
|
148
|
+
Ember.Object.create({title: 'Submit', clicked:"submitManual"})
|
149
|
+
Ember.Object.create({title: 'Cancel', dismiss: 'modal'})
|
150
|
+
],
|
151
|
+
|
152
|
+
actions: {
|
153
|
+
submitManual: function() {
|
154
|
+
Bootstrap.NM.push('Modal destroyed!', 'success');
|
155
|
+
return Bootstrap.ModalManager.close('manualModal');
|
156
|
+
},
|
157
|
+
createModalProgramatically: function() {
|
158
|
+
//@property {string} The name of the modal, required later to close the modal (see submitManual function above)
|
159
|
+
//@property {string} The title of the modal.
|
160
|
+
//@property {string} The template name to render within the modal body, a View class may also be specified.
|
161
|
+
//@property {array} Array of Button meta data
|
162
|
+
//@property {object} The controller instance that instantiate the modal.
|
163
|
+
Bootstrap.ModalManager.open('manualModal', 'Hello', 'demo-template', this.manualButtons, this);
|
164
|
+
}
|
165
|
+
}
|
166
|
+
});
|
167
|
+
```
|
@@ -0,0 +1,76 @@
|
|
1
|
+
# Notifications
|
2
|
+
|
3
|
+
_Notifications_ is not a Bootstrap component but is mandatory for almost every web application.
|
4
|
+
|
5
|
+
_Notifications_ are messages that are rendered as _Alerts_, they fade in for a short period of time with some message and type and then they fade out.
|
6
|
+
|
7
|
+
Notifications are pushed into an array, so different parts of the application may push notifications to the user
|
8
|
+
and each will be displayed one after another.
|
9
|
+
|
10
|
+
To use notifications, put somewhere in your _application_ template the _bs-notifications_ component.
|
11
|
+
|
12
|
+
``` html
|
13
|
+
\{\{bs-notifications style="z-index: 1000; position: fixed; width: 50%; left: 0; right: 0; margin-left: auto; margin-right: auto; margin-top: 50px;"\}\}
|
14
|
+
```
|
15
|
+
|
16
|
+
How you style the component is up to you, this is just an example for centralizing the notifications on the screen.
|
17
|
+
|
18
|
+
Then use the _NotificationManager_ / _NM_ to push new notifications with a message and type.
|
19
|
+
|
20
|
+
<div class="bs-example" >
|
21
|
+
{{bs-button type="info" clicked="pushInfo" title="Push Info"}}
|
22
|
+
{{bs-button type="warning" clicked="pushWarn" title="Push Warning"}}
|
23
|
+
{{bs-button type="success" clicked="pushSuccess" title="Push Success"}}
|
24
|
+
{{bs-button type="danger" clicked="pushDanger" title="Push Danger"}}
|
25
|
+
</div>
|
26
|
+
|
27
|
+
Controller code:
|
28
|
+
|
29
|
+
``` javascript
|
30
|
+
Showcase.ShowComponentsNotificationsController = Ember.Controller.extend({
|
31
|
+
pushInfo: function() {
|
32
|
+
return Bootstrap.NM.push('Hello, this is just an info message.', 'info');
|
33
|
+
},
|
34
|
+
pushWarn: function() {
|
35
|
+
return Bootstrap.NM.push('Could not perform operation!', 'warning');
|
36
|
+
},
|
37
|
+
pushSuccess: function() {
|
38
|
+
return Bootstrap.NM.push('Successfully performed operation!', 'success');
|
39
|
+
},
|
40
|
+
pushDanger: function() {
|
41
|
+
return Bootstrap.NM.push('Danger! system is halting!', 'danger');
|
42
|
+
}
|
43
|
+
});
|
44
|
+
```
|
45
|
+
|
46
|
+
During fade out, If user hover with the mouse in the notification area, it will cancel the fade in animation so the user can have more time to read the message, moving the mouse out will retrigger the fade out.
|
47
|
+
|
48
|
+
You can control the duration messages are displayed, the fade out and fade in time by providing properties for each, for more info see the properties options below.
|
49
|
+
|
50
|
+
|
51
|
+
## Component Properties
|
52
|
+
|
53
|
+
<div class="table-responsive">
|
54
|
+
<table class="table table-bordered table-striped">
|
55
|
+
<thead>
|
56
|
+
<tr>
|
57
|
+
<th style="width: 150px;">Property</th>
|
58
|
+
<th>Description</th>
|
59
|
+
</tr>
|
60
|
+
</thead>
|
61
|
+
<tbody>
|
62
|
+
<tr>
|
63
|
+
<td>showTime</td>
|
64
|
+
<td>A number in _ms_ that defines how long the notification is displayed before it starts to fade out.</td>
|
65
|
+
</tr>
|
66
|
+
<tr>
|
67
|
+
<td>fadeInTime</td>
|
68
|
+
<td>A number in _ms_ that defines how long it takes a notification to fades in.</td>
|
69
|
+
</tr>
|
70
|
+
<tr>
|
71
|
+
<td>fadeOutTime</td>
|
72
|
+
<td>A number in _ms_ that defines how long it takes a notification to fade out.</td>
|
73
|
+
</tr>
|
74
|
+
</tbody>
|
75
|
+
</table>
|
76
|
+
</div>
|