catscope 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/assets/bower.json +1 -0
- data/assets/bower_components/foundation/LICENSE +22 -0
- data/assets/bower_components/foundation/README.md +46 -0
- data/assets/bower_components/foundation/bower.json +2 -4
- data/assets/bower_components/foundation/css/foundation.css +1695 -1230
- data/assets/bower_components/foundation/css/foundation.css.map +1 -1
- data/assets/bower_components/foundation/css/foundation.min.css +1 -0
- data/assets/bower_components/foundation/css/normalize.css +9 -12
- data/assets/bower_components/foundation/css/normalize.css.map +1 -1
- data/assets/bower_components/foundation/css/normalize.min.css +1 -0
- data/assets/bower_components/foundation/js/foundation/foundation.abide.js +171 -75
- data/assets/bower_components/foundation/js/foundation/foundation.accordion.js +70 -12
- data/assets/bower_components/foundation/js/foundation/foundation.alert.js +5 -5
- data/assets/bower_components/foundation/js/foundation/foundation.clearing.js +84 -40
- data/assets/bower_components/foundation/js/foundation/foundation.dropdown.js +104 -79
- data/assets/bower_components/foundation/js/foundation/foundation.equalizer.js +57 -26
- data/assets/bower_components/foundation/js/foundation/foundation.interchange.js +50 -38
- data/assets/bower_components/foundation/js/foundation/foundation.joyride.js +121 -110
- data/assets/bower_components/foundation/js/foundation/foundation.js +121 -79
- data/assets/bower_components/foundation/js/foundation/foundation.magellan.js +75 -59
- data/assets/bower_components/foundation/js/foundation/foundation.offcanvas.js +95 -22
- data/assets/bower_components/foundation/js/foundation/foundation.orbit.js +127 -123
- data/assets/bower_components/foundation/js/foundation/foundation.reveal.js +147 -69
- data/assets/bower_components/foundation/js/foundation/foundation.slider.js +101 -72
- data/assets/bower_components/foundation/js/foundation/foundation.tab.js +52 -39
- data/assets/bower_components/foundation/js/foundation/foundation.tooltip.js +97 -49
- data/assets/bower_components/foundation/js/foundation/foundation.topbar.js +70 -57
- data/assets/bower_components/foundation/js/foundation.js +1544 -951
- data/assets/bower_components/foundation/js/foundation.min.js +5 -4
- data/assets/bower_components/foundation/js/vendor/fastclick.js +8 -9
- data/assets/bower_components/foundation/js/vendor/jquery.js +6 -6
- data/assets/bower_components/foundation/js/vendor/modernizr.js +1 -1
- data/assets/bower_components/foundation/package.json +57 -0
- data/assets/bower_components/foundation/scss/foundation/_functions.scss +53 -43
- data/assets/bower_components/foundation/scss/foundation/_settings.scss +59 -37
- data/assets/bower_components/foundation/scss/foundation/components/_accordion.scss +12 -8
- data/assets/bower_components/foundation/scss/foundation/components/_alert-boxes.scss +12 -12
- data/assets/bower_components/foundation/scss/foundation/components/_block-grid.scss +14 -13
- data/assets/bower_components/foundation/scss/foundation/components/_breadcrumbs.scss +19 -19
- data/assets/bower_components/foundation/scss/foundation/components/_button-groups.scss +33 -25
- data/assets/bower_components/foundation/scss/foundation/components/_buttons.scss +30 -28
- data/assets/bower_components/foundation/scss/foundation/components/_clearing.scss +51 -47
- data/assets/bower_components/foundation/scss/foundation/components/_dropdown-buttons.scss +10 -11
- data/assets/bower_components/foundation/scss/foundation/components/_dropdown.scss +45 -38
- data/assets/bower_components/foundation/scss/foundation/components/_flex-video.scss +7 -7
- data/assets/bower_components/foundation/scss/foundation/components/_forms.scss +99 -62
- data/assets/bower_components/foundation/scss/foundation/components/_global.scss +152 -67
- data/assets/bower_components/foundation/scss/foundation/components/_grid.scss +39 -36
- data/assets/bower_components/foundation/scss/foundation/components/_icon-bar.scss +337 -235
- data/assets/bower_components/foundation/scss/foundation/components/_inline-lists.scss +9 -8
- data/assets/bower_components/foundation/scss/foundation/components/_joyride.scss +40 -42
- data/assets/bower_components/foundation/scss/foundation/components/_keystrokes.scss +2 -3
- data/assets/bower_components/foundation/scss/foundation/components/_labels.scss +6 -6
- data/assets/bower_components/foundation/scss/foundation/components/_magellan.scss +2 -2
- data/assets/bower_components/foundation/scss/foundation/components/_offcanvas.scss +259 -168
- data/assets/bower_components/foundation/scss/foundation/components/_orbit.scss +82 -62
- data/assets/bower_components/foundation/scss/foundation/components/_pagination.scss +16 -15
- data/assets/bower_components/foundation/scss/foundation/components/_panels.scss +21 -15
- data/assets/bower_components/foundation/scss/foundation/components/_pricing-tables.scss +16 -16
- data/assets/bower_components/foundation/scss/foundation/components/_progress-bars.scss +10 -4
- data/assets/bower_components/foundation/scss/foundation/components/_range-slider.scss +28 -20
- data/assets/bower_components/foundation/scss/foundation/components/_reveal.scss +38 -28
- data/assets/bower_components/foundation/scss/foundation/components/_side-nav.scss +15 -11
- data/assets/bower_components/foundation/scss/foundation/components/_split-buttons.scss +22 -18
- data/assets/bower_components/foundation/scss/foundation/components/_sub-nav.scss +14 -12
- data/assets/bower_components/foundation/scss/foundation/components/_switches.scss +22 -19
- data/assets/bower_components/foundation/scss/foundation/components/_tables.scss +8 -8
- data/assets/bower_components/foundation/scss/foundation/components/_tabs.scss +50 -31
- data/assets/bower_components/foundation/scss/foundation/components/_thumbs.scss +8 -8
- data/assets/bower_components/foundation/scss/foundation/components/_tooltips.scss +25 -25
- data/assets/bower_components/foundation/scss/foundation/components/_top-bar.scss +176 -122
- data/assets/bower_components/foundation/scss/foundation/components/_type.scss +38 -38
- data/assets/bower_components/foundation/scss/foundation/components/_visibility.scss +33 -16
- data/assets/bower_components/foundation/scss/foundation.scss +37 -40
- data/assets/bower_components/foundation/scss/normalize.scss +8 -11
- data/assets/bower_components/jquery/bower.json +2 -1
- data/assets/bower_components/jquery/dist/jquery.js +9 -4
- data/assets/bower_components/jquery/dist/jquery.min.js +4 -4
- data/assets/bower_components/jquery/dist/jquery.min.map +1 -1
- data/assets/bower_components/jquery/src/core.js +6 -1
- data/assets/scss/_settings.scss +2 -0
- data/assets/stylesheets/app.css +3066 -2429
- data/lib/catscope/version.rb +1 -1
- data/lib/catscope/views/layout.erb +6 -2
- metadata +8 -4
- data/assets/bower_components/foundation/scss/foundation/components/_toolbar.scss +0 -70
@@ -6,13 +6,13 @@
|
|
6
6
|
Foundation.libs.joyride = {
|
7
7
|
name : 'joyride',
|
8
8
|
|
9
|
-
version : '5.5.
|
9
|
+
version : '5.5.3',
|
10
10
|
|
11
11
|
defaults : {
|
12
12
|
expose : false, // turn on or off the expose feature
|
13
13
|
modal : true, // Whether to cover page with modal during the tour
|
14
14
|
keyboard : true, // enable left, right and esc keystrokes
|
15
|
-
tip_location : 'bottom', // 'top' or '
|
15
|
+
tip_location : 'bottom', // 'top', 'bottom', 'left' or 'right' in relation to parent
|
16
16
|
nub_position : 'auto', // override on a per tooltip bases
|
17
17
|
scroll_speed : 1500, // Page scrolling speed in milliseconds, 0 = no scroll animation
|
18
18
|
scroll_animation : 'linear', // supports 'swing' and 'linear', extend with jQuery UI.
|
@@ -32,16 +32,16 @@
|
|
32
32
|
tip_container : 'body', // Where will the tip be attached
|
33
33
|
abort_on_close : true, // When true, the close event will not fire any callback
|
34
34
|
tip_location_patterns : {
|
35
|
-
top: ['bottom'],
|
36
|
-
bottom: [], // bottom should not need to be repositioned
|
37
|
-
left: ['right', 'top', 'bottom'],
|
38
|
-
right: ['left', 'top', 'bottom']
|
35
|
+
top : ['bottom'],
|
36
|
+
bottom : [], // bottom should not need to be repositioned
|
37
|
+
left : ['right', 'top', 'bottom'],
|
38
|
+
right : ['left', 'top', 'bottom']
|
39
39
|
},
|
40
|
-
post_ride_callback : function (){}, // A method to call once the tour closes (canceled or complete)
|
41
|
-
post_step_callback : function (){}, // A method to call after each step
|
42
|
-
pre_step_callback : function (){}, // A method to call before each step
|
43
|
-
pre_ride_callback : function (){}, // A method to call before the tour starts (passed index, tip, and cloned exposed element)
|
44
|
-
post_expose_callback : function (){}, // A method to call after an element has been exposed
|
40
|
+
post_ride_callback : function () {}, // A method to call once the tour closes (canceled or complete)
|
41
|
+
post_step_callback : function () {}, // A method to call after each step
|
42
|
+
pre_step_callback : function () {}, // A method to call before each step
|
43
|
+
pre_ride_callback : function () {}, // A method to call before the tour starts (passed index, tip, and cloned exposed element)
|
44
|
+
post_expose_callback : function () {}, // A method to call after an element has been exposed
|
45
45
|
template : { // HTML segments for tip layout
|
46
46
|
link : '<a href="#close" class="joyride-close-tip">×</a>',
|
47
47
|
timer : '<div class="joyride-timer-indicator-wrap"><span class="joyride-timer-indicator"></span></div>',
|
@@ -64,7 +64,7 @@
|
|
64
64
|
this.bindings(method, options)
|
65
65
|
},
|
66
66
|
|
67
|
-
go_next : function() {
|
67
|
+
go_next : function () {
|
68
68
|
if (this.settings.$li.next().length < 1) {
|
69
69
|
this.end();
|
70
70
|
} else if (this.settings.timer > 0) {
|
@@ -78,7 +78,7 @@
|
|
78
78
|
}
|
79
79
|
},
|
80
80
|
|
81
|
-
go_prev : function() {
|
81
|
+
go_prev : function () {
|
82
82
|
if (this.settings.$li.prev().length < 1) {
|
83
83
|
// Do nothing if there are no prev element
|
84
84
|
} else if (this.settings.timer > 0) {
|
@@ -111,10 +111,12 @@
|
|
111
111
|
this.end(this.settings.abort_on_close);
|
112
112
|
}.bind(this))
|
113
113
|
|
114
|
-
.on('keyup.fndtn.joyride', function(e) {
|
114
|
+
.on('keyup.fndtn.joyride', function (e) {
|
115
115
|
// Don't do anything if keystrokes are disabled
|
116
116
|
// or if the joyride is not being shown
|
117
|
-
if (!this.settings.keyboard || !this.settings.riding)
|
117
|
+
if (!this.settings.keyboard || !this.settings.riding) {
|
118
|
+
return;
|
119
|
+
}
|
118
120
|
|
119
121
|
switch (e.which) {
|
120
122
|
case 39: // right arrow
|
@@ -160,9 +162,13 @@
|
|
160
162
|
integer_settings = ['timer', 'scrollSpeed', 'startOffset', 'tipAnimationFadeSpeed', 'cookieExpires'],
|
161
163
|
int_settings_count = integer_settings.length;
|
162
164
|
|
163
|
-
if (!$this.length > 0)
|
165
|
+
if (!$this.length > 0) {
|
166
|
+
return;
|
167
|
+
}
|
164
168
|
|
165
|
-
if (!this.settings.init)
|
169
|
+
if (!this.settings.init) {
|
170
|
+
this.events();
|
171
|
+
}
|
166
172
|
|
167
173
|
this.settings = $this.data(this.attr_name(true) + '-init');
|
168
174
|
|
@@ -255,10 +261,11 @@
|
|
255
261
|
txt = $.trim(txt) || 'Previous';
|
256
262
|
|
257
263
|
// Add the disabled class to the button if it's the first element
|
258
|
-
if (idx == 0)
|
264
|
+
if (idx == 0) {
|
259
265
|
txt = $(this.settings.template.prev_button).append(txt).addClass('disabled')[0].outerHTML;
|
260
|
-
else
|
266
|
+
} else {
|
261
267
|
txt = $(this.settings.template.prev_button).append(txt)[0].outerHTML;
|
268
|
+
}
|
262
269
|
} else {
|
263
270
|
txt = '';
|
264
271
|
}
|
@@ -267,10 +274,8 @@
|
|
267
274
|
|
268
275
|
create : function (opts) {
|
269
276
|
this.settings.tip_settings = $.extend({}, this.settings, this.data_options(opts.$li));
|
270
|
-
var buttonText = opts.$li.attr(this.add_namespace('data-button'))
|
271
|
-
|
272
|
-
prevButtonText = opts.$li.attr(this.add_namespace('data-button-prev'))
|
273
|
-
|| opts.$li.attr(this.add_namespace('data-prev-text')),
|
277
|
+
var buttonText = opts.$li.attr(this.add_namespace('data-button')) || opts.$li.attr(this.add_namespace('data-text')),
|
278
|
+
prevButtonText = opts.$li.attr(this.add_namespace('data-button-prev')) || opts.$li.attr(this.add_namespace('data-prev-text')),
|
274
279
|
tipClass = opts.$li.attr('class'),
|
275
280
|
$tip_content = $(this.tip_template({
|
276
281
|
tip_class : tipClass,
|
@@ -287,8 +292,7 @@
|
|
287
292
|
var $timer = null;
|
288
293
|
|
289
294
|
// are we paused?
|
290
|
-
if (this.settings.$li === undefined
|
291
|
-
|| ($.inArray(this.settings.$li.index(), this.settings.pause_after) === -1)) {
|
295
|
+
if (this.settings.$li === undefined || ($.inArray(this.settings.$li.index(), this.settings.pause_after) === -1)) {
|
292
296
|
|
293
297
|
// don't go to the next li if the tour was paused
|
294
298
|
if (this.settings.paused) {
|
@@ -319,8 +323,8 @@
|
|
319
323
|
|
320
324
|
this.settings.tip_settings.tip_location_pattern = this.settings.tip_location_patterns[this.settings.tip_settings.tip_location];
|
321
325
|
|
322
|
-
// scroll and hide bg if not modal
|
323
|
-
if (!/body/i.test(this.settings.$target.selector)) {
|
326
|
+
// scroll and hide bg if not modal and not expose
|
327
|
+
if (!/body/i.test(this.settings.$target.selector) && !this.settings.expose) {
|
324
328
|
var joyridemodalbg = $('.joyride-modal-bg');
|
325
329
|
if (/pop/i.test(this.settings.tipAnimation)) {
|
326
330
|
joyridemodalbg.hide();
|
@@ -348,7 +352,7 @@
|
|
348
352
|
|
349
353
|
setTimeout(function () {
|
350
354
|
$timer.animate({
|
351
|
-
width: $timer.parent().width()
|
355
|
+
width : $timer.parent().width()
|
352
356
|
}, this.settings.timer, 'linear');
|
353
357
|
}.bind(this), this.settings.tip_animation_fade_speed);
|
354
358
|
|
@@ -357,7 +361,6 @@
|
|
357
361
|
|
358
362
|
}
|
359
363
|
|
360
|
-
|
361
364
|
} else if (/fade/i.test(this.settings.tip_animation)) {
|
362
365
|
|
363
366
|
$timer.width(0);
|
@@ -370,7 +373,7 @@
|
|
370
373
|
|
371
374
|
setTimeout(function () {
|
372
375
|
$timer.animate({
|
373
|
-
width: $timer.parent().width()
|
376
|
+
width : $timer.parent().width()
|
374
377
|
}, this.settings.timer, 'linear');
|
375
378
|
}.bind(this), this.settings.tip_animation_fade_speed);
|
376
379
|
|
@@ -415,7 +418,7 @@
|
|
415
418
|
|
416
419
|
// Prevent scroll bouncing...wait to remove from layout
|
417
420
|
this.settings.$current_tip.css('visibility', 'hidden');
|
418
|
-
setTimeout($.proxy(function() {
|
421
|
+
setTimeout($.proxy(function () {
|
419
422
|
this.hide();
|
420
423
|
this.css('visibility', 'visible');
|
421
424
|
}, this.settings.$current_tip), 0);
|
@@ -429,10 +432,11 @@
|
|
429
432
|
this.set_next_tip();
|
430
433
|
this.settings.$current_tip = this.settings.$next_tip;
|
431
434
|
} else {
|
432
|
-
if (is_prev)
|
435
|
+
if (is_prev) {
|
433
436
|
this.settings.$li = this.settings.$li.prev();
|
434
|
-
else
|
437
|
+
} else {
|
435
438
|
this.settings.$li = this.settings.$li.next();
|
439
|
+
}
|
436
440
|
this.set_next_tip();
|
437
441
|
}
|
438
442
|
|
@@ -468,7 +472,7 @@
|
|
468
472
|
|
469
473
|
if (tipOffset != 0) {
|
470
474
|
$('html, body').stop().animate({
|
471
|
-
scrollTop: tipOffset
|
475
|
+
scrollTop : tipOffset
|
472
476
|
}, this.settings.scroll_speed, 'swing');
|
473
477
|
}
|
474
478
|
},
|
@@ -496,67 +500,67 @@
|
|
496
500
|
}
|
497
501
|
|
498
502
|
if (!/body/i.test(this.settings.$target.selector)) {
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
503
|
+
var topAdjustment = this.settings.tip_settings.tipAdjustmentY ? parseInt(this.settings.tip_settings.tipAdjustmentY) : 0,
|
504
|
+
leftAdjustment = this.settings.tip_settings.tipAdjustmentX ? parseInt(this.settings.tip_settings.tipAdjustmentX) : 0;
|
505
|
+
|
506
|
+
if (this.bottom()) {
|
507
|
+
if (this.rtl) {
|
508
|
+
this.settings.$next_tip.css({
|
509
|
+
top : (this.settings.$target.offset().top + nub_height + this.settings.$target.outerHeight() + topAdjustment),
|
510
|
+
left : this.settings.$target.offset().left + this.settings.$target.outerWidth() - this.settings.$next_tip.outerWidth() + leftAdjustment});
|
511
|
+
} else {
|
512
|
+
this.settings.$next_tip.css({
|
513
|
+
top : (this.settings.$target.offset().top + nub_height + this.settings.$target.outerHeight() + topAdjustment),
|
514
|
+
left : this.settings.$target.offset().left + leftAdjustment});
|
515
|
+
}
|
512
516
|
|
513
|
-
|
517
|
+
this.nub_position($nub, this.settings.tip_settings.nub_position, 'top');
|
514
518
|
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
519
|
+
} else if (this.top()) {
|
520
|
+
if (this.rtl) {
|
521
|
+
this.settings.$next_tip.css({
|
522
|
+
top : (this.settings.$target.offset().top - this.settings.$next_tip.outerHeight() - nub_height + topAdjustment),
|
523
|
+
left : this.settings.$target.offset().left + this.settings.$target.outerWidth() - this.settings.$next_tip.outerWidth()});
|
524
|
+
} else {
|
525
|
+
this.settings.$next_tip.css({
|
526
|
+
top : (this.settings.$target.offset().top - this.settings.$next_tip.outerHeight() - nub_height + topAdjustment),
|
527
|
+
left : this.settings.$target.offset().left + leftAdjustment});
|
528
|
+
}
|
525
529
|
|
526
|
-
|
530
|
+
this.nub_position($nub, this.settings.tip_settings.nub_position, 'bottom');
|
527
531
|
|
528
|
-
|
532
|
+
} else if (this.right()) {
|
529
533
|
|
530
|
-
|
531
|
-
|
532
|
-
|
534
|
+
this.settings.$next_tip.css({
|
535
|
+
top : this.settings.$target.offset().top + topAdjustment,
|
536
|
+
left : (this.settings.$target.outerWidth() + this.settings.$target.offset().left + nub_width + leftAdjustment)});
|
533
537
|
|
534
|
-
|
538
|
+
this.nub_position($nub, this.settings.tip_settings.nub_position, 'left');
|
535
539
|
|
536
|
-
|
540
|
+
} else if (this.left()) {
|
537
541
|
|
538
|
-
|
539
|
-
|
540
|
-
|
542
|
+
this.settings.$next_tip.css({
|
543
|
+
top : this.settings.$target.offset().top + topAdjustment,
|
544
|
+
left : (this.settings.$target.offset().left - this.settings.$next_tip.outerWidth() - nub_width + leftAdjustment)});
|
541
545
|
|
542
|
-
|
546
|
+
this.nub_position($nub, this.settings.tip_settings.nub_position, 'right');
|
543
547
|
|
544
|
-
|
548
|
+
}
|
545
549
|
|
546
|
-
|
550
|
+
if (!this.visible(this.corners(this.settings.$next_tip)) && this.settings.attempts < this.settings.tip_settings.tip_location_pattern.length) {
|
547
551
|
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
+
$nub.removeClass('bottom')
|
553
|
+
.removeClass('top')
|
554
|
+
.removeClass('right')
|
555
|
+
.removeClass('left');
|
552
556
|
|
553
|
-
|
557
|
+
this.settings.tip_settings.tip_location = this.settings.tip_settings.tip_location_pattern[this.settings.attempts];
|
554
558
|
|
555
|
-
|
559
|
+
this.settings.attempts++;
|
556
560
|
|
557
|
-
|
561
|
+
this.pos_default();
|
558
562
|
|
559
|
-
|
563
|
+
}
|
560
564
|
|
561
565
|
} else if (this.settings.$li.length) {
|
562
566
|
|
@@ -593,12 +597,12 @@
|
|
593
597
|
|
594
598
|
if (this.top()) {
|
595
599
|
|
596
|
-
this.settings.$next_tip.offset({top: this.settings.$target.offset().top - tip_height - nub_height});
|
600
|
+
this.settings.$next_tip.offset({top : this.settings.$target.offset().top - tip_height - nub_height});
|
597
601
|
$nub.addClass('bottom');
|
598
602
|
|
599
603
|
} else {
|
600
604
|
|
601
|
-
this.settings.$next_tip.offset({top: this.settings.$target.offset().top + target_height + nub_height});
|
605
|
+
this.settings.$next_tip.offset({top : this.settings.$target.offset().top + target_height + nub_height});
|
602
606
|
$nub.addClass('top');
|
603
607
|
|
604
608
|
}
|
@@ -646,14 +650,14 @@
|
|
646
650
|
|
647
651
|
if (arguments.length > 0 && arguments[0] instanceof $) {
|
648
652
|
el = arguments[0];
|
649
|
-
} else if(this.settings.$target && !/body/i.test(this.settings.$target.selector)){
|
653
|
+
} else if (this.settings.$target && !/body/i.test(this.settings.$target.selector)) {
|
650
654
|
el = this.settings.$target;
|
651
|
-
}
|
655
|
+
} else {
|
652
656
|
return false;
|
653
657
|
}
|
654
658
|
|
655
|
-
if(el.length < 1){
|
656
|
-
if(window.console){
|
659
|
+
if (el.length < 1) {
|
660
|
+
if (window.console) {
|
657
661
|
console.error('element not valid', el);
|
658
662
|
}
|
659
663
|
return false;
|
@@ -662,39 +666,41 @@
|
|
662
666
|
expose = $(this.settings.template.expose);
|
663
667
|
this.settings.$body.append(expose);
|
664
668
|
expose.css({
|
665
|
-
top: el.offset().top,
|
666
|
-
left: el.offset().left,
|
667
|
-
width: el.outerWidth(true),
|
668
|
-
height: el.outerHeight(true)
|
669
|
+
top : el.offset().top,
|
670
|
+
left : el.offset().left,
|
671
|
+
width : el.outerWidth(true),
|
672
|
+
height : el.outerHeight(true)
|
669
673
|
});
|
670
674
|
|
671
675
|
exposeCover = $(this.settings.template.expose_cover);
|
672
676
|
|
673
677
|
origCSS = {
|
674
|
-
zIndex: el.css('z-index'),
|
675
|
-
position: el.css('position')
|
678
|
+
zIndex : el.css('z-index'),
|
679
|
+
position : el.css('position')
|
676
680
|
};
|
677
681
|
|
678
682
|
origClasses = el.attr('class') == null ? '' : el.attr('class');
|
679
683
|
|
680
|
-
el.css('z-index',parseInt(expose.css('z-index'))+1);
|
684
|
+
el.css('z-index', parseInt(expose.css('z-index')) + 1);
|
681
685
|
|
682
686
|
if (origCSS.position == 'static') {
|
683
|
-
el.css('position','relative');
|
687
|
+
el.css('position', 'relative');
|
684
688
|
}
|
685
689
|
|
686
|
-
el.data('expose-css',origCSS);
|
690
|
+
el.data('expose-css', origCSS);
|
687
691
|
el.data('orig-class', origClasses);
|
688
692
|
el.attr('class', origClasses + ' ' + this.settings.expose_add_class);
|
689
693
|
|
690
694
|
exposeCover.css({
|
691
|
-
top: el.offset().top,
|
692
|
-
left: el.offset().left,
|
693
|
-
width: el.outerWidth(true),
|
694
|
-
height: el.outerHeight(true)
|
695
|
+
top : el.offset().top,
|
696
|
+
left : el.offset().left,
|
697
|
+
width : el.outerWidth(true),
|
698
|
+
height : el.outerHeight(true)
|
695
699
|
});
|
696
700
|
|
697
|
-
if (this.settings.modal)
|
701
|
+
if (this.settings.modal) {
|
702
|
+
this.show_modal();
|
703
|
+
}
|
698
704
|
|
699
705
|
this.settings.$body.append(exposeCover);
|
700
706
|
expose.addClass(randId);
|
@@ -707,20 +713,20 @@
|
|
707
713
|
un_expose : function () {
|
708
714
|
var exposeId,
|
709
715
|
el,
|
710
|
-
expose
|
716
|
+
expose,
|
711
717
|
origCSS,
|
712
718
|
origClasses,
|
713
719
|
clearAll = false;
|
714
720
|
|
715
721
|
if (arguments.length > 0 && arguments[0] instanceof $) {
|
716
722
|
el = arguments[0];
|
717
|
-
} else if(this.settings.$target && !/body/i.test(this.settings.$target.selector)){
|
723
|
+
} else if (this.settings.$target && !/body/i.test(this.settings.$target.selector)) {
|
718
724
|
el = this.settings.$target;
|
719
|
-
}
|
725
|
+
} else {
|
720
726
|
return false;
|
721
727
|
}
|
722
728
|
|
723
|
-
if(el.length < 1){
|
729
|
+
if (el.length < 1) {
|
724
730
|
if (window.console) {
|
725
731
|
console.error('element not valid', el);
|
726
732
|
}
|
@@ -749,7 +755,7 @@
|
|
749
755
|
}
|
750
756
|
|
751
757
|
if (origCSS.position != el.css('position')) {
|
752
|
-
if(origCSS.position == 'static') {// this is default, no need to set it.
|
758
|
+
if (origCSS.position == 'static') {// this is default, no need to set it.
|
753
759
|
el.css('position', '');
|
754
760
|
} else {
|
755
761
|
el.css('position', origCSS.position);
|
@@ -765,7 +771,7 @@
|
|
765
771
|
this.remove_exposed(el);
|
766
772
|
},
|
767
773
|
|
768
|
-
add_exposed: function(el){
|
774
|
+
add_exposed : function (el) {
|
769
775
|
this.settings.exposed = this.settings.exposed || [];
|
770
776
|
if (el instanceof $ || typeof el === 'object') {
|
771
777
|
this.settings.exposed.push(el[0]);
|
@@ -774,11 +780,11 @@
|
|
774
780
|
}
|
775
781
|
},
|
776
782
|
|
777
|
-
remove_exposed: function(el){
|
783
|
+
remove_exposed : function (el) {
|
778
784
|
var search, i;
|
779
785
|
if (el instanceof $) {
|
780
786
|
search = el[0]
|
781
|
-
} else if (typeof el == 'string'){
|
787
|
+
} else if (typeof el == 'string') {
|
782
788
|
search = el;
|
783
789
|
}
|
784
790
|
|
@@ -821,6 +827,10 @@
|
|
821
827
|
},
|
822
828
|
|
823
829
|
corners : function (el) {
|
830
|
+
if (el.length === 0) {
|
831
|
+
return [false, false, false, false];
|
832
|
+
}
|
833
|
+
|
824
834
|
var w = $(window),
|
825
835
|
window_half = w.height() / 2,
|
826
836
|
//using this to calculate since scroll may not have finished yet.
|
@@ -854,7 +864,9 @@
|
|
854
864
|
var i = hidden_corners.length;
|
855
865
|
|
856
866
|
while (i--) {
|
857
|
-
if (hidden_corners[i])
|
867
|
+
if (hidden_corners[i]) {
|
868
|
+
return false;
|
869
|
+
}
|
858
870
|
}
|
859
871
|
|
860
872
|
return true;
|
@@ -882,7 +894,7 @@
|
|
882
894
|
|
883
895
|
end : function (abort) {
|
884
896
|
if (this.settings.cookie_monster) {
|
885
|
-
$.cookie(this.settings.cookie_name, 'ridden', {
|
897
|
+
$.cookie(this.settings.cookie_name, 'ridden', {expires : this.settings.cookie_expires, domain : this.settings.cookie_domain});
|
886
898
|
}
|
887
899
|
|
888
900
|
if (this.settings.timer > 0) {
|
@@ -916,7 +928,6 @@
|
|
916
928
|
$('.joyride-close-tip, .joyride-next-tip, .joyride-modal-bg').off('.joyride');
|
917
929
|
$('.joyride-tip-guide, .joyride-modal-bg').remove();
|
918
930
|
clearTimeout(this.settings.automate);
|
919
|
-
this.settings = {};
|
920
931
|
},
|
921
932
|
|
922
933
|
reflow : function () {}
|