diff options
author | plegall <plg@piwigo.org> | 2015-02-10 13:49:36 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2015-02-10 13:49:36 +0000 |
commit | 483dc8c065fe945da150b52bf1328a91c29875dc (patch) | |
tree | d64bbb81328c4b41cb2ef6dfaafbe82259e29ffc /plugins/TakeATour/js/custom.patch | |
parent | a3c913778912d7fa15a762f4fabc3bf28cf44087 (diff) |
bug 3198: upgrade Bootstrap tour to version 0.10.1 + change patch to replace toString.call by {}.toString.call (compatibility with IE)
git-svn-id: http://piwigo.org/svn/trunk@30941 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | plugins/TakeATour/js/custom.patch | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/plugins/TakeATour/js/custom.patch b/plugins/TakeATour/js/custom.patch index 0ad5f0b5c..c372de036 100644 --- a/plugins/TakeATour/js/custom.patch +++ b/plugins/TakeATour/js/custom.patch @@ -1,43 +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) {
+--- bootstrap-tour-standalone.js.orig 2015-02-10 14:28:55.000000000 +0100 ++++ bootstrap-tour-standalone.js 2015-02-10 14:35:03.000000000 +0100 +@@ -870,9 +870,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)) { +@@ -887,6 +893,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); + } +@@ -1023,7 +1037,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) { |