diff options
Diffstat (limited to '')
-rw-r--r-- | plugins/TakeATour/js/custom-bootstrap-tour-standalone.js | 72 |
1 files changed, 66 insertions, 6 deletions
diff --git a/plugins/TakeATour/js/custom-bootstrap-tour-standalone.js b/plugins/TakeATour/js/custom-bootstrap-tour-standalone.js index 23c052af6..70a155a53 100644 --- a/plugins/TakeATour/js/custom-bootstrap-tour-standalone.js +++ b/plugins/TakeATour/js/custom-bootstrap-tour-standalone.js @@ -1,5 +1,5 @@ /* ===========================================================
-# bootstrap-tour - v0.9.0
+# bootstrap-tour - v0.9.3
# http://bootstraptour.com
# ==============================================================
# Copyright 2012-2013 Ulrich Sossou
@@ -17,7 +17,56 @@ # limitations under the License.
*/
/* ========================================================================
- * Bootstrap: tooltip.js v3.1.0
+ * Bootstrap: transition.js v3.1.1
+ * http://getbootstrap.com/javascript/#transitions
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
+ // ============================================================
+
+ function transitionEnd() {
+ var el = document.createElement('bootstrap')
+
+ var transEndEventNames = {
+ 'WebkitTransition' : 'webkitTransitionEnd',
+ 'MozTransition' : 'transitionend',
+ 'OTransition' : 'oTransitionEnd otransitionend',
+ 'transition' : 'transitionend'
+ }
+
+ for (var name in transEndEventNames) {
+ if (el.style[name] !== undefined) {
+ return { end: transEndEventNames[name] }
+ }
+ }
+
+ return false // explicit for ie8 ( ._.)
+ }
+
+ // http://blog.alexmaccaw.com/css-transitions
+ $.fn.emulateTransitionEnd = function (duration) {
+ var called = false, $el = this
+ $(this).one($.support.transition.end, function () { called = true })
+ var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
+ setTimeout(callback, duration)
+ return this
+ }
+
+ $(function () {
+ $.support.transition = transitionEnd()
+ })
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: tooltip.js v3.1.1
* http://getbootstrap.com/javascript/#tooltip
* Inspired by the original jQuery.tipsy by Jason Frame
* ========================================================================
@@ -417,7 +466,7 @@ }(jQuery);
/* ========================================================================
- * Bootstrap: popover.js v3.1.0
+ * Bootstrap: popover.js v3.1.1
* http://getbootstrap.com/javascript/#popovers
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@@ -532,12 +581,18 @@ document = window.document;
Tour = (function() {
function Tour(options) {
+ var storage;
+ try {
+ storage = window.localStorage;
+ } catch (_error) {
+ storage = false;
+ }
this._options = $.extend({
name: "tour",
steps: [],
container: "body",
keyboard: true,
- storage: window.localStorage,
+ storage: storage,
debug: false,
backdrop: false,
redirect: true,
@@ -695,7 +750,6 @@ Tour.prototype.restart = function() {
this._removeState("current_step");
this._removeState("end");
- this.setCurrentStep(0);
return this.start();
};
@@ -830,6 +884,9 @@ _this._showBackdrop(!_this._isOrphan(step) ? step.element : void 0);
}
_this._scrollIntoView(step.element, function() {
+ if (_this.getCurrentStep() !== i) {
+ return;
+ }
if ((step.element != null) && step.backdrop) {
_this._showOverlayElement(step.element);
}
@@ -967,6 +1024,7 @@ Tour.prototype._showPopover = function(step, i) {
var $element, $navigation, $template, $tip, isOrphan, options;
+ $(".tour-" + this._options.name).remove();
options = $.extend({}, this._options);
$template = $.isFunction(step.template) ? $(step.template(i, step)) : $(step.template);
$navigation = $template.find(".popover-navigation");
@@ -982,7 +1040,7 @@ if (step.options) {
$.extend(options, step.options);
}
- if (step.reflex & !isOrphan) {
+ if (step.reflex && !isOrphan) {
$element.css("cursor", "pointer").on("click.tour-" + this._options.name, (function(_this) {
return function() {
if (_this._isLast()) {
@@ -1194,9 +1252,11 @@ };
Tour.prototype._hideBackground = function() {
+ if (this.backdrop) {
this.backdrop.remove();
this.backdrop.overlay = null;
return this.backdrop.backgroundShown = false;
+ }
};
Tour.prototype._showOverlayElement = function(element) {
|