volt-foundation 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fe54e306ed60a7b270131aa86b3319fc5e42ef5c
4
- data.tar.gz: 94632cce7b51ef73095d0c21c4ab1c8b8b256253
3
+ metadata.gz: 27db155e41516dc7c547cbc5b2d41f7cc60fdb22
4
+ data.tar.gz: 6734e0c5cd498cf676e229cce4bc30ff13a651af
5
5
  SHA512:
6
- metadata.gz: a9a93842df673f577cf440406fc21587f40aa6162c9948022f6fca0f13531f8ceb2d6a5bfb60ecb3d7f412de24e332bef41f5c6ffc491cf9977f424352b31ce5
7
- data.tar.gz: f7c0f7e96b4436593e02ca241f57820a1a6194fde6155f2ac92811945c74a72e0f80901610548f66bd2f325d9d9491f73c97df243cce901414f700bf98ba5119
6
+ metadata.gz: abad4d59e782178332e80f51e41298c0b04e79d9f6349b5f030a1bada998e1bc4f62da4331bfc85da583b3fccdfb4685cde39ae0150b6dc81d1da4f6b8ff04d4
7
+ data.tar.gz: a26abdade7d3c015df8daed326c92d5b800ea53c3550f6efb330a769a3a39eb636642b2758cc4d5e677f34b17fdd5bf45ff78c44e6500448af98eca849e82e20
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.3
1
+ 0.0.4
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.version = version
11
11
  spec.authors = ["danReynolds"]
12
12
  spec.email = ["fnetma2@gmail.com"]
13
- spec.summary = %q{TFoundation for the volt framework}
13
+ spec.summary = %q{Foundation for the volt framework}
14
14
  spec.homepage = ""
15
15
  spec.license = "MIT"
16
16
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: volt-foundation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - danReynolds
@@ -54,23 +54,6 @@ files:
54
54
  - app/foundation/assets/css/foundation.min.css
55
55
  - app/foundation/assets/css/normalize.css
56
56
  - app/foundation/assets/js/foundation.min.js
57
- - app/foundation/assets/js/foundation/foundation.abide.js
58
- - app/foundation/assets/js/foundation/foundation.accordion.js
59
- - app/foundation/assets/js/foundation/foundation.alert.js
60
- - app/foundation/assets/js/foundation/foundation.clearing.js
61
- - app/foundation/assets/js/foundation/foundation.dropdown.js
62
- - app/foundation/assets/js/foundation/foundation.equalizer.js
63
- - app/foundation/assets/js/foundation/foundation.interchange.js
64
- - app/foundation/assets/js/foundation/foundation.joyride.js
65
- - app/foundation/assets/js/foundation/foundation.js
66
- - app/foundation/assets/js/foundation/foundation.magellan.js
67
- - app/foundation/assets/js/foundation/foundation.offcanvas.js
68
- - app/foundation/assets/js/foundation/foundation.orbit.js
69
- - app/foundation/assets/js/foundation/foundation.reveal.js
70
- - app/foundation/assets/js/foundation/foundation.slider.js
71
- - app/foundation/assets/js/foundation/foundation.tab.js
72
- - app/foundation/assets/js/foundation/foundation.tooltip.js
73
- - app/foundation/assets/js/foundation/foundation.topbar.js
74
57
  - app/foundation/assets/js/vendor/modernizr.js
75
58
  - lib/volt/foundation.rb
76
59
  - volt-foundation.gemspec
@@ -97,5 +80,5 @@ rubyforge_project:
97
80
  rubygems_version: 2.2.2
98
81
  signing_key:
99
82
  specification_version: 4
100
- summary: TFoundation for the volt framework
83
+ summary: Foundation for the volt framework
101
84
  test_files: []
