aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/TakeATour/js
diff options
context:
space:
mode:
authorflop25 <flop25@piwigo.org>2014-06-23 20:08:45 +0000
committerflop25 <flop25@piwigo.org>2014-06-23 20:08:45 +0000
commitba5fcfda0f1cb21d84c1f6d1ca3b92a4502eb014 (patch)
tree9026c9714ba0af12b9e9b8025b3227275c0b4cc8 /plugins/TakeATour/js
parent517761cc8e774ddaa27966a4aa052e2c85c9b919 (diff)
adjustments for 2.7
js updated to 9.0.3 git-svn-id: http://piwigo.org/svn/trunk@28775 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'plugins/TakeATour/js')
-rw-r--r--plugins/TakeATour/js/custom-bootstrap-tour-standalone.js72
-rw-r--r--plugins/TakeATour/js/custom.patch43
2 files changed, 109 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) {
diff --git a/plugins/TakeATour/js/custom.patch b/plugins/TakeATour/js/custom.patch
new file mode 100644
index 000000000..0ad5f0b5c
--- /dev/null
+++ b/plugins/TakeATour/js/custom.patch
@@ -0,0 +1,43 @@
+--- E:/Program Files/EasyPHP/www/SITE/sandbox/pwg_test/piwigo_trunk/plugins/TakeATour/js/903.js Mon Jun 23 21:44:59 2014
++++ E:/Program Files/EasyPHP/www/SITE/sandbox/pwg_test/piwigo_trunk/plugins/TakeATour/js/custom-bootstrap-tour-standalone.js Sun Apr 13 19:05:42 2014
+@@ -849,9 +849,15 @@
+ return step.path;
+ }
+ }).call(_this);
+- current_path = [document.location.pathname, document.location.hash].join("");
++ current_path = document.location.href;
+ if (_this._isRedirect(path, current_path)) {
++ if (toString.call(path) === "[object RegExp]") {
+ _this._redirect(step, path);
++ }
++ else {
++ path = document.location.protocol+'//'+path;
++ _this._redirect(step, path);
++ }
+ return;
+ }
+ if (_this._isOrphan(step)) {
+@@ -866,6 +872,14 @@
+ }
+ _this._debug("Show the orphan step " + (_this._current + 1) + ". Orphans option is true.");
+ }
++ if (step.title === "" & step.content === "") {
++ if (skipToPrevious) {
++ _this._showPrevStep();
++ } else {
++ _this._showNextStep();
++ }
++ return;
++ }
+ if (step.backdrop) {
+ _this._showBackdrop(!_this._isOrphan(step) ? step.element : void 0);
+ }
+@@ -988,7 +1002,7 @@
+ };
+
+ Tour.prototype._isRedirect = function(path, currentPath) {
+- return (path != null) && path !== "" && (({}.toString.call(path) === "[object RegExp]" && !path.test(currentPath)) || ({}.toString.call(path) === "[object String]" && path.replace(/\?.*$/, "").replace(/\/?$/, "") !== currentPath.replace(/\/?$/, "")));
++ return (path != null) && path !== "" && ((toString.call(path) === "[object RegExp]" && !path.test(currentPath)) || (toString.call(path) === "[object String]" && path !== currentPath.replace("http://", "").replace("https://", "")));
+ };
+
+ Tour.prototype._redirect = function(step, path) {