Skip to content
Browse files

updating less transform syntax for better FF support and updated mini…

…fied js
  • Loading branch information...
1 parent 9c57778 commit 6304d994f47a0c0b990a7f0b6ec098a0a4d24b64 @brianfleming brianfleming committed Aug 3, 2012
Showing with 36 additions and 16 deletions.
  1. +5 −5 css/pageguide.css
  2. +1 −1 css/pageguide.min.css
  3. +23 −3 js/pageguide.min.js
  4. +7 −7 less/pageguide.less
View
10 css/pageguide.css
@@ -299,11 +299,11 @@
left: 10px;
}
#tlyPageGuideWrapper #tlyPageGuideMessages .tlypageguide_back {
- -webkit-transform: rotate(-180deg) scale(1) skew(0) translate(0);
- -moz-transform: rotate(-180deg) scale(1) skew(0) translate(0);
- -o-transform: rotate(-180deg) scale(1) skew(0) translate(0);
- -ms-transform: rotate(-180deg) scale(1) skew(0) translate(0);
- transform: rotate(-180deg) scale(1) skew(0) translate(0);
+ -webkit-transform: rotate(-180deg) scale(1) skewX(0deg) skewY(0deg) translate(0px);
+ -moz-transform: rotate(-180deg) scale(1) skewX(0deg) skewY(0deg) translate(0px);
+ -o-transform: rotate(-180deg) scale(1) skewX(0deg) skewY(0deg) translate(0px);
+ -ms-transform: rotate(-180deg) scale(1) skewX(0deg) skewY(0deg) translate(0px);
+ transform: rotate(-180deg) scale(1) skewX(0deg) skewY(0deg) translate(0px);
}
#tlyPageGuideWrapper #tlyPageGuideMessages .tlypageguide_fwd {
left: 90px;
View
2 css/pageguide.min.css
@@ -1 +1 @@
-#tlyPageGuideWrapper{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;color:#000;font-size:12px;font-family:Helvetica,Arial,sans serif}#tlyPageGuideWrapper .tlypageguide_toggle{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;background:rgba(0,0,0,0.1);-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;-o-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;clear:both;color:#000;cursor:pointer;display:block;float:right;font-size:11px;height:50px;line-height:25px;padding:22px 6px 6px;position:fixed;right:-190px;text-align:left;text-decoration:none;top:84px;width:184px;-webkit-transition:all .2s ease-in;-moz-transition:all .2s ease-in;-o-transition:all .2s ease-in;-ms-transition:all .2s ease-in;transition:all .2s ease-in}#tlyPageGuideWrapper .tlypageguide_toggle:before{background:transparent url("/img/tlyguide/tlyguide_icon.png") 0 0 no-repeat;display:block;height:16px;overflow:hidden;text-indent:-999px;width:16px;content:" ";left:25px;position:absolute;top:8px}#tlyPageGuideWrapper .tlypageguide_toggle div{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;border-left:1px solid #fff;display:block;height:33px;line-height:16px;overflow:hidden;padding:2px 0 0 5px;position:absolute;right:-4px;top:6px;width:124px}#tlyPageGuideWrapper .tlypageguide_toggle div span{display:block;margin:0 0 0 -118px;width:115px;-webkit-transition:all .2s ease-in;-moz-transition:all .2s ease-in;-o-transition:all .2s ease-in;-ms-transition:all .2s ease-in;transition:all .2s ease-in}#tlyPageGuideWrapper .tlypageguide_toggle a{bottom:-26px;color:#000;opacity:0;position:absolute;right:10px;text-decoration:none}#tlyPageGuideWrapper .tlypageguide_toggle:hover{background:rgba(0,0,0,0.2);right:0!important}#tlyPageGuideWrapper .tlypageguide_toggle:hover div span{margin:0}#tlyPageGuideWrapper #tlyPageGuide{list-style:none;margin:0;padding:0}#tlyPageGuideWrapper #tlyPageGuide li{background:rgba(247,0,119,0.3);-webkit-box-shadow:0 2px 10px 1px rgba(0,0,0,0.4);-moz-box-shadow:0 2px 10px 1px rgba(0,0,0,0.4);-o-box-shadow:0 2px 10px 1px rgba(0,0,0,0.4);box-shadow:0 2px 10px 1px rgba(0,0,0,0.4);-webkit-transition:min-height,max-height .1s ease-in-out;-moz-transition:min-height,max-height .1s ease-in-out;-o-transition:min-height,max-height .1s ease-in-out;-ms-transition:min-height,max-height .1s ease-in-out;transition:min-height,max-height .1s ease-in-out;filter:alpha(opacity=0);-moz-opacity:0;-khtml-opacity:0;opacity:0;cursor:pointer;display:block;height:46px;line-height:50px;min-height:0;max-height:0;position:absolute;text-align:center;width:50px;z-index:5000}#tlyPageGuideWrapper #tlyPageGuide li.expanded{filter:alpha(opacity=0);-moz-opacity:1;-khtml-opacity:1;opacity:1;height:46px;min-height:15px;max-height:46px}#tlyPageGuideWrapper #tlyPageGuide li.expanded:after{display:block}#tlyPageGuideWrapper #tlyPageGuide li ins{background:0;color:#fff;display:block;font-size:32px;overflow:hidden;text-decoration:none;width:50px}#tlyPageGuideWrapper #tlyPageGuide li div{display:none}#tlyPageGuideWrapper #tlyPageGuide li:after{content:" ";display:none;height:0;left:0;position:absolute;top:-15px;width:0;border-top:0;border-right:0;border-bottom:0;border-left:none;top:auto;left:auto;right:auto}#tlyPageGuideWrapper #tlyPageGuide li.tlypageguide-active{background:rgba(247,0,119,0.95)}#tlyPageGuideWrapper #tlyPageGuide li.tlypageguide-active.tlypageguide_bottom:after{border-bottom:15px solid rgba(247,0,119,0.95)}#tlyPageGuideWrapper #tlyPageGuide li.tlypageguide-active.tlypageguide_right:after,#tlyPageGuideWrapper #tlyPageGuide li.tlypageguide-active.tlypageguide_left:after,#tlyPageGuideWrapper #tlyPageGuide li.tlypageguide-active.tlypageguide_top:after{border-top:15px solid rgba(247,0,119,0.95)}#tlyPageGuideWrapper #tlyPageGuide li.tlypageguide_bottom:after{border-bottom:15px solid rgba(247,0,119,0.3);border-right:15px solid transparent;left:0;top:-15px}#tlyPageGuideWrapper #tlyPageGuide li.tlypageguide_bottom:hover{margin-top:-5px}#tlyPageGuideWrapper #tlyPageGuide li.tlypageguide_right:after{border-top:15px solid rgba(247,0,119,0.3);border-left:15px solid transparent;left:-15px;top:0}#tlyPageGuideWrapper #tlyPageGuide li.tlypageguide_right:hover{margin-left:-5px}#tlyPageGuideWrapper #tlyPageGuide li.tlypageguide_left:after{border-top:15px solid rgba(247,0,119,0.3);border-right:15px solid transparent;right:-15px;top:0}#tlyPageGuideWrapper #tlyPageGuide li.tlypageguide_left:hover{margin-left:5px}#tlyPageGuideWrapper #tlyPageGuide li.tlypageguide_top:after{border-top:15px solid rgba(247,0,119,0.3);border-right:15px solid transparent;bottom:-15px;left:0}#tlyPageGuideWrapper #tlyPageGuide li.tlypageguide_top:hover{margin-top:5px}#tlyPageGuideWrapper #tlyPageGuide li:hover{background:rgba(247,0,119,0.95)}#tlyPageGuideWrapper #tlyPageGuide li:hover.tlypageguide_bottom:after{border-bottom:15px solid rgba(247,0,119,0.95)}#tlyPageGuideWrapper #tlyPageGuide li:hover.tlypageguide_right:after,#tlyPageGuideWrapper #tlyPageGuide li:hover.tlypageguide_left:after,#tlyPageGuideWrapper #tlyPageGuide li:hover.tlypageguide_top:after{border-top:15px solid rgba(247,0,119,0.95)}#tlyPageGuideWrapper #tlyPageGuideMessages{-webkit-border-radius:3px 3px 0 0;-moz-border-radius:3px 3px 0 0;-o-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;background:rgba(0,0,0,0.85);-webkit-box-shadow:0 0 9px 4px rgba(0,0,0,0.4);-moz-box-shadow:0 0 9px 4px rgba(0,0,0,0.4);-o-box-shadow:0 0 9px 4px rgba(0,0,0,0.4);box-shadow:0 0 9px 4px rgba(0,0,0,0.4);bottom:0;display:none;font-size:16px;height:0;margin:0 5% 0 5%;padding:10px;position:fixed;width:90%;z-index:1000}#tlyPageGuideWrapper #tlyPageGuideMessages span{background:rgba(247,0,119,0.95);-webkit-border-radius:3px;-moz-border-radius:3px;-o-border-radius:3px;border-radius:3px;color:#fff;display:block;font-size:32px;height:46px;left:40px;line-height:50px;overflow:hidden;position:absolute;text-align:center;top:25px;width:50px}#tlyPageGuideWrapper #tlyPageGuideMessages div{color:#fff;line-height:22px;margin:10px 90px 0 120px;position:relative}#tlyPageGuideWrapper #tlyPageGuideMessages div a{color:#fff}#tlyPageGuideWrapper #tlyPageGuideMessages div a:hover{color:#fff}#tlyPageGuideWrapper #tlyPageGuideMessages .tlypageguide_close{background:#f70077;-webkit-border-radius:0 0 3px 3px;-moz-border-radius:0 0 3px 3px;-o-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;color:#fff;display:block;font-size:11px;height:24px;line-height:26px;overflow:hidden;position:absolute;right:50px;text-align:center;text-decoration:none;top:0;width:50px}#tlyPageGuideWrapper #tlyPageGuideMessages .tlypageguide_back,#tlyPageGuideWrapper #tlyPageGuideMessages .tlypageguide_fwd{background:transparent url("/img/tlyguide/tlyguide_arrow.png") 10px 4px no-repeat;display:block;height:30px;overflow:hidden;text-indent:-999px;width:30px;position:absolute;top:34px;left:10px}#tlyPageGuideWrapper #tlyPageGuideMessages .tlypageguide_back{-webkit-transform:rotate(-180deg) scale(1) skew(0) translate(0);-moz-transform:rotate(-180deg) scale(1) skew(0) translate(0);-o-transform:rotate(-180deg) scale(1) skew(0) translate(0);-ms-transform:rotate(-180deg) scale(1) skew(0) translate(0);transform:rotate(-180deg) scale(1) skew(0) translate(0)}#tlyPageGuideWrapper #tlyPageGuideMessages .tlypageguide_fwd{left:90px}.tlypageguide_shadow{position:relative}.tlypageguide_shadow:after{background-color:rgba(247,0,119,0.1);-webkit-box-shadow:0 0 1px 1px rgba(147,0,119,0.25);-moz-box-shadow:0 0 1px 1px rgba(147,0,119,0.25);-o-box-shadow:0 0 1px 1px rgba(147,0,119,0.25);box-shadow:0 0 1px 1px rgba(147,0,119,0.25);content:" ";display:none;position:absolute;top:0;left:0}.tlypageguide-open #tlyPageGuideWrapper .tlypageguide_toggle{-webkit-box-shadow:6px 4px 5px 0 rgba(0,0,0,0.4);-moz-box-shadow:6px 4px 5px 0 rgba(0,0,0,0.4);-o-box-shadow:6px 4px 5px 0 rgba(0,0,0,0.4);box-shadow:6px 4px 5px 0 rgba(0,0,0,0.4);background:rgba(247,0,119,0.9);color:#fff;right:0!important}.tlypageguide-open #tlyPageGuideWrapper .tlypageguide_toggle a{opacity:1.0}.tlypageguide-open #tlyPageGuideWrapper .tlypageguide_toggle div span{margin:0}.tlypageguide-open .tlypageguide_shadow:after{display:block}
+#tlyPageGuideWrapper{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;color:#000;font-size:12px;font-family:Helvetica,Arial,sans serif}#tlyPageGuideWrapper .tlypageguide_toggle{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;background:rgba(0,0,0,0.1);-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;-o-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;clear:both;color:#000;cursor:pointer;display:block;float:right;font-size:11px;height:50px;line-height:25px;padding:22px 6px 6px;position:fixed;right:-190px;text-align:left;text-decoration:none;top:84px;width:184px;-webkit-transition:all .2s ease-in;-moz-transition:all .2s ease-in;-o-transition:all .2s ease-in;-ms-transition:all .2s ease-in;transition:all .2s ease-in}#tlyPageGuideWrapper .tlypageguide_toggle:before{background:transparent url("/img/tlyguide/tlyguide_icon.png") 0 0 no-repeat;display:block;height:16px;overflow:hidden;text-indent:-999px;width:16px;content:" ";left:25px;position:absolute;top:8px}#tlyPageGuideWrapper .tlypageguide_toggle div{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;border-left:1px solid #fff;display:block;height:33px;line-height:16px;overflow:hidden;padding:2px 0 0 5px;position:absolute;right:-4px;top:6px;width:124px}#tlyPageGuideWrapper .tlypageguide_toggle div span{display:block;margin:0 0 0 -118px;width:115px;-webkit-transition:all .2s ease-in;-moz-transition:all .2s ease-in;-o-transition:all .2s ease-in;-ms-transition:all .2s ease-in;transition:all .2s ease-in}#tlyPageGuideWrapper .tlypageguide_toggle a{bottom:-26px;color:#000;opacity:0;position:absolute;right:10px;text-decoration:none}#tlyPageGuideWrapper .tlypageguide_toggle:hover{background:rgba(0,0,0,0.2);right:0!important}#tlyPageGuideWrapper .tlypageguide_toggle:hover div span{margin:0}#tlyPageGuideWrapper #tlyPageGuide{list-style:none;margin:0;padding:0}#tlyPageGuideWrapper #tlyPageGuide li{background:rgba(247,0,119,0.3);-webkit-box-shadow:0 2px 10px 1px rgba(0,0,0,0.4);-moz-box-shadow:0 2px 10px 1px rgba(0,0,0,0.4);-o-box-shadow:0 2px 10px 1px rgba(0,0,0,0.4);box-shadow:0 2px 10px 1px rgba(0,0,0,0.4);-webkit-transition:min-height,max-height .1s ease-in-out;-moz-transition:min-height,max-height .1s ease-in-out;-o-transition:min-height,max-height .1s ease-in-out;-ms-transition:min-height,max-height .1s ease-in-out;transition:min-height,max-height .1s ease-in-out;filter:alpha(opacity=0);-moz-opacity:0;-khtml-opacity:0;opacity:0;cursor:pointer;display:block;height:46px;line-height:50px;min-height:0;max-height:0;position:absolute;text-align:center;width:50px;z-index:5000}#tlyPageGuideWrapper #tlyPageGuide li.expanded{filter:alpha(opacity=0);-moz-opacity:1;-khtml-opacity:1;opacity:1;height:46px;min-height:15px;max-height:46px}#tlyPageGuideWrapper #tlyPageGuide li.expanded:after{display:block}#tlyPageGuideWrapper #tlyPageGuide li ins{background:0;color:#fff;display:block;font-size:32px;overflow:hidden;text-decoration:none;width:50px}#tlyPageGuideWrapper #tlyPageGuide li div{display:none}#tlyPageGuideWrapper #tlyPageGuide li:after{content:" ";display:none;height:0;left:0;position:absolute;top:-15px;width:0;border-top:0;border-right:0;border-bottom:0;border-left:none;top:auto;left:auto;right:auto}#tlyPageGuideWrapper #tlyPageGuide li.tlypageguide-active{background:rgba(247,0,119,0.95)}#tlyPageGuideWrapper #tlyPageGuide li.tlypageguide-active.tlypageguide_bottom:after{border-bottom:15px solid rgba(247,0,119,0.95)}#tlyPageGuideWrapper #tlyPageGuide li.tlypageguide-active.tlypageguide_right:after,#tlyPageGuideWrapper #tlyPageGuide li.tlypageguide-active.tlypageguide_left:after,#tlyPageGuideWrapper #tlyPageGuide li.tlypageguide-active.tlypageguide_top:after{border-top:15px solid rgba(247,0,119,0.95)}#tlyPageGuideWrapper #tlyPageGuide li.tlypageguide_bottom:after{border-bottom:15px solid rgba(247,0,119,0.3);border-right:15px solid transparent;left:0;top:-15px}#tlyPageGuideWrapper #tlyPageGuide li.tlypageguide_bottom:hover{margin-top:-5px}#tlyPageGuideWrapper #tlyPageGuide li.tlypageguide_right:after{border-top:15px solid rgba(247,0,119,0.3);border-left:15px solid transparent;left:-15px;top:0}#tlyPageGuideWrapper #tlyPageGuide li.tlypageguide_right:hover{margin-left:-5px}#tlyPageGuideWrapper #tlyPageGuide li.tlypageguide_left:after{border-top:15px solid rgba(247,0,119,0.3);border-right:15px solid transparent;right:-15px;top:0}#tlyPageGuideWrapper #tlyPageGuide li.tlypageguide_left:hover{margin-left:5px}#tlyPageGuideWrapper #tlyPageGuide li.tlypageguide_top:after{border-top:15px solid rgba(247,0,119,0.3);border-right:15px solid transparent;bottom:-15px;left:0}#tlyPageGuideWrapper #tlyPageGuide li.tlypageguide_top:hover{margin-top:5px}#tlyPageGuideWrapper #tlyPageGuide li:hover{background:rgba(247,0,119,0.95)}#tlyPageGuideWrapper #tlyPageGuide li:hover.tlypageguide_bottom:after{border-bottom:15px solid rgba(247,0,119,0.95)}#tlyPageGuideWrapper #tlyPageGuide li:hover.tlypageguide_right:after,#tlyPageGuideWrapper #tlyPageGuide li:hover.tlypageguide_left:after,#tlyPageGuideWrapper #tlyPageGuide li:hover.tlypageguide_top:after{border-top:15px solid rgba(247,0,119,0.95)}#tlyPageGuideWrapper #tlyPageGuideMessages{-webkit-border-radius:3px 3px 0 0;-moz-border-radius:3px 3px 0 0;-o-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;background:rgba(0,0,0,0.85);-webkit-box-shadow:0 0 9px 4px rgba(0,0,0,0.4);-moz-box-shadow:0 0 9px 4px rgba(0,0,0,0.4);-o-box-shadow:0 0 9px 4px rgba(0,0,0,0.4);box-shadow:0 0 9px 4px rgba(0,0,0,0.4);bottom:0;display:none;font-size:16px;height:0;margin:0 5% 0 5%;padding:10px;position:fixed;width:90%;z-index:1000}#tlyPageGuideWrapper #tlyPageGuideMessages span{background:rgba(247,0,119,0.95);-webkit-border-radius:3px;-moz-border-radius:3px;-o-border-radius:3px;border-radius:3px;color:#fff;display:block;font-size:32px;height:46px;left:40px;line-height:50px;overflow:hidden;position:absolute;text-align:center;top:25px;width:50px}#tlyPageGuideWrapper #tlyPageGuideMessages div{color:#fff;line-height:22px;margin:10px 90px 0 120px;position:relative}#tlyPageGuideWrapper #tlyPageGuideMessages div a{color:#fff}#tlyPageGuideWrapper #tlyPageGuideMessages div a:hover{color:#fff}#tlyPageGuideWrapper #tlyPageGuideMessages .tlypageguide_close{background:#f70077;-webkit-border-radius:0 0 3px 3px;-moz-border-radius:0 0 3px 3px;-o-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;color:#fff;display:block;font-size:11px;height:24px;line-height:26px;overflow:hidden;position:absolute;right:50px;text-align:center;text-decoration:none;top:0;width:50px}#tlyPageGuideWrapper #tlyPageGuideMessages .tlypageguide_back,#tlyPageGuideWrapper #tlyPageGuideMessages .tlypageguide_fwd{background:transparent url("/img/tlyguide/tlyguide_arrow.png") 10px 4px no-repeat;display:block;height:30px;overflow:hidden;text-indent:-999px;width:30px;position:absolute;top:34px;left:10px}#tlyPageGuideWrapper #tlyPageGuideMessages .tlypageguide_back{-webkit-transform:rotate(-180deg) scale(1) skewX(0deg) skewY(0deg) translate(0);-moz-transform:rotate(-180deg) scale(1) skewX(0deg) skewY(0deg) translate(0);-o-transform:rotate(-180deg) scale(1) skewX(0deg) skewY(0deg) translate(0);-ms-transform:rotate(-180deg) scale(1) skewX(0deg) skewY(0deg) translate(0);transform:rotate(-180deg) scale(1) skewX(0deg) skewY(0deg) translate(0)}#tlyPageGuideWrapper #tlyPageGuideMessages .tlypageguide_fwd{left:90px}.tlypageguide_shadow{position:relative}.tlypageguide_shadow:after{background-color:rgba(247,0,119,0.1);-webkit-box-shadow:0 0 1px 1px rgba(147,0,119,0.25);-moz-box-shadow:0 0 1px 1px rgba(147,0,119,0.25);-o-box-shadow:0 0 1px 1px rgba(147,0,119,0.25);box-shadow:0 0 1px 1px rgba(147,0,119,0.25);content:" ";display:none;position:absolute;top:0;left:0}.tlypageguide-open #tlyPageGuideWrapper .tlypageguide_toggle{-webkit-box-shadow:6px 4px 5px 0 rgba(0,0,0,0.4);-moz-box-shadow:6px 4px 5px 0 rgba(0,0,0,0.4);-o-box-shadow:6px 4px 5px 0 rgba(0,0,0,0.4);box-shadow:6px 4px 5px 0 rgba(0,0,0,0.4);background:rgba(247,0,119,0.9);color:#fff;right:0!important}.tlypageguide-open #tlyPageGuideWrapper .tlypageguide_toggle a{opacity:1.0}.tlypageguide-open #tlyPageGuideWrapper .tlypageguide_toggle div span{margin:0}.tlypageguide-open .tlypageguide_shadow:after{display:block}
View
26 js/pageguide.min.js
@@ -7,13 +7,33 @@
*
* Contributing Author: Tracelytics Team
*/
-tl=window.tl||{};tl.pg=tl.pg||{};tl.pg.default_prefs={'auto_show_first':true,'loading_selector':'#loading','track_events_cb':function(){return;}};tl.pg.init=function(preferences){if(jQuery("#tlyPageGuide").length===0){return;}
-var guide=jQuery("#tlyPageGuide"),wrapper=jQuery('<div>',{id:'tlyPageGuideWrapper'}),message=jQuery('<div>',{id:'tlyPageGuideMessages'});message.append('<a href="#" class="tlypageguide_close" title="Close Guide">close</a>').append('<span></span>').append('<div></div>').append('<a href="#" class="tlypageguide_back" title="Previous">Previous</a>').append('<a href="#" class="tlypageguide_fwd" title="Next">Next</a>');jQuery('<div/>',{'title':'Launch Page Guide','class':'tlypageguide_toggle'}).append('page guide').append('<div><span>'+guide.data('tourtitle')+'</span></div>').append('<a href="javascript:void(0);" title="close guide">close guide &raquo;</a>').appendTo(wrapper);wrapper.append(guide);wrapper.append(message);jQuery('body').append(wrapper);var pg=new tl.pg.PageGuide(jQuery('#tlyPageGuideWrapper'),preferences);pg.ready(function(){pg.setup_handlers();pg.$base.children(".tlypageguide_toggle").animate({"right":"-120px"},250);});return pg;};tl.pg.PageGuide=function(pg_elem,preferences){this.preferences=jQuery.extend({},tl.pg.default_prefs,preferences);this.$base=pg_elem;this.$all_items=jQuery('#tlyPageGuide > li',this.$base);this.$items=jQuery([]);this.$message=jQuery('#tlyPageGuideMessages');this.$fwd=jQuery('a.tlypageguide_fwd',this.$base);this.$back=jQuery('a.tlypageguide_back',this.$base);this.cur_idx=0;this.track_event=this.preferences.track_events_cb;};tl.pg.isScrolledIntoView=function(elem){var dvtop=jQuery(window).scrollTop(),dvbtm=dvtop+jQuery(window).height(),eltop=jQuery(elem).offset().top,elbtm=eltop+jQuery(elem).height();return(elbtm>=dvtop)&&(eltop<=dvbtm-100);};tl.pg.PageGuide.prototype.ready=function(callback){var that=this,interval=window.setInterval(function(){if(!jQuery(that.preferences.loading_selector).is(':visible')){callback();clearInterval(interval);}},250);return this;};tl.pg.PageGuide.prototype._on_expand=function(){var that=this,$d=document,$w=window;this.position_tour();this.cur_idx=0;var ns=$d.createElement('style');$d.getElementsByTagName('head')[0].appendChild(ns);if(!$w.createPopup){ns.appendChild($d.createTextNode(''));ns.setAttribute("type","text/css");}
+
+/*
+ * PageGuide usage:
+ *
+ * Preferences:
+ * auto_show_first - Whether or not to focus on the first visible item
+ * immediately on PG open (default true)
+ * loading_selector - The CSS selector for the loading element. pageguide
+ * will wait until this element is no longer visible
+ * starting up.
+ * track_events_cb - Optional callback for tracking user interactions
+ * with pageguide. Should be a method taking a single
+ * parameter indicating the name of the interaction.
+ * (default none)
+ * handle_doc_switch - Optional callback to enlight or adapt interface
+ * depending on current documented element. Should be a
+ * function taking 2 parameters, current and previous
+ * data-tourtarget selectors. (default null)
+ */
+tl=window.tl||{};tl.pg=tl.pg||{};tl.pg.default_prefs={'auto_show_first':true,'loading_selector':'#loading','track_events_cb':function(){return;},'handle_doc_switch':null};tl.pg.init=function(preferences){if(jQuery("#tlyPageGuide").length===0){return;}
+var guide=jQuery("#tlyPageGuide"),wrapper=jQuery('<div>',{id:'tlyPageGuideWrapper'}),message=jQuery('<div>',{id:'tlyPageGuideMessages'});message.append('<a href="#" class="tlypageguide_close" title="Close Guide">close</a>').append('<span></span>').append('<div></div>').append('<a href="#" class="tlypageguide_back" title="Previous">Previous</a>').append('<a href="#" class="tlypageguide_fwd" title="Next">Next</a>');jQuery('<div/>',{'title':'Launch Page Guide','class':'tlypageguide_toggle'}).append('page guide').append('<div><span>'+guide.data('tourtitle')+'</span></div>').append('<a href="javascript:void(0);" title="close guide">close guide &raquo;</a>').appendTo(wrapper);wrapper.append(guide);wrapper.append(message);jQuery('body').append(wrapper);var pg=new tl.pg.PageGuide(jQuery('#tlyPageGuideWrapper'),preferences);pg.ready(function(){pg.setup_handlers();pg.$base.children(".tlypageguide_toggle").animate({"right":"-120px"},250);});return pg;};tl.pg.PageGuide=function(pg_elem,preferences){this.preferences=jQuery.extend({},tl.pg.default_prefs,preferences);this.$base=pg_elem;this.$all_items=jQuery('#tlyPageGuide > li',this.$base);this.$items=jQuery([]);this.$message=jQuery('#tlyPageGuideMessages');this.$fwd=jQuery('a.tlypageguide_fwd',this.$base);this.$back=jQuery('a.tlypageguide_back',this.$base);this.cur_idx=0;this.track_event=this.preferences.track_events_cb;this.handle_doc_switch=this.preferences.handle_doc_switch;};tl.pg.isScrolledIntoView=function(elem){var dvtop=jQuery(window).scrollTop(),dvbtm=dvtop+jQuery(window).height(),eltop=jQuery(elem).offset().top,elbtm=eltop+jQuery(elem).height();return(elbtm>=dvtop)&&(eltop<=dvbtm-100);};tl.pg.PageGuide.prototype.ready=function(callback){var that=this,interval=window.setInterval(function(){if(!jQuery(that.preferences.loading_selector).is(':visible')){callback();clearInterval(interval);}},250);return this;};tl.pg.PageGuide.prototype._on_expand=function(){var that=this,$d=document,$w=window;this.position_tour();this.cur_idx=0;var ns=$d.createElement('style');$d.getElementsByTagName('head')[0].appendChild(ns);if(!$w.createPopup){ns.appendChild($d.createTextNode(''));ns.setAttribute("type","text/css");}
var sh=$d.styleSheets[$d.styleSheets.length-1];var ie="";this.$items.each(function(i){var $p=jQuery(jQuery(this).data('tourtarget')+":visible:first");$p.addClass("tlypageguide_shadow tlypageguide_shadow"+i);var node_text='.tlypageguide_shadow'+i+':after { height: '+
$p.outerHeight()+'px; width: '+$p.outerWidth(false)+'px; }';if(!$w.createPopup){var k=$d.createTextNode(node_text,0);ns.appendChild(k);}else{ie+=node_text;}
jQuery(this).prepend('<ins>'+(i+1)+'</ins>');jQuery(this).data('idx',i);});if($w.createPopup){sh.cssText=ie;}
if(this.preferences.auto_show_first&&this.$items.length>0){this.show_message(0);}};tl.pg.PageGuide.prototype.open=function(){this.track_event('PG.open');this._on_expand();this.$items.toggleClass('expanded');jQuery('body').addClass('tlypageguide-open');};tl.pg.PageGuide.prototype.close=function(){this.track_event('PG.close');this.$items.toggleClass('expanded');this.$message.animate({height:"0"},500,function(){jQuery(this).hide();});jQuery('ins').remove();jQuery('body').removeClass('tlypageguide-open');};tl.pg.PageGuide.prototype.setup_handlers=function(){var that=this;jQuery('.tlypageguide_toggle',this.$base).live('click',function(){if(jQuery('body').is('.tlypageguide-open')){that.close();}else{that.open();}
-return false;});jQuery('.tlypageguide_close',this.$message).live('click',function(){that.close();return false;});this.$all_items.live('click',function(){var new_index=jQuery(this).data('idx');that.track_event('PG.specific_elt');that.show_message(new_index);});this.$fwd.live('click',function(){var new_index=(that.cur_idx+1)%that.$items.length;that.track_event('PG.fwd');that.show_message(new_index);return false;});this.$back.live('click',function(){var new_index=(that.cur_idx+that.$items.length-1)%that.$items.length;that.track_event('PG.back');that.show_message(new_index,true);return false;});jQuery(window).resize(function(){that.position_tour();});};tl.pg.PageGuide.prototype.show_message=function(new_index,left){var old_idx=this.cur_idx,old_item=this.$items[old_idx],new_item=this.$items[new_index];this.cur_idx=new_index;jQuery('div',this.$message).html(jQuery(new_item).children('div').html());this.$items.removeClass("tlypageguide-active");jQuery(new_item).addClass("tlypageguide-active");if(!tl.pg.isScrolledIntoView(jQuery(new_item))){jQuery('html,body').animate({scrollTop:jQuery(new_item).offset().top-50},500);}
+return false;});jQuery('.tlypageguide_close',this.$message).live('click',function(){that.close();return false;});this.$all_items.live('click',function(){var new_index=jQuery(this).data('idx');that.track_event('PG.specific_elt');that.show_message(new_index);});this.$fwd.live('click',function(){var new_index=(that.cur_idx+1)%that.$items.length;that.track_event('PG.fwd');that.show_message(new_index);return false;});this.$back.live('click',function(){var new_index=(that.cur_idx+that.$items.length-1)%that.$items.length;that.track_event('PG.back');that.show_message(new_index,true);return false;});jQuery(window).resize(function(){that.position_tour();});};tl.pg.PageGuide.prototype.show_message=function(new_index,left){var old_idx=this.cur_idx,old_item=this.$items[old_idx],new_item=this.$items[new_index];this.cur_idx=new_index;if(this.handle_doc_switch){this.handle_doc_switch(jQuery(new_item).data('tourtarget'),jQuery(old_item).data('tourtarget'));}
+jQuery('div',this.$message).html(jQuery(new_item).children('div').html());this.$items.removeClass("tlypageguide-active");jQuery(new_item).addClass("tlypageguide-active");if(!tl.pg.isScrolledIntoView(jQuery(new_item))){jQuery('html,body').animate({scrollTop:jQuery(new_item).offset().top-50},500);}
this.$message.not(':visible').show().animate({'height':'100px'},500);this.roll_number(jQuery('span',this.$message),jQuery(new_item).children('ins').html(),left);};tl.pg.PageGuide.prototype.roll_number=function(num_wrapper,new_text,left){num_wrapper.animate({'text-indent':(left?'':'-')+'50px'},'fast',function(){num_wrapper.html(new_text);num_wrapper.css({'text-indent':(left?'-':'')+'50px'},'fast').animate({'text-indent':"0"},'fast');});};tl.pg.PageGuide.prototype.position_tour=function(){this.$items=this.$all_items.filter(function(){return jQuery(jQuery(this).data('tourtarget')).is(':visible');});this.$items.each(function(){var arrow=jQuery(this),target=jQuery(arrow.data('tourtarget')).filter(':visible:first'),setLeft=target.offset().left,setTop=target.offset().top;if(arrow.hasClass("tlypageguide_top")){setTop-=60;}else if(arrow.hasClass("tlypageguide_bottom")){setTop+=target.outerHeight()+15;}else{setTop+=5;}
if(arrow.hasClass("tlypageguide_right")){setLeft+=target.outerWidth(false)+15;}else if(arrow.hasClass("tlypageguide_left")){setLeft-=65;}else{setLeft+=5;}
arrow.css({"left":setLeft+"px","top":setTop+"px"});});};
View
14 less/pageguide.less
@@ -44,12 +44,12 @@
opacity:@op/100;
}
- .pg-transform (@rotate: 90deg, @scale: 1, @skew: 1deg, @translate: 10px) {
- -webkit-transform: rotate(@rotate) scale(@scale) skew(@skew) translate(@translate);
- -moz-transform: rotate(@rotate) scale(@scale) skew(@skew) translate(@translate);
- -o-transform: rotate(@rotate) scale(@scale) skew(@skew) translate(@translate);
- -ms-transform: rotate(@rotate) scale(@scale) skew(@skew) translate(@translate);
- transform: rotate(@rotate) scale(@scale) skew(@skew) translate(@translate);
+ .pg-transform (@rotate: 0deg, @scale: 1, @skewX: 0deg, @skewY: 0deg, @translate: 0px) {
+ -webkit-transform: rotate(@rotate) scale(@scale) skewX(@skewX) skewY(@skewY) translate(@translate);
+ -moz-transform: rotate(@rotate) scale(@scale) skewX(@skewX) skewY(@skewY) translate(@translate);
+ -o-transform: rotate(@rotate) scale(@scale) skewX(@skewX) skewY(@skewY) translate(@translate);
+ -ms-transform: rotate(@rotate) scale(@scale) skewX(@skewX) skewY(@skewY) translate(@translate);
+ transform: rotate(@rotate) scale(@scale) skewX(@skewX) skewY(@skewY) translate(@translate);
}
.pg-border-box (){
@@ -344,7 +344,7 @@
}
.tlypageguide_back {
- .pg-transform(-180deg, 1, 0, 0);
+ .pg-transform(-180deg, 1, 0, 0, 0);
}
.tlypageguide_fwd {

0 comments on commit 6304d99

Please sign in to comment.
Something went wrong with that request. Please try again.