source:
trunk/plugins/TakeATour/js/custom.patch
@
30941
Last change on this file since 30941 was 30941, checked in by , 9 years ago | |
---|---|
File size: 1.9 KB |
-
bootstrap-tour-standalone.js
old new 870 870 return step.path; 871 871 } 872 872 }).call(_this); 873 current_path = [document.location.pathname, document.location.hash].join('');873 current_path = document.location.href; 874 874 if (_this._isRedirect(path, current_path)) { 875 if ({}.toString.call(path) === "[object RegExp]") { 876 _this._redirect(step, path); 877 } 878 else { 879 path = document.location.protocol+'//'+path; 875 880 _this._redirect(step, path); 881 } 876 882 return; 877 883 } 878 884 if (_this._isOrphan(step)) { … … 887 893 } 888 894 _this._debug("Show the orphan step " + (_this._current + 1) + ". Orphans option is true."); 889 895 } 896 if (step.title === "" & step.content === "") { 897 if (skipToPrevious) { 898 _this._showPrevStep(); 899 } else { 900 _this._showNextStep(); 901 } 902 return; 903 } 890 904 if (step.backdrop) { 891 905 _this._showBackdrop(!_this._isOrphan(step) ? step.element : void 0); 892 906 } … … 1023 1037 }; 1024 1038 1025 1039 Tour.prototype._isRedirect = function(path, currentPath) { 1026 return (path != null) && path !== '' && (({}.toString.call(path) === '[object RegExp]' && !path.test(currentPath)) || ({}.toString.call(path) === '[object String]' && path .replace(/\?.*$/, '').replace(/\/?$/, '') !== currentPath.replace(/\/?$/, '')));1040 return (path != null) && path !== '' && (({}.toString.call(path) === '[object RegExp]' && !path.test(currentPath)) || ({}.toString.call(path) === '[object String]' && path !== currentPath.replace("http://", "").replace("https://", ""))); 1027 1041 }; 1028 1042 1029 1043 Tour.prototype._redirect = function(step, path) {
Note: See TracBrowser
for help on using the repository browser.