woople-theme 0.2.44 → 0.2.45

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,19 +1,24 @@
1
1
  $(document).ready(function() {
2
2
  function updateAssessmentFormState() {
3
- var numberOfQuestions = $('#assessment legend').length;
3
+ var numberOfQuestions = $('#assessment .legend').length;
4
4
  var numberOfCheckedAnswers = $('#assessment input:checked').length;
5
5
  var numberOfUnansweredQuestions = numberOfQuestions - numberOfCheckedAnswers;
6
6
 
7
7
  var unansweredQuestionsBadge = $('#assessment .badge');
8
8
  if (numberOfUnansweredQuestions > 0) {
9
- var unansweredQuestionsBadgeText = numberOfUnansweredQuestions + ' unanswered question';
10
- if (numberOfUnansweredQuestions > 1) {
11
- unansweredQuestionsBadgeText += 's';
9
+ if (numberOfUnansweredQuestions == 1) {
10
+ unansweredQuestionsBadgeText = '<%= I18n.t 'woople_theme.assessment_form.unanswered_questions.one' %>';
11
+ } else {
12
+ unansweredQuestionsBadgeText = '<%= I18n.t 'woople_theme.assessment_form.unanswered_questions.other' %>'.replace('%{count}', numberOfUnansweredQuestions);
12
13
  }
13
14
 
14
15
  unansweredQuestionsBadge.text(unansweredQuestionsBadgeText);
15
16
  } else {
16
- unansweredQuestionsBadge.addClass('fade-out');
17
+ if (phone()) {
18
+ unansweredQuestionsBadge.hide();
19
+ }
20
+
21
+ unansweredQuestionsBadge.fadeOut();
17
22
  $('#assessment input[type=submit]').removeAttr('disabled');
18
23
 
19
24
  $('.touch #assessment .span4').addClass('collapse-height');
@@ -90,6 +90,10 @@ function mobileSearchToggle() {
90
90
 
91
91
  }
92
92
 
93
+ function phone() {
94
+ return $(window).width() <= 480 ? true : false;
95
+ }
96
+
93
97
  $(document).ready(function() {
94
98
  resizeFix();
95
99
 
@@ -3,7 +3,8 @@
3
3
 
4
4
  @assessment-fieldset-padding: 32px;
5
5
  @touch-assessment-fieldset-padding: @assessment-fieldset-padding / 2;
6
- @question-number-offset: 18px;
6
+ @question-number-width: 24px;
7
+ @question-number-offset: @question-number-width + 4;
7
8
  @answer-label-font-size: 14px;
8
9
 
9
10
  #assessment {
@@ -17,9 +18,8 @@
17
18
  background-color: white;
18
19
  }
19
20
 
20
- legend {
21
- margin: 0 0 8px 0;
22
- border: none;
21
+ .legend {
22
+ margin-bottom: @assessment-fieldset-padding / 2 - @assessment-fieldset-padding / 4;
23
23
  padding-left: @question-number-offset;
24
24
  font-size: 18px;
25
25
  font-weight: @title-font-weight;
@@ -27,14 +27,18 @@
27
27
  color: @primaryTextColour;
28
28
 
29
29
  span {
30
+ display: inline-block;
30
31
  margin-left: -@question-number-offset;
32
+ width: @question-number-width;
33
+ text-align: right;
31
34
  color: @primary;
32
35
  }
33
36
  }
34
37
 
35
38
  label {
36
39
  margin: 0;
37
- padding-top: 8px;
40
+ padding-top: @assessment-fieldset-padding / 4;
41
+ padding-left: @question-number-offset;
38
42
  font-size: @answer-label-font-size;
39
43
  line-height: normal;
40
44
  color: @secondaryTextColour;
@@ -42,6 +46,7 @@
42
46
  input {
43
47
  margin-top: 2px;
44
48
  margin-bottom: 0;
49
+ padding: 0; /* Overrides IE8 & IE9 user agent padding */
45
50
  width: @answer-label-font-size;
46
51
  height: @answer-label-font-size;
47
52
  }
@@ -51,12 +56,8 @@
51
56
  padding-top: 12px;
52
57
  }
53
58
 
54
- .fade-out {
55
- opacity: 0;
56
- -webkit-transition: opacity 0.5s;
57
- -moz-transition: opacity 0.5s;
58
- -o-transition: opacity 0.5s;
59
- transition: opacity 0.5s;
59
+ .badge {
60
+ background-color: @yellow;
60
61
  }
61
62
 
62
63
  .span8 {
@@ -82,21 +83,16 @@
82
83
  padding: @touch-assessment-fieldset-padding 0 (@touch-assessment-fieldset-padding - @touch-assessment-fieldset-padding / 8) 0;
83
84
  }
84
85
 
85
- legend {
86
+ .legend {
86
87
  margin-bottom: @touch-assessment-fieldset-padding / 2 - @touch-assessment-fieldset-padding / 8;
87
88
  margin-left: @touch-assessment-fieldset-padding;
88
89
  margin-right: @touch-assessment-fieldset-padding;
89
- width: auto;
90
90
  }
91
91
 
92
92
  label {
93
93
  padding: (@touch-assessment-fieldset-padding / 8) @touch-assessment-fieldset-padding (@touch-assessment-fieldset-padding / 8) (@touch-assessment-fieldset-padding + @question-number-offset);
94
94
  }
95
95
 
96
- .row-fluid {
97
- -webkit-perspective: 1000; /* Removes CSS transition flicker */
98
- }
99
-
100
96
  .span4 {
101
97
  padding-top: 0;
102
98
  min-height: 0;
@@ -5,7 +5,7 @@
5
5
 
6
6
  <div class="fieldset <%= cycle 'odd', 'even' %>">
7
7
  <div class="row-fluid">
8
- <div class="span4"><span class="badge badge-warning"><%= t 'woople_theme.assessment_form.unanswered_questions', count: assessment_form.questions.count %></span></div>
8
+ <div class="span4"><span class="badge"><%= t 'woople_theme.assessment_form.unanswered_questions', count: assessment_form.questions.count %></span></div>
9
9
  <div class="span8">
10
10
  <input type="button" value="Cancel" class="btn btn-large" data-course-path="<%= assessment_form.course_path %>" />
11
11
  <input type="submit" value="Submit Assessment" class="btn btn-primary btn-large" disabled="disabled" />
@@ -1,6 +1,6 @@
1
1
  <% question_number = assessment_form_question_counter + 1 %>
2
2
  <div class="fieldset <%= cycle 'odd', 'even' %>">
3
- <legend><span><%= question_number %></span> <%= assessment_form_question.name %></legend>
3
+ <div class="legend"><span><%= question_number %></span> <%= assessment_form_question.name %></div>
4
4
  <div>
5
5
  <%= render partial: 'woople-theme/assessment_form_answer', collection: assessment_form_question.answers, locals: { question_number: question_number } %>
6
6
  </div>
@@ -1,3 +1,3 @@
1
1
  module WoopleTheme
2
- VERSION = "0.2.44"
2
+ VERSION = "0.2.45"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: woople-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.44
4
+ version: 0.2.45
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-15 00:00:00.000000000 Z
12
+ date: 2012-06-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &70188192191560 !ruby/object:Gem::Requirement
16
+ requirement: &70275761235380 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.2.5
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70188192191560
24
+ version_requirements: *70275761235380
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: less-rails-bootstrap
27
- requirement: &70188192190240 !ruby/object:Gem::Requirement
27
+ requirement: &70275761234220 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - =
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 2.0.13
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70188192190240
35
+ version_requirements: *70275761234220
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: therubyracer
38
- requirement: &70188192189620 !ruby/object:Gem::Requirement
38
+ requirement: &70275761233340 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70188192189620
46
+ version_requirements: *70275761233340
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: bundler
49
- requirement: &70188192189140 !ruby/object:Gem::Requirement
49
+ requirement: &70275761232880 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70188192189140
57
+ version_requirements: *70275761232880
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: sqlite3
60
- requirement: &70188192188700 !ruby/object:Gem::Requirement
60
+ requirement: &70275761232420 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70188192188700
68
+ version_requirements: *70275761232420
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec-rails
71
- requirement: &70188192187740 !ruby/object:Gem::Requirement
71
+ requirement: &70275761231560 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: 2.9.0
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *70188192187740
79
+ version_requirements: *70275761231560
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: capybara
82
- requirement: &70188192187220 !ruby/object:Gem::Requirement
82
+ requirement: &70275761231020 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,7 +87,7 @@ dependencies:
87
87
  version: '0'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *70188192187220
90
+ version_requirements: *70275761231020
91
91
  description: All Front-End all the Time
92
92
  email:
93
93
  - developers@bigbangtechnology.com
@@ -125,7 +125,7 @@ files:
125
125
  - app/assets/images/woople-theme/star-icon2x.png
126
126
  - app/assets/images/woople-theme/video-js.png
127
127
  - app/assets/javascripts/assessment_flipper.js
128
- - app/assets/javascripts/assessment_form.js
128
+ - app/assets/javascripts/assessment_form.js.erb
129
129
  - app/assets/javascripts/woople-theme/theme.js
130
130
  - app/assets/stylesheets/woople-theme/assessment.css.less
131
131
  - app/assets/stylesheets/woople-theme/base.css.less