groundworkcss-rails 0.2.7 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/generators/groundworkcss/layout/templates/_sidebar.html.erb +5 -5
- data/lib/groundworkcss/rails/version.rb +1 -1
- data/vendor/assets/javascripts/groundworkcss/components/responsiveText.js +19 -2
- data/vendor/assets/javascripts/groundworkcss/groundwork.all.js +754 -744
- data/vendor/assets/javascripts/groundworkcss/plugins/jquery.modals.js +152 -158
- data/vendor/assets/javascripts/groundworkcss/plugins/jquery.popover.js +170 -176
- data/vendor/assets/javascripts/groundworkcss/plugins/jquery.responsiveTables.js +44 -50
- data/vendor/assets/javascripts/groundworkcss/plugins/jquery.responsiveText.js +26 -32
- data/vendor/assets/javascripts/groundworkcss/plugins/jquery.tooltip.js +111 -117
- data/vendor/assets/stylesheets/groundworkcss-scss/_buttons.scss +67 -16
- data/vendor/assets/stylesheets/groundworkcss-scss/_callouts.scss +21 -11
- data/vendor/assets/stylesheets/groundworkcss-scss/_font-awesome.scss +1 -0
- data/vendor/assets/stylesheets/groundworkcss-scss/_forms.scss +4 -4
- data/vendor/assets/stylesheets/groundworkcss-scss/_messages.scss +20 -10
- data/vendor/assets/stylesheets/groundworkcss-scss/_typography.scss +2 -0
- data/vendor/assets/stylesheets/groundworkcss-scss/_variables.scss +30 -5
- data/vendor/assets/stylesheets/groundworkcss-scss/{groundwork.css.scss → groundwork.scss} +0 -0
- metadata +15 -22
- data/vendor/assets/fonts/groundworkcss/fontawesome.otf +0 -0
- data/vendor/assets/javascripts/groundworkcss/groundwork.js +0 -264
- data/vendor/assets/javascripts/groundworkcss/libs/html5shiv.js +0 -299
- data/vendor/assets/javascripts/groundworkcss/plugins/jquery.orbit-1.4.0.js +0 -919
- data/vendor/assets/stylesheets/groundworkcss-scss/_classes.scss +0 -143
- data/vendor/assets/stylesheets/groundworkcss-scss/_layout.scss +0 -78
- data/vendor/assets/stylesheets/groundworkcss-scss/_orbit.scss +0 -239
@@ -3,17 +3,17 @@
|
|
3
3
|
<% if content_for? :nav %>
|
4
4
|
<h3>
|
5
5
|
<i class="icon-reorder"></i>
|
6
|
-
Navigation
|
7
|
-
</h3>
|
8
|
-
<nav>
|
6
|
+
Navigation
|
7
|
+
</h3>
|
8
|
+
<nav class="nav">
|
9
9
|
<ul>
|
10
10
|
<%= yield :nav%>
|
11
11
|
</ul>
|
12
12
|
</nav>
|
13
13
|
<%end%>
|
14
|
-
|
14
|
+
|
15
15
|
<br/>
|
16
|
-
|
16
|
+
|
17
17
|
<% if content_for? :sidebar%>
|
18
18
|
<%= yield :sidebar%>
|
19
19
|
<%end%>
|
@@ -5,17 +5,34 @@
|
|
5
5
|
|
6
6
|
$(function() {
|
7
7
|
return $('.responsive').not('table').each(function(index, object) {
|
8
|
-
var compression, max, min;
|
8
|
+
var $this, compression, max, min, scrollReset, scrollTime;
|
9
9
|
compression = 10;
|
10
10
|
min = 10;
|
11
11
|
max = 200;
|
12
|
+
scrollTime = 650;
|
13
|
+
scrollReset = 200;
|
12
14
|
compression = parseFloat($(this).attr('data-compression') || compression);
|
13
15
|
min = parseFloat($(this).attr('data-min') || min);
|
14
16
|
max = parseFloat($(this).attr('data-max') || max);
|
15
|
-
|
17
|
+
$(object).responsiveText({
|
16
18
|
compressor: compression,
|
17
19
|
minSize: min,
|
18
20
|
maxSize: max
|
19
21
|
});
|
22
|
+
$this = $(this);
|
23
|
+
return $(this).hover((function() {
|
24
|
+
var difference;
|
25
|
+
difference = $this.get(0).scrollWidth - $this.width();
|
26
|
+
console.log(difference);
|
27
|
+
if (difference > 0) {
|
28
|
+
return $this.stop().animate({
|
29
|
+
"text-indent": -difference
|
30
|
+
}, scrollTime);
|
31
|
+
}
|
32
|
+
}), function() {
|
33
|
+
return $this.stop().animate({
|
34
|
+
"text-indent": 0
|
35
|
+
}, scrollReset);
|
36
|
+
});
|
20
37
|
});
|
21
38
|
});
|
@@ -1,5 +1,4 @@
|
|
1
1
|
// Generated by CoffeeScript 1.6.1
|
2
|
-
|
3
2
|
/*
|
4
3
|
*
|
5
4
|
* GroundworkCSS JS by Gary Hepting - https://github.com/groundworkcss/groundwork
|
@@ -10,13 +9,11 @@
|
|
10
9
|
*
|
11
10
|
*/
|
12
11
|
|
13
|
-
|
14
12
|
/* --------------------------------------------
|
15
13
|
Begin jquery.modals.coffee
|
16
14
|
--------------------------------------------
|
17
15
|
*/
|
18
16
|
|
19
|
-
|
20
17
|
/*
|
21
18
|
*
|
22
19
|
* jQuery Modals by Gary Hepting
|
@@ -24,492 +21,490 @@
|
|
24
21
|
*
|
25
22
|
*/
|
26
23
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
(
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
$(
|
38
|
-
|
39
|
-
|
24
|
+
var equalizeColumns, limitPaginationItems;
|
25
|
+
|
26
|
+
(function($) {
|
27
|
+
var elems, modals;
|
28
|
+
if ($('div#iframeModal').length < 1) {
|
29
|
+
$('body').append('<div class="iframe modal" id="iframeModal"><iframe marginheight="0" marginwidth="0" frameborder="0"></iframe></div>');
|
30
|
+
$('div#iframeModal').prepend('<i class="close icon-remove"></i>').prepend('<i class="fullscreen icon-resize-full"></i>');
|
31
|
+
}
|
32
|
+
$('a.modal').each(function() {
|
33
|
+
$(this).attr('data-url', $(this).attr('href'));
|
34
|
+
return $(this).attr('href', '#iframeModal');
|
35
|
+
});
|
36
|
+
$('a.modal').on("click", function(e) {
|
37
|
+
$('div#iframeModal iframe').replaceWith('<iframe marginheight="0" marginwidth="0" frameborder="0" width="100%" height="100%" src="' + $(this).attr('data-url') + '"></iframe>');
|
38
|
+
e.preventDefault();
|
39
|
+
return false;
|
40
|
+
});
|
41
|
+
elems = [];
|
42
|
+
$.fn.modal = function() {
|
43
|
+
this.each(function() {
|
44
|
+
var $this;
|
45
|
+
$(this).not('#iframeModal').wrapInner('<div class="modal-content"></div>');
|
46
|
+
$(this).prepend('<i class="close icon-remove"></i>').prepend('<i class="fullscreen icon-resize-full"></i>').appendTo('body');
|
47
|
+
$this = $(this);
|
48
|
+
return $('[href=#' + $(this).attr('id') + ']').on("click", function(e) {
|
49
|
+
modals.open($(this).attr('href'), $(this).hasClass('fullscreen'));
|
50
|
+
e.preventDefault();
|
51
|
+
return false;
|
52
|
+
});
|
40
53
|
});
|
41
|
-
$('
|
42
|
-
|
43
|
-
e.preventDefault();
|
44
|
-
return false;
|
54
|
+
$('div.modal .close').on("click", function() {
|
55
|
+
return modals.close();
|
45
56
|
});
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
57
|
+
return $('div.modal .fullscreen').on("click", function() {
|
58
|
+
return modals.fullscreen($(this).parent('div.modal'));
|
59
|
+
});
|
60
|
+
};
|
61
|
+
modals = (function() {
|
62
|
+
var close, fullscreen, open;
|
63
|
+
$('body').addClass('modal-ready');
|
64
|
+
if ($("#overlay").length < 1) {
|
65
|
+
$('body').append('<div id="overlay"></div>');
|
66
|
+
}
|
67
|
+
$('#overlay, div.modal .close').bind("click", function(e) {
|
68
|
+
return close();
|
69
|
+
});
|
70
|
+
open = function(elem, fullscreen) {
|
71
|
+
$(window).bind("keydown", function(e) {
|
72
|
+
var keyCode;
|
73
|
+
keyCode = (e.which ? e.which : e.keyCode);
|
74
|
+
if (keyCode === 27) {
|
75
|
+
return close();
|
76
|
+
}
|
64
77
|
});
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
78
|
+
$(elem).addClass("active");
|
79
|
+
if (!$(elem).hasClass('iframe')) {
|
80
|
+
$(elem).css({
|
81
|
+
width: 'auto',
|
82
|
+
height: 'auto'
|
83
|
+
});
|
84
|
+
$(elem).css({
|
85
|
+
height: $(elem).outerHeight()
|
86
|
+
});
|
71
87
|
}
|
72
|
-
$(
|
73
|
-
|
88
|
+
$(elem).css({
|
89
|
+
top: '50%',
|
90
|
+
left: '50%',
|
91
|
+
'margin-top': ($(elem).outerHeight() / -2) + 'px',
|
92
|
+
'margin-left': ($(elem).outerWidth() / -2) + 'px'
|
74
93
|
});
|
75
|
-
|
76
|
-
$(
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
94
|
+
setTimeout(function() {
|
95
|
+
return $('body').addClass("modal-active");
|
96
|
+
}, 0);
|
97
|
+
setTimeout(function() {
|
98
|
+
return $('body').removeClass('modal-ready');
|
99
|
+
}, 400);
|
100
|
+
if (fullscreen) {
|
101
|
+
modals.fullscreen(elem);
|
102
|
+
}
|
103
|
+
};
|
104
|
+
close = function() {
|
105
|
+
var modal;
|
106
|
+
modal = $('div.modal.active');
|
107
|
+
$(window).unbind("keydown");
|
108
|
+
$('body').removeClass("modal-active").addClass('modal-ready');
|
109
|
+
if (modal.hasClass('iframe')) {
|
110
|
+
$('div#iframeModal iframe').replaceWith('<iframe marginheight="0" marginwidth="0" frameborder="0"></iframe>');
|
111
|
+
modal.css({
|
112
|
+
width: '80%',
|
113
|
+
height: '80%'
|
82
114
|
});
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
height: 'auto'
|
88
|
-
});
|
89
|
-
$(elem).css({
|
90
|
-
height: $(elem).outerHeight()
|
91
|
-
});
|
92
|
-
}
|
93
|
-
$(elem).css({
|
94
|
-
top: '50%',
|
95
|
-
left: '50%',
|
96
|
-
'margin-top': ($(elem).outerHeight() / -2) + 'px',
|
97
|
-
'margin-left': ($(elem).outerWidth() / -2) + 'px'
|
115
|
+
} else {
|
116
|
+
modal.css({
|
117
|
+
width: 'auto',
|
118
|
+
height: 'auto'
|
98
119
|
});
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
$('
|
114
|
-
if (modal.hasClass('iframe')) {
|
115
|
-
$('div
|
116
|
-
modal.css({
|
120
|
+
}
|
121
|
+
modal.css({
|
122
|
+
top: '10%',
|
123
|
+
left: '10%',
|
124
|
+
'max-width': '80%',
|
125
|
+
'max-height': '80%',
|
126
|
+
'margin-top': 0,
|
127
|
+
'margin-left': 0
|
128
|
+
});
|
129
|
+
modal.removeClass("active").removeClass("fullscreen");
|
130
|
+
$('i.fullscreen', modal).removeClass('icon-resize-small').addClass('icon-resize-full');
|
131
|
+
};
|
132
|
+
fullscreen = function(elem) {
|
133
|
+
if ($('div.modal.active').hasClass('fullscreen')) {
|
134
|
+
$('div.modal i.fullscreen').removeClass('icon-resize-small').addClass('icon-resize-full');
|
135
|
+
if ($('div.modal.active').hasClass('iframe')) {
|
136
|
+
$('div.modal.active').css({
|
117
137
|
width: '80%',
|
118
138
|
height: '80%'
|
119
139
|
});
|
120
140
|
} else {
|
121
|
-
modal.css({
|
141
|
+
$('div.modal.active').css({
|
122
142
|
width: 'auto',
|
123
143
|
height: 'auto'
|
124
144
|
});
|
145
|
+
$('div.modal.active').css({
|
146
|
+
height: $('div.modal.active').outerHeight()
|
147
|
+
});
|
125
148
|
}
|
126
|
-
modal.css({
|
127
|
-
top: '10%',
|
128
|
-
left: '10%',
|
149
|
+
$('div.modal.active').removeClass('fullscreen').css({
|
129
150
|
'max-width': '80%',
|
130
|
-
'max-height': '80%'
|
151
|
+
'max-height': '80%'
|
152
|
+
});
|
153
|
+
$('div.modal.active').delay(100).css({
|
154
|
+
top: '50%',
|
155
|
+
left: '50%',
|
156
|
+
'margin-top': ($('div.modal.active').outerHeight() / -2) + 'px',
|
157
|
+
'margin-left': ($('div.modal.active').outerWidth() / -2) + 'px'
|
158
|
+
});
|
159
|
+
} else {
|
160
|
+
$('div.modal i.fullscreen').addClass('icon-resize-small').removeClass('icon-resize-full');
|
161
|
+
$('div.modal.active').addClass('fullscreen').css({
|
162
|
+
top: 0,
|
163
|
+
left: 0,
|
131
164
|
'margin-top': 0,
|
132
|
-
'margin-left': 0
|
165
|
+
'margin-left': 0,
|
166
|
+
width: '100%',
|
167
|
+
height: '100%',
|
168
|
+
'max-width': '100%',
|
169
|
+
'max-height': '100%'
|
133
170
|
});
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
$('div.modal.active').removeClass('fullscreen').css({
|
155
|
-
'max-width': '80%',
|
156
|
-
'max-height': '80%'
|
157
|
-
});
|
158
|
-
$('div.modal.active').delay(100).css({
|
159
|
-
top: '50%',
|
160
|
-
left: '50%',
|
161
|
-
'margin-top': ($('div.modal.active').outerHeight() / -2) + 'px',
|
162
|
-
'margin-left': ($('div.modal.active').outerWidth() / -2) + 'px'
|
171
|
+
}
|
172
|
+
};
|
173
|
+
return {
|
174
|
+
open: open,
|
175
|
+
close: close,
|
176
|
+
fullscreen: fullscreen
|
177
|
+
};
|
178
|
+
})();
|
179
|
+
return $(window).resize(function() {
|
180
|
+
return $('div.modal.active').each(function() {
|
181
|
+
if (!$(this).hasClass('fullscreen')) {
|
182
|
+
$(this).removeClass('active').css({
|
183
|
+
top: '50%',
|
184
|
+
left: '50%',
|
185
|
+
'margin-top': ($(this).outerHeight() / -2) + 'px',
|
186
|
+
'margin-left': ($(this).outerWidth() / -2) + 'px'
|
187
|
+
}).addClass('active');
|
188
|
+
if (!$(this).hasClass('iframe')) {
|
189
|
+
$(this).css({
|
190
|
+
height: 'auto'
|
163
191
|
});
|
164
|
-
|
165
|
-
|
166
|
-
$('div.modal.active').addClass('fullscreen').css({
|
167
|
-
top: 0,
|
168
|
-
left: 0,
|
169
|
-
'margin-top': 0,
|
170
|
-
'margin-left': 0,
|
171
|
-
width: '100%',
|
172
|
-
height: '100%',
|
173
|
-
'max-width': '100%',
|
174
|
-
'max-height': '100%'
|
192
|
+
return $(this).css({
|
193
|
+
height: $(this).outerHeight()
|
175
194
|
});
|
176
195
|
}
|
177
|
-
}
|
178
|
-
return {
|
179
|
-
open: open,
|
180
|
-
close: close,
|
181
|
-
fullscreen: fullscreen
|
182
|
-
};
|
183
|
-
})();
|
184
|
-
return $(window).resize(function() {
|
185
|
-
return $('div.modal.active').each(function() {
|
186
|
-
if (!$(this).hasClass('fullscreen')) {
|
187
|
-
$(this).removeClass('active').css({
|
188
|
-
top: '50%',
|
189
|
-
left: '50%',
|
190
|
-
'margin-top': ($(this).outerHeight() / -2) + 'px',
|
191
|
-
'margin-left': ($(this).outerWidth() / -2) + 'px'
|
192
|
-
}).addClass('active');
|
193
|
-
if (!$(this).hasClass('iframe')) {
|
194
|
-
$(this).css({
|
195
|
-
height: 'auto'
|
196
|
-
});
|
197
|
-
return $(this).css({
|
198
|
-
height: $(this).outerHeight()
|
199
|
-
});
|
200
|
-
}
|
201
|
-
}
|
202
|
-
});
|
196
|
+
}
|
203
197
|
});
|
204
|
-
})
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
return this.each(function() {
|
237
|
-
var columns, elem, fontSize, rows;
|
238
|
-
elem = $(this);
|
239
|
-
elem.attr('data-compression', settings.compressor);
|
240
|
-
elem.attr('data-min', settings.minSize);
|
241
|
-
elem.attr('data-max', settings.maxSize);
|
242
|
-
elem.attr('data-padding', settings.padding);
|
243
|
-
columns = $("tr", elem).first().children("th, td").length;
|
244
|
-
rows = $("tr", elem).length;
|
245
|
-
if (settings.height !== "auto") {
|
246
|
-
$this.css("height", settings.height);
|
247
|
-
if (settings.adjust_parents) {
|
248
|
-
$this.parents().each(function() {
|
249
|
-
return $(this).css("height", "100%");
|
250
|
-
});
|
251
|
-
}
|
252
|
-
}
|
253
|
-
$("tr th, tr td", elem).css("width", Math.floor(100 / columns) + "%");
|
254
|
-
$("tr th, tr td", elem).css("height", Math.floor(100 / rows) + "%");
|
255
|
-
fontSize = Math.floor(Math.max(Math.min(elem.width() / settings.compressor, parseFloat(settings.maxSize)), parseFloat(settings.minSize)));
|
256
|
-
$("tr th, tr td", elem).css("font-size", fontSize + "px");
|
257
|
-
return elems.push(elem);
|
258
|
-
});
|
198
|
+
});
|
199
|
+
})(jQuery);
|
200
|
+
|
201
|
+
/* --------------------------------------------
|
202
|
+
Begin jquery.responsiveTables.coffee
|
203
|
+
--------------------------------------------
|
204
|
+
*/
|
205
|
+
|
206
|
+
|
207
|
+
/*
|
208
|
+
*
|
209
|
+
* jQuery ResponsiveTables by Gary Hepting - https://github.com/ghepting/responsiveTables
|
210
|
+
*
|
211
|
+
* Open source under the BSD License.
|
212
|
+
*
|
213
|
+
* Copyright © 2013 Gary Hepting. All rights reserved.
|
214
|
+
*
|
215
|
+
*/
|
216
|
+
|
217
|
+
|
218
|
+
(function($) {
|
219
|
+
var elems;
|
220
|
+
elems = [];
|
221
|
+
$.fn.responsiveTable = function(options) {
|
222
|
+
var settings;
|
223
|
+
settings = {
|
224
|
+
compressor: options.compressor || 10,
|
225
|
+
minSize: options.minSize || Number.NEGATIVE_INFINITY,
|
226
|
+
maxSize: options.maxSize || Number.POSITIVE_INFINITY,
|
227
|
+
padding: 2,
|
228
|
+
height: "auto",
|
229
|
+
adjust_parents: true
|
259
230
|
};
|
260
|
-
return
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
231
|
+
return this.each(function() {
|
232
|
+
var columns, elem, fontSize, rows;
|
233
|
+
elem = $(this);
|
234
|
+
elem.attr('data-compression', settings.compressor);
|
235
|
+
elem.attr('data-min', settings.minSize);
|
236
|
+
elem.attr('data-max', settings.maxSize);
|
237
|
+
elem.attr('data-padding', settings.padding);
|
238
|
+
columns = $("tr", elem).first().children("th, td").length;
|
239
|
+
rows = $("tr", elem).length;
|
240
|
+
if (settings.height !== "auto") {
|
241
|
+
$this.css("height", settings.height);
|
242
|
+
if (settings.adjust_parents) {
|
243
|
+
$this.parents().each(function() {
|
244
|
+
return $(this).css("height", "100%");
|
245
|
+
});
|
246
|
+
}
|
247
|
+
}
|
248
|
+
$("tr th, tr td", elem).css("width", Math.floor(100 / columns) + "%");
|
249
|
+
$("tr th, tr td", elem).css("height", Math.floor(100 / rows) + "%");
|
250
|
+
fontSize = Math.floor(Math.max(Math.min(elem.width() / settings.compressor, parseFloat(settings.maxSize)), parseFloat(settings.minSize)));
|
251
|
+
$("tr th, tr td", elem).css("font-size", fontSize + "px");
|
252
|
+
return elems.push(elem);
|
267
253
|
});
|
268
|
-
}
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
});
|
254
|
+
};
|
255
|
+
return $(window).on("resize", function() {
|
256
|
+
return $(elems).each(function() {
|
257
|
+
var elem, fontSize;
|
258
|
+
elem = $(this);
|
259
|
+
fontSize = Math.floor(Math.max(Math.min(elem.width() / (elem.attr('data-compression')), parseFloat(elem.attr('data-max'))), parseFloat(elem.attr('data-min'))));
|
260
|
+
return $("tr th, tr td", elem).css("font-size", fontSize + "px");
|
261
|
+
});
|
262
|
+
});
|
263
|
+
})(jQuery);
|
264
|
+
|
265
|
+
/* --------------------------------------------
|
266
|
+
Begin jquery.responsiveText.coffee
|
267
|
+
--------------------------------------------
|
268
|
+
*/
|
269
|
+
|
270
|
+
|
271
|
+
/*
|
272
|
+
*
|
273
|
+
* jQuery ResponsiveText by Gary Hepting - https://github.com/ghepting/responsiveText
|
274
|
+
*
|
275
|
+
* Open source under the BSD License.
|
276
|
+
*
|
277
|
+
* Copyright © 2013 Gary Hepting. All rights reserved.
|
278
|
+
*
|
279
|
+
*/
|
280
|
+
|
281
|
+
|
282
|
+
(function($) {
|
283
|
+
var elems;
|
284
|
+
elems = [];
|
285
|
+
$.fn.responsiveText = function(options) {
|
286
|
+
var settings;
|
287
|
+
settings = {
|
288
|
+
compressor: options.compressor || 10,
|
289
|
+
minSize: options.minSize || Number.NEGATIVE_INFINITY,
|
290
|
+
maxSize: options.maxSize || Number.POSITIVE_INFINITY
|
306
291
|
};
|
307
|
-
return
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
292
|
+
return this.each(function() {
|
293
|
+
var elem;
|
294
|
+
elem = $(this);
|
295
|
+
elem.attr('data-compression', settings.compressor);
|
296
|
+
elem.attr('data-min', settings.minSize);
|
297
|
+
elem.attr('data-max', settings.maxSize);
|
298
|
+
elem.css("font-size", Math.floor(Math.max(Math.min(elem.width() / settings.compressor, parseFloat(settings.maxSize)), parseFloat(settings.minSize))));
|
299
|
+
return elems.push(elem);
|
313
300
|
});
|
314
|
-
}
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
301
|
+
};
|
302
|
+
return $(window).on("resize", function() {
|
303
|
+
return $(elems).each(function() {
|
304
|
+
var elem;
|
305
|
+
elem = $(this);
|
306
|
+
return elem.css("font-size", Math.floor(Math.max(Math.min(elem.width() / (elem.attr('data-compression')), parseFloat(elem.attr('data-max'))), parseFloat(elem.attr('data-min')))));
|
307
|
+
});
|
308
|
+
});
|
309
|
+
})(jQuery);
|
310
|
+
|
311
|
+
/* --------------------------------------------
|
312
|
+
Begin jquery.tooltip.coffee
|
313
|
+
--------------------------------------------
|
314
|
+
*/
|
315
|
+
|
316
|
+
|
317
|
+
/*
|
318
|
+
*
|
319
|
+
* jQuery Tooltips by Gary Hepting - https://github.com/ghepting/jquery-tooltips
|
320
|
+
*
|
321
|
+
* Open source under the BSD License.
|
322
|
+
*
|
323
|
+
* Copyright © 2013 Gary Hepting. All rights reserved.
|
324
|
+
*
|
325
|
+
*/
|
326
|
+
|
327
|
+
|
328
|
+
(function($) {
|
329
|
+
return $.fn.tooltip = function(options) {
|
330
|
+
var closetooltip, defaults, delayShow, getElementPosition, resettooltip, setPosition, showtooltip, tooltip, trigger;
|
331
|
+
defaults = {
|
332
|
+
topOffset: 0,
|
333
|
+
delay: 100,
|
334
|
+
speed: 100
|
335
|
+
};
|
336
|
+
options = $.extend(defaults, options);
|
337
|
+
tooltip = $('#tooltip');
|
338
|
+
delayShow = '';
|
339
|
+
trigger = '';
|
340
|
+
if ($('#tooltip').length !== 1) {
|
341
|
+
tooltip = $("<div id=\"tooltip\"></div>");
|
342
|
+
tooltip.appendTo("body").hide();
|
343
|
+
}
|
344
|
+
getElementPosition = function(el) {
|
345
|
+
var bottom, left, offset, right, top, win;
|
346
|
+
offset = el.offset();
|
347
|
+
win = $(window);
|
348
|
+
return {
|
349
|
+
top: top = offset.top - win.scrollTop(),
|
350
|
+
left: left = offset.left - win.scrollLeft(),
|
351
|
+
bottom: bottom = win.height() - top - el.outerHeight(),
|
352
|
+
right: right = win.width() - left - el.outerWidth()
|
340
353
|
};
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
if ($(
|
346
|
-
tooltip
|
347
|
-
tooltip.appendTo("body").hide();
|
354
|
+
};
|
355
|
+
setPosition = function(trigger) {
|
356
|
+
var attrs, coords, height, width;
|
357
|
+
coords = getElementPosition(trigger);
|
358
|
+
if (tooltip.outerWidth() > ($(window).width() - 20)) {
|
359
|
+
tooltip.css('width', $(window).width() - 20);
|
348
360
|
}
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
}
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
tooltip.addClass('top');
|
379
|
-
attrs.top = (trigger.offset().top - height) - 20;
|
380
|
-
} else {
|
381
|
-
tooltip.addClass('bottom');
|
382
|
-
attrs.top = trigger.offset().top + trigger.outerHeight() - 4;
|
383
|
-
}
|
384
|
-
return tooltip.css(attrs);
|
385
|
-
};
|
386
|
-
resettooltip = function() {
|
387
|
-
return tooltip.text('').removeClass('left right top bottom').css({
|
388
|
-
left: 'auto',
|
389
|
-
right: 'auto',
|
390
|
-
top: 'auto',
|
391
|
-
bottom: 'auto',
|
392
|
-
width: 'auto',
|
393
|
-
'padding-left': 'auto',
|
394
|
-
'padding-right': 'auto'
|
395
|
-
});
|
396
|
-
};
|
397
|
-
closetooltip = function() {
|
398
|
-
tooltip.stop().hide();
|
399
|
-
resettooltip();
|
400
|
-
return $('[role=tooltip]').removeClass('on');
|
401
|
-
};
|
402
|
-
showtooltip = function(trigger) {
|
403
|
-
clearTimeout(delayShow);
|
404
|
-
return delayShow = setTimeout(function() {
|
405
|
-
tooltip.css({
|
406
|
-
"opacity": 0,
|
407
|
-
"display": "block"
|
408
|
-
}).text(trigger.attr('data-title'));
|
409
|
-
setPosition(trigger);
|
410
|
-
trigger.addClass('on');
|
411
|
-
console.log(tooltip.css('display'));
|
412
|
-
return tooltip.animate({
|
413
|
-
top: "+=10",
|
414
|
-
opacity: 1
|
415
|
-
}, options.speed);
|
416
|
-
}, options.delay);
|
417
|
-
};
|
418
|
-
this.each(function() {
|
419
|
-
var $this;
|
420
|
-
$this = $(this);
|
421
|
-
$this.attr('role', 'tooltip').attr('data-title', $this.attr('title'));
|
422
|
-
return $this.removeAttr("title");
|
423
|
-
});
|
424
|
-
$('body').on('focus', '[role=tooltip]', function() {
|
425
|
-
return showtooltip($(this));
|
426
|
-
}).on('blur', '[role=tooltip]', function() {
|
427
|
-
clearTimeout(delayShow);
|
428
|
-
return closetooltip();
|
429
|
-
}).on('mouseenter', '[role=tooltip]:not(input,select,textarea)', function() {
|
430
|
-
return showtooltip($(this));
|
431
|
-
}).on('mouseleave', '[role=tooltip]:not(input,select,textarea)', function() {
|
432
|
-
clearTimeout(delayShow);
|
433
|
-
return closetooltip();
|
434
|
-
});
|
435
|
-
return $(window).on({
|
436
|
-
scroll: function() {
|
437
|
-
trigger = $('[role=tooltip].on');
|
438
|
-
if (trigger.length) {
|
439
|
-
setPosition(trigger);
|
440
|
-
return $('#tooltip').css({
|
441
|
-
top: "+=10"
|
442
|
-
});
|
443
|
-
}
|
444
|
-
}
|
361
|
+
attrs = {};
|
362
|
+
tooltip.css('max-width', Math.min($(window).width() - parseInt($('body').css('padding-left')) - parseInt($('body').css('padding-right')), parseInt(tooltip.css('max-width'))));
|
363
|
+
width = tooltip.outerWidth();
|
364
|
+
height = tooltip.outerHeight();
|
365
|
+
if (coords.left <= coords.right) {
|
366
|
+
tooltip.addClass('left');
|
367
|
+
attrs.left = coords.left;
|
368
|
+
} else {
|
369
|
+
tooltip.addClass('right');
|
370
|
+
attrs.right = coords.right;
|
371
|
+
}
|
372
|
+
if ((coords.top - options.topOffset) > (height + 20)) {
|
373
|
+
tooltip.addClass('top');
|
374
|
+
attrs.top = (trigger.offset().top - height) - 20;
|
375
|
+
} else {
|
376
|
+
tooltip.addClass('bottom');
|
377
|
+
attrs.top = trigger.offset().top + trigger.outerHeight() - 4;
|
378
|
+
}
|
379
|
+
return tooltip.css(attrs);
|
380
|
+
};
|
381
|
+
resettooltip = function() {
|
382
|
+
return tooltip.text('').removeClass('left right top bottom').css({
|
383
|
+
left: 'auto',
|
384
|
+
right: 'auto',
|
385
|
+
top: 'auto',
|
386
|
+
bottom: 'auto',
|
387
|
+
width: 'auto',
|
388
|
+
'padding-left': 'auto',
|
389
|
+
'padding-right': 'auto'
|
445
390
|
});
|
446
391
|
};
|
447
|
-
|
392
|
+
closetooltip = function() {
|
393
|
+
tooltip.stop().hide();
|
394
|
+
resettooltip();
|
395
|
+
return $('[role=tooltip]').removeClass('on');
|
396
|
+
};
|
397
|
+
showtooltip = function(trigger) {
|
398
|
+
clearTimeout(delayShow);
|
399
|
+
return delayShow = setTimeout(function() {
|
400
|
+
tooltip.css({
|
401
|
+
"opacity": 0,
|
402
|
+
"display": "block"
|
403
|
+
}).text(trigger.attr('data-title'));
|
404
|
+
setPosition(trigger);
|
405
|
+
trigger.addClass('on');
|
406
|
+
console.log(tooltip.css('display'));
|
407
|
+
return tooltip.animate({
|
408
|
+
top: "+=10",
|
409
|
+
opacity: 1
|
410
|
+
}, options.speed);
|
411
|
+
}, options.delay);
|
412
|
+
};
|
413
|
+
this.each(function() {
|
414
|
+
var $this;
|
415
|
+
$this = $(this);
|
416
|
+
$this.attr('role', 'tooltip').attr('data-title', $this.attr('title'));
|
417
|
+
return $this.removeAttr("title");
|
418
|
+
});
|
419
|
+
$('body').on('focus', '[role=tooltip]', function() {
|
420
|
+
return showtooltip($(this));
|
421
|
+
}).on('blur', '[role=tooltip]', function() {
|
422
|
+
clearTimeout(delayShow);
|
423
|
+
return closetooltip();
|
424
|
+
}).on('mouseenter', '[role=tooltip]:not(input,select,textarea)', function() {
|
425
|
+
return showtooltip($(this));
|
426
|
+
}).on('mouseleave', '[role=tooltip]:not(input,select,textarea)', function() {
|
427
|
+
clearTimeout(delayShow);
|
428
|
+
return closetooltip();
|
429
|
+
});
|
430
|
+
return $(window).on({
|
431
|
+
scroll: function() {
|
432
|
+
trigger = $('[role=tooltip].on');
|
433
|
+
if (trigger.length) {
|
434
|
+
setPosition(trigger);
|
435
|
+
return $('#tooltip').css({
|
436
|
+
top: "+=10"
|
437
|
+
});
|
438
|
+
}
|
439
|
+
}
|
440
|
+
});
|
441
|
+
};
|
442
|
+
})(jQuery);
|
448
443
|
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
444
|
+
/* --------------------------------------------
|
445
|
+
Begin disabled.coffee
|
446
|
+
--------------------------------------------
|
447
|
+
*/
|
453
448
|
|
454
449
|
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
});
|
450
|
+
$(function() {
|
451
|
+
$('.disabled').each(function() {
|
452
|
+
$(this).attr('tabindex', '-1');
|
453
|
+
$(this).find('a').attr('tabindex', '-1');
|
454
|
+
return $(this).find('input, select, textarea').addClass('disabled').attr('tabindex', '-1').attr('readonly', 'readyonly');
|
455
|
+
});
|
456
|
+
$('body').on('click', '.disabled, .disabled *', function(e) {
|
457
|
+
e.preventDefault();
|
458
|
+
return false;
|
465
459
|
});
|
460
|
+
});
|
466
461
|
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
462
|
+
/* --------------------------------------------
|
463
|
+
Begin equalizeColumns.coffee
|
464
|
+
--------------------------------------------
|
465
|
+
*/
|
471
466
|
|
472
467
|
|
473
|
-
|
474
|
-
|
475
|
-
|
468
|
+
$(function() {
|
469
|
+
return equalizeColumns();
|
470
|
+
});
|
476
471
|
|
477
|
-
|
478
|
-
|
479
|
-
|
472
|
+
$(window).resize(function() {
|
473
|
+
return equalizeColumns();
|
474
|
+
});
|
480
475
|
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
if (!collapsed) {
|
491
|
-
if (!$(this).hasClass('equal')) {
|
492
|
-
$(this).addClass('equal');
|
493
|
-
}
|
494
|
-
if ($(this).outerHeight() > tallest) {
|
495
|
-
return tallest = $(this).outerHeight();
|
496
|
-
}
|
497
|
-
}
|
498
|
-
});
|
476
|
+
equalizeColumns = function() {
|
477
|
+
return $('.row.equalize').each(function() {
|
478
|
+
var $row, collapsed, tallest;
|
479
|
+
$row = $(this);
|
480
|
+
tallest = 0;
|
481
|
+
collapsed = false;
|
482
|
+
$(this).children('*').each(function(i) {
|
483
|
+
$(this).css('min-height', '1px');
|
484
|
+
collapsed = $(this).outerWidth() === $row.outerWidth();
|
499
485
|
if (!collapsed) {
|
500
|
-
|
486
|
+
if (!$(this).hasClass('equal')) {
|
487
|
+
$(this).addClass('equal');
|
488
|
+
}
|
489
|
+
if ($(this).outerHeight() > tallest) {
|
490
|
+
return tallest = $(this).outerHeight();
|
491
|
+
}
|
501
492
|
}
|
502
493
|
});
|
503
|
-
|
494
|
+
if (!collapsed) {
|
495
|
+
return $(this).children('*').css('min-height', tallest);
|
496
|
+
}
|
497
|
+
});
|
498
|
+
};
|
504
499
|
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
500
|
+
/* --------------------------------------------
|
501
|
+
Begin forms.coffee
|
502
|
+
--------------------------------------------
|
503
|
+
*/
|
509
504
|
|
510
505
|
|
511
|
-
|
512
|
-
|
506
|
+
$(function() {
|
507
|
+
$('body').on('click', '\
|
513
508
|
.error input, \
|
514
509
|
.error textarea, \
|
515
510
|
.invalid input, \
|
@@ -518,358 +513,373 @@
|
|
518
513
|
textarea.error, \
|
519
514
|
input.invalid, \
|
520
515
|
textarea.invalid', function(e) {
|
521
|
-
|
522
|
-
});
|
523
|
-
$('span.select select').each(function() {
|
524
|
-
if ($(this).children('option').first().val() === '' && $(this).children('option').first().attr('selected')) {
|
525
|
-
return $(this).addClass('unselected');
|
526
|
-
} else {
|
527
|
-
return $(this).removeClass('unselected');
|
528
|
-
}
|
529
|
-
});
|
530
|
-
$('body').on('change', 'span.select select', function(e) {
|
531
|
-
if ($(this).children('option').first().val() === '' && $(this).children('option').first().attr('selected')) {
|
532
|
-
return $(this).addClass('unselected');
|
533
|
-
} else {
|
534
|
-
return $(this).removeClass('unselected');
|
535
|
-
}
|
536
|
-
});
|
516
|
+
return $(this).focus().select();
|
537
517
|
});
|
518
|
+
$('span.select select').each(function() {
|
519
|
+
if ($(this).children('option').first().val() === '' && $(this).children('option').first().attr('selected')) {
|
520
|
+
return $(this).addClass('unselected');
|
521
|
+
} else {
|
522
|
+
return $(this).removeClass('unselected');
|
523
|
+
}
|
524
|
+
});
|
525
|
+
$('body').on('change', 'span.select select', function(e) {
|
526
|
+
if ($(this).children('option').first().val() === '' && $(this).children('option').first().attr('selected')) {
|
527
|
+
return $(this).addClass('unselected');
|
528
|
+
} else {
|
529
|
+
return $(this).removeClass('unselected');
|
530
|
+
}
|
531
|
+
});
|
532
|
+
});
|
538
533
|
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
534
|
+
/* --------------------------------------------
|
535
|
+
Begin menus.coffee
|
536
|
+
--------------------------------------------
|
537
|
+
*/
|
543
538
|
|
544
539
|
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
return $(this).addClass('on');
|
557
|
-
}
|
558
|
-
});
|
559
|
-
$('body').on('mouseleave', '.nav > ul > li.menu:not(.disabled)', function(e) {
|
560
|
-
if ($(window).width() >= 768) {
|
561
|
-
return delay = setTimeout((function() {
|
562
|
-
return $('.nav > ul > li.menu.on').removeClass('on');
|
563
|
-
}), 350);
|
564
|
-
}
|
565
|
-
});
|
566
|
-
$('body').on('click', '.nav > ul > li.menu:not(.disabled) > a', function(e) {
|
567
|
-
if (Modernizr.touch || $(window).width() < 768) {
|
568
|
-
openMenu(e.target);
|
569
|
-
} else {
|
570
|
-
$('.nav > ul > li.menu.on').removeClass('on');
|
571
|
-
$(e.target).parents('li.menu').addClass('on');
|
572
|
-
}
|
573
|
-
e.preventDefault();
|
574
|
-
return false;
|
575
|
-
});
|
576
|
-
$('body').on('focus', '.nav > ul > li:not(.on) > a', function() {
|
577
|
-
return $('.nav > ul > li.menu.on').removeClass('on');
|
578
|
-
});
|
579
|
-
$('body').on('focus', '.nav > ul > li.menu > a', function(e) {
|
580
|
-
openMenu(e.target);
|
581
|
-
e.preventDefault();
|
582
|
-
return false;
|
583
|
-
});
|
584
|
-
$('body').on('click', function(e) {
|
585
|
-
if ($(e.target).hasClass('dropdown')) {
|
586
|
-
$(e.target).toggleClass('on');
|
587
|
-
} else {
|
588
|
-
if ($('.dropdown').filter('.on').length) {
|
589
|
-
$('.dropdown').filter('.on').removeClass('on');
|
590
|
-
}
|
591
|
-
}
|
592
|
-
if ($('.nav > ul > li').filter('.menu.on').length) {
|
593
|
-
return $('.nav > ul > li').filter('.menu.on').removeClass('on');
|
594
|
-
}
|
595
|
-
});
|
596
|
-
$('body').on('focus', '.dropdown', function(e) {
|
540
|
+
$(function() {
|
541
|
+
var delay, openMenu,
|
542
|
+
_this = this;
|
543
|
+
delay = '';
|
544
|
+
openMenu = function(target) {
|
545
|
+
return $(target).parent('li.menu').toggleClass('on');
|
546
|
+
};
|
547
|
+
$('body').on('mouseenter', '.nav > ul > li.menu:not(.disabled)', function(e) {
|
548
|
+
if ($(window).width() >= 768) {
|
549
|
+
clearTimeout(delay);
|
550
|
+
$('.nav > ul > li.menu.on').removeClass('on');
|
597
551
|
return $(this).addClass('on');
|
598
|
-
}
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
552
|
+
}
|
553
|
+
});
|
554
|
+
$('body').on('mouseleave', '.nav > ul > li.menu:not(.disabled)', function(e) {
|
555
|
+
if ($(window).width() >= 768) {
|
556
|
+
return delay = setTimeout((function() {
|
557
|
+
return $('.nav > ul > li.menu.on').removeClass('on');
|
558
|
+
}), 350);
|
559
|
+
}
|
560
|
+
});
|
561
|
+
$('body').on('click', '.nav > ul > li.menu:not(.disabled) > a', function(e) {
|
562
|
+
if (Modernizr.touch || $(window).width() < 768) {
|
563
|
+
openMenu(e.target);
|
564
|
+
} else {
|
565
|
+
$('.nav > ul > li.menu.on').removeClass('on');
|
566
|
+
$(e.target).parents('li.menu').addClass('on');
|
567
|
+
}
|
568
|
+
e.preventDefault();
|
569
|
+
return false;
|
570
|
+
});
|
571
|
+
$('body').on('focus', '.nav > ul > li:not(.on) > a', function() {
|
572
|
+
return $('.nav > ul > li.menu.on').removeClass('on');
|
573
|
+
});
|
574
|
+
$('body').on('focus', '.nav > ul > li.menu > a', function(e) {
|
575
|
+
openMenu(e.target);
|
576
|
+
e.preventDefault();
|
577
|
+
return false;
|
578
|
+
});
|
579
|
+
$('body').on('click', function(e) {
|
580
|
+
if ($(e.target).hasClass('dropdown')) {
|
581
|
+
$(e.target).toggleClass('on');
|
582
|
+
} else {
|
583
|
+
if ($('.dropdown').filter('.on').length) {
|
584
|
+
$('.dropdown').filter('.on').removeClass('on');
|
608
585
|
}
|
609
|
-
}
|
610
|
-
$('
|
611
|
-
$(
|
612
|
-
|
613
|
-
return false;
|
614
|
-
});
|
615
|
-
$('body').on('focus', '.menu-toggle', function(e) {
|
616
|
-
return $(e.target).parent('.nav.menu').addClass('on');
|
617
|
-
});
|
618
|
-
$('body').on('blur', '.nav.menu > ul > li:last-child a', function(e) {
|
619
|
-
return $('.nav.menu').filter('.on').removeClass('on');
|
620
|
-
});
|
586
|
+
}
|
587
|
+
if ($('.nav > ul > li').filter('.menu.on').length) {
|
588
|
+
return $('.nav > ul > li').filter('.menu.on').removeClass('on');
|
589
|
+
}
|
621
590
|
});
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
591
|
+
$('body').on('focus', '.dropdown', function(e) {
|
592
|
+
return $(this).addClass('on');
|
593
|
+
});
|
594
|
+
$('body').on('blur', '.dropdown li:last-child a', function(e) {
|
595
|
+
return $('.dropdown').filter('.on').removeClass('on');
|
596
|
+
});
|
597
|
+
$('.nav.menu').each(function() {
|
598
|
+
if (!$(this).attr('data-label')) {
|
599
|
+
$(this).attr('data-label', 'Menu');
|
600
|
+
}
|
601
|
+
if (!($(this).find('.menu-toggle').length > 0)) {
|
602
|
+
return $(this).prepend('<a href="#" class="menu-toggle"><i class="icon-reorder"></i></a>');
|
626
603
|
}
|
627
604
|
});
|
605
|
+
$('body').on('click', '.nav.menu .menu-toggle', function(e) {
|
606
|
+
$(this).parent('.nav.menu').toggleClass('on');
|
607
|
+
e.preventDefault();
|
608
|
+
return false;
|
609
|
+
});
|
610
|
+
$('body').on('focus', '.menu-toggle', function(e) {
|
611
|
+
return $(e.target).parent('.nav.menu').addClass('on');
|
612
|
+
});
|
613
|
+
$('body').on('blur', '.nav.menu > ul > li:last-child a', function(e) {
|
614
|
+
return $('.nav.menu').filter('.on').removeClass('on');
|
615
|
+
});
|
616
|
+
});
|
628
617
|
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
618
|
+
$(window).on('resize', function() {
|
619
|
+
if ($('.nav > ul > li.menu.on').length > 1) {
|
620
|
+
return $('.nav > ul > li.menu.on').removeClass('on').first().addClass('on');
|
621
|
+
}
|
622
|
+
});
|
633
623
|
|
624
|
+
/* --------------------------------------------
|
625
|
+
Begin modals.coffee
|
626
|
+
--------------------------------------------
|
627
|
+
*/
|
634
628
|
|
635
|
-
|
636
|
-
|
637
|
-
|
629
|
+
|
630
|
+
/*
|
631
|
+
* Requires jquery.modals.js
|
632
|
+
*/
|
638
633
|
|
639
634
|
|
640
|
-
|
641
|
-
|
642
|
-
|
635
|
+
$(function() {
|
636
|
+
return $('div.modal, div[role=dialog]').modal();
|
637
|
+
});
|
643
638
|
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
639
|
+
/* --------------------------------------------
|
640
|
+
Begin pagination.coffee
|
641
|
+
--------------------------------------------
|
642
|
+
*/
|
648
643
|
|
649
644
|
|
650
|
-
|
645
|
+
$(function() {
|
646
|
+
limitPaginationItems();
|
647
|
+
$('body').on('click', '.pagination ul > li:not(.next, .prev) a', function(e) {
|
648
|
+
$('.pagination ul > li:not(.next, .prev)').removeClass('active');
|
649
|
+
$(this).parent('li').addClass('active');
|
650
|
+
if ($(this).parent('li').hasClass('first')) {
|
651
|
+
$('.pagination ul > li.prev').addClass('disabled');
|
652
|
+
} else {
|
653
|
+
$('.pagination ul > li.prev').removeClass('disabled');
|
654
|
+
}
|
655
|
+
if ($(this).parent('li').hasClass('last')) {
|
656
|
+
$('.pagination ul > li.next').addClass('disabled');
|
657
|
+
} else {
|
658
|
+
$('.pagination ul > li.next').removeClass('disabled');
|
659
|
+
}
|
651
660
|
limitPaginationItems();
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
} else {
|
663
|
-
$('.pagination ul > li.next').removeClass('disabled');
|
664
|
-
}
|
661
|
+
e.preventDefault();
|
662
|
+
return false;
|
663
|
+
});
|
664
|
+
$('body').on('click', '.pagination ul > li.prev:not(.disabled)', function(e) {
|
665
|
+
var el;
|
666
|
+
$('.pagination ul > li.next').removeClass('disabled');
|
667
|
+
el = $('.pagination ul > li.active');
|
668
|
+
if (!el.hasClass('first')) {
|
669
|
+
el.removeClass('active');
|
670
|
+
el.prev().addClass('active');
|
665
671
|
limitPaginationItems();
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
el = $('.pagination ul > li.active');
|
673
|
-
if (!el.hasClass('first')) {
|
674
|
-
el.removeClass('active');
|
675
|
-
el.prev().addClass('active');
|
676
|
-
limitPaginationItems();
|
677
|
-
}
|
678
|
-
if ($('.pagination ul > li.active').hasClass('first')) {
|
679
|
-
$(this).addClass('disabled');
|
680
|
-
}
|
681
|
-
e.preventDefault();
|
682
|
-
return false;
|
683
|
-
});
|
684
|
-
$('body').on('click', '.pagination ul > li.next:not(.disabled)', function(e) {
|
685
|
-
var el;
|
686
|
-
$('.pagination ul > li.prev').removeClass('disabled');
|
687
|
-
el = $('.pagination ul > li.active');
|
688
|
-
if (!el.hasClass('last')) {
|
689
|
-
el.removeClass('active');
|
690
|
-
el.next().addClass('active');
|
691
|
-
limitPaginationItems();
|
692
|
-
}
|
693
|
-
if ($('.pagination ul > li.active').hasClass('last')) {
|
694
|
-
$(this).addClass('disabled');
|
695
|
-
}
|
696
|
-
e.preventDefault();
|
697
|
-
return false;
|
698
|
-
});
|
699
|
-
$('body').on('click', '.pagination ul > li.disabled a', function(e) {
|
700
|
-
e.preventDefault();
|
701
|
-
return false;
|
702
|
-
});
|
672
|
+
}
|
673
|
+
if ($('.pagination ul > li.active').hasClass('first')) {
|
674
|
+
$(this).addClass('disabled');
|
675
|
+
}
|
676
|
+
e.preventDefault();
|
677
|
+
return false;
|
703
678
|
});
|
704
|
-
|
705
|
-
|
706
|
-
|
679
|
+
$('body').on('click', '.pagination ul > li.next:not(.disabled)', function(e) {
|
680
|
+
var el;
|
681
|
+
$('.pagination ul > li.prev').removeClass('disabled');
|
682
|
+
el = $('.pagination ul > li.active');
|
683
|
+
if (!el.hasClass('last')) {
|
684
|
+
el.removeClass('active');
|
685
|
+
el.next().addClass('active');
|
686
|
+
limitPaginationItems();
|
687
|
+
}
|
688
|
+
if ($('.pagination ul > li.active').hasClass('last')) {
|
689
|
+
$(this).addClass('disabled');
|
690
|
+
}
|
691
|
+
e.preventDefault();
|
692
|
+
return false;
|
707
693
|
});
|
708
|
-
|
709
|
-
|
710
|
-
return
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
694
|
+
$('body').on('click', '.pagination ul > li.disabled a', function(e) {
|
695
|
+
e.preventDefault();
|
696
|
+
return false;
|
697
|
+
});
|
698
|
+
});
|
699
|
+
|
700
|
+
$(window).resize(function() {
|
701
|
+
return limitPaginationItems();
|
702
|
+
});
|
703
|
+
|
704
|
+
limitPaginationItems = function() {
|
705
|
+
return $('.pagination ul').each(function() {
|
706
|
+
var pagination, totalItemsWidth, visibleItemsWidth, visibleSpace, _results;
|
707
|
+
pagination = $(this);
|
708
|
+
visibleSpace = pagination.outerWidth() - pagination.children('li.prev').outerWidth() - pagination.children('li.next').outerWidth();
|
709
|
+
totalItemsWidth = 0;
|
710
|
+
pagination.children('li').each(function() {
|
711
|
+
return totalItemsWidth += $(this).outerWidth();
|
712
|
+
});
|
713
|
+
pagination.children('li').not('.prev, .next, .active').hide();
|
714
|
+
visibleItemsWidth = 0;
|
715
|
+
pagination.children('li:visible').each(function() {
|
716
|
+
return visibleItemsWidth += $(this).outerWidth();
|
717
|
+
});
|
718
|
+
_results = [];
|
719
|
+
while ((visibleItemsWidth + 29) < visibleSpace && (visibleItemsWidth + 29) < totalItemsWidth) {
|
720
|
+
pagination.children('li:visible').not('.next').last().next().show();
|
719
721
|
visibleItemsWidth = 0;
|
720
722
|
pagination.children('li:visible').each(function() {
|
721
723
|
return visibleItemsWidth += $(this).outerWidth();
|
722
724
|
});
|
723
|
-
|
724
|
-
|
725
|
-
pagination.children('li:visible').not('.next').last().next().show();
|
725
|
+
if ((visibleItemsWidth + 29) <= visibleSpace) {
|
726
|
+
pagination.children('li:visible').not('.prev').first().prev().show();
|
726
727
|
visibleItemsWidth = 0;
|
727
728
|
pagination.children('li:visible').each(function() {
|
728
729
|
return visibleItemsWidth += $(this).outerWidth();
|
729
730
|
});
|
730
|
-
if ((visibleItemsWidth + 29) <= visibleSpace) {
|
731
|
-
pagination.children('li:visible').not('.prev').first().prev().show();
|
732
|
-
visibleItemsWidth = 0;
|
733
|
-
pagination.children('li:visible').each(function() {
|
734
|
-
return visibleItemsWidth += $(this).outerWidth();
|
735
|
-
});
|
736
|
-
}
|
737
|
-
visibleItemsWidth = 0;
|
738
|
-
_results.push(pagination.children('li:visible').each(function() {
|
739
|
-
return visibleItemsWidth += $(this).outerWidth();
|
740
|
-
}));
|
741
731
|
}
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
--------------------------------------------
|
749
|
-
*/
|
750
|
-
|
751
|
-
|
752
|
-
/*
|
753
|
-
* Requires jquery.responsiveText.js
|
754
|
-
*/
|
755
|
-
|
756
|
-
|
757
|
-
$(function() {
|
758
|
-
return $('table.responsive').each(function(index, object) {
|
759
|
-
var compression, max, min, padding;
|
760
|
-
compression = 30;
|
761
|
-
min = 8;
|
762
|
-
max = 13;
|
763
|
-
padding = 0;
|
764
|
-
compression = parseFloat($(this).attr('data-compression') || compression);
|
765
|
-
min = parseFloat($(this).attr('data-min') || min);
|
766
|
-
max = parseFloat($(this).attr('data-max') || max);
|
767
|
-
padding = parseFloat($(this).attr('data-padding') || padding);
|
768
|
-
return $(object).responsiveTable({
|
769
|
-
compressor: compression,
|
770
|
-
minSize: min,
|
771
|
-
maxSize: max,
|
772
|
-
padding: padding
|
773
|
-
});
|
774
|
-
});
|
732
|
+
visibleItemsWidth = 0;
|
733
|
+
_results.push(pagination.children('li:visible').each(function() {
|
734
|
+
return visibleItemsWidth += $(this).outerWidth();
|
735
|
+
}));
|
736
|
+
}
|
737
|
+
return _results;
|
775
738
|
});
|
739
|
+
};
|
776
740
|
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
741
|
+
/* --------------------------------------------
|
742
|
+
Begin responsiveTables.coffee
|
743
|
+
--------------------------------------------
|
744
|
+
*/
|
781
745
|
|
782
746
|
|
783
|
-
|
784
|
-
|
785
|
-
|
747
|
+
/*
|
748
|
+
* Requires jquery.responsiveText.js
|
749
|
+
*/
|
786
750
|
|
787
751
|
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
752
|
+
$(function() {
|
753
|
+
return $('table.responsive').each(function(index, object) {
|
754
|
+
var compression, max, min, padding;
|
755
|
+
compression = 30;
|
756
|
+
min = 8;
|
757
|
+
max = 13;
|
758
|
+
padding = 0;
|
759
|
+
compression = parseFloat($(this).attr('data-compression') || compression);
|
760
|
+
min = parseFloat($(this).attr('data-min') || min);
|
761
|
+
max = parseFloat($(this).attr('data-max') || max);
|
762
|
+
padding = parseFloat($(this).attr('data-padding') || padding);
|
763
|
+
return $(object).responsiveTable({
|
764
|
+
compressor: compression,
|
765
|
+
minSize: min,
|
766
|
+
maxSize: max,
|
767
|
+
padding: padding
|
802
768
|
});
|
803
769
|
});
|
770
|
+
});
|
804
771
|
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
772
|
+
/* --------------------------------------------
|
773
|
+
Begin responsiveText.coffee
|
774
|
+
--------------------------------------------
|
775
|
+
*/
|
809
776
|
|
810
777
|
|
811
|
-
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
778
|
+
/*
|
779
|
+
* Requires jquery.responsiveText.js
|
780
|
+
*/
|
781
|
+
|
782
|
+
|
783
|
+
$(function() {
|
784
|
+
return $('.responsive').not('table').each(function(index, object) {
|
785
|
+
var $this, compression, max, min, scrollReset, scrollTime;
|
786
|
+
compression = 10;
|
787
|
+
min = 10;
|
788
|
+
max = 200;
|
789
|
+
scrollTime = 650;
|
790
|
+
scrollReset = 200;
|
791
|
+
compression = parseFloat($(this).attr('data-compression') || compression);
|
792
|
+
min = parseFloat($(this).attr('data-min') || min);
|
793
|
+
max = parseFloat($(this).attr('data-max') || max);
|
794
|
+
$(object).responsiveText({
|
795
|
+
compressor: compression,
|
796
|
+
minSize: min,
|
797
|
+
maxSize: max
|
798
|
+
});
|
799
|
+
$this = $(this);
|
800
|
+
return $(this).hover((function() {
|
801
|
+
var difference;
|
802
|
+
difference = $this.get(0).scrollWidth - $this.width();
|
803
|
+
console.log(difference);
|
804
|
+
if (difference > 0) {
|
805
|
+
return $this.stop().animate({
|
806
|
+
"text-indent": -difference
|
807
|
+
}, scrollTime);
|
824
808
|
}
|
825
|
-
|
826
|
-
return
|
809
|
+
}), function() {
|
810
|
+
return $this.stop().animate({
|
811
|
+
"text-indent": 0
|
812
|
+
}, scrollReset);
|
827
813
|
});
|
828
814
|
});
|
815
|
+
});
|
829
816
|
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
817
|
+
/* --------------------------------------------
|
818
|
+
Begin tabs.coffee
|
819
|
+
--------------------------------------------
|
820
|
+
*/
|
834
821
|
|
835
822
|
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
tiles = $(this).parents('.tiles');
|
845
|
-
tiles.find('.tile').removeClass('active');
|
846
|
-
tiles.find('input.value, select.value').val($(this).data('value')).change();
|
847
|
-
$(this).addClass('active');
|
823
|
+
$(function() {
|
824
|
+
return $('body').on('click', '.tabs > ul li a[href^=#], [role=tab] a', function(e) {
|
825
|
+
var tabs;
|
826
|
+
if (!$(this).hasClass('disabled')) {
|
827
|
+
if ($(this).parents('[role=tabpanel]').length > 0) {
|
828
|
+
tabs = $(this).parents('[role=tabpanel]');
|
829
|
+
} else {
|
830
|
+
tabs = $(this).parents('.tabs');
|
848
831
|
}
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
return tiles.find('.tile[data-value=' + $(this).val() + ']').addClass('active');
|
857
|
-
});
|
832
|
+
tabs.find('> ul li a, [role=tab] a').removeClass('active');
|
833
|
+
$(this).addClass('active');
|
834
|
+
tabs.children('div, [role=tabpanel]').removeClass('active');
|
835
|
+
tabs.children($(this).attr('href')).addClass('active');
|
836
|
+
}
|
837
|
+
e.preventDefault();
|
838
|
+
return false;
|
858
839
|
});
|
840
|
+
});
|
841
|
+
|
842
|
+
/* --------------------------------------------
|
843
|
+
Begin tooltips.coffee
|
844
|
+
--------------------------------------------
|
845
|
+
*/
|
859
846
|
|
860
|
-
/* --------------------------------------------
|
861
|
-
Begin tooltips.coffee
|
862
|
-
--------------------------------------------
|
863
|
-
*/
|
864
847
|
|
848
|
+
/*
|
849
|
+
* Requires jquery.tooltips.js
|
850
|
+
*/
|
865
851
|
|
866
|
-
/*
|
867
|
-
* Requires jquery.tooltips.js
|
868
|
-
*/
|
869
852
|
|
853
|
+
$(function() {
|
854
|
+
return $('.tooltip[title]').tooltip();
|
855
|
+
});
|
870
856
|
|
871
|
-
|
872
|
-
|
873
|
-
|
857
|
+
/* --------------------------------------------
|
858
|
+
Begin tiles.coffee
|
859
|
+
--------------------------------------------
|
860
|
+
*/
|
874
861
|
|
875
|
-
|
862
|
+
|
863
|
+
$(function() {
|
864
|
+
$('.tiles').each(function() {
|
865
|
+
$(this).find('.tile').attr('role', 'button');
|
866
|
+
return $(this).find('.tile[data-value=' + $(this).find('input.value, select.value').val() + ']').addClass('active');
|
867
|
+
});
|
868
|
+
$('body').on('click', '.tiles .tile', function(e) {
|
869
|
+
var tiles;
|
870
|
+
if (!$(this).hasClass('disabled')) {
|
871
|
+
tiles = $(this).parents('.tiles');
|
872
|
+
tiles.find('.tile').removeClass('active');
|
873
|
+
tiles.find('input.value, select.value').val($(this).data('value')).change();
|
874
|
+
$(this).addClass('active');
|
875
|
+
}
|
876
|
+
e.preventDefault();
|
877
|
+
return false;
|
878
|
+
});
|
879
|
+
return $('body').on('change', '.tiles input.value, .tiles select.value', function(e) {
|
880
|
+
var tiles;
|
881
|
+
tiles = $(this).parents('.tiles');
|
882
|
+
tiles.find('.tile').removeClass('active');
|
883
|
+
return tiles.find('.tile[data-value=' + $(this).val() + ']').addClass('active');
|
884
|
+
});
|
885
|
+
});
|