alexgunslinger-hopscotch-rails 0.2.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +22 -0
- data/README.md +37 -0
- data/lib/hopscotch/rails.rb +8 -0
- data/lib/hopscotch/rails/version.rb +5 -0
- data/vendor/assets/images/sprite-green.png +0 -0
- data/vendor/assets/images/sprite-orange.png +0 -0
- data/vendor/assets/javascripts/hopscotch.js +17 -0
- data/vendor/assets/stylesheets/hopscotch.css +521 -0
- metadata +95 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 25277cbf158b6fa8dd17716fd5bb2308cb1b842e
|
4
|
+
data.tar.gz: 78f5479fd7d1da3f4f3262ac05bf252cd8bea9bb
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b4b2ffa8e12b5ba09fe19298be6792e639d87b05466193f04526d1fd086ba6fc367c3dbfaaaae34943d665f51d2fe04d0818caaf1410c8461ea3c7b9c302f893
|
7
|
+
data.tar.gz: e36553fd5ee066e5e3a3ebdb976dbfe68935fba0719baec51c661e7a4843c4f79d45b4517772aeabc55cf63686dfcd5798f685bd0dac8f4a72fadc8279c72274
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Chris Schmitz
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
# Hopscotch::Rails
|
2
|
+
|
3
|
+
[Hopscotch](http://linkedin.github.io/hopscotch/) is a framework for making product tours on web pages. This gem makes it easy to include the framework into a Rails app.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'hopscotch-rails'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install hopscotch-rails
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
Require the assets:
|
22
|
+
|
23
|
+
In `app/assets/javascripts/application.js`:
|
24
|
+
|
25
|
+
//= require hopscotch
|
26
|
+
|
27
|
+
In `app/assets/stylesheets/application.css`:
|
28
|
+
|
29
|
+
*= require hopscotch
|
30
|
+
|
31
|
+
## Contributing
|
32
|
+
|
33
|
+
1. Fork it
|
34
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
35
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
36
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
37
|
+
5. Create new Pull Request
|
Binary file
|
Binary file
|
@@ -0,0 +1,17 @@
|
|
1
|
+
/**! hopscotch - v0.2.6
|
2
|
+
*
|
3
|
+
* Copyright 2016 LinkedIn Corp. All rights reserved.
|
4
|
+
*
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
* you may not use this file except in compliance with the License.
|
7
|
+
* You may obtain a copy of the License at
|
8
|
+
*
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
*
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
* See the License for the specific language governing permissions and
|
15
|
+
* limitations under the License.
|
16
|
+
*/
|
17
|
+
!function(a,b){"use strict";if("function"==typeof define&&define.amd)define([],b);else if("object"==typeof exports)module.exports=b();else{var c="hopscotch";if(a[c])return;a[c]=b()}}(this,function(){var Hopscotch,HopscotchBubble,HopscotchCalloutManager,HopscotchI18N,customI18N,customRenderer,customEscape,utils,callbacks,helpers,winLoadHandler,defaultOpts,winHopscotch,templateToUse="bubble_default",Sizzle=window.Sizzle||null,undefinedStr="undefined",waitingToStart=!1,hasJquery=typeof jQuery!==undefinedStr,hasSessionStorage=!1,isStorageWritable=!1,document=window.document,validIdRegEx=/^[a-zA-Z]+[a-zA-Z0-9_-]*$/,rtlMatches={left:"right",right:"left"};try{typeof window.sessionStorage!==undefinedStr&&(hasSessionStorage=!0,sessionStorage.setItem("hopscotch.test.storage","ok"),sessionStorage.removeItem("hopscotch.test.storage"),isStorageWritable=!0)}catch(err){}return defaultOpts={smoothScroll:!0,scrollDuration:1e3,scrollTopMargin:200,showCloseButton:!0,showPrevButton:!1,showNextButton:!0,bubbleWidth:280,bubblePadding:15,arrowWidth:20,skipIfNoElement:!0,isRtl:!1,cookieName:"hopscotch.tour.state"},Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)}),winLoadHandler=function(){waitingToStart&&winHopscotch.startTour()},utils={addClass:function(a,b){var c,d,e,f;if(a.className){for(d=b.split(/\s+/),c=" "+a.className+" ",e=0,f=d.length;f>e;++e)c.indexOf(" "+d[e]+" ")<0&&(c+=d[e]+" ");a.className=c.replace(/^\s+|\s+$/g,"")}else a.className=b},removeClass:function(a,b){var c,d,e,f;for(d=b.split(/\s+/),c=" "+a.className+" ",e=0,f=d.length;f>e;++e)c=c.replace(" "+d[e]+" "," ");a.className=c.replace(/^\s+|\s+$/g,"")},hasClass:function(a,b){var c;return a.className?(c=" "+a.className+" ",-1!==c.indexOf(" "+b+" ")):!1},getPixelValue:function(a){var b=typeof a;return"number"===b?a:"string"===b?parseInt(a,10):0},valOrDefault:function(a,b){return typeof a!==undefinedStr?a:b},invokeCallbackArrayHelper:function(a){var b;return Array.isArray(a)&&(b=helpers[a[0]],"function"==typeof b)?b.apply(this,a.slice(1)):void 0},invokeCallbackArray:function(a){var b,c;if(Array.isArray(a)){if("string"==typeof a[0])return utils.invokeCallbackArrayHelper(a);for(b=0,c=a.length;c>b;++b)utils.invokeCallback(a[b])}},invokeCallback:function(a){return"function"==typeof a?a():"string"==typeof a&&helpers[a]?helpers[a]():utils.invokeCallbackArray(a)},invokeEventCallbacks:function(a,b){var c,d,e=callbacks[a];if(b)return this.invokeCallback(b);for(c=0,d=e.length;d>c;++c)this.invokeCallback(e[c].cb)},getScrollTop:function(){var a;return a=typeof window.pageYOffset!==undefinedStr?window.pageYOffset:document.documentElement.scrollTop},getScrollLeft:function(){var a;return a=typeof window.pageXOffset!==undefinedStr?window.pageXOffset:document.documentElement.scrollLeft},getWindowHeight:function(){return window.innerHeight||document.documentElement.clientHeight},addEvtListener:function(a,b,c){return a?a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent("on"+b,c):void 0},removeEvtListener:function(a,b,c){return a?a.removeEventListener?a.removeEventListener(b,c,!1):a.detachEvent("on"+b,c):void 0},documentIsReady:function(){return"complete"===document.readyState},evtPreventDefault:function(a){a.preventDefault?a.preventDefault():event&&(event.returnValue=!1)},extend:function(a,b){var c;for(c in b)b.hasOwnProperty(c)&&(a[c]=b[c])},getStepTargetHelper:function(a){var b=document.getElementById(a);if(b)return b;if(hasJquery)return b=jQuery(a),b.length?b[0]:null;if(Sizzle)return b=new Sizzle(a),b.length?b[0]:null;if(document.querySelector)try{return document.querySelector(a)}catch(c){}return/^#[a-zA-Z][\w-_:.]*$/.test(a)?document.getElementById(a.substring(1)):null},getStepTarget:function(a){var b;if(!a||!a.target)return null;if("string"==typeof a.target)return utils.getStepTargetHelper(a.target);if(Array.isArray(a.target)){var c,d;for(c=0,d=a.target.length;d>c;c++)if("string"==typeof a.target[c]&&(b=utils.getStepTargetHelper(a.target[c])))return b;return null}return a.target},getI18NString:function(a){return customI18N[a]||HopscotchI18N[a]},setState:function(a,b,c){var d,e="";if(hasSessionStorage&&isStorageWritable)try{sessionStorage.setItem(a,b)}catch(f){isStorageWritable=!1,this.setState(a,b,c)}else hasSessionStorage&&sessionStorage.removeItem(a),c&&(d=new Date,d.setTime(d.getTime()+24*c*60*60*1e3),e="; expires="+d.toGMTString()),document.cookie=a+"="+b+e+"; path=/"},getState:function(a){var b,c,d,e=a+"=",f=document.cookie.split(";");if(hasSessionStorage&&(d=sessionStorage.getItem(a)))return d;for(b=0;b<f.length;b++){for(c=f[b];" "===c.charAt(0);)c=c.substring(1,c.length);if(0===c.indexOf(e)){d=c.substring(e.length,c.length);break}}return d},clearState:function(a){hasSessionStorage?sessionStorage.removeItem(a):this.setState(a,"",-1)},normalizePlacement:function(a){!a.placement&&a.orientation&&(a.placement=a.orientation)},flipPlacement:function(a){if(a.isRtl&&!a._isFlipped){var b,c,d=["orientation","placement"];a.xOffset&&(a.xOffset=-1*this.getPixelValue(a.xOffset));for(c in d)b=d[c],a.hasOwnProperty(b)&&rtlMatches.hasOwnProperty(a[b])&&(a[b]=rtlMatches[a[b]]);a._isFlipped=!0}}},utils.addEvtListener(window,"load",winLoadHandler),callbacks={next:[],prev:[],start:[],end:[],show:[],error:[],close:[]},helpers={},HopscotchI18N={stepNums:null,nextBtn:"Next",prevBtn:"Back",doneBtn:"Done",skipBtn:"Skip",closeTooltip:"Close"},customI18N={},HopscotchBubble=function(a){this.init(a)},HopscotchBubble.prototype={isShowing:!1,currStep:void 0,setPosition:function(a){var b,c,d,e,f,g,h,i=utils.getStepTarget(a),j=this.element,k=this.arrowEl,l=a.isRtl?"right":"left";if(utils.flipPlacement(a),utils.normalizePlacement(a),c=j.offsetWidth,b=j.offsetHeight,utils.removeClass(j,"fade-in-down fade-in-up fade-in-left fade-in-right"),d=i.getBoundingClientRect(),h=a.isRtl?d.right-c:d.left,"top"===a.placement)e=d.top-b-this.opt.arrowWidth,f=h;else if("bottom"===a.placement)e=d.bottom+this.opt.arrowWidth,f=h;else if("left"===a.placement)e=d.top,f=d.left-c-this.opt.arrowWidth;else{if("right"!==a.placement)throw new Error("Bubble placement failed because step.placement is invalid or undefined!");e=d.top,f=d.right+this.opt.arrowWidth}g="center"!==a.arrowOffset?utils.getPixelValue(a.arrowOffset):a.arrowOffset,g?"top"===a.placement||"bottom"===a.placement?(k.style.top="","center"===g?k.style[l]=Math.floor(c/2-k.offsetWidth/2)+"px":k.style[l]=g+"px"):("left"===a.placement||"right"===a.placement)&&(k.style[l]="","center"===g?k.style.top=Math.floor(b/2-k.offsetHeight/2)+"px":k.style.top=g+"px"):(k.style.top="",k.style[l]=""),"center"===a.xOffset?f=d.left+i.offsetWidth/2-c/2:f+=utils.getPixelValue(a.xOffset),"center"===a.yOffset?e=d.top+i.offsetHeight/2-b/2:e+=utils.getPixelValue(a.yOffset),a.fixedElement||(e+=utils.getScrollTop(),f+=utils.getScrollLeft()),j.style.position=a.fixedElement?"fixed":"absolute",j.style.top=e+"px",j.style.left=f+"px"},render:function(a,b,c){var d,e,f,g,h,i,j,k,l,m,n=this.element;if(a?this.currStep=a:this.currStep&&(a=this.currStep),this.opt.isTourBubble?(g=winHopscotch.getCurrTour(),g&&(e=g.customData,d=g.customRenderer,a.isRtl=a.hasOwnProperty("isRtl")?a.isRtl:g.hasOwnProperty("isRtl")?g.isRtl:this.opt.isRtl,f=g.unsafe,Array.isArray(g.steps)&&(h=g.steps.length,i=this._getStepI18nNum(this._getStepNum(h-1)),k=this._getStepNum(b)===this._getStepNum(h-1)))):(e=a.customData,d=a.customRenderer,f=a.unsafe,a.isRtl=a.hasOwnProperty("isRtl")?a.isRtl:this.opt.isRtl),j=k?utils.getI18NString("doneBtn"):a.showSkip?utils.getI18NString("skipBtn"):utils.getI18NString("nextBtn"),utils.flipPlacement(a),utils.normalizePlacement(a),this.placement=a.placement,m={i18n:{prevBtn:utils.getI18NString("prevBtn"),nextBtn:j,closeTooltip:utils.getI18NString("closeTooltip"),stepNum:this._getStepI18nNum(this._getStepNum(b)),numSteps:i},buttons:{showPrev:utils.valOrDefault(a.showPrevButton,this.opt.showPrevButton)&&this._getStepNum(b)>0,showNext:utils.valOrDefault(a.showNextButton,this.opt.showNextButton),showCTA:utils.valOrDefault(a.showCTAButton&&a.ctaLabel,!1),ctaLabel:a.ctaLabel,showClose:utils.valOrDefault(this.opt.showCloseButton,!0)},step:{num:b,isLast:utils.valOrDefault(k,!1),title:a.title||"",content:a.content||"",isRtl:a.isRtl,placement:a.placement,padding:utils.valOrDefault(a.padding,this.opt.bubblePadding),width:utils.getPixelValue(a.width)||this.opt.bubbleWidth,customData:a.customData||{}},tour:{isTour:this.opt.isTourBubble,numSteps:h,unsafe:utils.valOrDefault(f,!1),customData:e||{}}},"function"==typeof d)n.innerHTML=d(m);else if("string"==typeof d){if(!winHopscotch.templates||"function"!=typeof winHopscotch.templates[d])throw new Error('Bubble rendering failed - template "'+d+'" is not a function.');n.innerHTML=winHopscotch.templates[d](m)}else if(customRenderer)n.innerHTML=customRenderer(m);else{if(!winHopscotch.templates||"function"!=typeof winHopscotch.templates[templateToUse])throw new Error('Bubble rendering failed - template "'+templateToUse+'" is not a function.');n.innerHTML=winHopscotch.templates[templateToUse](m)}for(children=n.children,numChildren=children.length,l=0;l<numChildren;l++)node=children[l],utils.hasClass(node,"hopscotch-arrow")&&(this.arrowEl=node);return n.style.zIndex="number"==typeof a.zindex?a.zindex:"",this._setArrow(a.placement),this.hide(!1),this.setPosition(a),c&&c(!a.fixedElement),this},_getStepNum:function(a){var b,c,d=0,e=winHopscotch.getSkippedStepsIndexes(),f=e.length;for(c=0;f>c;c++)b=e[c],a>b&&d++;return a-d},_getStepI18nNum:function(a){var b=utils.getI18NString("stepNums");return b&&a<b.length?a=b[a]:a+=1,a},_setArrow:function(a){utils.removeClass(this.arrowEl,"down up right left"),"top"===a?utils.addClass(this.arrowEl,"down"):"bottom"===a?utils.addClass(this.arrowEl,"up"):"left"===a?utils.addClass(this.arrowEl,"right"):"right"===a&&utils.addClass(this.arrowEl,"left")},_getArrowDirection:function(){return"top"===this.placement?"down":"bottom"===this.placement?"up":"left"===this.placement?"right":"right"===this.placement?"left":void 0},show:function(){var a=this,b="fade-in-"+this._getArrowDirection(),c=1e3;return utils.removeClass(this.element,"hide"),utils.addClass(this.element,b),setTimeout(function(){utils.removeClass(a.element,"invisible")},50),setTimeout(function(){utils.removeClass(a.element,b)},c),this.isShowing=!0,this},hide:function(a){var b=this.element;return a=utils.valOrDefault(a,!0),b.style.top="",b.style.left="",a?(utils.addClass(b,"hide"),utils.removeClass(b,"invisible")):(utils.removeClass(b,"hide"),utils.addClass(b,"invisible")),utils.removeClass(b,"animate fade-in-up fade-in-down fade-in-right fade-in-left"),this.isShowing=!1,this},destroy:function(){var a=this.element;a&&a.parentNode.removeChild(a),utils.removeEvtListener(a,"click",this.clickCb)},_handleBubbleClick:function(a){function b(c){return c===a.currentTarget?null:utils.hasClass(c,"hopscotch-cta")?"cta":utils.hasClass(c,"hopscotch-next")?"next":utils.hasClass(c,"hopscotch-prev")?"prev":utils.hasClass(c,"hopscotch-close")?"close":b(c.parentElement)}var c;a=a||window.event;var d=a.target||a.srcElement;if(c=b(d),"cta"===c)this.opt.isTourBubble||winHopscotch.getCalloutManager().removeCallout(this.currStep.id),this.currStep.onCTA&&utils.invokeCallback(this.currStep.onCTA);else if("next"===c)winHopscotch.nextStep(!0);else if("prev"===c)winHopscotch.prevStep(!0);else if("close"===c){if(this.opt.isTourBubble){var e=winHopscotch.getCurrStepNum(),f=winHopscotch.getCurrTour(),g=e===f.steps.length-1;utils.invokeEventCallbacks("close"),winHopscotch.endTour(!0,g)}else this.opt.onClose&&utils.invokeCallback(this.opt.onClose),this.opt.id&&!this.opt.isTourBubble?winHopscotch.getCalloutManager().removeCallout(this.opt.id):this.destroy();utils.evtPreventDefault(a)}},init:function(a){var b,c,d,e,f=document.createElement("div"),g=this,h=!1;this.element=f,e={showPrevButton:defaultOpts.showPrevButton,showNextButton:defaultOpts.showNextButton,bubbleWidth:defaultOpts.bubbleWidth,bubblePadding:defaultOpts.bubblePadding,arrowWidth:defaultOpts.arrowWidth,isRtl:defaultOpts.isRtl,showNumber:!0,isTourBubble:!0},a=typeof a===undefinedStr?{}:a,utils.extend(e,a),this.opt=e,f.className="hopscotch-bubble animated",e.isTourBubble?(d=winHopscotch.getCurrTour(),d&&utils.addClass(f,"tour-"+d.id)):utils.addClass(f,"hopscotch-callout no-number"),b=function(){!h&&g.isShowing&&(h=!0,setTimeout(function(){g.setPosition(g.currStep),h=!1},100))},utils.addEvtListener(window,"resize",b),this.clickCb=function(a){g._handleBubbleClick(a)},utils.addEvtListener(f,"click",this.clickCb),this.hide(),utils.documentIsReady()?document.body.appendChild(f):(document.addEventListener?(c=function(){document.removeEventListener("DOMContentLoaded",c),window.removeEventListener("load",c),document.body.appendChild(f)},document.addEventListener("DOMContentLoaded",c,!1)):(c=function(){"complete"===document.readyState&&(document.detachEvent("onreadystatechange",c),window.detachEvent("onload",c),document.body.appendChild(f))},document.attachEvent("onreadystatechange",c)),utils.addEvtListener(window,"load",c))}},HopscotchCalloutManager=function(){var a={},b={};this.createCallout=function(c){var d;if(!c.id)throw new Error("Must specify a callout id.");if(!validIdRegEx.test(c.id))throw new Error("Callout ID is using an invalid format. Use alphanumeric, underscores, and/or hyphens only. First character must be a letter.");if(a[c.id])throw new Error("Callout by that id already exists. Please choose a unique id.");if(!utils.getStepTarget(c))throw new Error("Must specify existing target element via 'target' option.");return c.showNextButton=c.showPrevButton=!1,c.isTourBubble=!1,d=new HopscotchBubble(c),a[c.id]=d,b[c.id]=c,d.render(c,null,function(){d.show(),c.onShow&&utils.invokeCallback(c.onShow)}),d},this.getCallout=function(b){return a[b]},this.removeAllCallouts=function(){var b;for(b in a)a.hasOwnProperty(b)&&this.removeCallout(b)},this.removeCallout=function(c){var d=a[c];a[c]=null,b[c]=null,d&&d.destroy()},this.refreshCalloutPositions=function(){var c,d,e;for(c in a)a.hasOwnProperty(c)&&b.hasOwnProperty(c)&&(d=a[c],e=b[c],d&&e&&d.setPosition(e))}},Hopscotch=function(a){var b,c,d,e,f,g,h,i,j=this,k={},l=[],m=function(a){return b&&b.element&&b.element.parentNode||(b=new HopscotchBubble(d)),a&&utils.extend(b.opt,{bubblePadding:o("bubblePadding"),bubbleWidth:o("bubbleWidth"),showNextButton:o("showNextButton"),showPrevButton:o("showPrevButton"),showCloseButton:o("showCloseButton"),arrowWidth:o("arrowWidth"),isRtl:o("isRtl")}),b},n=function(){b&&(b.destroy(),b=null)},o=function(a){return"undefined"==typeof d?defaultOpts[a]:utils.valOrDefault(d[a],defaultOpts[a])},p=function(){var a;return a=!e||0>f||f>=e.steps.length?null:e.steps[f]},q=function(){j.nextStep()},r=function(a){var b,c,d,e,f,g,h=m(),i=h.element,j=utils.getPixelValue(i.style.top),k=j+utils.getPixelValue(i.offsetHeight),l=utils.getStepTarget(p()),n=l.getBoundingClientRect(),q=n.top+utils.getScrollTop(),r=n.bottom+utils.getScrollTop(),s=q>j?j:q,t=k>r?k:r,u=utils.getScrollTop(),v=u+utils.getWindowHeight(),w=s-o("scrollTopMargin");s>=u&&(s<=u+o("scrollTopMargin")||v>=t)?a&&a():o("smoothScroll")?typeof YAHOO!==undefinedStr&&typeof YAHOO.env!==undefinedStr&&typeof YAHOO.env.ua!==undefinedStr&&typeof YAHOO.util!==undefinedStr&&typeof YAHOO.util.Scroll!==undefinedStr?(b=YAHOO.env.ua.webkit?document.body:document.documentElement,d=YAHOO.util.Easing?YAHOO.util.Easing.easeOut:void 0,c=new YAHOO.util.Scroll(b,{scroll:{to:[0,w]}},o("scrollDuration")/1e3,d),c.onComplete.subscribe(a),c.animate()):hasJquery?jQuery("body, html").animate({scrollTop:w},o("scrollDuration"),a):(0>w&&(w=0),e=u>s?-1:1,f=Math.abs(u-w)/(o("scrollDuration")/10),(g=function(){var b=utils.getScrollTop(),c=b+e*f;return e>0&&c>=w||0>e&&w>=c?(c=w,a&&a(),void window.scrollTo(0,c)):(window.scrollTo(0,c),utils.getScrollTop()===b?void(a&&a()):void setTimeout(g,10))})()):(window.scrollTo(0,w),a&&a())},s=function(a,b){var c,d,g;f+a>=0&&f+a<e.steps.length?(f+=a,d=p(),g=function(){c=utils.getStepTarget(d),c?(k[f]&&delete k[f],b(f)):(k[f]=!0,utils.invokeEventCallbacks("error"),s(a,b))},d.delay?setTimeout(g,d.delay):g()):b(-1)},t=function(a,b){var c,d,g,h,i=m(),j=this;if(i.hide(),a=utils.valOrDefault(a,!0),c=p(),c.nextOnTargetClick&&utils.removeEvtListener(utils.getStepTarget(c),"click",q),d=c,g=b>0?d.multipage:f>0&&e.steps[f-1].multipage,h=function(c){var e;if(-1===c)return this.endTour(!0);if(a&&(e=b>0?utils.invokeEventCallbacks("next",d.onNext):utils.invokeEventCallbacks("prev",d.onPrev)),c===f){if(g)return void x();e=utils.valOrDefault(e,!0),e?this.showStep(c):this.endTour(!1)}},!g&&o("skipIfNoElement"))s(b,function(a){h.call(j,a)});else if(f+b>=0&&f+b<e.steps.length){if(f+=b,c=p(),!utils.getStepTarget(c)&&!g)return utils.invokeEventCallbacks("error"),this.endTour(!0,!1);h.call(this,f)}else if(f+b===e.steps.length)return this.endTour();return this},u=function(a){var b,c,d,e={};for(b in a)a.hasOwnProperty(b)&&"id"!==b&&"steps"!==b&&(e[b]=a[b]);return i.call(this,e,!0),c=utils.getState(o("cookieName")),c&&(d=c.split(":"),g=d[0],h=d[1],d.length>2&&(l=d[2].split(",")),h=parseInt(h,10)),this},v=function(a,b,c){var d,e;if(f=a||0,k=b||{},d=p(),e=utils.getStepTarget(d))return void c(f);if(!e){if(utils.invokeEventCallbacks("error"),k[f]=!0,o("skipIfNoElement"))return void s(1,c);f=-1,c(f)}},w=function(a){function b(){d.show(),utils.invokeEventCallbacks("show",c.onShow)}var c=e.steps[a],d=m(),g=utils.getStepTarget(c);f!==a&&p().nextOnTargetClick&&utils.removeEvtListener(utils.getStepTarget(p()),"click",q),f=a,d.hide(!1),d.render(c,a,function(a){a?r(b):b(),c.nextOnTargetClick&&utils.addEvtListener(g,"click",q)}),x()},x=function(){var a=e.id+":"+f,b=winHopscotch.getSkippedStepsIndexes();b&&b.length>0&&(a+=":"+b.join(",")),utils.setState(o("cookieName"),a,1)},y=function(a){a&&this.configure(a)};this.getCalloutManager=function(){return typeof c===undefinedStr&&(c=new HopscotchCalloutManager),c},this.startTour=function(a,b){var c,d,f={},i=this;if(!e){if(!a)throw new Error("Tour data is required for startTour.");if(!a.id||!validIdRegEx.test(a.id))throw new Error("Tour ID is using an invalid format. Use alphanumeric, underscores, and/or hyphens only. First character must be a letter.");e=a,u.call(this,a)}if(typeof b!==undefinedStr){if(b>=e.steps.length)throw new Error("Specified step number out of bounds.");d=b}if(!utils.documentIsReady())return waitingToStart=!0,this;if("undefined"==typeof d&&e.id===g&&typeof h!==undefinedStr){if(d=h,l.length>0)for(var j=0,k=l.length;k>j;j++)f[l[j]]=!0}else d||(d=0);return v(d,f,function(a){var b=-1!==a&&utils.getStepTarget(e.steps[a]);return b?(utils.invokeEventCallbacks("start"),c=m(),c.hide(!1),i.isActive=!0,void(utils.getStepTarget(p())?i.showStep(a):(utils.invokeEventCallbacks("error"),o("skipIfNoElement")&&i.nextStep(!1)))):void i.endTour(!1,!1)}),this},this.showStep=function(a){var b=e.steps[a],c=f;return utils.getStepTarget(b)?(b.delay?setTimeout(function(){w(a)},b.delay):w(a),this):(f=a,utils.invokeEventCallbacks("error"),void(f=c))},this.prevStep=function(a){return t.call(this,a,-1),this},this.nextStep=function(a){return t.call(this,a,1),this},this.endTour=function(a,b){var c,d=m();return a=utils.valOrDefault(a,!0),b=utils.valOrDefault(b,!0),e&&(c=p(),c&&c.nextOnTargetClick&&utils.removeEvtListener(utils.getStepTarget(c),"click",q)),f=0,h=void 0,d.hide(),a&&utils.clearState(o("cookieName")),this.isActive&&(this.isActive=!1,e&&b&&utils.invokeEventCallbacks("end")),this.removeCallbacks(null,!0),this.resetDefaultOptions(),n(),e=null,this},this.getCurrTour=function(){return e},this.getCurrTarget=function(){return utils.getStepTarget(p())},this.getCurrStepNum=function(){return f},this.getSkippedStepsIndexes=function(){var a,b=[];for(a in k)b.push(a);return b},this.refreshBubblePosition=function(){var a=p();return a&&m().setPosition(a),this.getCalloutManager().refreshCalloutPositions(),this},this.listen=function(a,b,c){return a&&callbacks[a].push({cb:b,fromTour:c}),this},this.unlisten=function(a,b){var c,d,e=callbacks[a];for(c=0,d=e.length;d>c;++c)e[c].cb===b&&e.splice(c,1);return this},this.removeCallbacks=function(a,b){var c,d,e,f;for(f in callbacks)if(!a||a===f)if(b)for(c=callbacks[f],d=0,e=c.length;e>d;++d)c[d].fromTour&&(c.splice(d--,1),--e);else callbacks[f]=[];return this},this.registerHelper=function(a,b){"string"==typeof a&&"function"==typeof b&&(helpers[a]=b)},this.unregisterHelper=function(a){helpers[a]=null},this.invokeHelper=function(a){var b,c,d=[];for(b=1,c=arguments.length;c>b;++b)d.push(arguments[b]);helpers[a]&&helpers[a].call(null,d)},this.setCookieName=function(a){return d.cookieName=a,this},this.resetDefaultOptions=function(){return d={},this},this.resetDefaultI18N=function(){return customI18N={},this},this.getState=function(){return utils.getState(o("cookieName"))},i=function(a,b){var c,e,f,g,h=["next","prev","start","end","show","error","close"];for(d||this.resetDefaultOptions(),utils.extend(d,a),a&&utils.extend(customI18N,a.i18n),f=0,g=h.length;g>f;++f)e="on"+h[f].charAt(0).toUpperCase()+h[f].substring(1),a[e]&&this.listen(h[f],a[e],b);return c=m(!0),this},this.configure=function(a){return i.call(this,a,!1)},this.setRenderer=function(a){var b=typeof a;return"string"===b?(templateToUse=a,customRenderer=void 0):"function"===b&&(customRenderer=a),this},this.setEscaper=function(a){return"function"==typeof a&&(customEscape=a),this},y.call(this,a)},winHopscotch=new Hopscotch,function(){var _={};_.escape=function(a){return customEscape?customEscape(a):null==a?"":(""+a).replace(new RegExp("[&<>\"']","g"),function(a){return"&"==a?"&":"<"==a?"<":">"==a?">":'"'==a?""":"'"==a?"'":void 0})},this.templates=this.templates||{},this.templates.bubble_default=function(obj){function optEscape(a,b){return b?_.escape(a):a}obj||(obj={});var __t,__p="";_.escape,Array.prototype.join;with(obj)__p+='\n<div class="hopscotch-bubble-container" style="width: '+(null==(__t=step.width)?"":__t)+"px; padding: "+(null==(__t=step.padding)?"":__t)+'px;">\n ',tour.isTour&&(__p+='<span class="hopscotch-bubble-number">'+(null==(__t=i18n.stepNum)?"":__t)+"</span>"),__p+='\n <div class="hopscotch-bubble-content">\n ',""!==step.title&&(__p+='<h3 class="hopscotch-title">'+(null==(__t=optEscape(step.title,tour.unsafe))?"":__t)+"</h3>"),__p+="\n ",""!==step.content&&(__p+='<div class="hopscotch-content">'+(null==(__t=optEscape(step.content,tour.unsafe))?"":__t)+"</div>"),__p+='\n </div>\n <div class="hopscotch-actions">\n ',buttons.showPrev&&(__p+='<button class="hopscotch-nav-button prev hopscotch-prev">'+(null==(__t=i18n.prevBtn)?"":__t)+"</button>"),__p+="\n ",buttons.showCTA&&(__p+='<button class="hopscotch-nav-button next hopscotch-cta">'+(null==(__t=buttons.ctaLabel)?"":__t)+"</button>"),__p+="\n ",buttons.showNext&&(__p+='<button class="hopscotch-nav-button next hopscotch-next">'+(null==(__t=i18n.nextBtn)?"":__t)+"</button>"),__p+="\n </div>\n ",buttons.showClose&&(__p+='<button class="hopscotch-bubble-close hopscotch-close">'+(null==(__t=i18n.closeTooltip)?"":__t)+"</button>"),__p+='\n</div>\n<div class="hopscotch-bubble-arrow-container hopscotch-arrow">\n <div class="hopscotch-bubble-arrow-border"></div>\n <div class="hopscotch-bubble-arrow"></div>\n</div>';return __p}}.call(winHopscotch),winHopscotch});
|
@@ -0,0 +1,521 @@
|
|
1
|
+
/**! hopscotch - v0.2.6
|
2
|
+
*
|
3
|
+
* Copyright 2016 LinkedIn Corp. All rights reserved.
|
4
|
+
*
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
* you may not use this file except in compliance with the License.
|
7
|
+
* You may obtain a copy of the License at
|
8
|
+
*
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
*
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
* See the License for the specific language governing permissions and
|
15
|
+
* limitations under the License.
|
16
|
+
*/
|
17
|
+
/**
|
18
|
+
* This fade animation is based on Dan Eden's animate.css (http://daneden.me/animate/), under the terms of the MIT license.
|
19
|
+
*
|
20
|
+
* Copyright 2013 Dan Eden.
|
21
|
+
*
|
22
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
23
|
+
* of this software and associated documentation files (the "Software"), to deal
|
24
|
+
* in the Software without restriction, including without limitation the rights
|
25
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
26
|
+
* copies of the Software, and to permit persons to whom the Software is
|
27
|
+
* furnished to do so, subject to the following conditions:
|
28
|
+
*
|
29
|
+
* The above copyright notice and this permission notice shall be included in
|
30
|
+
* all copies or substantial portions of the Software.
|
31
|
+
*
|
32
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
33
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
34
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
35
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
36
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
37
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
38
|
+
* THE SOFTWARE.
|
39
|
+
*/
|
40
|
+
.animated {
|
41
|
+
-webkit-animation-fill-mode: both;
|
42
|
+
-moz-animation-fill-mode: both;
|
43
|
+
-ms-animation-fill-mode: both;
|
44
|
+
-o-animation-fill-mode: both;
|
45
|
+
animation-fill-mode: both;
|
46
|
+
-webkit-animation-duration: 1s;
|
47
|
+
-moz-animation-duration: 1s;
|
48
|
+
-ms-animation-duration: 1s;
|
49
|
+
-o-animation-duration: 1s;
|
50
|
+
animation-duration: 1s;
|
51
|
+
}
|
52
|
+
@-webkit-keyframes fadeInUp {
|
53
|
+
0% {
|
54
|
+
opacity: 0;
|
55
|
+
-webkit-transform: translateY(20px);
|
56
|
+
}
|
57
|
+
100% {
|
58
|
+
opacity: 1;
|
59
|
+
-webkit-transform: translateY(0);
|
60
|
+
}
|
61
|
+
}
|
62
|
+
@-moz-keyframes fadeInUp {
|
63
|
+
0% {
|
64
|
+
opacity: 0;
|
65
|
+
-moz-transform: translateY(20px);
|
66
|
+
}
|
67
|
+
100% {
|
68
|
+
opacity: 1;
|
69
|
+
-moz-transform: translateY(0);
|
70
|
+
}
|
71
|
+
}
|
72
|
+
@-o-keyframes fadeInUp {
|
73
|
+
0% {
|
74
|
+
opacity: 0;
|
75
|
+
-o-transform: translateY(20px);
|
76
|
+
}
|
77
|
+
100% {
|
78
|
+
opacity: 1;
|
79
|
+
-o-transform: translateY(0);
|
80
|
+
}
|
81
|
+
}
|
82
|
+
@keyframes fadeInUp {
|
83
|
+
0% {
|
84
|
+
opacity: 0;
|
85
|
+
transform: translateY(20px);
|
86
|
+
}
|
87
|
+
100% {
|
88
|
+
opacity: 1;
|
89
|
+
transform: translateY(0);
|
90
|
+
}
|
91
|
+
}
|
92
|
+
.fade-in-up {
|
93
|
+
-webkit-animation-name: fadeInUp;
|
94
|
+
-moz-animation-name: fadeInUp;
|
95
|
+
-o-animation-name: fadeInUp;
|
96
|
+
animation-name: fadeInUp;
|
97
|
+
}
|
98
|
+
@-webkit-keyframes fadeInDown {
|
99
|
+
0% {
|
100
|
+
opacity: 0;
|
101
|
+
-webkit-transform: translateY(-20px);
|
102
|
+
}
|
103
|
+
100% {
|
104
|
+
opacity: 1;
|
105
|
+
-webkit-transform: translateY(0);
|
106
|
+
}
|
107
|
+
}
|
108
|
+
@-moz-keyframes fadeInDown {
|
109
|
+
0% {
|
110
|
+
opacity: 0;
|
111
|
+
-moz-transform: translateY(-20px);
|
112
|
+
}
|
113
|
+
100% {
|
114
|
+
opacity: 1;
|
115
|
+
-moz-transform: translateY(0);
|
116
|
+
}
|
117
|
+
}
|
118
|
+
@-o-keyframes fadeInDown {
|
119
|
+
0% {
|
120
|
+
opacity: 0;
|
121
|
+
-ms-transform: translateY(-20px);
|
122
|
+
}
|
123
|
+
100% {
|
124
|
+
opacity: 1;
|
125
|
+
-ms-transform: translateY(0);
|
126
|
+
}
|
127
|
+
}
|
128
|
+
@keyframes fadeInDown {
|
129
|
+
0% {
|
130
|
+
opacity: 0;
|
131
|
+
transform: translateY(-20px);
|
132
|
+
}
|
133
|
+
100% {
|
134
|
+
opacity: 1;
|
135
|
+
transform: translateY(0);
|
136
|
+
}
|
137
|
+
}
|
138
|
+
.fade-in-down {
|
139
|
+
-webkit-animation-name: fadeInDown;
|
140
|
+
-moz-animation-name: fadeInDown;
|
141
|
+
-o-animation-name: fadeInDown;
|
142
|
+
animation-name: fadeInDown;
|
143
|
+
}
|
144
|
+
@-webkit-keyframes fadeInRight {
|
145
|
+
0% {
|
146
|
+
opacity: 0;
|
147
|
+
-webkit-transform: translateX(-20px);
|
148
|
+
}
|
149
|
+
100% {
|
150
|
+
opacity: 1;
|
151
|
+
-webkit-transform: translateX(0);
|
152
|
+
}
|
153
|
+
}
|
154
|
+
@-moz-keyframes fadeInRight {
|
155
|
+
0% {
|
156
|
+
opacity: 0;
|
157
|
+
-moz-transform: translateX(-20px);
|
158
|
+
}
|
159
|
+
100% {
|
160
|
+
opacity: 1;
|
161
|
+
-moz-transform: translateX(0);
|
162
|
+
}
|
163
|
+
}
|
164
|
+
@-o-keyframes fadeInRight {
|
165
|
+
0% {
|
166
|
+
opacity: 0;
|
167
|
+
-o-transform: translateX(-20px);
|
168
|
+
}
|
169
|
+
100% {
|
170
|
+
opacity: 1;
|
171
|
+
-o-transform: translateX(0);
|
172
|
+
}
|
173
|
+
}
|
174
|
+
@keyframes fadeInRight {
|
175
|
+
0% {
|
176
|
+
opacity: 0;
|
177
|
+
transform: translateX(-20px);
|
178
|
+
}
|
179
|
+
100% {
|
180
|
+
opacity: 1;
|
181
|
+
transform: translateX(0);
|
182
|
+
}
|
183
|
+
}
|
184
|
+
.fade-in-right {
|
185
|
+
-webkit-animation-name: fadeInRight;
|
186
|
+
-moz-animation-name: fadeInRight;
|
187
|
+
-o-animation-name: fadeInRight;
|
188
|
+
animation-name: fadeInRight;
|
189
|
+
}
|
190
|
+
@-webkit-keyframes fadeInLeft {
|
191
|
+
0% {
|
192
|
+
opacity: 0;
|
193
|
+
-webkit-transform: translateX(20px);
|
194
|
+
}
|
195
|
+
100% {
|
196
|
+
opacity: 1;
|
197
|
+
-webkit-transform: translateX(0);
|
198
|
+
}
|
199
|
+
}
|
200
|
+
@-moz-keyframes fadeInLeft {
|
201
|
+
0% {
|
202
|
+
opacity: 0;
|
203
|
+
-moz-transform: translateX(20px);
|
204
|
+
}
|
205
|
+
100% {
|
206
|
+
opacity: 1;
|
207
|
+
-moz-transform: translateX(0);
|
208
|
+
}
|
209
|
+
}
|
210
|
+
@-o-keyframes fadeInLeft {
|
211
|
+
0% {
|
212
|
+
opacity: 0;
|
213
|
+
-o-transform: translateX(20px);
|
214
|
+
}
|
215
|
+
100% {
|
216
|
+
opacity: 1;
|
217
|
+
-o-transform: translateX(0);
|
218
|
+
}
|
219
|
+
}
|
220
|
+
@keyframes fadeInLeft {
|
221
|
+
0% {
|
222
|
+
opacity: 0;
|
223
|
+
transform: translateX(20px);
|
224
|
+
}
|
225
|
+
100% {
|
226
|
+
opacity: 1;
|
227
|
+
transform: translateX(0);
|
228
|
+
}
|
229
|
+
}
|
230
|
+
.fade-in-left {
|
231
|
+
-webkit-animation-name: fadeInLeft;
|
232
|
+
-moz-animation-name: fadeInLeft;
|
233
|
+
-o-animation-name: fadeInLeft;
|
234
|
+
animation-name: fadeInLeft;
|
235
|
+
}
|
236
|
+
div.hopscotch-bubble .hopscotch-nav-button {
|
237
|
+
/* borrowed from katy styles */
|
238
|
+
font-weight: bold;
|
239
|
+
border-width: 1px;
|
240
|
+
border-style: solid;
|
241
|
+
cursor: pointer;
|
242
|
+
margin: 0;
|
243
|
+
overflow: visible;
|
244
|
+
text-decoration: none !important;
|
245
|
+
width: auto;
|
246
|
+
padding: 0 10px;
|
247
|
+
height: 26px;
|
248
|
+
line-height: 24px;
|
249
|
+
font-size: 12px;
|
250
|
+
*zoom: 1;
|
251
|
+
white-space: nowrap;
|
252
|
+
display: -moz-inline-stack;
|
253
|
+
display: inline-block;
|
254
|
+
*vertical-align: auto;
|
255
|
+
zoom: 1;
|
256
|
+
*display: inline;
|
257
|
+
vertical-align: middle;
|
258
|
+
-moz-border-radius: 3px;
|
259
|
+
-ms-border-radius: 3px;
|
260
|
+
-o-border-radius: 3px;
|
261
|
+
-webkit-border-radius: 3px;
|
262
|
+
border-radius: 3px;
|
263
|
+
-webkit-box-sizing: border-box;
|
264
|
+
-moz-box-sizing: border-box;
|
265
|
+
box-sizing: border-box;
|
266
|
+
}
|
267
|
+
div.hopscotch-bubble .hopscotch-nav-button:hover {
|
268
|
+
*zoom: 1;
|
269
|
+
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
|
270
|
+
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
|
271
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
|
272
|
+
}
|
273
|
+
div.hopscotch-bubble .hopscotch-nav-button:active {
|
274
|
+
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25) inset;
|
275
|
+
-moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25) inset;
|
276
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25) inset;
|
277
|
+
}
|
278
|
+
div.hopscotch-bubble .hopscotch-nav-button.next {
|
279
|
+
border-color: #1b5480;
|
280
|
+
color: #fff;
|
281
|
+
margin: 0 0 0 10px;
|
282
|
+
/* HS specific*/
|
283
|
+
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
|
284
|
+
background-color: #287bbc;
|
285
|
+
filter: progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr='#287bbc', endColorstr='#23639a');
|
286
|
+
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #287bbc), color-stop(100%, #23639a));
|
287
|
+
background-image: -webkit-linear-gradient(top, #287bbc 0%, #23639a 100%);
|
288
|
+
background-image: -moz-linear-gradient(top, #287bbc 0%, #23639a 100%);
|
289
|
+
background-image: -o-linear-gradient(top, #287bbc 0%, #23639a 100%);
|
290
|
+
background-image: linear-gradient(top, #287bbc 0%, #23639a 100%);
|
291
|
+
}
|
292
|
+
div.hopscotch-bubble .hopscotch-nav-button.next:hover {
|
293
|
+
background-color: #2672ae;
|
294
|
+
filter: progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr='#2672ae', endColorstr='#1e4f7e');
|
295
|
+
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #2672ae), color-stop(100%, #1e4f7e));
|
296
|
+
background-image: -webkit-linear-gradient(top, #2672ae 0%, #1e4f7e 100%);
|
297
|
+
background-image: -moz-linear-gradient(top, #2672ae 0%, #1e4f7e 100%);
|
298
|
+
background-image: -o-linear-gradient(top, #2672ae 0%, #1e4f7e 100%);
|
299
|
+
background-image: linear-gradient(top, #2672ae 0%, #1e4f7e 100%);
|
300
|
+
}
|
301
|
+
div.hopscotch-bubble .hopscotch-nav-button.prev {
|
302
|
+
border-color: #a7a7a7;
|
303
|
+
color: #444;
|
304
|
+
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
|
305
|
+
background-color: #f2f2f2;
|
306
|
+
filter: progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr='#f2f2f2', endColorstr='#e9e9e9');
|
307
|
+
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #f2f2f2), color-stop(100%, #e9e9e9));
|
308
|
+
background-image: -webkit-linear-gradient(top, #f2f2f2 0%, #e9e9e9 100%);
|
309
|
+
background-image: -moz-linear-gradient(top, #f2f2f2 0%, #e9e9e9 100%);
|
310
|
+
background-image: -o-linear-gradient(top, #f2f2f2 0%, #e9e9e9 100%);
|
311
|
+
background-image: linear-gradient(top, #f2f2f2 0%, #e9e9e9 100%);
|
312
|
+
}
|
313
|
+
div.hopscotch-bubble .hopscotch-nav-button.prev:hover {
|
314
|
+
background-color: #e8e8e8;
|
315
|
+
filter: progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr='#FFE8E8E8', endColorstr='#FFA9A9A9');
|
316
|
+
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #e8e8e8), color-stop(13%, #e3e3e3), color-stop(32%, #d7d7d7), color-stop(71%, #b9b9b9), color-stop(100%, #a9a9a9));
|
317
|
+
background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #e3e3e3 13%, #d7d7d7 32%, #b9b9b9 71%, #a9a9a9 100%);
|
318
|
+
background-image: -moz-linear-gradient(top, #e8e8e8 0%, #e3e3e3 13%, #d7d7d7 32%, #b9b9b9 71%, #a9a9a9 100%);
|
319
|
+
background-image: -o-linear-gradient(top, #e8e8e8 0%, #e3e3e3 13%, #d7d7d7 32%, #b9b9b9 71%, #a9a9a9 100%);
|
320
|
+
background-image: linear-gradient(top, #e8e8e8 0%, #e3e3e3 13%, #d7d7d7 32%, #b9b9b9 71%, #a9a9a9 100%);
|
321
|
+
}
|
322
|
+
div.hopscotch-bubble {
|
323
|
+
background-color: #ffffff;
|
324
|
+
border: 5px solid #000000;
|
325
|
+
/* default */
|
326
|
+
border: 5px solid rgba(0, 0, 0, 0.5);
|
327
|
+
/* transparent, if supported */
|
328
|
+
color: #333;
|
329
|
+
font-family: Helvetica, Arial;
|
330
|
+
font-size: 13px;
|
331
|
+
position: absolute;
|
332
|
+
z-index: 999999;
|
333
|
+
-webkit-box-sizing: content-box;
|
334
|
+
-moz-box-sizing: content-box;
|
335
|
+
box-sizing: content-box;
|
336
|
+
-moz-background-clip: padding;
|
337
|
+
/* for Mozilla browsers*/
|
338
|
+
-webkit-background-clip: padding;
|
339
|
+
/* Webkit */
|
340
|
+
background-clip: padding-box;
|
341
|
+
/* browsers with full support */
|
342
|
+
}
|
343
|
+
div.hopscotch-bubble * {
|
344
|
+
-webkit-box-sizing: content-box;
|
345
|
+
-moz-box-sizing: content-box;
|
346
|
+
box-sizing: content-box;
|
347
|
+
}
|
348
|
+
div.hopscotch-bubble.animate {
|
349
|
+
-moz-transition-property: top, left;
|
350
|
+
-moz-transition-duration: 1s;
|
351
|
+
-moz-transition-timing-function: ease-in-out;
|
352
|
+
-ms-transition-property: top, left;
|
353
|
+
-ms-transition-duration: 1s;
|
354
|
+
-ms-transition-timing-function: ease-in-out;
|
355
|
+
-o-transition-property: top, left;
|
356
|
+
-o-transition-duration: 1s;
|
357
|
+
-o-transition-timing-function: ease-in-out;
|
358
|
+
-webkit-transition-property: top, left;
|
359
|
+
-webkit-transition-duration: 1s;
|
360
|
+
-webkit-transition-timing-function: ease-in-out;
|
361
|
+
transition-property: top, left;
|
362
|
+
transition-duration: 1s;
|
363
|
+
transition-timing-function: ease-in-out;
|
364
|
+
}
|
365
|
+
div.hopscotch-bubble.invisible {
|
366
|
+
opacity: 0;
|
367
|
+
}
|
368
|
+
div.hopscotch-bubble.hide,
|
369
|
+
div.hopscotch-bubble .hide,
|
370
|
+
div.hopscotch-bubble .hide-all {
|
371
|
+
display: none;
|
372
|
+
}
|
373
|
+
div.hopscotch-bubble h3 {
|
374
|
+
color: #000;
|
375
|
+
font-family: Helvetica, Arial;
|
376
|
+
font-size: 16px;
|
377
|
+
font-weight: bold;
|
378
|
+
line-height: 19px;
|
379
|
+
margin: -1px 15px 0 0;
|
380
|
+
padding: 0;
|
381
|
+
}
|
382
|
+
div.hopscotch-bubble .hopscotch-bubble-container {
|
383
|
+
padding: 15px;
|
384
|
+
position: relative;
|
385
|
+
text-align: left;
|
386
|
+
-webkit-font-smoothing: antialiased;
|
387
|
+
/* to fix text flickering */
|
388
|
+
}
|
389
|
+
div.hopscotch-bubble .hopscotch-content {
|
390
|
+
font-family: Helvetica, Arial;
|
391
|
+
font-weight: normal;
|
392
|
+
line-height: 17px;
|
393
|
+
margin: -5px 0 11px;
|
394
|
+
padding-top: 8px;
|
395
|
+
}
|
396
|
+
div.hopscotch-bubble .hopscotch-bubble-content {
|
397
|
+
margin: 0 0 0 40px;
|
398
|
+
}
|
399
|
+
div.hopscotch-bubble.no-number .hopscotch-bubble-content {
|
400
|
+
margin: 0;
|
401
|
+
}
|
402
|
+
div.hopscotch-bubble .hopscotch-bubble-close {
|
403
|
+
-webkit-appearance: none;
|
404
|
+
-moz-appearance: none;
|
405
|
+
appearance: none;
|
406
|
+
border: 0;
|
407
|
+
color: #000;
|
408
|
+
background: transparent -192px -92px no-repeat;
|
409
|
+
background-image: url('sprite-green.png');
|
410
|
+
display: block;
|
411
|
+
padding: 8px;
|
412
|
+
position: absolute;
|
413
|
+
text-decoration: none;
|
414
|
+
text-indent: -9999px;
|
415
|
+
width: 8px;
|
416
|
+
height: 8px;
|
417
|
+
top: 0;
|
418
|
+
right: 0;
|
419
|
+
}
|
420
|
+
div.hopscotch-bubble .hopscotch-bubble-close.hide,
|
421
|
+
div.hopscotch-bubble .hopscotch-bubble-close.hide-all {
|
422
|
+
display: none;
|
423
|
+
}
|
424
|
+
div.hopscotch-bubble .hopscotch-bubble-number {
|
425
|
+
background: transparent 0 0 no-repeat;
|
426
|
+
background-image: url('sprite-green.png');
|
427
|
+
color: #fff;
|
428
|
+
display: block;
|
429
|
+
float: left;
|
430
|
+
font-size: 17px;
|
431
|
+
font-weight: bold;
|
432
|
+
line-height: 31px;
|
433
|
+
padding: 0 10px 0 0;
|
434
|
+
text-align: center;
|
435
|
+
width: 30px;
|
436
|
+
height: 30px;
|
437
|
+
}
|
438
|
+
div.hopscotch-bubble .hopscotch-bubble-arrow-container {
|
439
|
+
position: absolute;
|
440
|
+
width: 34px;
|
441
|
+
height: 34px;
|
442
|
+
}
|
443
|
+
div.hopscotch-bubble .hopscotch-bubble-arrow-container .hopscotch-bubble-arrow,
|
444
|
+
div.hopscotch-bubble .hopscotch-bubble-arrow-container .hopscotch-bubble-arrow-border {
|
445
|
+
width: 0;
|
446
|
+
height: 0;
|
447
|
+
}
|
448
|
+
div.hopscotch-bubble .hopscotch-bubble-arrow-container.up {
|
449
|
+
top: -22px;
|
450
|
+
left: 10px;
|
451
|
+
}
|
452
|
+
div.hopscotch-bubble .hopscotch-bubble-arrow-container.up .hopscotch-bubble-arrow {
|
453
|
+
border-bottom: 17px solid #ffffff;
|
454
|
+
border-left: 17px solid transparent;
|
455
|
+
border-right: 17px solid transparent;
|
456
|
+
position: relative;
|
457
|
+
top: -10px;
|
458
|
+
}
|
459
|
+
div.hopscotch-bubble .hopscotch-bubble-arrow-container.up .hopscotch-bubble-arrow-border {
|
460
|
+
border-bottom: 17px solid #000000;
|
461
|
+
border-bottom: 17px solid rgba(0, 0, 0, 0.5);
|
462
|
+
border-left: 17px solid transparent;
|
463
|
+
border-right: 17px solid transparent;
|
464
|
+
}
|
465
|
+
div.hopscotch-bubble .hopscotch-bubble-arrow-container.down {
|
466
|
+
bottom: -39px;
|
467
|
+
left: 10px;
|
468
|
+
}
|
469
|
+
div.hopscotch-bubble .hopscotch-bubble-arrow-container.down .hopscotch-bubble-arrow {
|
470
|
+
border-top: 17px solid #ffffff;
|
471
|
+
border-left: 17px solid transparent;
|
472
|
+
border-right: 17px solid transparent;
|
473
|
+
position: relative;
|
474
|
+
top: -24px;
|
475
|
+
}
|
476
|
+
div.hopscotch-bubble .hopscotch-bubble-arrow-container.down .hopscotch-bubble-arrow-border {
|
477
|
+
border-top: 17px solid #000000;
|
478
|
+
border-top: 17px solid rgba(0, 0, 0, 0.5);
|
479
|
+
border-left: 17px solid transparent;
|
480
|
+
border-right: 17px solid transparent;
|
481
|
+
}
|
482
|
+
div.hopscotch-bubble .hopscotch-bubble-arrow-container.left {
|
483
|
+
top: 10px;
|
484
|
+
left: -22px;
|
485
|
+
}
|
486
|
+
div.hopscotch-bubble .hopscotch-bubble-arrow-container.left .hopscotch-bubble-arrow {
|
487
|
+
border-bottom: 17px solid transparent;
|
488
|
+
border-right: 17px solid #ffffff;
|
489
|
+
border-top: 17px solid transparent;
|
490
|
+
position: relative;
|
491
|
+
left: 7px;
|
492
|
+
top: -34px;
|
493
|
+
}
|
494
|
+
div.hopscotch-bubble .hopscotch-bubble-arrow-container.left .hopscotch-bubble-arrow-border {
|
495
|
+
border-right: 17px solid #000000;
|
496
|
+
border-right: 17px solid rgba(0, 0, 0, 0.5);
|
497
|
+
border-bottom: 17px solid transparent;
|
498
|
+
border-top: 17px solid transparent;
|
499
|
+
}
|
500
|
+
div.hopscotch-bubble .hopscotch-bubble-arrow-container.right {
|
501
|
+
top: 10px;
|
502
|
+
right: -39px;
|
503
|
+
}
|
504
|
+
div.hopscotch-bubble .hopscotch-bubble-arrow-container.right .hopscotch-bubble-arrow {
|
505
|
+
border-bottom: 17px solid transparent;
|
506
|
+
border-left: 17px solid #ffffff;
|
507
|
+
border-top: 17px solid transparent;
|
508
|
+
position: relative;
|
509
|
+
left: -7px;
|
510
|
+
top: -34px;
|
511
|
+
}
|
512
|
+
div.hopscotch-bubble .hopscotch-bubble-arrow-container.right .hopscotch-bubble-arrow-border {
|
513
|
+
border-left: 17px solid #000000;
|
514
|
+
border-left: 17px solid rgba(0, 0, 0, 0.5);
|
515
|
+
border-bottom: 17px solid transparent;
|
516
|
+
border-top: 17px solid transparent;
|
517
|
+
}
|
518
|
+
div.hopscotch-bubble .hopscotch-actions {
|
519
|
+
margin: 10px 0 0;
|
520
|
+
text-align: right;
|
521
|
+
}
|
metadata
ADDED
@@ -0,0 +1,95 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: alexgunslinger-hopscotch-rails
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.2.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Chris Schmitz
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-11-07 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.3'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: railties
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.2'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.2'
|
55
|
+
description: Hopscotch is a framework for making product tours on web pages. This
|
56
|
+
gem makes it easy to include the framework into a Rails app.
|
57
|
+
email:
|
58
|
+
- ccschmitz@gmail.com
|
59
|
+
executables: []
|
60
|
+
extensions: []
|
61
|
+
extra_rdoc_files: []
|
62
|
+
files:
|
63
|
+
- LICENSE.txt
|
64
|
+
- README.md
|
65
|
+
- lib/hopscotch/rails.rb
|
66
|
+
- lib/hopscotch/rails/version.rb
|
67
|
+
- vendor/assets/images/sprite-green.png
|
68
|
+
- vendor/assets/images/sprite-orange.png
|
69
|
+
- vendor/assets/javascripts/hopscotch.js
|
70
|
+
- vendor/assets/stylesheets/hopscotch.css
|
71
|
+
homepage: https://github.com/AlexGunslinger/hopscotch-rails
|
72
|
+
licenses:
|
73
|
+
- MIT
|
74
|
+
metadata: {}
|
75
|
+
post_install_message:
|
76
|
+
rdoc_options: []
|
77
|
+
require_paths:
|
78
|
+
- lib
|
79
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '0'
|
84
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
89
|
+
requirements: []
|
90
|
+
rubyforge_project:
|
91
|
+
rubygems_version: 2.6.6
|
92
|
+
signing_key:
|
93
|
+
specification_version: 4
|
94
|
+
summary: Hopscotch ready to go for a Rails app
|
95
|
+
test_files: []
|