introjs-rails 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -9,19 +9,19 @@
9
9
 
10
10
  Add `introjs-rails` to your Gemfile and run `bundle install`:
11
11
 
12
- gem "introjs-rails"
12
+ gem "introjs-rails"
13
13
 
14
14
  ### Include introjs-rails javascript assets
15
15
 
16
16
  Add the following to your `app/assets/javascripts/application.js`:
17
17
 
18
- //= require introjs
18
+ //= require introjs
19
19
 
20
20
  ### Include introjs-rails stylesheet assets
21
21
 
22
22
  Add to your `app/assets/stylesheets/application.css`:
23
23
 
24
- *= require introjs
24
+ *= require introjs
25
25
 
26
26
  ## Version
27
27
 
@@ -1 +1 @@
1
- (function(){function t(e){this._targetElement=e}function n(e){var t=e.querySelectorAll("*[data-intro]"),n=[],o=this;if(t.length<1){return}for(var a=0,f=t.length;a<f;a++){var l=t[a];n.push({element:l,intro:l.getAttribute("data-intro"),step:parseInt(l.getAttribute("data-step"))})}n.sort(function(e,t){return e.step-t.step});o._introItems=n;if(u(e)){r.call(o);var c=e.querySelector(".introjs-skipbutton"),h=e.querySelector(".introjs-nextbutton");e.onkeydown=function(t){if(t.keyCode==27){s(e)}if([37,39].indexOf(t.keyCode)>=0){if(t.keyCode==37){i.call(o)}else if(t.keyCode==39){r.call(o)}}}}return false}function r(){if(this._currentStep==undefined){this._currentStep=0}else{++this._currentStep}if(this._introItems.length<=this._currentStep){s(this._targetElement);return}o.call(this,this._introItems[this._currentStep].element)}function i(){if(this._currentStep==0)return;o.call(this,this._introItems[--this._currentStep].element)}function s(e){var t=e.querySelector(".introjs-overlay");t.style.opacity=0;setTimeout(function(){t.parentNode.removeChild(t)},500);var n=e.querySelector(".introjs-helperLayer");n.parentNode.removeChild(n);var r=document.querySelector(".introjs-showElement");r.className=r.className.replace(/introjs-showElement/,"").trim();e.onkeydown=null}function o(e){var t=this,n=document.querySelector(".introjs-helperLayer"),i=a(e);if(n!=null){var o=n.querySelector(".introjs-helperNumberLayer"),u=n.querySelector(".introjs-tooltiptext"),f=n.querySelector(".introjs-tooltip");n.setAttribute("style","width: "+(i.width+10)+"px; "+"height:"+(i.height+10)+"px; "+"top:"+(i.top-5)+"px;"+"left: "+(i.left-5)+"px;");o.innerHTML=e.getAttribute("data-step");u.innerHTML=e.getAttribute("data-intro");var l=document.querySelector(".introjs-showElement");l.className=l.className.replace(/introjs-showElement/,"").trim();e.className+=" introjs-showElement";setTimeout(function(){f.style.bottom="-"+(a(f).height+10)+"px"},300)}else{e.className+=" introjs-showElement";var c=document.createElement("div"),h=document.createElement("span"),p=document.createElement("div");c.className="introjs-helperLayer";c.setAttribute("style","width: "+(i.width+10)+"px; "+"height:"+(i.height+10)+"px; "+"top:"+(i.top-5)+"px;"+"left: "+(i.left-5)+"px;");document.body.appendChild(c);h.className="introjs-helperNumberLayer";p.className="introjs-tooltip";h.innerHTML=e.getAttribute("data-step");p.innerHTML="<div class='introjs-tooltiptext'>"+e.getAttribute("data-intro")+"</div><div class='introjs-tooltipbuttons'></div>";c.appendChild(h);c.appendChild(p);var d=document.createElement("a");d.className="introjs-skipbutton";d.href="javascript:void(0);";d.innerHTML="Skip";var v=document.createElement("a");v.onclick=function(){r.call(t)};v.className="introjs-nextbutton";v.href="javascript:void(0);";v.innerHTML="Next ";d.onclick=function(){s(t._targetElement)};var m=p.querySelector(".introjs-tooltipbuttons");m.appendChild(d);m.appendChild(v);p.style.bottom="-"+(a(p).height+10)+"px"}if(typeof e.scrollIntoViewIfNeeded==="function"){e.scrollIntoViewIfNeeded()}}function u(e){var t=document.createElement("div"),n="";t.className="introjs-overlay";var r=a(e);if(r){n+="width: "+r.width+"px; height:"+r.height+"px; top:"+r.top+"px;left: "+r.left+"px;";t.setAttribute("style",n)}e.appendChild(t);t.onclick=function(){s(e)};setTimeout(function(){n+="opacity: .5;";t.setAttribute("style",n)},10);return true}function a(e){var t={};t.width=e.offsetWidth;t.height=e.offsetHeight;var n=0;var r=0;while(e&&!isNaN(e.offsetLeft)&&!isNaN(e.offsetTop)){n+=e.offsetLeft;r+=e.offsetTop;e=e.offsetParent}t.top=r;t.left=n;return t}var e="0.1.0";var f=function(e){if(typeof e==="object"){return new t(e)}else if(typeof e==="string"){var n=document.querySelector(e);if(n){return new t(n)}else{throw new Error("There's no element with given selector.")}}else{return new t(document.body)}};f.version=e;f.fn=t.prototype={clone:function(){return t(this)},start:function(){return n.call(this,this._targetElement)}};this["introJs"]=f})()
1
+ (function(){function t(e){this._targetElement=e}function n(e){var t=e.querySelectorAll("*[data-intro]"),n=[],o=this;if(t.length<1){return false}for(var u=0,a=t.length;u<a;u++){var l=t[u];n.push({element:l,intro:l.getAttribute("data-intro"),step:parseInt(l.getAttribute("data-step"),10),position:l.getAttribute("data-position")||"bottom"})}n.sort(function(e,t){return e.step-t.step});o._introItems=n;if(f.call(o,e)){r.call(o);var c=e.querySelector(".introjs-skipbutton"),h=e.querySelector(".introjs-nextbutton");window.onkeydown=function(t){if(t.keyCode==27){s.call(o,e)}else if(t.keyCode==37){i.call(o)}else if(t.keyCode==39||t.keyCode==13){r.call(o)}}}return false}function r(){if(typeof this._currentStep==="undefined"){this._currentStep=0}else{++this._currentStep}if(this._introItems.length<=this._currentStep){if(this._introCompleteCallback!=undefined){this._introCompleteCallback.call(this)}s.call(this,this._targetElement);return}u.call(this,this._introItems[this._currentStep].element)}function i(){if(this._currentStep==0){return false}u.call(this,this._introItems[--this._currentStep].element)}function s(e){var t=e.querySelector(".introjs-overlay");t.style.opacity=0;setTimeout(function(){if(t.parentNode){t.parentNode.removeChild(t)}},500);var n=e.querySelector(".introjs-helperLayer");if(n){n.parentNode.removeChild(n)}var r=document.querySelector(".introjs-showElement");if(r){r.className=r.className.replace(/introjs-[a-zA-Z]+/g,"").trim()}e.onkeydown=null;this._currentStep=undefined;if(this._introExitCallback!=undefined){this._introExitCallback.call(this)}}function o(e,t,n){var r=l(t);t.style.top=null;t.style.right=null;t.style.bottom=null;t.style.left=null;switch(e.getAttribute("data-position")){case"top":t.style.left="15px";t.style.top="-"+(r.height+10)+"px";n.className="introjs-arrow bottom";break;case"right":console.log(r);t.style.right="-"+(r.width+10)+"px";n.className="introjs-arrow left";break;case"left":t.style.top="15px";t.style.left="-"+(r.width+10)+"px";n.className="introjs-arrow right";break;case"bottom":default:t.style.bottom="-"+(r.height+10)+"px";n.className="introjs-arrow top";break}}function u(e){var t=this,n=document.querySelector(".introjs-helperLayer"),u=l(e);if(n!=null){var f=n.querySelector(".introjs-helperNumberLayer"),c=n.querySelector(".introjs-tooltiptext"),h=n.querySelector(".introjs-arrow"),p=n.querySelector(".introjs-tooltip");n.setAttribute("style","width: "+(u.width+10)+"px; "+"height:"+(u.height+10)+"px; "+"top:"+(u.top-5)+"px;"+"left: "+(u.left-5)+"px;");f.innerHTML=e.getAttribute("data-step");c.innerHTML=e.getAttribute("data-intro");var d=document.querySelector(".introjs-showElement");d.className=d.className.replace(/introjs-[a-zA-Z]+/g,"").trim();o(e,p,h)}else{var v=document.createElement("div"),m=document.createElement("span"),g=document.createElement("div"),y=document.createElement("div");v.className="introjs-helperLayer";v.setAttribute("style","width: "+(u.width+10)+"px; "+"height:"+(u.height+10)+"px; "+"top:"+(u.top-5)+"px;"+"left: "+(u.left-5)+"px;");this._targetElement.appendChild(v);m.className="introjs-helperNumberLayer";g.className="introjs-arrow";y.className="introjs-tooltip";m.innerHTML=e.getAttribute("data-step");y.innerHTML="<div class='introjs-tooltiptext'>"+e.getAttribute("data-intro")+"</div><div class='introjs-tooltipbuttons'></div>";v.appendChild(m);y.appendChild(g);v.appendChild(y);var b=document.createElement("a");b.onclick=function(){r.call(t)};b.className="introjs-button introjs-nextbutton";b.href="javascript:void(0);";b.innerHTML="Next →";var w=document.createElement("a");w.onclick=function(){i.call(t)};w.className="introjs-button introjs-prevbutton";w.href="javascript:void(0);";w.innerHTML=" Back";var E=document.createElement("a");E.className="introjs-button introjs-skipbutton";E.href="javascript:void(0);";E.innerHTML="Skip";E.onclick=function(){s.call(t,t._targetElement)};var S=y.querySelector(".introjs-tooltipbuttons");S.appendChild(E);S.appendChild(w);S.appendChild(b);o(e,y,g)}e.className+=" introjs-showElement";var x="";if(e.currentStyle){x=e.currentStyle["position"]}else if(document.defaultView&&document.defaultView.getComputedStyle){x=document.defaultView.getComputedStyle(e,null).getPropertyValue("position")}x=x.toLowerCase();if(x!="absolute"&&x!="relative"){e.className+=" introjs-relativePosition"}if(!a(e)){var T=e.getBoundingClientRect();top=T.bottom-T.height,bottom=T.bottom-window.innerHeight;if(top<0){window.scrollBy(0,top-30)}else{window.scrollBy(0,bottom+100)}}}function a(e){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom+80<=window.innerHeight&&t.right<=window.innerWidth}function f(e){var t=document.createElement("div"),n="",r=this;t.className="introjs-overlay";if(e.tagName.toLowerCase()=="body"){n+="top: 0;bottom: 0; left: 0;right: 0;position: fixed;";t.setAttribute("style",n)}else{var i=l(e);if(i){n+="width: "+i.width+"px; height:"+i.height+"px; top:"+i.top+"px;left: "+i.left+"px;";t.setAttribute("style",n)}}e.appendChild(t);t.onclick=function(){s.call(r,e)};setTimeout(function(){n+="opacity: .5;";t.setAttribute("style",n)},10);return true}function l(e){var t={};t.width=e.offsetWidth;t.height=e.offsetHeight;var n=0;var r=0;while(e&&!isNaN(e.offsetLeft)&&!isNaN(e.offsetTop)){n+=e.offsetLeft;r+=e.offsetTop;e=e.offsetParent}t.top=r;t.left=n;return t}var e="0.2.0";var c=function(e){if(typeof e==="object"){return new t(e)}else if(typeof e==="string"){var n=document.querySelector(e);if(n){return new t(n)}else{throw new Error("There's no element with given selector.")}}else{return new t(document.body)}};c.version=e;c.fn=t.prototype={clone:function(){return new t(this)},start:function(){n.call(this,this._targetElement);return this},oncomplete:function(e){if(typeof e==="function"){this._introCompleteCallback=e}else{throw new Error("Provided callback for oncomplete was not a function.")}return this},onexit:function(e){if(typeof e==="function"){this._introExitCallback=e}else{throw new Error("Provided callback for onexit was not a function.")}return this}};window["introJs"]=c})()
@@ -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;-o-transition:all .3s ease-out;-ms-transition:all .3s ease-out;transition:all .3s ease-out}.introjs-showElement{z-index:9999999;position:relative}.introjs-helperLayer{background-color:rgba(255,255,255,0.9);z-index:9999998;position:absolute;border-radius:4px;border:1px solid rgba(0,0,0,0.5);box-shadow:0 2px 15px rgba(0,0,0,0.4);-webkit-transition:all .3s ease-out;-moz-transition:all .3s ease-out;-o-transition:all .3s ease-out;-ms-transition:all .3s ease-out;transition:all .3s ease-out}.introjs-helperNumberLayer{z-index:9999999999!important;padding:2px;background:#ff3019;background:-moz-linear-gradient(top,#ff3019 0,#cf0404 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#ff3019),color-stop(100%,#cf0404));background:-webkit-linear-gradient(top,#ff3019 0,#cf0404 100%);background:-o-linear-gradient(top,#ff3019 0,#cf0404 100%);background:-ms-linear-gradient(top,#ff3019 0,#cf0404 100%);background:linear-gradient(to bottom,#ff3019 0,#cf0404 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3019',endColorstr='#cf0404',GradientType=0);color:white;position:absolute;border-radius:50%;font-family:Arial,verdana,tahoma;font-size:13px;font-weight:bold;text-align:center;width:20px;border:3px solid white;box-shadow:0 2px 5px rgba(0,0,0,0.4);text-shadow:1px 1px 1px rgba(0,0,0,0.3);left:-16px;top:-16px}.introjs-tooltip:before{border:5px solid white;content:'';border-top-color:transparent;border-right-color:transparent;border-bottom-color:white;border-left-color:transparent;position:absolute;top:-10px}.introjs-tooltip{position:absolute;padding:10px;background-color:white;border-radius:3px;box-shadow:0 1px 10px rgba(0,0,0,0.4);-webkit-transition:all .1s ease-out;-moz-transition:all .1s ease-out;-o-transition:all .1s ease-out;-ms-transition:all .1s ease-out;transition:all .1s ease-out}.introjs-tooltipbuttons{font-size:10px;text-align:right}.introjs-tooltipbuttons .introjs-skipbutton{margin-right:5px;color:gray}.introjs-tooltipbuttons .introjs-nextbutton{font-weight:bold;color:#2071d3;font-size:11px}
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:all .1s ease-out;-moz-transition:all .1s ease-out;-ms-transition:all .1s ease-out;-o-transition:all .1s ease-out;transition:all .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}
@@ -1,5 +1,5 @@
1
1
  module Introjs
2
2
  module Rails
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
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.1.0
4
+ version: 0.2.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-15 00:00:00.000000000 Z
12
+ date: 2013-03-20 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: -2165148443092454672
128
+ hash: -2457814536081957212
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: -2165148443092454672
137
+ hash: -2457814536081957212
138
138
  requirements: []
139
139
  rubyforge_project:
140
140
  rubygems_version: 1.8.25