From 446a964a190edf094871cd4bb4b045e469446223 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Sat, 9 Feb 2008 03:20:42 +0000 Subject: Incorporated templates phase into Setup.hs and improved templates. + Removed templates/Makefile and fillTemplates.pl. + Removed 'templates' Makefile target. + Added postConf hook to Setup.hs that fills the templates. + Use compressed javascripts for S5 and ASCIIMathML templates. + Revised test suite. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1216 788f1e2b-df1e-0410-8736-df70ead52e1b --- templates/ui/default/slides.js.packed | 74 +++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 templates/ui/default/slides.js.packed (limited to 'templates/ui/default/slides.js.packed') diff --git a/templates/ui/default/slides.js.packed b/templates/ui/default/slides.js.packed new file mode 100644 index 000000000..47b95e53f --- /dev/null +++ b/templates/ui/default/slides.js.packed @@ -0,0 +1,74 @@ +var undef;var slideCSS='';var snum=0;var smax=1;var incpos=0;var number=undef;var s5mode=true;var defaultView='slideshow';var controlVis='visible';var isIE=navigator.appName=='Microsoft Internet Explorer'&&navigator.userAgent.indexOf('Opera')<1?1:0;var isOp=navigator.userAgent.indexOf('Opera')>-1?1:0;var isGe=navigator.userAgent.indexOf('Gecko')>-1&&navigator.userAgent.indexOf('Safari')<1?1:0;function hasClass(object,className){if(!object.className)return false;return(object.className.search('(^|\\s)'+className+'(\\s|$)')!=-1);} +function hasValue(object,value){if(!object)return false;return(object.search('(^|\\s)'+value+'(\\s|$)')!=-1);} +function removeClass(object,className){if(!object)return;object.className=object.className.replace(new RegExp('(^|\\s)'+className+'(\\s|$)'),RegExp.$1+RegExp.$2);} +function addClass(object,className){if(!object||hasClass(object,className))return;if(object.className){object.className+=' '+className;}else{object.className=className;}} +function GetElementsWithClassName(elementName,className){var allElements=document.getElementsByTagName(elementName);var elemColl=new Array();for(var i=0;i '+'\/<\/span> '+''+(smax-1)+'<\/span>';if(snum==0){cs.style.visibility='hidden';}else{cs.style.visibility='visible';}} +function go(step){if(document.getElementById('slideProj').disabled||step==0)return;var jl=document.getElementById('jumplist');var cid='slide'+snum;var ce=document.getElementById(cid);if(incrementals[snum].length>0){for(var i=0;ilmax)snum=lmax;if(snum<0)snum=0;}else +snum=parseInt(jl.value);var nid='slide'+snum;var ne=document.getElementById(nid);if(!ne){ne=document.getElementById('slide0');snum=0;} +if(step<0){incpos=incrementals[snum].length}else{incpos=0;} +if(incrementals[snum].length>0&&incpos==0){for(var i=0;i0&&incpos>0) +addClass(incrementals[snum][incpos-1],'current');ce.style.visibility='hidden';ne.style.visibility='visible';jl.selectedIndex=snum;currentSlide();number=0;} +function goTo(target){if(target>=smax||target==snum)return;go(target-snum);} +function subgo(step){if(step>0){removeClass(incrementals[snum][incpos-1],'current');removeClass(incrementals[snum][incpos],'incremental');addClass(incrementals[snum][incpos],'current');incpos++;}else{incpos--;removeClass(incrementals[snum][incpos],'current');addClass(incrementals[snum][incpos],'incremental');addClass(incrementals[snum][incpos-1],'current');}} +function toggle(){var slideColl=GetElementsWithClassName('*','slide');var slides=document.getElementById('slideProj');var outline=document.getElementById('outlineStyle');if(!slides.disabled){slides.disabled=true;outline.disabled=false;s5mode=false;fontSize('1em');for(var n=0;n=incrementals[snum].length){go(1);}else{subgo(1);} +break;case 33:case 37:case 38:if(number!=undef){go(-1*number);}else if(!incrementals[snum]||incpos<=0){go(-1);}else{subgo(-1);} +break;case 36:goTo(0);break;case 35:goTo(smax-1);break;case 67:showHide('k');break;} +if(key.which<48||key.which>57){number=undef;}else{if(window.event&&isParentOrSelf(window.event.srcElement,'controls'))return;if(key.target&&isParentOrSelf(key.target,'controls'))return;number=(((number!=undef)?number:0)*10)+(key.which-48);}} +return false;} +function clicker(e){number=undef;var target;if(window.event){target=window.event.srcElement;e=window.event;}else target=e.target;if(target.getAttribute('href')!=null||hasValue(target.rel,'external')||isParentOrSelf(target,'controls')||isParentOrSelf(target,'embed')||isParentOrSelf(target,'object'))return true;if(!e.which||e.which==1){if(!incrementals[snum]||incpos>=incrementals[snum].length){go(1);}else{subgo(1);}}} +function findSlide(hash){var target=null;var slides=GetElementsWithClassName('*','slide');for(var i=0;i'+'