Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
152 commits
Select commit Hold shift + click to select a range
413fddb
Removed spec/dummy/public/spree files
Jan 15, 2015
22385b7
Updates gitignore.
Jan 15, 2015
396cd37
Merge branch 'master' into feature/bourbon-neat
Jan 15, 2015
b759356
Merge branch 'master' into feature/bourbon-neat
Jan 15, 2015
91f27ff
Gets rid of bootstrap dependencies.
Jan 15, 2015
314b7da
Converts master stylesheet to SASS.
Jan 15, 2015
e52c645
Gets rid of assorted JS Bootstrap dependencies.
Jan 15, 2015
7607431
Removes manual Bootstrap library requirements from sprangular.rb
Jan 15, 2015
2b8915f
Gets rid of angular-motion stylesheet.
Jan 15, 2015
1c8c8ba
Removes ui.bootstrap and mcgrea.ngStrap from the application module.
Jan 15, 2015
07122dc
Gets rid of Bootstrap-related gems.
Jan 15, 2015
b18a6da
Adds Bourbon and Neat to gemspec.
Jan 15, 2015
ee35056
Requires Bourbon and Neat on sprangular.rb.
Jan 15, 2015
1c667d1
Imports Bourbon and Neat on stylesheet manifest.
Jan 15, 2015
0f1e188
Overrides stylesheet manifest, generates Bitters scaffolding.
Jan 15, 2015
6b21ecc
Converts Bitter scaffolding files to SASS.
Jan 15, 2015
6d96dbe
Imports normalize.css for styles resetting.
Jan 15, 2015
856afab
Updates header navigation markup.
Jan 15, 2015
30ebce2
Moves Bitter-generated stylesheet scaffolding over to source manifest.
Jan 15, 2015
e7d7248
Gets rid of navigation bar partials.
Jan 15, 2015
9e60fb9
Imports Refill stylesheet for navigation bar.
Jan 15, 2015
bfc3b31
Fixes markup on navigation bar.
Jan 15, 2015
dd348a8
Strips out Bootstrap grid class names from application layout.
Jan 16, 2015
b531197
Strips out Bootstrap grid class names from product listing view.
Jan 16, 2015
4eff894
Creates module stylesheet to handle listing grids.
Jan 16, 2015
7ed7e56
Conforms product listing grid to proper conventions.
Jan 16, 2015
a4d0397
Extends button styles to .button class.
Jan 16, 2015
3fc3514
Creates stylesheet to handle form element components.
Jan 30, 2015
0429431
Adds form stylesheet to manifest file.
Jan 30, 2015
ff923f0
Scaffolds markup for dropdown directive template.
Jan 30, 2015
bc49c70
Creates Angular directive for dropdown component.
Jan 30, 2015
436e5a7
Refactors variant selection in order to use dropdown component.
Jan 30, 2015
98664fc
Bye bye bootstrap
joshnuss Feb 2, 2015
45d97aa
Added intialization values dict. in variantSelection, when no variant…
joshnuss Feb 3, 2015
e3695fc
Refactored Product.options to simplify key structure
joshnuss Feb 3, 2015
605ad47
Refactored variant-selection to $watch `values` instead of manual cal…
joshnuss Feb 3, 2015
d4d11ec
Refactored `dropdown` directive to use ngModel
joshnuss Feb 3, 2015
def2ca0
Ensures only one variant selection dropdown can be open at a time.
Mar 4, 2015
6248964
Removes forced width from grid container on product listing view.
Mar 4, 2015
dea4053
Merges master into feature/bourbon-neat.
Mar 4, 2015
4c527eb
Groups user and cart elements into dashboard placeholder on header.
Mar 4, 2015
980dd5d
Re-organizes stylesheet hierarchy.
Mar 4, 2015
1c06044
Adds z-index strata to variables stylesheet.
Mar 4, 2015
2e8e858
Renames global variables across stylesheets.
Mar 4, 2015
ab983c7
Increases grid container width.
Mar 4, 2015
fe68b8e
Resets margins on form elements.
Mar 4, 2015
f01c8c3
Refines top navigation styles.
Mar 4, 2015
a521582
Adds Sprangular logo to top navigation.
Mar 4, 2015
99ccbe5
Includes helpers stylesheet to application.
Mar 5, 2015
e1aa440
Changes application loader styles.
Mar 5, 2015
3a0a030
Creates stylesheet for handling of global layout styles.
Mar 5, 2015
c74e43c
Ensures grid container exists as its own wrapper on header and produc…
Mar 5, 2015
1cddb41
Creates dedicated stylesheet for flash messages.
Mar 5, 2015
da30730
Applies markup changes to jumbotron template.
Mar 5, 2015
cb8c7df
Adds chevron to CTA button on jumbotron template.
Mar 5, 2015
76f0a10
Sets styles to cart module on header navigation.
Mar 5, 2015
f1cc70f
Applies changes to footer markup and styles.
Mar 5, 2015
8808e7a
New color variable.
Mar 5, 2015
3257bd7
Removes bottom margin from flash modules.
Mar 5, 2015
330c947
Applies changes to markup on product listing and add to car button te…
Mar 5, 2015
36f8e04
Adjusts product listing styles accordingly.
Mar 5, 2015
eb4335c
Reverts model back to pre-master merge version.
Mar 6, 2015
1de5c61
Refactors styles of dropdown components.
Mar 6, 2015
aa7b2b0
Ensures dropdowns span 100% of list items on product listing view.
Mar 6, 2015
a01a85a
Refactors variant selection directive.
Mar 6, 2015
c22b428
Sets background color on dropdown container.
Mar 6, 2015
1b181e3
Detaches add to cart button from its wrapper.
Mar 6, 2015
6ca6ed5
Adjusts listing styles to accommodate changes on variant selection di…
Mar 6, 2015
c916a36
Ensures height of product listing items is consistent.
Mar 9, 2015
3051e04
Removes top and bottom padding of buttons in favor of line-height.
Mar 9, 2015
45701e6
Sets styles to presentation tags on variant selection module.
Mar 9, 2015
99faf6e
Moves product list pagination to its own layout partial.
Mar 10, 2015
0b9ea14
Adjusts markup on pagination partial.
Mar 10, 2015
667c5ed
Creates dedicated stylesheet and sets styles to pagination module.
Mar 10, 2015
503bc46
Markup cleanup on product show template.
Mar 10, 2015
479e3c2
Cleanup markup on partial templates of product view.
Mar 10, 2015
0de222f
Nests cart controls under details section on product show template.
Mar 10, 2015
304f0bb
Creates specific stylesheet and sets up grid structure on product sho…
Mar 10, 2015
d134024
Uses semantic approach on product gallery partial's markup.
Mar 10, 2015
e203c6d
Resets margins on figure element.
Mar 10, 2015
96c095e
Sets grid columns for product gallery thumbnails.
Mar 10, 2015
3a6fbbd
Revert "Reverts model back to pre-master merge version."
joshnuss Mar 13, 2015
4b7fead
Moves global style rules for variant selector over to dropdown module…
Apr 1, 2015
18fa03a
Adds top and bottom paddings to product details page werapper.
Apr 1, 2015
0bee985
Introduces color variation for button elements.
Apr 1, 2015
512add0
Increases height of form input elements.
Apr 1, 2015
a218f54
Utilitary display class.
Apr 1, 2015
919aaa3
Ensures dropdown wrapper positioning rules are global.
Apr 1, 2015
358c56c
Assigns proper formatting class to checkout button on product details…
Apr 1, 2015
89c54c7
Refactors markup of product properties partial.
Apr 1, 2015
ca31d11
Adjusts markup on product details page.
Apr 1, 2015
c4c4b06
Sets styles to product details page.
Apr 1, 2015
8ff87d4
Ensures footer sticks to the bottom of the page.
Apr 1, 2015
3675bca
Re-instates basic cart toggling functionality on application header.
Apr 1, 2015
556fbe5
Adjusts top padding on search field.
Apr 1, 2015
dad5f58
Creates modular stylesheet for cart.
Apr 1, 2015
c6a951a
Extends toggling functionality to close button on cart module.
Apr 2, 2015
157a535
Sets dropdown container width as global rule.
Apr 2, 2015
0f13246
Creates badge mixin.
Apr 2, 2015
029cc2d
Adjusts height of header module.
Apr 2, 2015
5fa65d3
Removes badge class from quantity on cart button.
Apr 2, 2015
bf3126f
Adjusts markup of promo code form.
Apr 2, 2015
11f3613
Introduces color variation for button elements.
Apr 2, 2015
e0d537d
Sets up clearfix class.
Apr 2, 2015
0685757
Adjusts markup on cart partial.
Apr 2, 2015
1bf2248
Sets styles to cart module.
Apr 2, 2015
bb8699a
Adds helper mixin for flash messages.
Apr 6, 2015
9b20fe0
Refactors extended and modular styles for flash messages.
Apr 6, 2015
a64c590
Updates markup of flash messages.
Apr 6, 2015
1173711
Sets styles for close icon on flash messages.
Apr 6, 2015
88f6b6a
Introduces new style variation for button elements.
Apr 6, 2015
626418b
Creates specific stylesheet to handle styles on user-related views.
Apr 6, 2015
3bad2f9
Adds utilitary floating classes to layout stylesheet.
Apr 6, 2015
13cef42
Removes fixed width from variants module on product details view.
Apr 6, 2015
7ca0849
Adds bottom margin to form group wrappers.
Apr 6, 2015
39cddda
Adjusts markup on sign in page.
Apr 6, 2015
d9bda68
Extends auth markup template to sign up page.
Apr 6, 2015
463e9dc
Applies proper color to inline error messages on forms.
Apr 6, 2015
114bcfe
Extends auth markup template to password resetting page.
Apr 6, 2015
43ad515
Conforms account page to auth markup.
Apr 6, 2015
8ea6f16
Moves grid-related styles to proper core stylesheet, updates syntax.
Apr 6, 2015
43e4488
Creates utilitary grid column class.
Apr 6, 2015
1324479
Updates grid-based auth layouts.
Apr 6, 2015
92d8017
Creates specific stylesheet to handle styles on checkout pages.
Apr 6, 2015
58c4b24
Scaffolds checkout index view into three separate columns.
Apr 6, 2015
1a6f314
Changes subheading elements on checkout index view.
Apr 6, 2015
7dc70a4
Removes bottom margin from select elements.
Apr 6, 2015
24f6299
Updates markup on billing and shipping address forms.
Apr 6, 2015
9887172
Wraps select element for existing addresses into from group wrapper.
Apr 6, 2015
cfbe623
Applies markup changes to shipping rates partial.
Apr 6, 2015
fce07b4
Removes bottom margin from error message snippets.
Apr 6, 2015
079fb03
Wraps select element for existing credit cards into form group wrapper.
Apr 6, 2015
2c5ee7a
Applies markup changes to credit card form partial.
Apr 6, 2015
27ad963
Sets preliminary styles to checkout index page.
Apr 6, 2015
d49b8d4
Adjusts markup and spacing of checkout summary items.
Apr 7, 2015
90b6e17
Un-nests promo code form and checkout confirmation button from summar…
Apr 7, 2015
0075160
Applies markup changes to checkout promo code form.
Apr 7, 2015
c3efc2c
Sets styles to checkout summary and promo code modules.
Apr 7, 2015
3c25ca2
Includes module stylesheet to handle breadcrumb elements.
Apr 7, 2015
5818c8a
Extends breadcrumb styles to checkout inner navigation.
Apr 7, 2015
0b09ea0
Migrations.
Apr 1, 2015
c5b9692
Merges master into feature/bourbon-neat.
Apr 7, 2015
9298b76
Removes bottom margin from form elements.
Apr 7, 2015
d94ebd2
Adjusts overflow on cart module.
Apr 7, 2015
ac8e4ae
Adjusts markup of promo form partial on cart module.
Apr 7, 2015
41d5663
Cart module should be fixed-positioned.
Apr 7, 2015
7521fb4
Removes border radius from form input elements.
Apr 7, 2015
b555e65
Migrations.
Apr 1, 2015
cd7f63f
Merges master into feature/bourbon-neat.
Jun 16, 2015
fc49b3c
Refactors variant selector styles.
Jun 23, 2015
0cc7947
Changes functionality of variant selection directive.
Jun 23, 2015
422ca98
Refactors use of variant selection on product-related templates.
Jun 23, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ spec/dummy/log/*.log
spec/dummy/tmp/
spec/dummy/public/spree
spec/dummy/.sass-cache
.ruby-version
104 changes: 53 additions & 51 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
GIT
remote: git://github.com/rails/sass-rails.git
revision: f305f0299daa7c08d86f51d5e8ee0474375bbb87
revision: afd9826fa3bbb40a7d378369bba04306ff8d9014
specs:
sass-rails (5.0.1)
sass-rails (5.0.3)
railties (>= 4.0.0, < 5.0)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
Expand All @@ -11,20 +11,20 @@ GIT

GIT
remote: git://github.com/spree/spree.git
revision: 85f5308df93647be4f4bb74851795fc51b839939
revision: f8f760cb0d1f46d6a2b8aac452b3d7689e0a15f0
branch: 2-4-stable
specs:
spree_api (2.4.5.beta)
spree_api (2.4.7.beta)
rabl (~> 0.9.4.pre1)
spree_core (= 2.4.5.beta)
spree_core (= 2.4.7.beta)
versioncake (~> 2.3.1)
spree_backend (2.4.5.beta)
spree_backend (2.4.7.beta)
jquery-rails (~> 3.1.2)
jquery-ui-rails (~> 5.0.0)
select2-rails (= 3.5.9.1)
spree_api (= 2.4.5.beta)
spree_core (= 2.4.5.beta)
spree_core (2.4.5.beta)
spree_api (= 2.4.7.beta)
spree_core (= 2.4.7.beta)
spree_core (2.4.7.beta)
activemerchant (~> 1.44.1)
acts_as_list (~> 0.3)
awesome_nested_set (~> 3.0.1)
Expand All @@ -42,18 +42,18 @@ GIT
paperclip (~> 4.2.0)
paranoia (~> 2.0.5)
premailer-rails
rails (~> 4.1.8)
rails (= 4.1.9)
ransack (~> 1.4.1)
state_machine (= 1.2.0)
stringex (~> 1.5.1)
truncate_html (= 0.9.2)
twitter_cldr (~> 3.0)
spree_sample (2.4.5.beta)
spree_core (= 2.4.5.beta)
spree_sample (2.4.7.beta)
spree_core (= 2.4.7.beta)

GIT
remote: git://github.com/spree/spree_auth_devise.git
revision: 997382fcb1f6ed78a201ee7016384cfe71745aea
revision: 590d36810bbd35905ee204b4c9ea6f03ff236d09
branch: 2-4-stable
specs:
spree_auth_devise (2.2.0)
Expand All @@ -65,7 +65,7 @@ GIT

GIT
remote: git://github.com/spree/spree_gateway.git
revision: d8e51e5c159b5652a989192fa36c31e38077e552
revision: 747971a1c34f10fe784c8825440e24d14c8a0990
branch: 2-4-stable
specs:
spree_gateway (2.4.0)
Expand All @@ -76,24 +76,24 @@ PATH
specs:
sprangular (0.1.0)
active_model_serializers (~> 0.8.3)
bourbon
coffee-rails
font-awesome-rails (~> 4.2)
jquery-rails
neat
ngannotate-rails (= 0.15.4)
prerender_rails
rack-rewrite
rails
rails-assets-angular (= 1.3.9)
rails-assets-angular-animate
rails-assets-angular-i18n
rails-assets-angular-motion
rails-assets-angular-route
rails-assets-angular-sanitize
rails-assets-angular-strap
rails-assets-angular-translate
rails-assets-angularytics
rails-assets-bootstrap-additions
rails-assets-bootstrap-sass-official
rails-assets-jasmine-sinon
rails-assets-sinon
rails-assets-underscore
rails-assets-underscore.string
sass-rails
Expand Down Expand Up @@ -148,11 +148,14 @@ GEM
tzinfo (~> 1.1)
acts_as_list (0.6.0)
activerecord (>= 3.0)
addressable (2.3.7)
addressable (2.3.8)
arel (5.0.1.20140414130214)
awesome_nested_set (3.0.2)
activerecord (>= 4.0.0, < 5)
bcrypt (3.1.10)
bourbon (4.2.3)
sass (~> 3.4)
thor
builder (3.2.2)
camertron-eprun (1.1.0)
cancancan (1.9.2)
Expand All @@ -162,10 +165,10 @@ GEM
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
capybara-angular (0.1.0)
capybara-angular (0.1.1)
capybara
carmen (1.0.1)
unicode_utils (~> 1.4.0)
carmen (1.0.2)
activesupport (>= 3.0.0)
childprocess (0.5.5)
ffi (~> 1.0, >= 1.0.11)
chromedriver-helper (0.0.8)
Expand All @@ -190,7 +193,7 @@ GEM
safe_yaml (~> 1.0.0)
css_parser (1.3.6)
addressable
database_cleaner (1.4.0)
database_cleaner (1.4.1)
deface (1.0.1)
colorize (>= 0.5.8)
nokogiri (~> 1.6.0)
Expand All @@ -210,7 +213,7 @@ GEM
factory_girl (4.5.0)
activesupport (>= 3.0.0)
ffaker (1.32.1)
ffi (1.9.6)
ffi (1.9.8)
font-awesome-rails (4.3.0.0)
railties (>= 3.2, < 5.0)
friendly_id (5.0.5)
Expand Down Expand Up @@ -241,12 +244,15 @@ GEM
mime-types (2.4.3)
mini_portile (0.6.2)
minitest (5.5.1)
monetize (1.1.0)
monetize (1.2.0)
money (~> 6.5.0)
money (6.5.1)
i18n (>= 0.6.4, <= 0.7.0)
multi_json (1.10.1)
multi_json (1.11.0)
multi_xml (0.5.5)
neat (1.7.2)
bourbon (>= 4.0)
sass (>= 3.3)
ngannotate-rails (0.15.4)
execjs
rails (>= 3.1)
Expand All @@ -273,7 +279,7 @@ GEM
cliver (~> 0.3.1)
multi_json (~> 1.0)
websocket-driver (>= 0.2.0)
polyamorous (1.1.0)
polyamorous (1.2.0)
activerecord (>= 3.0)
polyglot (0.3.5)
premailer (1.8.4)
Expand All @@ -289,7 +295,7 @@ GEM
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
pry-rails (0.3.2)
pry-rails (0.3.4)
pry (>= 0.9.10)
rabl (0.9.4.pre1)
activesupport (>= 2.3.14)
Expand All @@ -308,28 +314,25 @@ GEM
railties (= 4.1.9)
sprockets-rails (~> 2.0)
rails-assets-angular (1.3.9)
rails-assets-angular-animate (1.3.13)
rails-assets-angular (~> 1.3.0)
rails-assets-angular-i18n (1.3.15)
rails-assets-angular-motion (0.3.4)
rails-assets-angular (>= 1.2, < 2)
rails-assets-angular-animate (>= 1.2, < 2)
rails-assets-angular-animate (1.3.9)
rails-assets-angular (= 1.3.9)
rails-assets-angular-i18n (1.4.0)
rails-assets-angular-route (1.3.9)
rails-assets-angular (= 1.3.9)
rails-assets-angular-sanitize (1.3.9)
rails-assets-angular (= 1.3.9)
rails-assets-angular-strap (2.2.1)
rails-assets-angular (>= 1.2.21, < 2)
rails-assets-angular-translate (2.7.0)
rails-assets-angular (>= 1.2.26, <= 1.4)
rails-assets-angular-translate (2.7.2)
rails-assets-angular (>= 1.2.26, <= 1.5)
rails-assets-angularytics (0.4.0)
rails-assets-angular
rails-assets-bootstrap-additions (0.2.3)
rails-assets-bootstrap-sass-official (3.3.4)
rails-assets-jquery (>= 1.9.0)
rails-assets-jquery (2.1.4)
rails-assets-jasmine (2.0.4)
rails-assets-jasmine-sinon (0.4.0)
rails-assets-jasmine (~> 2.0.0)
rails-assets-sinonjs (>= 1.7.1)
rails-assets-sinon (1.15.3)
rails-assets-sinonjs (1.14.1)
rails-assets-underscore (1.8.3)
rails-assets-underscore.string (3.0.3)
rails-assets-underscore.string (3.1.1)
railties (4.1.9)
actionpack (= 4.1.9)
activesupport (= 4.1.9)
Expand All @@ -342,9 +345,9 @@ GEM
activesupport (>= 3.0)
i18n
polyamorous (~> 1.1)
rspec-core (3.2.1)
rspec-core (3.2.3)
rspec-support (~> 3.2.0)
rspec-expectations (3.2.0)
rspec-expectations (3.2.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.2.0)
rspec-mocks (3.2.1)
Expand All @@ -369,7 +372,7 @@ GEM
multi_json (~> 1.0)
rubyzip (~> 1.0)
websocket (~> 1.0)
slim (3.0.3)
slim (3.0.6)
temple (~> 0.7.3)
tilt (>= 1.3.3, < 2.1)
slim-rails (3.0.1)
Expand All @@ -391,9 +394,9 @@ GEM
sqlite3 (1.3.10)
state_machine (1.2.0)
stringex (1.5.1)
temple (0.7.5)
temple (0.7.6)
thor (0.19.1)
thread_safe (0.3.4)
thread_safe (0.3.5)
tilt (1.4.1)
truncate_html (0.9.2)
twitter_cldr (3.1.2)
Expand All @@ -403,7 +406,6 @@ GEM
tzinfo
tzinfo (1.2.2)
thread_safe (~> 0.1)
unicode_utils (1.4.0)
version_sorter (1.1.1)
versioncake (2.3.1)
actionpack (>= 3.2)
Expand All @@ -412,11 +414,11 @@ GEM
tzinfo
warden (1.2.3)
rack (>= 1.0)
webmock (1.20.4)
webmock (1.21.0)
addressable (>= 2.3.6)
crack (>= 0.3.2)
websocket (1.2.1)
websocket-driver (0.5.3)
websocket-driver (0.5.4)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.2)
xpath (2.0.0)
Expand Down
Binary file added app/assets/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/logo_dynamo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 0 additions & 3 deletions app/assets/javascripts/sprangular.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,13 @@
//= require underscore.string
//= require angular
//= require angularytics
//= require bootstrap-sass-official
//= require validity

//
// Angular specific
//

//= require angular-translate
//= require angular-strap/angular-strap.js
//= require angular-strap/angular-strap.tpl.js
//= require angular-route
//= require angular-sanitize
//= require angular-animate
Expand Down
4 changes: 4 additions & 0 deletions app/assets/javascripts/sprangular/controllers/header.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Sprangular.controller "HeaderCtrl", (
) ->

$scope.cart = Cart
$scope.cartIsVisible = false
Catalog.taxonomies().then (taxonomies) ->
$scope.taxonomies = taxonomies
$scope.account = Account
Expand Down Expand Up @@ -49,3 +50,6 @@ Sprangular.controller "HeaderCtrl", (
Catalog.products(search, 1, pageSize: 3, ignoreLoadingIndicator: true)
.then (products) ->
$scope.lastSearch = products

$scope.toggleCart = ->
if $scope.cartIsVisible then $scope.cartIsVisible = false else $scope.cartIsVisible = true

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line exceeds maximum allowed length

46 changes: 46 additions & 0 deletions app/assets/javascripts/sprangular/directives/dropdown.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
'use strict'

Sprangular.directive 'dropdown', ($parse) ->
restrict: 'E'
require: ['?ngModel']
templateUrl: 'directives/dropdown.html'
scope:
description: '@'
label: '@'
options: '='
class: '='
emptyMessage: '@'

link: (scope, element, attrs, ctrls) ->
ngModelCtrl = ctrls[0]

if !attrs.emptyMessage
attrs.emptyMessage = '-- Choose --'

scope.model = ngModelCtrl

controller: ($scope) ->
$scope.expanded = false
$scope.sibling = null

$scope.expand = ->
$scope.sibling = $scope.$parent.$$prevSibling || $scope.$parent.$$nextSibling

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line exceeds maximum allowed length


if($scope.$parent.$parent.isVariantOpen)
$scope.sibling.$$childHead.expanded = false

$scope.expanded = true
$scope.$parent.$parent.isVariantOpen = true

$scope.displayValue = (val) ->
return unless val

if $scope.label
eval "val.#{$scope.label}"
else
val

$scope.select = (value) ->
$scope.model.$setViewValue(value)
$scope.expanded = false
$scope.$parent.$parent.isVariantOpen = false
Loading