@@ -1,313 +0,0 @@
1
- ;(function ($, window, document, undefined) {
2
- 'use strict';
3
-
4
- Foundation.libs.abide = {
5
- name : 'abide',
6
-
7
- version : '5.4.6',
8
-
9
- settings : {
10
- live_validate : true,
11
- focus_on_invalid : true,
12
- error_labels: true, // labels with a for="inputId" will recieve an `error` class
13
- timeout : 1000,
14
- patterns : {
15
- alpha: /^[a-zA-Z]+$/,
16
- alpha_numeric : /^[a-zA-Z0-9]+$/,
17
- integer: /^[-+]?\d+$/,
18
- number: /^[-+]?\d*(?:[\.\,]\d+)?$/,
19
-
20
- // amex, visa, diners
21
- card : /^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/,
22
- cvv : /^([0-9]){3,4}$/,
23
-
24
- // http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#valid-e-mail-address
25
- email : /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/,
26
-
27
- url: /^(https?|ftp|file|ssh):\/\/(((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/,
28
- // abc.de
29
- domain: /^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}$/,
30
-
31
- datetime: /^([0-2][0-9]{3})\-([0-1][0-9])\-([0-3][0-9])T([0-5][0-9])\:([0-5][0-9])\:([0-5][0-9])(Z|([\-\+]([0-1][0-9])\:00))$/,
32
- // YYYY-MM-DD
33
- date: /(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))$/,
34
- // HH:MM:SS
35
- time : /^(0[0-9]|1[0-9]|2[0-3])(:[0-5][0-9]){2}$/,
36
- dateISO: /^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/,
37
- // MM/DD/YYYY
38
- month_day_year : /^(0[1-9]|1[012])[- \/.](0[1-9]|[12][0-9]|3[01])[- \/.]\d{4}$/,
39
- // DD/MM/YYYY
40
- day_month_year : /^(0[1-9]|[12][0-9]|3[01])[- \/.](0[1-9]|1[012])[- \/.]\d{4}$/,
41
-
42
- // #FFF or #FFFFFF
43
- color: /^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/
44
- },
45
- validators : {
46
- equalTo: function(el, required, parent) {
47
- var from = document.getElementById(el.getAttribute(this.add_namespace('data-equalto'))).value,
48
- to = el.value,
49
- valid = (from === to);
50
-
51
- return valid;
52
- }
53
- }
54
- },
55
-
56
- timer : null,
57
-
58
- init : function (scope, method, options) {
59
- this.bindings(method, options);
60
- },
61
-
62
- events : function (scope) {
63
- var self = this,
64
- form = self.S(scope).attr('novalidate', 'novalidate'),
65
- settings = form.data(this.attr_name(true) + '-init') || {};
66
-
67
- this.invalid_attr = this.add_namespace('data-invalid');
68
-
69
- form
70
- .off('.abide')
71
- .on('submit.fndtn.abide validate.fndtn.abide', function (e) {
72
- var is_ajax = /ajax/i.test(self.S(this).attr(self.attr_name()));
73
- return self.validate(self.S(this).find('input, textarea, select').get(), e, is_ajax);
74
- })
75
- .on('reset', function() {
76
- return self.reset($(this));
77
- })
78
- .find('input, textarea, select')
79
- .off('.abide')
80
- .on('blur.fndtn.abide change.fndtn.abide', function (e) {
81
- self.validate([this], e);
82
- })
83
- .on('keydown.fndtn.abide', function (e) {
84
- if (settings.live_validate === true) {
85
- clearTimeout(self.timer);
86
- self.timer = setTimeout(function () {
87
- self.validate([this], e);
88
- }.bind(this), settings.timeout);
89
- }
90
- });
91
- },
92
-
93
- reset : function (form) {
94
- form.removeAttr(this.invalid_attr);
95
- $(this.invalid_attr, form).removeAttr(this.invalid_attr);
96
- $('.error', form).not('small').removeClass('error');
97
- },
98
-
99
- validate : function (els, e, is_ajax) {
100
- var validations = this.parse_patterns(els),
101
- validation_count = validations.length,
102
- form = this.S(els[0]).closest('form'),
103
- submit_event = /submit/.test(e.type);
104
-
105
- // Has to count up to make sure the focus gets applied to the top error
106
- for (var i=0; i < validation_count; i++) {
107
- if (!validations[i] && (submit_event || is_ajax)) {
108
- if (this.settings.focus_on_invalid) els[i].focus();
109
- form.trigger('invalid');
110
- this.S(els[i]).closest('form').attr(this.invalid_attr, '');
111
- return false;
112
- }
113
- }
114
-
115
- if (submit_event || is_ajax) {
116
- form.trigger('valid');
117
- }
118
-
119
- form.removeAttr(this.invalid_attr);
120
-
121
- if (is_ajax) return false;
122
-
123
- return true;
124
- },
125
-
126
- parse_patterns : function (els) {
127
- var i = els.length,
128
- el_patterns = [];
129
-
130
- while (i--) {
131
- el_patterns.push(this.pattern(els[i]));
132
- }
133
-
134
- return this.check_validation_and_apply_styles(el_patterns);
135
- },
136
-
137
- pattern : function (el) {
138
- var type = el.getAttribute('type'),
139
- required = typeof el.getAttribute('required') === 'string';
140
-
141
- var pattern = el.getAttribute('pattern') || '';
142
-
143
- if (this.settings.patterns.hasOwnProperty(pattern) && pattern.length > 0) {
144
- return [el, this.settings.patterns[pattern], required];
145
- } else if (pattern.length > 0) {
146
- return [el, new RegExp(pattern), required];
147
- }
148
-
149
- if (this.settings.patterns.hasOwnProperty(type)) {
150
- return [el, this.settings.patterns[type], required];
151
- }
152
-
153
- pattern = /.*/;
154
-
155
- return [el, pattern, required];
156
- },
157
-
158
- check_validation_and_apply_styles : function (el_patterns) {
159
- var i = el_patterns.length,
160
- validations = [],
161
- form = this.S(el_patterns[0][0]).closest('[data-' + this.attr_name(true) + ']'),
162
- settings = form.data(this.attr_name(true) + '-init') || {};
163
- while (i--) {
164
- var el = el_patterns[i][0],
165
- required = el_patterns[i][2],
166
- value = el.value.trim(),
167
- direct_parent = this.S(el).parent(),
168
- validator = el.getAttribute(this.add_namespace('data-abide-validator')),
169
- is_radio = el.type === "radio",
170
- is_checkbox = el.type === "checkbox",
171
- label = this.S('label[for="' + el.getAttribute('id') + '"]'),
172
- valid_length = (required) ? (el.value.length > 0) : true,
173
- el_validations = [];
174
-
175
- var parent, valid;
176
-
177
- // support old way to do equalTo validations
178
- if(el.getAttribute(this.add_namespace('data-equalto'))) { validator = "equalTo" }
179
-
180
- if (!direct_parent.is('label')) {
181
- parent = direct_parent;
182
- } else {
183
- parent = direct_parent.parent();
184
- }
185
-
186
- if (validator) {
187
- valid = this.settings.validators[validator].apply(this, [el, required, parent]);
188
- el_validations.push(valid);
189
- }
190
-
191
- if (is_radio && required) {
192
- el_validations.push(this.valid_radio(el, required));
193
- } else if (is_checkbox && required) {
194
- el_validations.push(this.valid_checkbox(el, required));
195
- } else {
196
-
197
- if (el_patterns[i][1].test(value) && valid_length ||
198
- !required && el.value.length < 1 || $(el).attr('disabled')) {
199
- el_validations.push(true);
200
- } else {
201
- el_validations.push(false);
202
- }
203
-
204
- el_validations = [el_validations.every(function(valid){return valid;})];
205
-
206
- if(el_validations[0]){
207
- this.S(el).removeAttr(this.invalid_attr);
208
- el.setAttribute('aria-invalid', 'false');
209
- el.removeAttribute('aria-describedby');
210
- parent.removeClass('error');
211
- if (label.length > 0 && this.settings.error_labels) {
212
- label.removeClass('error').removeAttr('role');
213
- }
214
- $(el).triggerHandler('valid');
215
- } else {
216
- this.S(el).attr(this.invalid_attr, '');
217
- el.setAttribute('aria-invalid', 'true');
218
-
219
- // Try to find the error associated with the input
220
- var errorElem = parent.find('small.error, span.error');
221
- var errorID = errorElem.length > 0 ? errorElem[0].id : "";
222
- if (errorID.length > 0) el.setAttribute('aria-describedby', errorID);
223
-
224
- // el.setAttribute('aria-describedby', $(el).find('.error')[0].id);
225
- parent.addClass('error');
226
- if (label.length > 0 && this.settings.error_labels) {
227
- label.addClass('error').attr('role', 'alert');
228
- }
229
- $(el).triggerHandler('invalid');
230
- }
231
- }
232
- validations.push(el_validations[0]);
233
- }
234
- validations = [validations.every(function(valid){return valid;})];
235
- return validations;
236
- },
237
-
238
- valid_checkbox : function(el, required) {
239
- var el = this.S(el),
240
- valid = (el.is(':checked') || !required);
241
-
242
- if (valid) {
243
- el.removeAttr(this.invalid_attr).parent().removeClass('error');
244
- } else {
245
- el.attr(this.invalid_attr, '').parent().addClass('error');
246
- }
247
-
248
- return valid;
249
- },
250
-
251
- valid_radio : function (el, required) {
252
- var name = el.getAttribute('name'),
253
- group = this.S(el).closest('[data-' + this.attr_name(true) + ']').find("[name='"+name+"']"),
254
- count = group.length,
255
- valid = false;
256
-
257
- // Has to count up to make sure the focus gets applied to the top error
258
- for (var i=0; i < count; i++) {
259
- if (group[i].checked) valid = true;
260
- }
261
-
262
- // Has to count up to make sure the focus gets applied to the top error
263
- for (var i=0; i < count; i++) {
264
- if (valid) {
265
- this.S(group[i]).removeAttr(this.invalid_attr).parent().removeClass('error');
266
- } else {
267
- this.S(group[i]).attr(this.invalid_attr, '').parent().addClass('error');
268
- }
269
- }
270
-
271
- return valid;
272
- },
273
-
274
- valid_equal: function(el, required, parent) {
275
- var from = document.getElementById(el.getAttribute(this.add_namespace('data-equalto'))).value,
276
- to = el.value,
277
- valid = (from === to);
278
-
279
- if (valid) {
280
- this.S(el).removeAttr(this.invalid_attr);
281
- parent.removeClass('error');
282
- if (label.length > 0 && settings.error_labels) label.removeClass('error');
283
- } else {
284
- this.S(el).attr(this.invalid_attr, '');
285
- parent.addClass('error');
286
- if (label.length > 0 && settings.error_labels) label.addClass('error');
287
- }
288
-
289
- return valid;
290
- },
291
-
292
- valid_oneof: function(el, required, parent, doNotValidateOthers) {
293
- var el = this.S(el),
294
- others = this.S('[' + this.add_namespace('data-oneof') + ']'),
295
- valid = others.filter(':checked').length > 0;
296
-
297
- if (valid) {
298
- el.removeAttr(this.invalid_attr).parent().removeClass('error');
299
- } else {
300
- el.attr(this.invalid_attr, '').parent().addClass('error');
301
- }
302
-
303
- if (!doNotValidateOthers) {
304
- var _this = this;
305
- others.each(function() {
306
- _this.valid_oneof.call(_this, this, null, null, true);
307
- });
308
- }
309
-
310
- return valid;
311
- }
312
- };
313
- }(jQuery, window, window.document));
@@ -1,65 +0,0 @@
1
- ;(function ($, window, document, undefined) {
2
- 'use strict';
3
-
4
- Foundation.libs.accordion = {
5
- name : 'accordion',
6
-
7
- version : '5.4.6',
8
-
9
- settings : {
10
- active_class: 'active',
11
- multi_expand: false,
12
- toggleable: true,
13
- callback : function () {}
14
- },
15
-
16
- init : function (scope, method, options) {
17
- this.bindings(method, options);
18
- },
19
-
20
- events : function () {
21
- var self = this;
22
- var S = this.S;
23
- S(this.scope)
24
- .off('.fndtn.accordion')
25
- .on('click.fndtn.accordion', '[' + this.attr_name() + '] > dd > a', function (e) {
26
- var accordion = S(this).closest('[' + self.attr_name() + ']'),
27
- groupSelector = self.attr_name() + '=' + accordion.attr(self.attr_name()),
28
- settings = accordion.data(self.attr_name(true) + '-init'),
29
- target = S('#' + this.href.split('#')[1]),
30
- aunts = $('> dd', accordion),
31
- siblings = aunts.children('.content'),
32
- active_content = siblings.filter('.' + settings.active_class);
33
- e.preventDefault();
34
-
35
- if (accordion.attr(self.attr_name())) {
36
- siblings = siblings.add('[' + groupSelector + '] dd > .content');
37
- aunts = aunts.add('[' + groupSelector + '] dd');
38
- }
39
-
40
- if (settings.toggleable && target.is(active_content)) {
41
- target.parent('dd').toggleClass(settings.active_class, false);
42
- target.toggleClass(settings.active_class, false);
43
- settings.callback(target);
44
- target.triggerHandler('toggled', [accordion]);
45
- accordion.triggerHandler('toggled', [target]);
46
- return;
47
- }
48
-
49
- if (!settings.multi_expand) {
50
- siblings.removeClass(settings.active_class);
51
- aunts.removeClass(settings.active_class);
52
- }
53
-
54
- target.addClass(settings.active_class).parent().addClass(settings.active_class);
55
- settings.callback(target);
56
- target.triggerHandler('toggled', [accordion]);
57
- accordion.triggerHandler('toggled', [target]);
58
- });
59
- },
60
-
61
- off : function () {},
62
-
63
- reflow : function () {}
64
- };
65
- }(jQuery, window, window.document));
@@ -1,43 +0,0 @@
1
- ;(function ($, window, document, undefined) {
2
- 'use strict';
3
-
4
- Foundation.libs.alert = {
5
- name : 'alert',
6
-
7
- version : '5.4.6',
8
-
9
- settings : {
10
- callback: function (){}
11
- },
12
-
13
- init : function (scope, method, options) {
14
- this.bindings(method, options);
15
- },
16
-
17
- events : function () {
18
- var self = this,
19
- S = this.S;
20
-
21
- $(this.scope).off('.alert').on('click.fndtn.alert', '[' + this.attr_name() + '] .close', function (e) {
22
- var alertBox = S(this).closest('[' + self.attr_name() + ']'),
23
- settings = alertBox.data(self.attr_name(true) + '-init') || self.settings;
24
-
25
- e.preventDefault();
26
- if (Modernizr.csstransitions) {
27
- alertBox.addClass("alert-close");
28
- alertBox.on('transitionend webkitTransitionEnd oTransitionEnd', function(e) {
29
- S(this).trigger('close').trigger('close.fndtn.alert').remove();
30
- settings.callback();
31
- });
32
- } else {
33
- alertBox.fadeOut(300, function () {
34
- S(this).trigger('close').trigger('close.fndtn.alert').remove();
35
- settings.callback();
36
- });
37
- }
38
- });
39
- },
40
-
41
- reflow : function () {}
42
- };
43
- }(jQuery, window, window.document));