opsask 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +14 -0
  3. data/.yardoc/checksums +4 -0
  4. data/.yardoc/object_types +0 -0
  5. data/.yardoc/objects/root.dat +0 -0
  6. data/.yardoc/proxy_types +0 -0
  7. data/Gemfile +15 -0
  8. data/Gemfile.lock +75 -0
  9. data/LICENSE +13 -0
  10. data/Rakefile +30 -0
  11. data/Readme.md +3 -0
  12. data/VERSION +1 -0
  13. data/bin/opsask +4 -0
  14. data/lib/opsask/app.rb +540 -0
  15. data/lib/opsask/main.rb +54 -0
  16. data/lib/opsask/metadata.rb +29 -0
  17. data/lib/opsask.rb +3 -0
  18. data/opsask.gemspec +29 -0
  19. data/public/css/foundation.css +5068 -0
  20. data/public/css/foundation.min.css +1 -0
  21. data/public/css/normalize.css +410 -0
  22. data/public/css/style.css +152 -0
  23. data/public/favicon.ico +0 -0
  24. data/public/fonts/DINMittelschriftStd.woff +0 -0
  25. data/public/img/.gitkeep +1 -0
  26. data/public/js/foundation/foundation.abide.js +256 -0
  27. data/public/js/foundation/foundation.accordion.js +49 -0
  28. data/public/js/foundation/foundation.alert.js +37 -0
  29. data/public/js/foundation/foundation.clearing.js +485 -0
  30. data/public/js/foundation/foundation.dropdown.js +208 -0
  31. data/public/js/foundation/foundation.equalizer.js +64 -0
  32. data/public/js/foundation/foundation.interchange.js +326 -0
  33. data/public/js/foundation/foundation.joyride.js +848 -0
  34. data/public/js/foundation/foundation.js +587 -0
  35. data/public/js/foundation/foundation.magellan.js +171 -0
  36. data/public/js/foundation/foundation.offcanvas.js +39 -0
  37. data/public/js/foundation/foundation.orbit.js +464 -0
  38. data/public/js/foundation/foundation.reveal.js +399 -0
  39. data/public/js/foundation/foundation.tab.js +58 -0
  40. data/public/js/foundation/foundation.tooltip.js +215 -0
  41. data/public/js/foundation/foundation.topbar.js +387 -0
  42. data/public/js/foundation/jquery.cookie.js +8 -0
  43. data/public/js/foundation.min.js +10 -0
  44. data/public/js/opsask.js +19 -0
  45. data/public/js/vendor/fastclick.js +9 -0
  46. data/public/js/vendor/jquery.cookie.js +8 -0
  47. data/public/js/vendor/jquery.js +26 -0
  48. data/public/js/vendor/modernizr.js +8 -0
  49. data/public/js/vendor/placeholder.js +2 -0
  50. data/tasks/generate-email-summary.rb +73 -0
  51. data/tasks/send-email-summary.sh +13 -0
  52. data/views/_components.erb +6 -0
  53. data/views/_count.erb +11 -0
  54. data/views/_flash.erb +3 -0
  55. data/views/_form.erb +37 -0
  56. data/views/_queue.erb +16 -0
  57. data/views/agile.erb +6 -0
  58. data/views/glance.erb +19 -0
  59. data/views/index.erb +27 -0
  60. data/views/layout.erb +43 -0
  61. data/views/stragglers.erb +6 -0
  62. data/views/untracked.erb +6 -0
  63. metadata +217 -0
