Ignore:
Timestamp:
Feb 10, 2015, 2:49:36 PM (9 years ago)
Author:
plg
Message:

bug 3198: upgrade Bootstrap tour to version 0.10.1 + change patch to replace toString.call by {}.toString.call (compatibility with IE)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/TakeATour/js/custom.patch

    r28775 r30941  
    1 --- E:/Program Files/EasyPHP/www/SITE/sandbox/pwg_test/piwigo_trunk/plugins/TakeATour/js/903.js Mon Jun 23 21:44:59 2014
    2 +++ 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
    3 @@ -849,9 +849,15 @@
     1--- bootstrap-tour-standalone.js.orig   2015-02-10 14:28:55.000000000 +0100
     2+++ bootstrap-tour-standalone.js        2015-02-10 14:35:03.000000000 +0100
     3@@ -870,9 +870,15 @@
    44                 return step.path;
    55             }
    66           }).call(_this);
    7 -          current_path = [document.location.pathname, document.location.hash].join("");
    8 +        current_path = document.location.href;
     7-          current_path = [document.location.pathname, document.location.hash].join('');
     8+          current_path = document.location.href;
    99           if (_this._isRedirect(path, current_path)) {
    10 +          if (toString.call(path) === "[object RegExp]") {
    11              _this._redirect(step, path);
     10+            if ({}.toString.call(path) === "[object RegExp]") {
     11+             _this._redirect(step, path);
    1212+          }
    1313+          else {
    1414+            path = document.location.protocol+'//'+path;
    15 +            _this._redirect(step, path);
     15             _this._redirect(step, path);
    1616+          }
    1717             return;
    1818           }
    1919           if (_this._isOrphan(step)) {
    20 @@ -866,6 +872,14 @@
     20@@ -887,6 +893,14 @@
    2121             }
    2222             _this._debug("Show the orphan step " + (_this._current + 1) + ". Orphans option is true.");
     
    3333             _this._showBackdrop(!_this._isOrphan(step) ? step.element : void 0);
    3434           }
    35 @@ -988,7 +1002,7 @@
     35@@ -1023,7 +1037,7 @@
    3636     };
    3737 
    3838     Tour.prototype._isRedirect = function(path, currentPath) {
    39 -      return (path != null) && path !== "" && (({}.toString.call(path) === "[object RegExp]" && !path.test(currentPath)) || ({}.toString.call(path) === "[object String]" && path.replace(/\?.*$/, "").replace(/\/?$/, "") !== currentPath.replace(/\/?$/, "")));
    40 +      return (path != null) && path !== "" && ((toString.call(path) === "[object RegExp]" && !path.test(currentPath)) || (toString.call(path) === "[object String]" && path !== currentPath.replace("http://", "").replace("https://", "")));
     39-      return (path != null) && path !== '' && (({}.toString.call(path) === '[object RegExp]' && !path.test(currentPath)) || ({}.toString.call(path) === '[object String]' && path.replace(/\?.*$/, '').replace(/\/?$/, '') !== currentPath.replace(/\/?$/, '')));
     40+      return (path != null) && path !== '' && (({}.toString.call(path) === '[object RegExp]' && !path.test(currentPath)) || ({}.toString.call(path) === '[object String]' && path !== currentPath.replace("http://", "").replace("https://", "")));
    4141     };
    4242 
Note: See TracChangeset for help on using the changeset viewer.