Changeset 28775 for trunk/plugins/TakeATour/js
- Timestamp:
- Jun 23, 2014, 10:08:45 PM (10 years ago)
- Location:
- trunk/plugins/TakeATour/js
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/TakeATour/js
-
Property
svn:ignore
set to
900.js
903.js
custom-bootstrap-tour-standalone.js.bak
-
Property
svn:ignore
set to
-
trunk/plugins/TakeATour/js/custom-bootstrap-tour-standalone.js
r28169 r28775 1 1 /* =========================================================== 2 # bootstrap-tour - v0.9. 02 # bootstrap-tour - v0.9.3 3 3 # http://bootstraptour.com 4 4 # ============================================================== … … 18 18 */ 19 19 /* ======================================================================== 20 * Bootstrap: tooltip.js v3.1.0 20 * Bootstrap: transition.js v3.1.1 21 * http://getbootstrap.com/javascript/#transitions 22 * ======================================================================== 23 * Copyright 2011-2014 Twitter, Inc. 24 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 25 * ======================================================================== */ 26 27 28 +function ($) { 29 'use strict'; 30 31 // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) 32 // ============================================================ 33 34 function transitionEnd() { 35 var el = document.createElement('bootstrap') 36 37 var transEndEventNames = { 38 'WebkitTransition' : 'webkitTransitionEnd', 39 'MozTransition' : 'transitionend', 40 'OTransition' : 'oTransitionEnd otransitionend', 41 'transition' : 'transitionend' 42 } 43 44 for (var name in transEndEventNames) { 45 if (el.style[name] !== undefined) { 46 return { end: transEndEventNames[name] } 47 } 48 } 49 50 return false // explicit for ie8 ( ._.) 51 } 52 53 // http://blog.alexmaccaw.com/css-transitions 54 $.fn.emulateTransitionEnd = function (duration) { 55 var called = false, $el = this 56 $(this).one($.support.transition.end, function () { called = true }) 57 var callback = function () { if (!called) $($el).trigger($.support.transition.end) } 58 setTimeout(callback, duration) 59 return this 60 } 61 62 $(function () { 63 $.support.transition = transitionEnd() 64 }) 65 66 }(jQuery); 67 68 /* ======================================================================== 69 * Bootstrap: tooltip.js v3.1.1 21 70 * http://getbootstrap.com/javascript/#tooltip 22 71 * Inspired by the original jQuery.tipsy by Jason Frame … … 418 467 419 468 /* ======================================================================== 420 * Bootstrap: popover.js v3.1. 0469 * Bootstrap: popover.js v3.1.1 421 470 * http://getbootstrap.com/javascript/#popovers 422 471 * ======================================================================== … … 533 582 Tour = (function() { 534 583 function Tour(options) { 584 var storage; 585 try { 586 storage = window.localStorage; 587 } catch (_error) { 588 storage = false; 589 } 535 590 this._options = $.extend({ 536 591 name: "tour", … … 538 593 container: "body", 539 594 keyboard: true, 540 storage: window.localStorage,595 storage: storage, 541 596 debug: false, 542 597 backdrop: false, … … 696 751 this._removeState("current_step"); 697 752 this._removeState("end"); 698 this.setCurrentStep(0);699 753 return this.start(); 700 754 }; … … 831 885 } 832 886 _this._scrollIntoView(step.element, function() { 887 if (_this.getCurrentStep() !== i) { 888 return; 889 } 833 890 if ((step.element != null) && step.backdrop) { 834 891 _this._showOverlayElement(step.element); … … 968 1025 Tour.prototype._showPopover = function(step, i) { 969 1026 var $element, $navigation, $template, $tip, isOrphan, options; 1027 $(".tour-" + this._options.name).remove(); 970 1028 options = $.extend({}, this._options); 971 1029 $template = $.isFunction(step.template) ? $(step.template(i, step)) : $(step.template); … … 983 1041 $.extend(options, step.options); 984 1042 } 985 if (step.reflex & !isOrphan) {1043 if (step.reflex && !isOrphan) { 986 1044 $element.css("cursor", "pointer").on("click.tour-" + this._options.name, (function(_this) { 987 1045 return function() { … … 1195 1253 1196 1254 Tour.prototype._hideBackground = function() { 1255 if (this.backdrop) { 1197 1256 this.backdrop.remove(); 1198 1257 this.backdrop.overlay = null; 1199 1258 return this.backdrop.backgroundShown = false; 1259 } 1200 1260 }; 1201 1261
Note: See TracChangeset
for help on using the changeset viewer.