From 057a7d9fed3bfe4230bd7bf0b0195dcd025a5b63 Mon Sep 17 00:00:00 2001 From: Chris Honniball Date: Wed, 24 Jun 2015 14:04:24 -0400 Subject: [PATCH] App updates. + #1 - added bootstrap JS + Added "installation". --- tests/dummy/app/controllers/index.js | 2 +- tests/dummy/app/index.html | 3 ++- tests/dummy/app/templates/application.hbs | 6 ++++++ tests/dummy/app/templates/index.hbs | 12 ++++++++++-- tests/dummy/config/environment.js | 2 +- 5 files changed, 20 insertions(+), 5 deletions(-) diff --git a/tests/dummy/app/controllers/index.js b/tests/dummy/app/controllers/index.js index 911a2c4..8058ca0 100644 --- a/tests/dummy/app/controllers/index.js +++ b/tests/dummy/app/controllers/index.js @@ -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" }, diff --git a/tests/dummy/app/index.html b/tests/dummy/app/index.html index 8083b68..9d0509a 100644 --- a/tests/dummy/app/index.html +++ b/tests/dummy/app/index.html @@ -10,9 +10,9 @@ {{content-for 'head'}} - + {{content-for 'head-footer'}} @@ -20,6 +20,7 @@ {{content-for 'body'}} + {{content-for 'body-footer'}} diff --git a/tests/dummy/app/templates/application.hbs b/tests/dummy/app/templates/application.hbs index 4e184b1..788a7a3 100644 --- a/tests/dummy/app/templates/application.hbs +++ b/tests/dummy/app/templates/application.hbs @@ -5,5 +5,11 @@ {{partial 'navigation'}} +

Installation

+ +
ember install ember-chosen
+ +
+ {{outlet}} diff --git a/tests/dummy/app/templates/index.hbs b/tests/dummy/app/templates/index.hbs index aa14cb5..bdd0a38 100644 --- a/tests/dummy/app/templates/index.hbs +++ b/tests/dummy/app/templates/index.hbs @@ -44,6 +44,10 @@

\{{ember-chosen}} with grouped options that rely on another select box on the page.

+

+ * Ember-Chosen validates the group before populating the options array. If the path doesn't exist in the first object within content then Ember-Chosen does not group the items. +

+
Example
@@ -88,13 +92,17 @@

\{{ember-chosen}} with block content that effects another select boxes grouping.

+

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

+
Example
{{#ember-chosen - placeholder="Select Some Things..." + placeholder="Select a group..." value=grouping allowSingleDeselect=true }} @@ -114,7 +122,7 @@
Code
\{{#ember-chosen
-  placeholder="Select Some Things..."
+  placeholder="Select a group..."
   value=grouping
   allowSingleDeselect=true
   }}
diff --git a/tests/dummy/config/environment.js b/tests/dummy/config/environment.js
index 9f1ff48..32646c2 100644
--- a/tests/dummy/config/environment.js
+++ b/tests/dummy/config/environment.js
@@ -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'",