moovui 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. checksums.yaml +15 -0
  2. data/.gitignore +2 -0
  3. data/Gemfile +4 -0
  4. data/Gemfile.lock +17 -0
  5. data/LICENSE.txt +22 -0
  6. data/README.md +1 -0
  7. data/Rakefile +1 -0
  8. data/bourbon/_bourbon-deprecated-upcoming.scss +13 -0
  9. data/bourbon/_bourbon.scss +59 -0
  10. data/bourbon/addons/_button.scss +273 -0
  11. data/bourbon/addons/_clearfix.scss +29 -0
  12. data/bourbon/addons/_font-family.scss +5 -0
  13. data/bourbon/addons/_hide-text.scss +5 -0
  14. data/bourbon/addons/_html5-input-types.scss +56 -0
  15. data/bourbon/addons/_position.scss +42 -0
  16. data/bourbon/addons/_prefixer.scss +49 -0
  17. data/bourbon/addons/_retina-image.scss +32 -0
  18. data/bourbon/addons/_size.scss +44 -0
  19. data/bourbon/addons/_timing-functions.scss +32 -0
  20. data/bourbon/addons/_triangle.scss +45 -0
  21. data/bourbon/css3/_animation.scss +52 -0
  22. data/bourbon/css3/_appearance.scss +3 -0
  23. data/bourbon/css3/_backface-visibility.scss +6 -0
  24. data/bourbon/css3/_background-image.scss +48 -0
  25. data/bourbon/css3/_background.scss +103 -0
  26. data/bourbon/css3/_border-image.scss +55 -0
  27. data/bourbon/css3/_border-radius.scss +22 -0
  28. data/bourbon/css3/_box-sizing.scss +4 -0
  29. data/bourbon/css3/_columns.scss +47 -0
  30. data/bourbon/css3/_flex-box.scss +52 -0
  31. data/bourbon/css3/_font-face.scss +23 -0
  32. data/bourbon/css3/_hidpi-media-query.scss +10 -0
  33. data/bourbon/css3/_image-rendering.scss +13 -0
  34. data/bourbon/css3/_inline-block.scss +8 -0
  35. data/bourbon/css3/_keyframes.scss +43 -0
  36. data/bourbon/css3/_linear-gradient.scss +41 -0
  37. data/bourbon/css3/_perspective.scss +8 -0
  38. data/bourbon/css3/_placeholder.scss +29 -0
  39. data/bourbon/css3/_radial-gradient.scss +44 -0
  40. data/bourbon/css3/_transform.scss +15 -0
  41. data/bourbon/css3/_transition.scss +34 -0
  42. data/bourbon/css3/_user-select.scss +3 -0
  43. data/bourbon/functions/_compact.scss +11 -0
  44. data/bourbon/functions/_flex-grid.scss +39 -0
  45. data/bourbon/functions/_grid-width.scss +13 -0
  46. data/bourbon/functions/_linear-gradient.scss +13 -0
  47. data/bourbon/functions/_modular-scale.scss +40 -0
  48. data/bourbon/functions/_px-to-em.scss +8 -0
  49. data/bourbon/functions/_radial-gradient.scss +23 -0
  50. data/bourbon/functions/_tint-shade.scss +9 -0
  51. data/bourbon/functions/_transition-property-name.scss +22 -0
  52. data/bourbon/helpers/_deprecated-webkit-gradient.scss +39 -0
  53. data/bourbon/helpers/_gradient-positions-parser.scss +13 -0
  54. data/bourbon/helpers/_linear-positions-parser.scss +61 -0
  55. data/bourbon/helpers/_radial-arg-parser.scss +69 -0
  56. data/bourbon/helpers/_radial-positions-parser.scss +18 -0
  57. data/bourbon/helpers/_render-gradients.scss +26 -0
  58. data/bourbon/helpers/_shape-size-stripper.scss +10 -0
  59. data/chosen.jquery.js +1166 -0
  60. data/custom.modernizr.js +4 -0
  61. data/fonts/TSTARPRO-BoldWeb.eot +0 -0
  62. data/fonts/TSTARPRO-BoldWeb.woff +0 -0
  63. data/fonts/entypo.eot +0 -0
  64. data/fonts/entypo.svg +235 -0
  65. data/fonts/entypo.ttf +0 -0
  66. data/fonts/entypo.woff +0 -0
  67. data/foundation.alerts.js +52 -0
  68. data/foundation.dropdown.js +177 -0
  69. data/foundation.js +440 -0
  70. data/foundation.reveal.js +330 -0
  71. data/foundation.section.js +400 -0
  72. data/foundation.tooltips.custom.js +222 -0
  73. data/globals/_base.scss +41 -0
  74. data/globals/_entypo.scss +711 -0
  75. data/globals/_footer.scss +29 -0
  76. data/globals/_header.scss +64 -0
  77. data/globals/_mixins.scss +69 -0
  78. data/globals/_normalize.scss +405 -0
  79. data/globals/_vars.scss +67 -0
  80. data/index.html +1254 -0
  81. data/lib/moovui/version.rb +3 -0
  82. data/lib/moovui.rb +4 -0
  83. data/modules/_accordion.scss +51 -0
  84. data/modules/_btn.scss +130 -0
  85. data/modules/_btnbar.scss +56 -0
  86. data/modules/_code.scss +55 -0
  87. data/modules/_copy.scss +99 -0
  88. data/modules/_definition.scss +34 -0
  89. data/modules/_docs.scss +127 -0
  90. data/modules/_dropdown.scss +32 -0
  91. data/modules/_flex.scss +300 -0
  92. data/modules/_grid.scss +72 -0
  93. data/modules/_input.scss +59 -0
  94. data/modules/_label.scss +6 -0
  95. data/modules/_list.scss +57 -0
  96. data/modules/_media.scss +17 -0
  97. data/modules/_modal.scss +71 -0
  98. data/modules/_notice.scss +111 -0
  99. data/modules/_pane.scss +25 -0
  100. data/modules/_resp.scss +71 -0
  101. data/modules/_select.scss +94 -0
  102. data/modules/_sidebar.scss +117 -0
  103. data/modules/_syntax-highlighter.scss +100 -0
  104. data/modules/_table.scss +63 -0
  105. data/modules/_tooltip.scss +59 -0
  106. data/moovui.gemspec +21 -0
  107. data/moovui.scss +43 -0
  108. data/shBrushBash.js +59 -0
  109. data/shBrushJScript.js +52 -0
  110. data/shBrushNull.js +35 -0
  111. data/shBrushSass.js +90 -0
  112. data/shBrushTritium.js +46 -0
  113. data/shBrushXml.js +69 -0
  114. data/shCore.custom.js +2399 -0
  115. data/shInit.js +14 -0
  116. metadata +187 -0
