introjs-rails 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1,15 @@
|
|
1
|
-
(function(){
|
1
|
+
(function(g,f){"object"===typeof exports?f(exports):"function"===typeof define&&define.amd?define(["exports"],f):f(g)})(this,function(g){function f(a){this._targetElement=a;this._options={nextLabel:"Next →",prevLabel:"← Back",skipLabel:"Skip",tooltipPosition:"bottom"}}function l(){"undefined"===typeof this._currentStep?this._currentStep=0:++this._currentStep;this._introItems.length<=this._currentStep?("function"===typeof this._introCompleteCallback&&this._introCompleteCallback.call(this),
|
2
|
+
k.call(this,this._targetElement)):q.call(this,this._introItems[this._currentStep].element)}function r(){if(0===this._currentStep)return!1;q.call(this,this._introItems[--this._currentStep].element)}function k(a){var b=a.querySelector(".introjs-overlay");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,
|
3
|
+
"").replace(/^\s+|\s+$/g,"");window.removeEventListener?window.removeEventListener("keydown",this._onKeyDown,!0):document.detachEvent&&document.detachEvent("onkeydown",this._onKeyDown);this._currentStep=void 0;void 0!=this._introExitCallback&&this._introExitCallback.call(this)}function s(a,b,d){a=m(b);b.style.top=null;b.style.right=null;b.style.bottom=null;b.style.left=null;if(this._introItems[this._currentStep])switch(this._introItems[this._currentStep].position){case "top":b.style.left="15px";b.style.top=
|
4
|
+
"-"+(a.height+10)+"px";d.className="introjs-arrow bottom";break;case "right":b.style.right="-"+(a.width+10)+"px";d.className="introjs-arrow left";break;case "left":b.style.top="15px";b.style.left="-"+(a.width+10)+"px";d.className="introjs-arrow right";break;default:b.style.bottom="-"+(a.height+10)+"px",d.className="introjs-arrow top"}}function q(a){var b;"undefined"!==typeof this._introChangeCallback&&this._introChangeCallback.call(this,a);var d=this,c=document.querySelector(".introjs-helperLayer"),
|
5
|
+
e=m(a);if(null!=c){var f=c.querySelector(".introjs-helperNumberLayer"),t=c.querySelector(".introjs-tooltiptext"),u=c.querySelector(".introjs-arrow"),n=c.querySelector(".introjs-tooltip");n.style.opacity=0;c.setAttribute("style","width: "+(e.width+10)+"px; height:"+(e.height+10)+"px; top:"+(e.top-5)+"px;left: "+(e.left-5)+"px;");c=document.querySelector(".introjs-showElement");c.className=c.className.replace(/introjs-[a-zA-Z]+/g,"").replace(/^\s+|\s+$/g,"");d._lastShowElementTimer&&clearTimeout(d._lastShowElementTimer);
|
6
|
+
d._lastShowElementTimer=setTimeout(function(){f.innerHTML=a.getAttribute("data-step");t.innerHTML=a.getAttribute("data-intro");s.call(d,a,n,u);n.style.opacity=1},350)}else{var h=document.createElement("div"),j=document.createElement("span"),c=document.createElement("div");b=document.createElement("div");h.className="introjs-helperLayer";h.setAttribute("style","width: "+(e.width+10)+"px; height:"+(e.height+10)+"px; top:"+(e.top-5)+"px;left: "+(e.left-5)+"px;");this._targetElement.appendChild(h);j.className=
|
7
|
+
"introjs-helperNumberLayer";c.className="introjs-arrow";b.className="introjs-tooltip";j.innerHTML=a.getAttribute("data-step");b.innerHTML='<div class="introjs-tooltiptext">'+a.getAttribute("data-intro")+'</div><div class="introjs-tooltipbuttons"></div>';h.appendChild(j);b.appendChild(c);h.appendChild(b);e=document.createElement("a");e.onclick=function(){l.call(d)};e.className="introjs-button introjs-nextbutton";e.href="javascript:void(0);";e.innerHTML=this._options.nextLabel;h=document.createElement("a");
|
8
|
+
h.onclick=function(){r.call(d)};h.className="introjs-button introjs-prevbutton";h.href="javascript:void(0);";h.innerHTML=this._options.prevLabel;j=document.createElement("a");j.className="introjs-button introjs-skipbutton";j.href="javascript:void(0);";j.innerHTML=this._options.skipLabel;j.onclick=function(){k.call(d,d._targetElement)};var g=b.querySelector(".introjs-tooltipbuttons");g.appendChild(j);g.appendChild(h);g.appendChild(e);s.call(d,a,b,c)}a.className+=" introjs-showElement";c="";a.currentStyle?
|
9
|
+
c=a.currentStyle.position:document.defaultView&&document.defaultView.getComputedStyle&&(c=document.defaultView.getComputedStyle(a,null).getPropertyValue("position"));c=c.toLowerCase();"absolute"!==c&&"relative"!==c&&(a.className+=" introjs-relativePosition");c=a.getBoundingClientRect();0<=c.top&&0<=c.left&&c.bottom+80<=window.innerHeight&&c.right<=window.innerWidth||(b=a.getBoundingClientRect(),c=b.bottom-(b.bottom-b.top),e=b.bottom,b=void 0!=window.innerWidth?window.innerHeight:document.documentElement.clientHeight,
|
10
|
+
b=e-b,0>c?window.scrollBy(0,c-30):window.scrollBy(0,b+100))}function v(a){var b=document.createElement("div"),d="",c=this;b.className="introjs-overlay";if("body"===a.tagName.toLowerCase())d+="top: 0;bottom: 0; left: 0;right: 0;position: fixed;",b.setAttribute("style",d);else{var e=m(a);e&&(d+="width: "+e.width+"px; height:"+e.height+"px; top:"+e.top+"px;left: "+e.left+"px;",b.setAttribute("style",d))}a.appendChild(b);b.onclick=function(){k.call(c,a)};setTimeout(function(){d+="opacity: .5;";b.setAttribute("style",
|
11
|
+
d)},10);return!0}function m(a){var b={};b.width=a.offsetWidth;b.height=a.offsetHeight;for(var d=0,c=0;a&&!isNaN(a.offsetLeft)&&!isNaN(a.offsetTop);)d+=a.offsetLeft,c+=a.offsetTop,a=a.offsetParent;b.top=c;b.left=d;return b}var p=function(a){if("object"===typeof a)return new f(a);if("string"===typeof a){if(a=document.querySelector(a))return new f(a);throw Error("There is no element with given selector.");}return new f(document.body)};p.version="0.3.0";p.fn=f.prototype={clone:function(){return new f(this)},
|
12
|
+
setOption:function(a,b){this._options[a]=b;return this},setOptions:function(a){var b=this._options,d={},c;for(c in b)d[c]=b[c];for(c in a)d[c]=a[c];this._options=d;return this},start:function(){var a=this._targetElement,b=a.querySelectorAll("*[data-intro]"),d=[],c=this;if(!(1>b.length)){for(var e=0,f=b.length;e<f;e++){var g=b[e];d.push({element:g,intro:g.getAttribute("data-intro"),step:parseInt(g.getAttribute("data-step"),10),position:g.getAttribute("data-position")||this._options.tooltipPosition})}d.sort(function(a,
|
13
|
+
b){return a.step-b.step});c._introItems=d;v.call(c,a)&&(l.call(c),a.querySelector(".introjs-skipbutton"),a.querySelector(".introjs-nextbutton"),c._onKeyDown=function(b){27===b.keyCode?k.call(c,a):37===b.keyCode?r.call(c):(39===b.keyCode||13===b.keyCode)&&l.call(c)},window.addEventListener?window.addEventListener("keydown",c._onKeyDown,!0):document.attachEvent&&document.attachEvent("onkeydown",c._onKeyDown))}return this},goToStep:function(a){this._currentStep=a-2;"undefined"!==typeof this._introItems&&
|
14
|
+
l.call(this);return this},exit:function(){k.call(this,this._targetElement)},onchange:function(a){if("function"===typeof a)this._introChangeCallback=a;else throw Error("Provided callback for onchange was not a function.");return this},oncomplete:function(a){if("function"===typeof a)this._introCompleteCallback=a;else throw Error("Provided callback for oncomplete was not a function.");return this},onexit:function(a){if("function"===typeof a)this._introExitCallback=a;else throw Error("Provided callback for onexit was not a function.");
|
15
|
+
return this}};return g.introJs=p});
|
@@ -1 +1 @@
|
|
1
|
-
.introjs-overlay{position:absolute;z-index:999999;background-color:#000;opacity:0;-webkit-transition:all .3s ease-out;-moz-transition:all .3s ease-out;-ms-transition:all .3s ease-out;-o-transition:all .3s ease-out;transition:all .3s ease-out}.introjs-showElement{z-index:9999999}.introjs-relativePosition{position:relative}.introjs-helperLayer{position:absolute;z-index:9999998;background-color:rgba(255,255,255,.9);border:1px solid rgba(0,0,0,.5);border-radius:4px;box-shadow:0 2px 15px rgba(0,0,0,.4);-webkit-transition:all .3s ease-out;-moz-transition:all .3s ease-out;-ms-transition:all .3s ease-out;-o-transition:all .3s ease-out;transition:all .3s ease-out}.introjs-helperNumberLayer{position:absolute;top:-16px;left:-16px;z-index:9999999999!important;padding:2px;font-family:Arial,verdana,tahoma;font-size:13px;font-weight:bold;color:white;text-align:center;text-shadow:1px 1px 1px rgba(0,0,0,.3);background:#ff3019;background:-webkit-linear-gradient(top,#ff3019 0,#cf0404 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#ff3019),color-stop(100%,#cf0404));background:-moz-linear-gradient(top,#ff3019 0,#cf0404 100%);background:-ms-linear-gradient(top,#ff3019 0,#cf0404 100%);background:-o-linear-gradient(top,#ff3019 0,#cf0404 100%);background:linear-gradient(to bottom,#ff3019 0,#cf0404 100%);width:20px;height:20px;line-height:20px;border:3px solid white;border-radius:50%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3019',endColorstr='#cf0404',GradientType=0);filter:progid:DXImageTransform.Microsoft.Shadow(direction=135,strength=2,color=ff0000);box-shadow:0 2px 5px rgba(0,0,0,.4)}.introjs-arrow{border:5px solid white;content:'';position:absolute}.introjs-arrow.top{top:-10px;border-top-color:transparent;border-right-color:transparent;border-bottom-color:white;border-left-color:transparent}.introjs-arrow.right{right:-10px;top:10px;border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent;border-left-color:white}.introjs-arrow.bottom{bottom:-10px;border-top-color:white;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent}.introjs-arrow.left{left:-10px;top:10px;border-top-color:transparent;border-right-color:white;border-bottom-color:transparent;border-left-color:transparent}.introjs-tooltip{position:absolute;padding:10px;background-color:white;border-radius:3px;box-shadow:0 1px 10px rgba(0,0,0,.4);-webkit-transition:
|
1
|
+
.introjs-overlay{position:absolute;z-index:999999;background-color:#000;opacity:0;-webkit-transition:all .3s ease-out;-moz-transition:all .3s ease-out;-ms-transition:all .3s ease-out;-o-transition:all .3s ease-out;transition:all .3s ease-out}.introjs-showElement{z-index:9999999}.introjs-relativePosition{position:relative}.introjs-helperLayer{position:absolute;z-index:9999998;background-color:rgba(255,255,255,.9);border:1px solid rgba(0,0,0,.5);border-radius:4px;box-shadow:0 2px 15px rgba(0,0,0,.4);-webkit-transition:all .3s ease-out;-moz-transition:all .3s ease-out;-ms-transition:all .3s ease-out;-o-transition:all .3s ease-out;transition:all .3s ease-out}.introjs-helperNumberLayer{position:absolute;top:-16px;left:-16px;z-index:9999999999!important;padding:2px;font-family:Arial,verdana,tahoma;font-size:13px;font-weight:bold;color:white;text-align:center;text-shadow:1px 1px 1px rgba(0,0,0,.3);background:#ff3019;background:-webkit-linear-gradient(top,#ff3019 0,#cf0404 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#ff3019),color-stop(100%,#cf0404));background:-moz-linear-gradient(top,#ff3019 0,#cf0404 100%);background:-ms-linear-gradient(top,#ff3019 0,#cf0404 100%);background:-o-linear-gradient(top,#ff3019 0,#cf0404 100%);background:linear-gradient(to bottom,#ff3019 0,#cf0404 100%);width:20px;height:20px;line-height:20px;border:3px solid white;border-radius:50%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3019',endColorstr='#cf0404',GradientType=0);filter:progid:DXImageTransform.Microsoft.Shadow(direction=135,strength=2,color=ff0000);box-shadow:0 2px 5px rgba(0,0,0,.4)}.introjs-arrow{border:5px solid white;content:'';position:absolute}.introjs-arrow.top{top:-10px;border-top-color:transparent;border-right-color:transparent;border-bottom-color:white;border-left-color:transparent}.introjs-arrow.right{right:-10px;top:10px;border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent;border-left-color:white}.introjs-arrow.bottom{bottom:-10px;border-top-color:white;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent}.introjs-arrow.left{left:-10px;top:10px;border-top-color:transparent;border-right-color:white;border-bottom-color:transparent;border-left-color:transparent}.introjs-tooltip{position:absolute;padding:10px;background-color:white;min-width:200px;border-radius:3px;box-shadow:0 1px 10px rgba(0,0,0,.4);-webkit-transition:opacity .1s ease-out;-moz-transition:opacity .1s ease-out;-ms-transition:opacity .1s ease-out;-o-transition:opacity .1s ease-out;transition:opacity .1s ease-out}.introjs-tooltipbuttons{text-align:right}.introjs-button{position:relative;overflow:visible;display:inline-block;padding:.3em .8em;border:1px solid #d4d4d4;margin:0;text-decoration:none;text-shadow:1px 1px 0 #fff;font:11px/normal sans-serif;color:#333;white-space:nowrap;cursor:pointer;outline:0;background-color:#ececec;background-image:-webkit-gradient(linear,0 0,0 100%,from(#f4f4f4),to(#ececec));background-image:-moz-linear-gradient(#f4f4f4,#ececec);background-image:-o-linear-gradient(#f4f4f4,#ececec);background-image:linear-gradient(#f4f4f4,#ececec);-webkit-background-clip:padding;-moz-background-clip:padding;-o-background-clip:padding-box;-webkit-border-radius:.2em;-moz-border-radius:.2em;border-radius:.2em;zoom:1;*display:inline;margin-top:10px}.introjs-button:hover{border-color:#bcbcbc;text-decoration:none;box-shadow:0 1px 1px #e3e3e3}.introjs-button:focus,.introjs-button:active{background-image:-webkit-gradient(linear,0 0,0 100%,from(#ececec),to(#f4f4f4));background-image:-moz-linear-gradient(#ececec,#f4f4f4);background-image:-o-linear-gradient(#ececec,#f4f4f4);background-image:linear-gradient(#ececec,#f4f4f4)}.introjs-button::-moz-focus-inner{padding:0;border:0}.introjs-skipbutton{margin-right:5px;color:#7a7a7a}.introjs-prevbutton{-webkit-border-radius:.2em 0 0 .2em;-moz-border-radius:.2em 0 0 .2em;border-radius:.2em 0 0 .2em;border-right:0}.introjs-nextbutton{-webkit-border-radius:0 .2em .2em 0;-moz-border-radius:0 .2em .2em 0;border-radius:0 .2em .2em 0}
|
data/lib/introjs-rails.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: introjs-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-03-
|
12
|
+
date: 2013-03-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thor
|
@@ -125,7 +125,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
125
125
|
version: '0'
|
126
126
|
segments:
|
127
127
|
- 0
|
128
|
-
hash:
|
128
|
+
hash: 3547491141343648267
|
129
129
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
130
130
|
none: false
|
131
131
|
requirements:
|
@@ -134,7 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
134
134
|
version: '0'
|
135
135
|
segments:
|
136
136
|
- 0
|
137
|
-
hash:
|
137
|
+
hash: 3547491141343648267
|
138
138
|
requirements: []
|
139
139
|
rubyforge_project:
|
140
140
|
rubygems_version: 1.8.25
|