Skip to content

Commit

Permalink
App updates.
Browse files Browse the repository at this point in the history
+ #1 - added bootstrap JS
+ Added "installation".
  • Loading branch information
Chris Honniball committed Jun 24, 2015
1 parent 105724c commit 057a7d9
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests/dummy/app/controllers/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Ember from 'ember';

export default Ember.Controller.extend({
grouping: 'test_group',
grouping: '',

options: Ember.A([
{ label: "Label 1", value: "Value 1", group: "Group A", alt_group: "Alt Group A" },
Expand Down
3 changes: 2 additions & 1 deletion tests/dummy/app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,17 @@
{{content-for 'head'}}

<link rel="stylesheet" href="assets/vendor.css">
<link rel="stylesheet" href="assets/dummy.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
<link rel="stylesheet" href="assets/dummy.css">

{{content-for 'head-footer'}}
</head>
<body>
{{content-for 'body'}}

<script src="assets/vendor.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script src="assets/dummy.js"></script>

{{content-for 'body-footer'}}
Expand Down
6 changes: 6 additions & 0 deletions tests/dummy/app/templates/application.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,11 @@

{{partial 'navigation'}}

<h3>Installation</h3>

<pre>ember install ember-chosen</pre>

<hr>

{{outlet}}
</div>
12 changes: 10 additions & 2 deletions tests/dummy/app/templates/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@
<div class="panel-body">
<p><code>\{{ember-chosen}}</code> with grouped options that rely on another select box on the page.</p>

<p>
* <strong>Ember-Chosen</strong> validates the group before populating the <code>options</code> array. If the path doesn't exist in the first object within <code>content</code> then <strong>Ember-Chosen</strong> does not group the items.
</p>

<h5 class="text-uppercase text-muted">Example</h5>

<div class="row">
Expand Down Expand Up @@ -88,13 +92,17 @@
<div class="panel-body">
<p><code>\{{ember-chosen}}</code> with block content that effects another select boxes grouping.</p>

<p>
* Attempts to select the item that matches the passed <code>value</code>. Matches are determined by looking for the a equal <code>value</code> in each <code>option</code> and if there is not an equal <code>value</code> then <strong>Ember-Chosen</strong> looks at the HTML content of the <code>option</code>.
</p>

<h5 class="text-uppercase text-muted">Example</h5>

<div class="row">
<div class="col-md-6 col-sm-8 col-xs-12">
<div class="form-group">
{{#ember-chosen
placeholder="Select Some Things..."
placeholder="Select a group..."
value=grouping
allowSingleDeselect=true
}}
Expand All @@ -114,7 +122,7 @@
<h5 class="text-uppercase text-muted">Code</h5>

<pre>\{{#ember-chosen
placeholder="Select Some Things..."
placeholder="Select a group..."
value=grouping
allowSingleDeselect=true
}}
Expand Down
2 changes: 1 addition & 1 deletion tests/dummy/config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = function(environment) {
locationType: 'auto',
contentSecurityPolicy: {
'default-src': "'none'",
'script-src': "'self'",
'script-src': "'self' maxcdn.bootstrapcdn.com",
'font-src': "'self' fonts.gstatic.com maxcdn.bootstrapcdn.com",
'connect-src': "'self'",
'img-src': "'self'",
Expand Down

0 comments on commit 057a7d9

Please sign in to comment.