@@ -0,0 +1,330 @@
1
+ /*jslint unparam: true, browser: true, indent: 2 */
2
+
3
+ ;(function ($, window, document, undefined) {
4
+ 'use strict';
5
+
6
+ Foundation.libs.reveal = {
7
+ name : 'reveal',
8
+
9
+ version : '4.2.2',
10
+
11
+ locked : false,
12
+
13
+ settings : {
14
+ animation: 'fadeAndPop',
15
+ animationSpeed: 250,
16
+ closeOnBackgroundClick: true,
17
+ closeOnEsc: true,
18
+ dismissModalClass: 'close-reveal-modal',
19
+ bgClass: 'reveal-modal-bg',
20
+ open: function(){},
21
+ opened: function(){},
22
+ close: function(){},
23
+ closed: function(){},
24
+ bg : $('.reveal-modal-bg'),
25
+ css : {
26
+ open : {
27
+ 'opacity': 0,
28
+ 'visibility': 'visible',
29
+ 'display' : 'block'
30
+ },
31
+ close : {
32
+ 'opacity': 1,
33
+ 'visibility': 'hidden',
34
+ 'display': 'none'
35
+ }
36
+ }
37
+ },
38
+
39
+ init : function (scope, method, options) {
40
+ Foundation.inherit(this, 'data_options delay');
41
+
42
+ if (typeof method === 'object') {
43
+ $.extend(true, this.settings, method);
44
+ } else if (typeof options !== 'undefined') {
45
+ $.extend(true, this.settings, options);
46
+ }
47
+
48
+ if (typeof method !== 'string') {
49
+ this.events();
50
+
51
+ return this.settings.init;
52
+ } else {
53
+ return this[method].call(this, options);
54
+ }
55
+ },
56
+
57
+ events : function () {
58
+ var self = this;
59
+
60
+ $(this.scope)
61
+ .off('.fndtn.reveal')
62
+ .on('click.fndtn.reveal', '[data-reveal-id]', function (e) {
63
+ e.preventDefault();
64
+
65
+ if (!self.locked) {
66
+ var element = $(this),
67
+ ajax = element.data('reveal-ajax');
68
+
69
+ self.locked = true;
70
+
71
+ if (typeof ajax === 'undefined') {
72
+ self.open.call(self, element);
73
+ } else {
74
+ var url = ajax === true ? element.attr('href') : ajax;
75
+
76
+ self.open.call(self, element, {url: url});
77
+ }
78
+ }
79
+ })
80
+ .on('click.fndtn.reveal', this.close_targets(), function (e) {
81
+ e.preventDefault();
82
+ if (!self.locked) {
83
+ var settings = $.extend({}, self.settings, self.data_options($('.reveal-modal.open')));
84
+ if ($(e.target)[0] === $('.' + settings.bgClass)[0] && !settings.closeOnBackgroundClick) {
85
+ return;
86
+ }
87
+
88
+ self.locked = true;
89
+ self.close.call(self, $(this).closest('.reveal-modal'));
90
+ }
91
+ })
92
+ .on('open.fndtn.reveal', '.reveal-modal', this.settings.open)
93
+ .on('opened.fndtn.reveal', '.reveal-modal', this.settings.opened)
94
+ .on('opened.fndtn.reveal', '.reveal-modal', this.open_video)
95
+ .on('close.fndtn.reveal', '.reveal-modal', this.settings.close)
96
+ .on('closed.fndtn.reveal', '.reveal-modal', this.settings.closed)
97
+ .on('closed.fndtn.reveal', '.reveal-modal', this.close_video);
98
+
99
+ $( 'body' ).bind( 'keyup.reveal', function ( event ) {
100
+ var open_modal = $('.reveal-modal.open'),
101
+ settings = $.extend({}, self.settings, self.data_options(open_modal));
102
+ if ( event.which === 27 && settings.closeOnEsc) { // 27 is the keycode for the Escape key
103
+ open_modal.foundation('reveal', 'close');
104
+ }
105
+ });
106
+
107
+ return true;
108
+ },
109
+
110
+ open : function (target, ajax_settings) {
111
+ if (target) {
112
+ if (typeof target.selector !== 'undefined') {
113
+ var modal = $('#' + target.data('reveal-id'));
114
+ } else {
115
+ var modal = $(this.scope);
116
+
117
+ ajax_settings = target;
118
+ }
119
+ } else {
120
+ var modal = $(this.scope);
121
+ }
122
+
123
+ if (!modal.hasClass('open')) {
124
+ var open_modal = $('.reveal-modal.open');
125
+
126
+ if (typeof modal.data('css-top') === 'undefined') {
127
+ modal.data('css-top', parseInt(modal.css('top'), 10))
128
+ .data('offset', this.cache_offset(modal));
129
+ }
130
+
131
+ modal.trigger('open');
132
+
133
+ if (open_modal.length < 1) {
134
+ this.toggle_bg(modal);
135
+ }
136
+
137
+ if (typeof ajax_settings === 'undefined' || !ajax_settings.url) {
138
+ this.hide(open_modal, this.settings.css.close);
139
+ this.show(modal, this.settings.css.open);
140
+ } else {
141
+ var self = this,
142
+ old_success = typeof ajax_settings.success !== 'undefined' ? ajax_settings.success : null;
143
+
144
+ $.extend(ajax_settings, {
145
+ success: function (data, textStatus, jqXHR) {
146
+ if ( $.isFunction(old_success) ) {
147
+ old_success(data, textStatus, jqXHR);
148
+ }
149
+
150
+ modal.html(data);
151
+ $(modal).foundation('section', 'reflow');
152
+
153
+ self.hide(open_modal, self.settings.css.close);
154
+ self.show(modal, self.settings.css.open);
155
+ }
156
+ });
157
+
158
+ $.ajax(ajax_settings);
159
+ }
160
+ }
161
+ },
162
+
163
+ close : function (modal) {
164
+
165
+ var modal = modal && modal.length ? modal : $(this.scope),
166
+ open_modals = $('.reveal-modal.open');
167
+
168
+ if (open_modals.length > 0) {
169
+ this.locked = true;
170
+ modal.trigger('close');
171
+ this.toggle_bg(modal);
172
+ this.hide(open_modals, this.settings.css.close);
173
+ }
174
+ },
175
+
176
+ close_targets : function () {
177
+ var base = '.' + this.settings.dismissModalClass;
178
+
179
+ if (this.settings.closeOnBackgroundClick) {
180
+ return base + ', .' + this.settings.bgClass;
181
+ }
182
+
183
+ return base;
184
+ },
185
+
186
+ toggle_bg : function (modal) {
187
+ if ($('.reveal-modal-bg').length === 0) {
188
+ this.settings.bg = $('<div />', {'class': this.settings.bgClass})
189
+ .appendTo('body');
190
+ }
191
+
192
+ if (this.settings.bg.filter(':visible').length > 0) {
193
+ this.hide(this.settings.bg);
194
+ } else {
195
+ this.show(this.settings.bg);
196
+ }
197
+ },
198
+
199
+ show : function (el, css) {
200
+ // is modal
201
+ if (css) {
202
+ if (/pop/i.test(this.settings.animation)) {
203
+ css.top = $(window).scrollTop() - el.data('offset') + 'px';
204
+ var end_css = {
205
+ top: $(window).scrollTop() + el.data('css-top') + 'px',
206
+ opacity: 1
207
+ };
208
+
209
+ return this.delay(function () {
210
+ return el
211
+ .css(css)
212
+ .animate(end_css, this.settings.animationSpeed, 'linear', function () {
213
+ this.locked = false;
214
+ el.trigger('opened');
215
+ }.bind(this))
216
+ .addClass('open');
217
+ }.bind(this), this.settings.animationSpeed / 2);
218
+ }
219
+
220
+ if (/fade/i.test(this.settings.animation)) {
221
+ var end_css = {opacity: 1};
222
+
223
+ return this.delay(function () {
224
+ return el
225
+ .css(css)
226
+ .animate(end_css, this.settings.animationSpeed, 'linear', function () {
227
+ this.locked = false;
228
+ el.trigger('opened');
229
+ }.bind(this))
230
+ .addClass('open');
231
+ }.bind(this), this.settings.animationSpeed / 2);
232
+ }
233
+
234
+ return el.css(css).show().css({opacity: 1}).addClass('open').trigger('opened');
235
+ }
236
+
237
+ // should we animate the background?
238
+ if (/fade/i.test(this.settings.animation)) {
239
+ return el.fadeIn(this.settings.animationSpeed / 2);
240
+ }
241
+
242
+ return el.show();
243
+ },
244
+
245
+ hide : function (el, css) {
246
+ // is modal
247
+ if (css) {
248
+ if (/pop/i.test(this.settings.animation)) {
249
+ var end_css = {
250
+ top: - $(window).scrollTop() - el.data('offset') + 'px',
251
+ opacity: 0
252
+ };
253
+
254
+ return this.delay(function () {
255
+ return el
256
+ .animate(end_css, this.settings.animationSpeed, 'linear', function () {
257
+ this.locked = false;
258
+ el.css(css).trigger('closed');
259
+ }.bind(this))
260
+ .removeClass('open');
261
+ }.bind(this), this.settings.animationSpeed / 2);
262
+ }
263
+
264
+ if (/fade/i.test(this.settings.animation)) {
265
+ var end_css = {opacity: 0};
266
+
267
+ return this.delay(function () {
268
+ return el
269
+ .animate(end_css, this.settings.animationSpeed, 'linear', function () {
270
+ this.locked = false;
271
+ el.css(css).trigger('closed');
272
+ }.bind(this))
273
+ .removeClass('open');
274
+ }.bind(this), this.settings.animationSpeed / 2);
275
+ }
276
+
277
+ return el.hide().css(css).removeClass('open').trigger('closed');
278
+ }
279
+
280
+ // should we animate the background?
281
+ if (/fade/i.test(this.settings.animation)) {
282
+ return el.fadeOut(this.settings.animationSpeed / 2);
283
+ }
284
+
285
+ return el.hide();
286
+ },
287
+
288
+ close_video : function (e) {
289
+ var video = $(this).find('.flex-video'),
290
+ iframe = video.find('iframe');
291
+
292
+ if (iframe.length > 0) {
293
+ iframe.attr('data-src', iframe[0].src);
294
+ iframe.attr('src', 'about:blank');
295
+ video.hide();
296
+ }
297
+ },
298
+
299
+ open_video : function (e) {
300
+ var video = $(this).find('.flex-video'),
301
+ iframe = video.find('iframe');
302
+
303
+ if (iframe.length > 0) {
304
+ var data_src = iframe.attr('data-src');
305
+ if (typeof data_src === 'string') {
306
+ iframe[0].src = iframe.attr('data-src');
307
+ } else {
308
+ var src = iframe[0].src;
309
+ iframe[0].src = undefined;
310
+ iframe[0].src = src;
311
+ }
312
+ video.show();
313
+ }
314
+ },
315
+
316
+ cache_offset : function (modal) {
317
+ var offset = modal.show().height() + parseInt(modal.css('top'), 10);
318
+
319
+ modal.hide();
320
+
321
+ return offset;
322
+ },
323
+
324
+ off : function () {
325
+ $(this.scope).off('.fndtn.reveal');
326
+ },
327
+
328
+ reflow : function () {}
329
+ };
330
+ }(Foundation.zj, this, this.document));