From dcbaf4d329fac3870b64925a8b89a40ff8ec1843 Mon Sep 17 00:00:00 2001 From: Seth Call Date: Wed, 23 Oct 2013 13:45:46 -0500 Subject: [PATCH] * VRFS-644 using icheck methods to set check/uncheck status --- web/app/assets/javascripts/createSession.js | 10 ++++++---- .../stylesheets/client/createSession.css.scss | 2 +- web/app/views/clients/_createSession.html.erb | 16 ++++++++-------- web/spec/features/find_sessions_spec.rb | 2 +- web/spec/features/music_sessions_spec.rb | 2 +- 5 files changed, 17 insertions(+), 15 deletions(-) diff --git a/web/app/assets/javascripts/createSession.js b/web/app/assets/javascripts/createSession.js index 699205ea8..fe19afe00 100644 --- a/web/app/assets/javascripts/createSession.js +++ b/web/app/assets/javascripts/createSession.js @@ -114,7 +114,7 @@ if (musician_access) { var approval_required = sessionSettings.hasOwnProperty('approval_required') ? sessionSettings.approval_required : false; - $('#musician-access-option-' + approval_required).attr('checked', 'checked'); + $('#musician-access-option-' + approval_required).iCheck('check').attr('checked', 'checked'); } var fan_access = sessionSettings.hasOwnProperty('fan_access') ? sessionSettings.fan_access : true; @@ -123,7 +123,7 @@ if (fan_access) { var fan_chat = sessionSettings.hasOwnProperty('fan_chat') ? sessionSettings.fan_chat : false; - $('#fan-chat-option-' + fan_chat).attr('checked', 'checked'); + $('#fan-chat-option-' + fan_chat).iCheck('check').attr('checked', 'checked'); } // Should easily be able to grab other items out of sessionSettings and put them into the appropriate ui elements. } @@ -376,11 +376,13 @@ // this exists solely due to a bug in Windows QTWebkit: https://bugreports.qt-project.org/browse/QTBUG-30072 function initializeButtons() { - $('div[layout-id="createSession"] .iradiobuttons input').iCheck({ + $('div[layout-id="createSession"] .icheckbuttons input').iCheck({ checkboxClass: 'icheckbox_minimal', - radioClass: 'iradio_minimal' + radioClass: 'iradio_minimal', + inheritClass: true }); } + function searchFriends(query) { if (query.length < 2) { $('#friend-search-results').empty(); diff --git a/web/app/assets/stylesheets/client/createSession.css.scss b/web/app/assets/stylesheets/client/createSession.css.scss index 8bbd0c263..0979239cd 100644 --- a/web/app/assets/stylesheets/client/createSession.css.scss +++ b/web/app/assets/stylesheets/client/createSession.css.scss @@ -116,7 +116,7 @@ div.friendbox input[type=text] { -div[layout-id="createSession"] .iradiobuttons { +div[layout-id="createSession"] .icheckbuttons { margin-top:5px; diff --git a/web/app/views/clients/_createSession.html.erb b/web/app/views/clients/_createSession.html.erb index b8f5e6844..6b508df6c 100644 --- a/web/app/views/clients/_createSession.html.erb +++ b/web/app/views/clients/_createSession.html.erb @@ -56,9 +56,9 @@ -
- - +
+ +
@@ -73,9 +73,9 @@ -
- - +
+ +
@@ -146,8 +146,8 @@
-
- +
+
I agree that intellectual property ownership of any musical works created during this session shall be governed by the terms of the Creative Commons CC BY-NC-SA license in accordance with the JamKazam Terms of Service. diff --git a/web/spec/features/find_sessions_spec.rb b/web/spec/features/find_sessions_spec.rb index 2cd68738f..8a1f618b2 100644 --- a/web/spec/features/find_sessions_spec.rb +++ b/web/spec/features/find_sessions_spec.rb @@ -43,7 +43,7 @@ describe "Find Session", :js => true, :type => :feature, :capybara_feature => tr within('#create-session-form') do fill_in('description', :with => @unique_session_desc) select('Rock', :from => 'genres') - find('intellectual-property').trigger(:click) + find('div.intellectual-property ins').trigger(:click) click_link('btn-create-session') # fails if page width is low end diff --git a/web/spec/features/music_sessions_spec.rb b/web/spec/features/music_sessions_spec.rb index cadf2c85c..49914f455 100644 --- a/web/spec/features/music_sessions_spec.rb +++ b/web/spec/features/music_sessions_spec.rb @@ -9,7 +9,7 @@ describe "Music Session", :js => true, :type => :feature, :capybara_feature => t within('#create-session-form') do fill_in('description', :with => 'foobar') select('Ambient', :from => 'genres') - find('intellectual-property').trigger(:click) + find('div.intellectual-property ins').trigger(:click) click_link('btn-create-session') end uu