From a19f2cf6981cfd8fac7f3fd2dd9c76cdfd0f56e1 Mon Sep 17 00:00:00 2001
From: Robert Kang
Date: Thu, 13 Feb 2014 21:11:51 -0400
Subject: [PATCH 01/35] fixes #96
---
introjs.css | 1 +
1 file changed, 1 insertion(+)
diff --git a/introjs.css b/introjs.css
index e3cda0c17..64d601da1 100644
--- a/introjs.css
+++ b/introjs.css
@@ -22,6 +22,7 @@
.introjs-fixParent {
z-index: auto !important;
opacity: 1.0 !important;
+ position: absolute;
}
.introjs-showElement {
From 814a75ee1f4275afd5e79e642e67988119e9de35 Mon Sep 17 00:00:00 2001
From: April Barrett
Date: Thu, 7 Nov 2013 18:53:00 -0800
Subject: [PATCH 02/35] adding component.json
---
component.json | 13 +++++++++++++
1 file changed, 13 insertions(+)
create mode 100644 component.json
diff --git a/component.json b/component.json
new file mode 100644
index 000000000..de99a3c92
--- /dev/null
+++ b/component.json
@@ -0,0 +1,13 @@
+{
+ "name": "intro",
+ "repo": "usablica/intro.js",
+ "description": "Better introductions for websites and features with a step-by-step guide for your projects",
+ "version": "0.7.0",
+ "main": "intro.js",
+ "scripts": [
+ "intro.js"
+ ],
+ "styles": [
+ "introjs.css"
+ ]
+}
From 04a1580cb7ad56941e53372ea4aa10bdca6988e6 Mon Sep 17 00:00:00 2001
From: Afshin Mehrabani
Date: Tue, 11 Mar 2014 10:56:03 +0330
Subject: [PATCH 03/35] Update component.json
---
component.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/component.json b/component.json
index de99a3c92..6cc166828 100644
--- a/component.json
+++ b/component.json
@@ -1,5 +1,5 @@
{
- "name": "intro",
+ "name": "intro.js",
"repo": "usablica/intro.js",
"description": "Better introductions for websites and features with a step-by-step guide for your projects",
"version": "0.7.0",
From 80bf24394bb537c05f58db92d34d7813059a873b Mon Sep 17 00:00:00 2001
From: Afshin Mehrabani
Date: Tue, 11 Mar 2014 12:32:11 +0330
Subject: [PATCH 04/35] Fix recursion problem in _clone function, fixes #239
---
bower.json | 2 +-
component.json | 2 +-
intro.js | 8 ++++----
package.json | 2 +-
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/bower.json b/bower.json
index 100164aa7..8b2b91812 100644
--- a/bower.json
+++ b/bower.json
@@ -1,6 +1,6 @@
{
"name": "intro.js",
- "version": "0.7.0",
+ "version": "0.7.1",
"description": "A better way for new feature introduction and step-by-step users guide for your website and project.",
"keywords": ["demo", "intro", "introduction"],
"homepage": "http://usablica.github.com/intro.js/",
diff --git a/component.json b/component.json
index 6cc166828..d1aee3afa 100644
--- a/component.json
+++ b/component.json
@@ -2,7 +2,7 @@
"name": "intro.js",
"repo": "usablica/intro.js",
"description": "Better introductions for websites and features with a step-by-step guide for your projects",
- "version": "0.7.0",
+ "version": "0.7.1",
"main": "intro.js",
"scripts": [
"intro.js"
diff --git a/intro.js b/intro.js
index cffefaf40..aa74dd1da 100644
--- a/intro.js
+++ b/intro.js
@@ -1,5 +1,5 @@
/**
- * Intro.js v0.7.0
+ * Intro.js v0.7.1
* https://github.com/usablica/intro.js
* MIT licensed
*
@@ -19,7 +19,7 @@
}
} (this, function (exports) {
//Default config/variables
- var VERSION = '0.7.0';
+ var VERSION = '0.7.1';
/**
* IntroJs main class
@@ -215,7 +215,7 @@
* @method _cloneObject
*/
function _cloneObject(object) {
- if (object == null || typeof (object) != 'object' || object.hasOwnProperty("nodeName") === true) {
+ if (object == null || typeof (object) != 'object' || object.hasOwnProperty("nodeName") === true || typeof (object.nodeType) != 'undefined') {
return object;
}
var temp = {};
@@ -646,7 +646,7 @@
if (/[0-9]+/.test(zIndex) || opacity < 1) {
parentElm.className += ' introjs-fixParent';
}
-
+
parentElm = parentElm.parentNode;
}
diff --git a/package.json b/package.json
index 8bbcda848..c8eb9174c 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "Intro.js",
"description": "Better introductions for websites and features with a step-by-step guide for your projects",
- "version": "0.7.0",
+ "version": "0.7.1",
"author": "Afshin Mehrabani ",
"repository": {
"type": "git",
From 44852a19d5b5ff49b8903f507b7927cc121b3856 Mon Sep 17 00:00:00 2001
From: Afshin Mehrabani
Date: Tue, 11 Mar 2014 12:39:38 +0330
Subject: [PATCH 05/35] Add minified version
---
minified/intro.min.js | 46 +++++++++++++++++++++----------------------
1 file changed, 23 insertions(+), 23 deletions(-)
diff --git a/minified/intro.min.js b/minified/intro.min.js
index 7c3d222c3..27dc1fd71 100644
--- a/minified/intro.min.js
+++ b/minified/intro.min.js
@@ -1,24 +1,24 @@
-(function(q,e){"object"===typeof exports?e(exports):"function"===typeof define&&define.amd?define(["exports"],e):e(q)})(this,function(q){function e(a){this._targetElement=a;this._options={nextLabel:"Next →",prevLabel:"← Back",skipLabel:"Skip",doneLabel:"Done",tooltipPosition:"bottom",tooltipClass:"",exitOnEsc:!0,exitOnOverlayClick:!0,showStepNumbers:!0,keyboardNavigation:!0,showButtons:!0,showBullets:!0,scrollToElement:!0}}function s(a){if(null==a||"object"!=typeof a||!0===a.hasOwnProperty("nodeName"))return a;
-var b={},c;for(c in a)b[c]=s(a[c]);return b}function t(){"undefined"===typeof this._currentStep?this._currentStep=0:++this._currentStep;if(this._introItems.length<=this._currentStep)"function"===typeof this._introCompleteCallback&&this._introCompleteCallback.call(this),u.call(this,this._targetElement);else{var a=this._introItems[this._currentStep];"undefined"!==typeof this._introBeforeChangeCallback&&this._introBeforeChangeCallback.call(this,a.element);z.call(this,a)}}function x(){if(0===this._currentStep)return!1;
-var a=this._introItems[--this._currentStep];"undefined"!==typeof this._introBeforeChangeCallback&&this._introBeforeChangeCallback.call(this,a.element);z.call(this,a)}function u(a){var b=a.querySelector(".introjs-overlay");if(null!=b){b.style.opacity=0;setTimeout(function(){b.parentNode&&b.parentNode.removeChild(b)},500);(a=a.querySelector(".introjs-helperLayer"))&&a.parentNode.removeChild(a);if(a=document.querySelector(".introjs-showElement"))a.className=a.className.replace(/introjs-[a-zA-Z]+/g,"").replace(/^\s+|\s+$/g,
-"");if((a=document.querySelectorAll(".introjs-fixParent"))&&0 a.active").className="";d.querySelector('.introjs-bullets li > a[data-stepnumber="'+
-a.step+'"]').className="active";n.style.opacity=1},350)}else{var h=document.createElement("div"),l=document.createElement("div"),g=document.createElement("div"),m=document.createElement("div"),k=document.createElement("div"),e=document.createElement("div");h.className="introjs-helperLayer";w.call(c,h);this._targetElement.appendChild(h);l.className="introjs-arrow";m.className="introjs-tooltiptext";m.innerHTML=a.intro;k.className="introjs-bullets";!1===this._options.showBullets&&(k.style.display="none");
-var q=document.createElement("ul");b=0;for(var v=this._introItems.length;bg)b.className+=" introjs-fixParent";b=b.parentNode}b=a.element.getBoundingClientRect();
-!(0<=b.top&&0<=b.left&&b.bottom+80<=window.innerHeight&&b.right<=window.innerWidth)&&!0===this._options.scrollToElement&&(g=a.element.getBoundingClientRect(),b=void 0!=window.innerWidth?window.innerHeight:document.documentElement.clientHeight,l=g.bottom-(g.bottom-g.top),g=g.bottom-b,0>l||a.element.clientHeight>b?window.scrollBy(0,l-30):window.scrollBy(0,g+100));"undefined"!==typeof this._introAfterChangeCallback&&this._introAfterChangeCallback.call(this,a.element)}function y(a,b){var c="";a.currentStyle?
-c=a.currentStyle[b]:document.defaultView&&document.defaultView.getComputedStyle&&(c=document.defaultView.getComputedStyle(a,null).getPropertyValue(b));return c&&c.toLowerCase?c.toLowerCase():c}function C(a){var b=document.createElement("div"),c="",d=this;b.className="introjs-overlay";if("body"===a.tagName.toLowerCase())c+="top: 0;bottom: 0; left: 0;right: 0;position: fixed;",b.setAttribute("style",c);else{var f=p(a);f&&(c+="width: "+f.width+"px; height:"+f.height+"px; top:"+f.top+"px;left: "+f.left+
-"px;",b.setAttribute("style",c))}a.appendChild(b);b.onclick=function(){!0==d._options.exitOnOverlayClick&&(u.call(d,a),void 0!=d._introExitCallback&&d._introExitCallback.call(d))};setTimeout(function(){c+="opacity: .8;";b.setAttribute("style",c)},10);return!0}function p(a){var b={};b.width=a.offsetWidth;b.height=a.offsetHeight;for(var c=0,d=0;a&&!isNaN(a.offsetLeft)&&!isNaN(a.offsetTop);)c+=a.offsetLeft,d+=a.offsetTop,a=a.offsetParent;b.top=d;b.left=c;return b}var v=function(a){if("object"===typeof a)return new e(a);
-if("string"===typeof a){if(a=document.querySelector(a))return new e(a);throw Error("There is no element with given selector.");}return new e(document.body)};v.version="0.7.0";v.fn=e.prototype={clone:function(){return new e(this)},setOption:function(a,b){this._options[a]=b;return this},setOptions:function(a){var b=this._options,c={},d;for(d in b)c[d]=b[d];for(d in a)c[d]=a[d];this._options=c;return this},start:function(){a:{var a=this._targetElement,b=[],c=this;if(this._options.steps)for(var d=[],
-f=0,d=this._options.steps.length;fd.length)break a;f=0;for(e=d.length;f a.active").className=
+"";d.querySelector('.introjs-bullets li > a[data-stepnumber="'+a.step+'"]').className="active";n.style.opacity=1},350)}else{var h=document.createElement("div"),l=document.createElement("div"),g=document.createElement("div"),m=document.createElement("div"),k=document.createElement("div"),e=document.createElement("div");h.className="introjs-helperLayer";w.call(c,h);this._targetElement.appendChild(h);l.className="introjs-arrow";m.className="introjs-tooltiptext";m.innerHTML=a.intro;k.className="introjs-bullets";
+!1===this._options.showBullets&&(k.style.display="none");var q=document.createElement("ul");b=0;for(var v=this._introItems.length;bg)b.className+=
+" introjs-fixParent";b=b.parentNode}b=a.element.getBoundingClientRect();!(0<=b.top&&0<=b.left&&b.bottom+80<=window.innerHeight&&b.right<=window.innerWidth)&&!0===this._options.scrollToElement&&(g=a.element.getBoundingClientRect(),b=void 0!=window.innerWidth?window.innerHeight:document.documentElement.clientHeight,l=g.bottom-(g.bottom-g.top),g=g.bottom-b,0>l||a.element.clientHeight>b?window.scrollBy(0,l-30):window.scrollBy(0,g+100));"undefined"!==typeof this._introAfterChangeCallback&&this._introAfterChangeCallback.call(this,
+a.element)}function y(a,b){var c="";a.currentStyle?c=a.currentStyle[b]:document.defaultView&&document.defaultView.getComputedStyle&&(c=document.defaultView.getComputedStyle(a,null).getPropertyValue(b));return c&&c.toLowerCase?c.toLowerCase():c}function C(a){var b=document.createElement("div"),c="",d=this;b.className="introjs-overlay";if("body"===a.tagName.toLowerCase())c+="top: 0;bottom: 0; left: 0;right: 0;position: fixed;",b.setAttribute("style",c);else{var f=p(a);f&&(c+="width: "+f.width+"px; height:"+
+f.height+"px; top:"+f.top+"px;left: "+f.left+"px;",b.setAttribute("style",c))}a.appendChild(b);b.onclick=function(){!0==d._options.exitOnOverlayClick&&(u.call(d,a),void 0!=d._introExitCallback&&d._introExitCallback.call(d))};setTimeout(function(){c+="opacity: .8;";b.setAttribute("style",c)},10);return!0}function p(a){var b={};b.width=a.offsetWidth;b.height=a.offsetHeight;for(var c=0,d=0;a&&!isNaN(a.offsetLeft)&&!isNaN(a.offsetTop);)c+=a.offsetLeft,d+=a.offsetTop,a=a.offsetParent;b.top=d;b.left=c;
+return b}var v=function(a){if("object"===typeof a)return new e(a);if("string"===typeof a){if(a=document.querySelector(a))return new e(a);throw Error("There is no element with given selector.");}return new e(document.body)};v.version="0.7.1";v.fn=e.prototype={clone:function(){return new e(this)},setOption:function(a,b){this._options[a]=b;return this},setOptions:function(a){var b=this._options,c={},d;for(d in b)c[d]=b[d];for(d in a)c[d]=a[d];this._options=c;return this},start:function(){a:{var a=this._targetElement,
+b=[],c=this;if(this._options.steps)for(var d=[],f=0,d=this._options.steps.length;fd.length)break a;f=0;for(e=d.length;f
Date: Tue, 11 Mar 2014 13:12:17 +0330
Subject: [PATCH 06/35] add v0.7.1 changelog
---
README.md | 3 +++
1 file changed, 3 insertions(+)
diff --git a/README.md b/README.md
index 08027240c..35df6ca3d 100644
--- a/README.md
+++ b/README.md
@@ -381,6 +381,9 @@ Want to learn faster and easier? Here we have **Instant IntroJs**, Packt Publish
## Release History
+ * **v0.7.1** - 2014-03-11
+ - Fix "Too much recursion" issue with Firefox and Internet Explorer.
+
* **v0.7.0** - 2014-02-07
- Add `onafterchange` event
- Add scrolling to element option
From be96db02967e9144695e7e9b99ceaa1a11718b4f Mon Sep 17 00:00:00 2001
From: Afshin Mehrabani
Date: Tue, 25 Mar 2014 12:28:20 +0430
Subject: [PATCH 07/35] Add ability to define introductions without focusing on
elements + fix IE8 issue in programmatic version
---
example/index.html | 1 +
example/programmatic/index.html | 3 +
example/withoutElement/index.html | 113 ++++++++++++++++++++++++++++++
intro.js | 97 +++++++++++++++++++++----
introjs.css | 7 ++
minified/intro.min.js | 48 +++++++------
minified/introjs.min.css | 2 +-
7 files changed, 234 insertions(+), 37 deletions(-)
create mode 100644 example/withoutElement/index.html
diff --git a/example/index.html b/example/index.html
index 63104255f..d42e90716 100644
--- a/example/index.html
+++ b/example/index.html
@@ -29,6 +29,7 @@ Examples
RTL version
HTML in tooltip
Custom CSS Class
+ Introduction without focusing on elements
+
+
+
+
+
+
+
+
+
Without Element
+
This example shows the introductions without focusing on elements.
+
Show me how
+
+
+
+
+
+
+
Section One
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis mollis augue a neque cursus ac blandit orci faucibus. Phasellus nec metus purus.
+
+
Section Two
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis mollis augue a neque cursus ac blandit orci faucibus. Phasellus nec metus purus.
+
+
Section Three
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis mollis augue a neque cursus ac blandit orci faucibus. Phasellus nec metus purus.
+
+
+
+
Section Four
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis mollis augue a neque cursus ac blandit orci faucibus. Phasellus nec metus purus.
+
+
+
Section Five
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis mollis augue a neque cursus ac blandit orci faucibus. Phasellus nec metus purus.
+
+
Section Six
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis mollis augue a neque cursus ac blandit orci faucibus. Phasellus nec metus purus.
+
+
+
+
+
+
+
+
+
diff --git a/example/programmatic/index.html b/example/programmatic/index.html
index 0ce961054..d40e4b48a 100644
--- a/example/programmatic/index.html
+++ b/example/programmatic/index.html
@@ -74,6 +74,9 @@
var intro = introJs();
intro.setOptions({
steps: [
+ {
+ intro: "Hello world!"
+ },
{
element: document.querySelector('#step1'),
intro: "This is a tooltip."
diff --git a/example/withoutElement/index.html b/example/withoutElement/index.html
new file mode 100644
index 000000000..5a4c12e25
--- /dev/null
+++ b/example/withoutElement/index.html
@@ -0,0 +1,113 @@
+
+
+