woople-theme 0.3.5 → 0.3.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,37 +1,4 @@
1
1
  $(document).ready(function() {
2
- function setFrontHeight(element) {
3
- var height = element.height();
4
- element.css({ height: height + 'px' }).attr('data-original-height', height);
5
- }
6
-
7
- function removeFrontHeight(element) {
8
- element.css({ height: 'inherit' });
9
- }
10
-
11
- $('.assessment .flip-action a').on('click', function() {
12
- $(this).closest('.assessment').addClass('flip');
13
-
14
- var front = $(this).closest('.front');
15
- setFrontHeight(front);
16
-
17
- var frontHeight = front.height();
18
-
19
- var back = $(this).closest('.front').next('.back');
20
- var backHeight = back.height();
21
-
22
- if (frontHeight > backHeight) {
23
- back.css({ height: '100%' });
24
- } else {
25
- front.css({ height: backHeight + 'px' });
26
- }
27
- });
28
-
29
- $('.assessment .flip-action-back a').on('click', function() {
30
- var assessment = $(this).closest('.assessment').removeClass('flip');
31
- var front = assessment.find('.front');
32
- removeFrontHeight(front);
33
- });
34
-
35
2
  $('.touch .alert').click(function() {
36
3
  $(this).alert('close');
37
4
  });
@@ -7,6 +7,7 @@
7
7
  //= require twitter/bootstrap/modal
8
8
  //= require twitter/bootstrap/button
9
9
  //= require twitter/bootstrap/alert
10
+ //= require twitter/bootstrap/tab
10
11
  //= require fastclick.min_
11
12
  //= require video.min
12
13
  //= require_tree .
@@ -62,7 +63,7 @@ function mobileSearchToggle() {
62
63
 
63
64
  $('a.search-page').on('click', function(e) {
64
65
  e.preventDefault();
65
-
66
+
66
67
  var masthead = $('#masthead');
67
68
  var menu = $('.container .menu');
68
69
  var form = $('form.search');
@@ -2,7 +2,6 @@
2
2
  @import "woople-theme/colours.css.less";
3
3
 
4
4
  .outline {
5
- overflow:hidden;
6
5
  border-bottom:solid 1px fade(@contentBorder, 35%);
7
6
 
8
7
  h2 {
@@ -44,87 +43,30 @@
44
43
  }
45
44
  }
46
45
 
47
- .flip-action, .flip-action-back {
48
- width:75px;
49
- padding:@contentPadding / 2;
50
-
51
- a {
52
- cursor: pointer;
53
- }
54
- }
55
-
56
- &.flip .front {
57
- z-index: 900;
58
-
59
- -webkit-transform: rotateY(180deg);
60
- -moz-transform: rotateY(180deg);
61
- }
62
-
63
- .front {
64
- position:relative;
65
- z-index:900;
66
- background:white;
67
- border-bottom:solid 1px transparent;
68
-
69
- .box-shadow(@default-shadow);
70
-
71
- -webkit-transform: rotateY(0deg);
72
- -webkit-transform-style: preserve-3d;
73
- -webkit-backface-visibility: hidden;
74
-
75
- -moz-transform: rotateY(0deg);
76
- -moz-transform-style: preserve-3d;
77
- -moz-backface-visibility: hidden;
46
+ .assessment-pad {
47
+ .nav-tabs {
48
+ margin-bottom: 0;
78
49
 
79
- -o-transition: -o-transform .4s ease-in-out;
80
- -ms-transition: -ms-transform .4s ease-in-out;
81
- -moz-transition: -moz-transform .4s ease-in-out;
82
- -webkit-transition: -webkit-transform .4s ease-in-out;
83
- transition: transform .4s ease-in-out;
84
- }
50
+ li:first-child {
51
+ margin-left: 10px;
52
+ }
85
53
 
86
- .front.completed {
87
- background-image:url(/assets/woople-theme/completed-triangle.png);
88
- background-position:top right;
89
- background-repeat:no-repeat;
90
- }
54
+ a {
55
+ outline: 0;
56
+ }
57
+ }
91
58
 
92
- &.flip .back {
93
- z-index:1000;
94
- -webkit-transform: rotateY(0deg);
95
- -moz-transform: rotateY(0deg);
96
- }
59
+ .tab-content.completed {
60
+ background-image:url(/assets/woople-theme/completed-triangle.png);
61
+ background-position:top right;
62
+ background-repeat:no-repeat;
63
+ }
97
64
 
98
- .back {
99
- position:absolute;
100
- z-index:800;
101
- background:white;
102
- top:0;
103
- left:0;
104
- width:100%;
105
- /*height:100%;*/
106
-
107
- .box-shadow(@default-shadow);
108
-
109
- -webkit-transform: rotateY(-180deg);
110
- -webkit-transform-style: preserve-3d;
111
- -webkit-backface-visibility: hidden;
112
-
113
- -moz-transform: rotateY(-180deg);
114
- -moz-transform-style: preserve-3d;
115
- -moz-backface-visibility: hidden;
116
-
117
- /* -- transition is the magic sauce for animation -- */
118
- -o-transition: -o-transform .4s ease-in-out;
119
- -ms-transition: -ms-transform .4s ease-in-out;
120
- -moz-transition: -moz-transform .4s ease-in-out;
121
- -webkit-transition: -webkit-transform .4s ease-in-out;
122
- transition: transform .4s ease-in-out;
123
- }
65
+ .tab-content {
66
+ background: white;
67
+ }
124
68
 
125
- .assessment-pad {
126
69
  .assessment-history {
127
-
128
70
  a {
129
71
  color: @primary;
130
72
  }
@@ -243,7 +185,7 @@
243
185
  }
244
186
 
245
187
  .assessment {
246
- .back {
188
+ .assessment-history {
247
189
  table tr > td:first-child, tr > th:first-child {
248
190
  text-indent:0;
249
191
  }
@@ -251,14 +193,3 @@
251
193
  }
252
194
  }
253
195
  }
254
-
255
- .no-csstransforms3d {
256
-
257
- .back {
258
- display:none;
259
- }
260
-
261
- .flip .back {
262
- display:block;
263
- }
264
- }
@@ -75,7 +75,7 @@
75
75
  #theme_video_html5_api {
76
76
  margin: 0;
77
77
  }
78
-
78
+
79
79
  img {
80
80
  display: block;
81
81
  }
@@ -99,4 +99,4 @@
99
99
  -webkit-border-radius: 0 0 @radius @radius;
100
100
  -moz-border-radius: 0 0 @radius @radius;
101
101
  border-radius: 0 0 @radius @radius;
102
- }
102
+ }
@@ -31,8 +31,8 @@ class OutlineAssessmentPresenter < ExplicitDelegator
31
31
  end
32
32
  end
33
33
 
34
- def history_link_tag
35
- history.empty? ? '' : content_tag(:a, I18n.t('woople_theme.assessment.history'))
34
+ def render_history_link
35
+ yield unless history.empty?
36
36
  end
37
37
 
38
38
  def each_history_item
@@ -1,68 +1,62 @@
1
1
  <% assessment.render do %>
2
2
  <div id="assessment-<%= assessment.assessment_id %>" class="assessment">
3
- <div class="front <%= assessment.completed_class %>">
4
- <div class="assessment-pad">
5
- <div class="flip-action pull-right">
6
- <%= assessment.history_link_tag %>
7
- </div>
8
-
9
- <h3><%=t('woople_theme.outline.assessment')%></h3>
10
-
11
- <p class="assessment-attributes">
12
- <span class="badge"><%=t('woople_theme.outline.assessment_questions', count: assessment.questions_asked) %></span>
13
- <span class="badge"><%=t('woople_theme.outline.assessment_requirement', percent: assessment.pass_requirement) %></span>
14
- <span class="badge"><%= t 'woople_theme.assessment.duration', count: assessment.estimated_duration %></span>
15
- </p>
16
-
17
- <% assessment.render_pass_fail_alert do |alert| %>
18
- <div class="alert <%= alert.css_class %> fade in">
19
- <button class="close" data-dismiss="alert">×</button>
20
- <strong><%= alert.heading %></strong> <%= alert.message %>
21
- </div>
3
+ <div class="assessment-pad">
4
+ <ul class="nav nav-tabs">
5
+ <li class="active"><a href="#assessment-details-<%= assessment.assessment_id %>" data-toggle="tab"><%=t('woople_theme.outline.assessment')%></a></li>
6
+ <% assessment.render_history_link do %>
7
+ <li><a href="#assessment-history-<%= assessment.assessment_id %>" data-toggle="tab"><%= t('woople_theme.assessment.history') %></a></li>
22
8
  <% end %>
9
+ </ul>
10
+ <div class="tab-content <%= assessment.completed_class %>">
11
+ <div class="tab-pane active" id="assessment-details-<%= assessment.assessment_id %>">
12
+ <p class="assessment-attributes">
13
+ <span class="badge"><%=t('woople_theme.outline.assessment_questions', count: assessment.questions_asked) %></span>
14
+ <span class="badge"><%=t('woople_theme.outline.assessment_requirement', percent: assessment.pass_requirement) %></span>
15
+ <span class="badge"><%= t 'woople_theme.assessment.duration', count: assessment.estimated_duration %></span>
16
+ </p>
23
17
 
24
- <% assessment.render_relearnings do %>
25
- <h4><%= t 'woople_theme.assessment.required_relearning' %></h4>
26
- <%= outline(assessment) do |outline| %>
27
- <%= outline.videos(assessment.relearnings) %>
18
+ <% assessment.render_pass_fail_alert do |alert| %>
19
+ <div class="alert <%= alert.css_class %> fade in">
20
+ <button class="close" data-dismiss="alert">×</button>
21
+ <strong><%= alert.heading %></strong> <%= alert.message %>
22
+ </div>
28
23
  <% end %>
29
- <% end %>
30
24
 
31
- <div class="assessment-start">
32
- <%= form_tag assessment.url, method: :post do %>
33
- <%= hidden_field_tag :assessment_id, assessment.assessment_id %>
34
- <%= assessment.start_button_tag %>
25
+ <% assessment.render_relearnings do %>
26
+ <h4><%= t 'woople_theme.assessment.required_relearning' %></h4>
27
+ <%= outline(assessment) do |outline| %>
28
+ <%= outline.videos(assessment.relearnings) %>
29
+ <% end %>
35
30
  <% end %>
36
- </div>
37
- </div>
38
- </div>
39
31
 
40
- <div class="back">
41
- <div class="assessment-pad">
42
- <div class="flip-action-back pull-right">
43
- <a><%= t 'woople_theme.assessment.name' %></a>
32
+ <div class="assessment-start">
33
+ <%= form_tag assessment.url, method: :post do %>
34
+ <%= hidden_field_tag :assessment_id, assessment.assessment_id %>
35
+ <%= assessment.start_button_tag %>
36
+ <% end %>
37
+ </div>
44
38
  </div>
45
-
46
- <h3><%= t 'woople_theme.assessment.assessment_history' %></h3>
47
- <div class="assessment-history">
48
- <table class="table">
49
- <thead>
50
- <tr>
51
- <th style="width:50%"><%= t 'woople_theme.assessment.date_title' %></th>
52
- <th><%= t 'woople_theme.assessment.score_title' %></th>
53
- <th class="count"><%= t 'woople_theme.assessment.result_title' %></th>
54
- </tr>
55
- </thead>
56
- <tbody>
57
- <% assessment.each_history_item do |history_item| %>
39
+ <div class="tab-pane" id="assessment-history-<%= assessment.assessment_id %>">
40
+ <div class="assessment-history">
41
+ <table class="table">
42
+ <thead>
58
43
  <tr>
59
- <td><%= history_item.date %></td>
60
- <td><%= history_item.score %></td>
61
- <td><%= link_to history_item.result_name, history_item.url %></td>
44
+ <th style="width:50%"><%= t 'woople_theme.assessment.date_title' %></th>
45
+ <th><%= t 'woople_theme.assessment.score_title' %></th>
46
+ <th class="count"><%= t 'woople_theme.assessment.result_title' %></th>
62
47
  </tr>
63
- <% end %>
64
- </tbody>
65
- </table>
48
+ </thead>
49
+ <tbody>
50
+ <% assessment.each_history_item do |history_item| %>
51
+ <tr>
52
+ <td><%= history_item.date %></td>
53
+ <td><%= history_item.score %></td>
54
+ <td><%= link_to history_item.result_name, history_item.url %></td>
55
+ </tr>
56
+ <% end %>
57
+ </tbody>
58
+ </table>
59
+ </div>
66
60
  </div>
67
61
  </div>
68
62
  </div>
@@ -1,3 +1,3 @@
1
1
  module WoopleTheme
2
- VERSION = '0.3.5'
2
+ VERSION = '0.3.6'
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.3.5
4
+ version: 0.3.6
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-07-17 00:00:00.000000000 Z
12
+ date: 2012-07-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &70284694912860 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,21 +21,31 @@ dependencies:
21
21
  version: 3.2.5
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70284694912860
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 3.2.5
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: less-rails-bootstrap
27
- requirement: &70284694912280 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
- - - =
35
+ - - '='
31
36
  - !ruby/object:Gem::Version
32
37
  version: 2.0.13
33
38
  type: :runtime
34
39
  prerelease: false
35
- version_requirements: *70284694912280
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - '='
44
+ - !ruby/object:Gem::Version
45
+ version: 2.0.13
36
46
  - !ruby/object:Gem::Dependency
37
47
  name: therubyracer
38
- requirement: &70284694911900 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
39
49
  none: false
40
50
  requirements:
41
51
  - - ! '>='
@@ -43,10 +53,15 @@ dependencies:
43
53
  version: '0'
44
54
  type: :runtime
45
55
  prerelease: false
46
- version_requirements: *70284694911900
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
47
62
  - !ruby/object:Gem::Dependency
48
63
  name: bundler
49
- requirement: &70284694911420 !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
50
65
  none: false
51
66
  requirements:
52
67
  - - ! '>='
@@ -54,10 +69,15 @@ dependencies:
54
69
  version: '0'
55
70
  type: :development
56
71
  prerelease: false
57
- version_requirements: *70284694911420
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
58
78
  - !ruby/object:Gem::Dependency
59
79
  name: sqlite3
60
- requirement: &70284694947240 !ruby/object:Gem::Requirement
80
+ requirement: !ruby/object:Gem::Requirement
61
81
  none: false
62
82
  requirements:
63
83
  - - ! '>='
@@ -65,21 +85,31 @@ dependencies:
65
85
  version: '0'
66
86
  type: :development
67
87
  prerelease: false
68
- version_requirements: *70284694947240
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
69
94
  - !ruby/object:Gem::Dependency
70
95
  name: rspec-rails
71
- requirement: &70284694946660 !ruby/object:Gem::Requirement
96
+ requirement: !ruby/object:Gem::Requirement
72
97
  none: false
73
98
  requirements:
74
- - - =
99
+ - - '='
75
100
  - !ruby/object:Gem::Version
76
101
  version: 2.11.0
77
102
  type: :development
78
103
  prerelease: false
79
- version_requirements: *70284694946660
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - '='
108
+ - !ruby/object:Gem::Version
109
+ version: 2.11.0
80
110
  - !ruby/object:Gem::Dependency
81
111
  name: capybara
82
- requirement: &70284694946180 !ruby/object:Gem::Requirement
112
+ requirement: !ruby/object:Gem::Requirement
83
113
  none: false
84
114
  requirements:
85
115
  - - ! '>='
@@ -87,7 +117,12 @@ dependencies:
87
117
  version: '0'
88
118
  type: :development
89
119
  prerelease: false
90
- version_requirements: *70284694946180
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ! '>='
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
91
126
  description: All Front-End all the Time
92
127
  email:
93
128
  - developers@bigbangtechnology.com
@@ -231,7 +266,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
231
266
  version: '0'
232
267
  requirements: []
233
268
  rubyforge_project:
234
- rubygems_version: 1.8.16
269
+ rubygems_version: 1.8.24
235
270
  signing_key:
236
271
  specification_version: 3
237
272
  summary: Our Front-End CSS Framework/Theme