@@ -0,0 +1,171 @@
1
+ ;(function ($, window, document, undefined) {
2
+ 'use strict';
3
+
4
+ Foundation.libs['magellan-expedition'] = {
5
+ name : 'magellan-expedition',
6
+
7
+ version : '5.1.1',
8
+
9
+ settings : {
10
+ active_class: 'active',
11
+ threshold: 0, // pixels from the top of the expedition for it to become fixes
12
+ destination_threshold: 20, // pixels from the top of destination for it to be considered active
13
+ throttle_delay: 30 // calculation throttling to increase framerate
14
+ },
15
+
16
+ init : function (scope, method, options) {
17
+ Foundation.inherit(this, 'throttle');
18
+ this.bindings(method, options);
19
+ },
20
+
21
+ events : function () {
22
+ var self = this,
23
+ S = self.S,
24
+ settings = self.settings;
25
+
26
+ // initialize expedition offset
27
+ self.set_expedition_position();
28
+
29
+
30
+ S(self.scope)
31
+ .off('.magellan')
32
+ .on('click.fndtn.magellan', '[' + self.add_namespace('data-magellan-arrival') + '] a[href^="#"]', function (e) {
33
+ e.preventDefault();
34
+ var expedition = $(this).closest('[' + self.attr_name() + ']'),
35
+ settings = expedition.data('magellan-expedition-init');
36
+
37
+ var hash = this.hash.split('#').join(''),
38
+ target = $('a[name='+hash+']');
39
+ if (target.length === 0) target = $('#'+hash);
40
+
41
+ // Account for expedition height if fixed position
42
+ var scroll_top = target.offset().top;
43
+ if (expedition.css('position') === 'fixed') {
44
+ scroll_top = scroll_top - expedition.outerHeight();
45
+ }
46
+
47
+ $('html, body').stop().animate({
48
+ 'scrollTop': scroll_top
49
+ }, 700, 'swing', function () {
50
+ window.location.hash = '#'+hash;
51
+ });
52
+ })
53
+ .on('scroll.fndtn.magellan', self.throttle(this.check_for_arrivals.bind(this), settings.throttle_delay))
54
+ .on('resize.fndtn.magellan', self.throttle(this.set_expedition_position.bind(this), settings.throttle_delay));
55
+ },
56
+
57
+ check_for_arrivals : function() {
58
+ var self = this;
59
+ self.update_arrivals();
60
+ self.update_expedition_positions();
61
+ },
62
+
63
+ set_expedition_position : function() {
64
+ var self = this;
65
+ $('[' + this.attr_name() + '=fixed]', self.scope).each(function(idx, el) {
66
+ var expedition = $(this),
67
+ styles = expedition.attr('styles'), // save styles
68
+ top_offset;
69
+
70
+ expedition.attr('style', '');
71
+ top_offset = expedition.offset().top;
72
+
73
+ expedition.data(self.data_attr('magellan-top-offset'), top_offset);
74
+ expedition.attr('style', styles);
75
+ });
76
+ },
77
+
78
+ update_expedition_positions : function() {
79
+ var self = this,
80
+ window_top_offset = $(window).scrollTop();
81
+
82
+ $('[' + this.attr_name() + '=fixed]', self.scope).each(function() {
83
+ var expedition = $(this),
84
+ top_offset = expedition.data('magellan-top-offset');
85
+
86
+ if (window_top_offset >= top_offset) {
87
+ // Placeholder allows height calculations to be consistent even when
88
+ // appearing to switch between fixed/non-fixed placement
89
+ var placeholder = expedition.prev('[' + self.add_namespace('data-magellan-expedition-clone') + ']');
90
+ if (placeholder.length === 0) {
91
+ placeholder = expedition.clone();
92
+ placeholder.removeAttr(self.attr_name());
93
+ placeholder.attr(self.add_namespace('data-magellan-expedition-clone'),'');
94
+ expedition.before(placeholder);
95
+ }
96
+ expedition.css({position:'fixed', top: 0});
97
+ } else {
98
+ expedition.prev('[' + self.add_namespace('data-magellan-expedition-clone') + ']').remove();
99
+ expedition.attr('style','');
100
+ }
101
+ });
102
+ },
103
+
104
+ update_arrivals : function() {
105
+ var self = this,
106
+ window_top_offset = $(window).scrollTop();
107
+
108
+ $('[' + this.attr_name() + ']', self.scope).each(function() {
109
+ var expedition = $(this),
110
+ settings = settings = expedition.data(self.attr_name(true) + '-init'),
111
+ offsets = self.offsets(expedition, window_top_offset),
112
+ arrivals = expedition.find('[' + self.add_namespace('data-magellan-arrival') + ']'),
113
+ active_item = false;
114
+ offsets.each(function(idx, item) {
115
+ if (item.viewport_offset >= item.top_offset) {
116
+ var arrivals = expedition.find('[' + self.add_namespace('data-magellan-arrival') + ']');
117
+ arrivals.not(item.arrival).removeClass(settings.active_class);
118
+ item.arrival.addClass(settings.active_class);
119
+ active_item = true;
120
+ return true;
121
+ }
122
+ });
123
+
124
+ if (!active_item) arrivals.removeClass(settings.active_class);
125
+ });
126
+ },
127
+
128
+ offsets : function(expedition, window_offset) {
129
+ var self = this,
130
+ settings = expedition.data(self.attr_name(true) + '-init'),
131
+ viewport_offset = (window_offset + settings.destination_threshold);
132
+
133
+ return expedition.find('[' + self.add_namespace('data-magellan-arrival') + ']').map(function(idx, el) {
134
+ var name = $(this).data(self.data_attr('magellan-arrival')),
135
+ dest = $('[' + self.add_namespace('data-magellan-destination') + '=' + name + ']');
136
+ if (dest.length > 0) {
137
+ var top_offset = dest.offset().top;
138
+ return {
139
+ destination : dest,
140
+ arrival : $(this),
141
+ top_offset : top_offset,
142
+ viewport_offset : viewport_offset
143
+ }
144
+ }
145
+ }).sort(function(a, b) {
146
+ if (a.top_offset < b.top_offset) return -1;
147
+ if (a.top_offset > b.top_offset) return 1;
148
+ return 0;
149
+ });
150
+ },
151
+
152
+ data_attr: function (str) {
153
+ if (this.namespace.length > 0) {
154
+ return this.namespace + '-' + str;
155
+ }
156
+
157
+ return str;
158
+ },
159
+
160
+ off : function () {
161
+ this.S(this.scope).off('.magellan');
162
+ this.S(window).off('.magellan');
163
+ },
164
+
165
+ reflow : function () {
166
+ var self = this;
167
+ // remove placeholder expeditions used for height calculation purposes
168
+ $('[' + self.add_namespace('data-magellan-expedition-clone') + ']', self.scope).remove();
169
+ }
170
+ };
171
+ }(jQuery, this, this.document));
@@ -0,0 +1,39 @@
1
+ ;(function ($, window, document, undefined) {
2
+ 'use strict';
3
+
4
+ Foundation.libs.offcanvas = {
5
+ name : 'offcanvas',
6
+
7
+ version : '5.1.1',
8
+
9
+ settings : {},
10
+
11
+ init : function (scope, method, options) {
12
+ this.events();
13
+ },
14
+
15
+ events : function () {
16
+ var S = this.S;
17
+
18
+ S(this.scope).off('.offcanvas')
19
+ .on('click.fndtn.offcanvas', '.left-off-canvas-toggle', function (e) {
20
+ e.preventDefault();
21
+ S(this).closest('.off-canvas-wrap').toggleClass('move-right');
22
+ })
23
+ .on('click.fndtn.offcanvas', '.exit-off-canvas', function (e) {
24
+ e.preventDefault();
25
+ S(".off-canvas-wrap").removeClass("move-right");
26
+ })
27
+ .on('click.fndtn.offcanvas', '.right-off-canvas-toggle', function (e) {
28
+ e.preventDefault();
29
+ S(this).closest(".off-canvas-wrap").toggleClass("move-left");
30
+ })
31
+ .on('click.fndtn.offcanvas', '.exit-off-canvas', function (e) {
32
+ e.preventDefault();
33
+ S(".off-canvas-wrap").removeClass("move-left");
34
+ });
35
+ },
36
+
37
+ reflow : function () {}
38
+ };
39
+ }(jQuery, this, this.document));
@@ -0,0 +1,464 @@
1
+ ;(function ($, window, document, undefined) {
2
+ 'use strict';
3
+
4
+ var noop = function() {};
5
+
6
+ var Orbit = function(el, settings) {
7
+ // Don't reinitialize plugin
8
+ if (el.hasClass(settings.slides_container_class)) {
9
+ return this;
10
+ }
11
+
12
+ var self = this,
13
+ container,
14
+ slides_container = el,
15
+ number_container,
16
+ bullets_container,
17
+ timer_container,
18
+ idx = 0,
19
+ animate,
20
+ timer,
21
+ locked = false,
22
+ adjust_height_after = false;
23
+
24
+
25
+ self.slides = function() {
26
+ return slides_container.children(settings.slide_selector);
27
+ };
28
+
29
+ self.slides().first().addClass(settings.active_slide_class);
30
+
31
+ self.update_slide_number = function(index) {
32
+ if (settings.slide_number) {
33
+ number_container.find('span:first').text(parseInt(index)+1);
34
+ number_container.find('span:last').text(self.slides().length);
35
+ }
36
+ if (settings.bullets) {
37
+ bullets_container.children().removeClass(settings.bullets_active_class);
38
+ $(bullets_container.children().get(index)).addClass(settings.bullets_active_class);
39
+ }
40
+ };
41
+
42
+ self.update_active_link = function(index) {
43
+ var link = $('a[data-orbit-link="'+self.slides().eq(index).attr('data-orbit-slide')+'"]');
44
+ link.siblings().removeClass(settings.bullets_active_class);
45
+ link.addClass(settings.bullets_active_class);
46
+ };
47
+
48
+ self.build_markup = function() {
49
+ slides_container.wrap('<div class="'+settings.container_class+'"></div>');
50
+ container = slides_container.parent();
51
+ slides_container.addClass(settings.slides_container_class);
52
+
53
+ if (settings.navigation_arrows) {
54
+ container.append($('<a href="#"><span></span></a>').addClass(settings.prev_class));
55
+ container.append($('<a href="#"><span></span></a>').addClass(settings.next_class));
56
+ }
57
+
58
+ if (settings.timer) {
59
+ timer_container = $('<div>').addClass(settings.timer_container_class);
60
+ timer_container.append('<span>');
61
+ timer_container.append($('<div>').addClass(settings.timer_progress_class));
62
+ timer_container.addClass(settings.timer_paused_class);
63
+ container.append(timer_container);
64
+ }
65
+
66
+ if (settings.slide_number) {
67
+ number_container = $('<div>').addClass(settings.slide_number_class);
68
+ number_container.append('<span></span> ' + settings.slide_number_text + ' <span></span>');
69
+ container.append(number_container);
70
+ }
71
+
72
+ if (settings.bullets) {
73
+ bullets_container = $('<ol>').addClass(settings.bullets_container_class);
74
+ container.append(bullets_container);
75
+ bullets_container.wrap('<div class="orbit-bullets-container"></div>');
76
+ self.slides().each(function(idx, el) {
77
+ var bullet = $('<li>').attr('data-orbit-slide', idx);
78
+ bullets_container.append(bullet);
79
+ });
80
+ }
81
+
82
+ if (settings.stack_on_small) {
83
+ container.addClass(settings.stack_on_small_class);
84
+ }
85
+ };
86
+
87
+ self._goto = function(next_idx, start_timer) {
88
+ // if (locked) {return false;}
89
+ if (next_idx === idx) {return false;}
90
+ if (typeof timer === 'object') {timer.restart();}
91
+ var slides = self.slides();
92
+
93
+ var dir = 'next';
94
+ locked = true;
95
+ if (next_idx < idx) {dir = 'prev';}
96
+ if (next_idx >= slides.length) {
97
+ if (!settings.circular) return false;
98
+ next_idx = 0;
99
+ } else if (next_idx < 0) {
100
+ if (!settings.circular) return false;
101
+ next_idx = slides.length - 1;
102
+ }
103
+
104
+ var current = $(slides.get(idx));
105
+ var next = $(slides.get(next_idx));
106
+
107
+ current.css('zIndex', 2);
108
+ current.removeClass(settings.active_slide_class);
109
+ next.css('zIndex', 4).addClass(settings.active_slide_class);
110
+
111
+ slides_container.trigger('before-slide-change.fndtn.orbit');
112
+ settings.before_slide_change();
113
+ self.update_active_link(next_idx);
114
+
115
+ var callback = function() {
116
+ var unlock = function() {
117
+ idx = next_idx;
118
+ locked = false;
119
+ if (start_timer === true) {timer = self.create_timer(); timer.start();}
120
+ self.update_slide_number(idx);
121
+ slides_container.trigger('after-slide-change.fndtn.orbit',[{slide_number: idx, total_slides: slides.length}]);
122
+ settings.after_slide_change(idx, slides.length);
123
+ };
124
+ if (slides_container.height() != next.height() && settings.variable_height) {
125
+ slides_container.animate({'height': next.height()}, 250, 'linear', unlock);
126
+ } else {
127
+ unlock();
128
+ }
129
+ };
130
+
131
+ if (slides.length === 1) {callback(); return false;}
132
+
133
+ var start_animation = function() {
134
+ if (dir === 'next') {animate.next(current, next, callback);}
135
+ if (dir === 'prev') {animate.prev(current, next, callback);}
136
+ };
137
+
138
+ if (next.height() > slides_container.height() && settings.variable_height) {
139
+ slides_container.animate({'height': next.height()}, 250, 'linear', start_animation);
140
+ } else {
141
+ start_animation();
142
+ }
143
+ };
144
+
145
+ self.next = function(e) {
146
+ e.stopImmediatePropagation();
147
+ e.preventDefault();
148
+ self._goto(idx + 1);
149
+ };
150
+
151
+ self.prev = function(e) {
152
+ e.stopImmediatePropagation();
153
+ e.preventDefault();
154
+ self._goto(idx - 1);
155
+ };
156
+
157
+ self.link_custom = function(e) {
158
+ e.preventDefault();
159
+ var link = $(this).attr('data-orbit-link');
160
+ if ((typeof link === 'string') && (link = $.trim(link)) != "") {
161
+ var slide = container.find('[data-orbit-slide='+link+']');
162
+ if (slide.index() != -1) {self._goto(slide.index());}
163
+ }
164
+ };
165
+
166
+ self.link_bullet = function(e) {
167
+ var index = $(this).attr('data-orbit-slide');
168
+ if ((typeof index === 'string') && (index = $.trim(index)) != "") {
169
+ if(isNaN(parseInt(index)))
170
+ {
171
+ var slide = container.find('[data-orbit-slide='+index+']');
172
+ if (slide.index() != -1) {self._goto(slide.index() + 1);}
173
+ }
174
+ else
175
+ {
176
+ self._goto(parseInt(index));
177
+ }
178
+ }
179
+
180
+ }
181
+
182
+ self.timer_callback = function() {
183
+ self._goto(idx + 1, true);
184
+ }
185
+
186
+ self.compute_dimensions = function() {
187
+ var current = $(self.slides().get(idx));
188
+ var h = current.height();
189
+ if (!settings.variable_height) {
190
+ self.slides().each(function(){
191
+ if ($(this).height() > h) { h = $(this).height(); }
192
+ });
193
+ }
194
+ slides_container.height(h);
195
+ };
196
+
197
+ self.create_timer = function() {
198
+ var t = new Timer(
199
+ container.find('.'+settings.timer_container_class),
200
+ settings,
201
+ self.timer_callback
202
+ );
203
+ return t;
204
+ };
205
+
206
+ self.stop_timer = function() {
207
+ if (typeof timer === 'object') timer.stop();
208
+ };
209
+
210
+ self.toggle_timer = function() {
211
+ var t = container.find('.'+settings.timer_container_class);
212
+ if (t.hasClass(settings.timer_paused_class)) {
213
+ if (typeof timer === 'undefined') {timer = self.create_timer();}
214
+ timer.start();
215
+ }
216
+ else {
217
+ if (typeof timer === 'object') {timer.stop();}
218
+ }
219
+ };
220
+
221
+ self.init = function() {
222
+ self.build_markup();
223
+ if (settings.timer) {
224
+ timer = self.create_timer();
225
+ Foundation.utils.image_loaded(this.slides().children('img'), timer.start);
226
+ }
227
+ animate = new FadeAnimation(settings, slides_container);
228
+ if (settings.animation === 'slide')
229
+ animate = new SlideAnimation(settings, slides_container);
230
+ container.on('click', '.'+settings.next_class, self.next);
231
+ container.on('click', '.'+settings.prev_class, self.prev);
232
+ container.on('click', '[data-orbit-slide]', self.link_bullet);
233
+ container.on('click', self.toggle_timer);
234
+ if (settings.swipe) {
235
+ container.on('touchstart.fndtn.orbit', function(e) {
236
+ if (!e.touches) {e = e.originalEvent;}
237
+ var data = {
238
+ start_page_x: e.touches[0].pageX,
239
+ start_page_y: e.touches[0].pageY,
240
+ start_time: (new Date()).getTime(),
241
+ delta_x: 0,
242
+ is_scrolling: undefined
243
+ };
244
+ container.data('swipe-transition', data);
245
+ e.stopPropagation();
246
+ })
247
+ .on('touchmove.fndtn.orbit', function(e) {
248
+ if (!e.touches) { e = e.originalEvent; }
249
+ // Ignore pinch/zoom events
250
+ if(e.touches.length > 1 || e.scale && e.scale !== 1) return;
251
+
252
+ var data = container.data('swipe-transition');
253
+ if (typeof data === 'undefined') {data = {};}
254
+
255
+ data.delta_x = e.touches[0].pageX - data.start_page_x;
256
+
257
+ if ( typeof data.is_scrolling === 'undefined') {
258
+ data.is_scrolling = !!( data.is_scrolling || Math.abs(data.delta_x) < Math.abs(e.touches[0].pageY - data.start_page_y) );
259
+ }
260
+
261
+ if (!data.is_scrolling && !data.active) {
262
+ e.preventDefault();
263
+ var direction = (data.delta_x < 0) ? (idx+1) : (idx-1);
264
+ data.active = true;
265
+ self._goto(direction);
266
+ }
267
+ })
268
+ .on('touchend.fndtn.orbit', function(e) {
269
+ container.data('swipe-transition', {});
270
+ e.stopPropagation();
271
+ })
272
+ }
273
+ container.on('mouseenter.fndtn.orbit', function(e) {
274
+ if (settings.timer && settings.pause_on_hover) {
275
+ self.stop_timer();
276
+ }
277
+ })
278
+ .on('mouseleave.fndtn.orbit', function(e) {
279
+ if (settings.timer && settings.resume_on_mouseout) {
280
+ timer.start();
281
+ }
282
+ });
283
+
284
+ $(document).on('click', '[data-orbit-link]', self.link_custom);
285
+ $(window).on('resize', self.compute_dimensions);
286
+ Foundation.utils.image_loaded(this.slides().children('img'), self.compute_dimensions);
287
+ Foundation.utils.image_loaded(this.slides().children('img'), function() {
288
+ container.prev('.preloader').css('display', 'none');
289
+ self.update_slide_number(0);
290
+ self.update_active_link(0);
291
+ slides_container.trigger('ready.fndtn.orbit');
292
+ });
293
+ };
294
+
295
+ self.init();
296
+ };
297
+
298
+ var Timer = function(el, settings, callback) {
299
+ var self = this,
300
+ duration = settings.timer_speed,
301
+ progress = el.find('.'+settings.timer_progress_class),
302
+ start,
303
+ timeout,
304
+ left = -1;
305
+
306
+ this.update_progress = function(w) {
307
+ var new_progress = progress.clone();
308
+ new_progress.attr('style', '');
309
+ new_progress.css('width', w+'%');
310
+ progress.replaceWith(new_progress);
311
+ progress = new_progress;
312
+ };
313
+
314
+ this.restart = function() {
315
+ clearTimeout(timeout);
316
+ el.addClass(settings.timer_paused_class);
317
+ left = -1;
318
+ self.update_progress(0);
319
+ };
320
+
321
+ this.start = function() {
322
+ if (!el.hasClass(settings.timer_paused_class)) {return true;}
323
+ left = (left === -1) ? duration : left;
324
+ el.removeClass(settings.timer_paused_class);
325
+ start = new Date().getTime();
326
+ progress.animate({'width': '100%'}, left, 'linear');
327
+ timeout = setTimeout(function() {
328
+ self.restart();
329
+ callback();
330
+ }, left);
331
+ el.trigger('timer-started.fndtn.orbit')
332
+ };
333
+
334
+ this.stop = function() {
335
+ if (el.hasClass(settings.timer_paused_class)) {return true;}
336
+ clearTimeout(timeout);
337
+ el.addClass(settings.timer_paused_class);
338
+ var end = new Date().getTime();
339
+ left = left - (end - start);
340
+ var w = 100 - ((left / duration) * 100);
341
+ self.update_progress(w);
342
+ el.trigger('timer-stopped.fndtn.orbit');
343
+ };
344
+ };
345
+
346
+ var SlideAnimation = function(settings, container) {
347
+ var duration = settings.animation_speed;
348
+ var is_rtl = ($('html[dir=rtl]').length === 1);
349
+ var margin = is_rtl ? 'marginRight' : 'marginLeft';
350
+ var animMargin = {};
351
+ animMargin[margin] = '0%';
352
+
353
+ this.next = function(current, next, callback) {
354
+ current.animate({marginLeft:'-100%'}, duration);
355
+ next.animate(animMargin, duration, function() {
356
+ current.css(margin, '100%');
357
+ callback();
358
+ });
359
+ };
360
+
361
+ this.prev = function(current, prev, callback) {
362
+ current.animate({marginLeft:'100%'}, duration);
363
+ prev.css(margin, '-100%');
364
+ prev.animate(animMargin, duration, function() {
365
+ current.css(margin, '100%');
366
+ callback();
367
+ });
368
+ };
369
+ };
370
+
371
+ var FadeAnimation = function(settings, container) {
372
+ var duration = settings.animation_speed;
373
+ var is_rtl = ($('html[dir=rtl]').length === 1);
374
+ var margin = is_rtl ? 'marginRight' : 'marginLeft';
375
+
376
+ this.next = function(current, next, callback) {
377
+ next.css({'margin':'0%', 'opacity':'0.01'});
378
+ next.animate({'opacity':'1'}, duration, 'linear', function() {
379
+ current.css('margin', '100%');
380
+ callback();
381
+ });
382
+ };
383
+
384
+ this.prev = function(current, prev, callback) {
385
+ prev.css({'margin':'0%', 'opacity':'0.01'});
386
+ prev.animate({'opacity':'1'}, duration, 'linear', function() {
387
+ current.css('margin', '100%');
388
+ callback();
389
+ });
390
+ };
391
+ };
392
+
393
+
394
+ Foundation.libs = Foundation.libs || {};
395
+
396
+ Foundation.libs.orbit = {
397
+ name: 'orbit',
398
+
399
+ version: '5.1.1',
400
+
401
+ settings: {
402
+ animation: 'slide',
403
+ timer_speed: 10000,
404
+ pause_on_hover: true,
405
+ resume_on_mouseout: false,
406
+ animation_speed: 500,
407
+ stack_on_small: false,
408
+ navigation_arrows: true,
409
+ slide_number: true,
410
+ slide_number_text: 'of',
411
+ container_class: 'orbit-container',
412
+ stack_on_small_class: 'orbit-stack-on-small',
413
+ next_class: 'orbit-next',
414
+ prev_class: 'orbit-prev',
415
+ timer_container_class: 'orbit-timer',
416
+ timer_paused_class: 'paused',
417
+ timer_progress_class: 'orbit-progress',
418
+ slides_container_class: 'orbit-slides-container',
419
+ slide_selector: '*',
420
+ bullets_container_class: 'orbit-bullets',
421
+ bullets_active_class: 'active',
422
+ slide_number_class: 'orbit-slide-number',
423
+ caption_class: 'orbit-caption',
424
+ active_slide_class: 'active',
425
+ orbit_transition_class: 'orbit-transitioning',
426
+ bullets: true,
427
+ circular: true,
428
+ timer: true,
429
+ variable_height: false,
430
+ swipe: true,
431
+ before_slide_change: noop,
432
+ after_slide_change: noop
433
+ },
434
+
435
+ init : function (scope, method, options) {
436
+ var self = this;
437
+ this.bindings(method, options);
438
+ },
439
+
440
+ events : function (instance) {
441
+ var orbit_instance = new Orbit(this.S(instance), this.S(instance).data('orbit-init'));
442
+ this.S(instance).data(self.name + '-instance', orbit_instance);
443
+ },
444
+
445
+ reflow : function () {
446
+ var self = this;
447
+
448
+ if (self.S(self.scope).is('[data-orbit]')) {
449
+ var $el = self.S(self.scope);
450
+ var instance = $el.data(self.name + '-instance');
451
+ instance.compute_dimensions();
452
+ } else {
453
+ self.S('[data-orbit]', self.scope).each(function(idx, el) {
454
+ var $el = self.S(el);
455
+ var opts = self.data_options($el);
456
+ var instance = $el.data(self.name + '-instance');
457
+ instance.compute_dimensions();
458
+ });
459
+ }
460
+ }
461
+ };
462
+
463
+
464
+ }(jQuery, this, this.document));