From cfeffe45f588ea1343cf90c0239c0e6496fc9b30 Mon Sep 17 00:00:00 2001 From: Oskar Wiksten Date: Sat, 9 Feb 2013 09:23:17 +0100 Subject: [PATCH] Refactor content editor - remove unused files. --- AndorsTrailEdit/inc/icons.gif | Bin 4041 -> 0 bytes AndorsTrailEdit/inc/jquery.dynatree.min.js | 252 ---- AndorsTrailEdit/inc/loading.gif | Bin 570 -> 0 bytes AndorsTrailEdit/inc/mustache.js | 597 -------- AndorsTrailEdit/inc/qunit.js | 1442 -------------------- AndorsTrailEdit/inc/require.js | 35 - AndorsTrailEdit/inc/ui.dynatree.css | 441 ------ AndorsTrailEdit/inc/vline.gif | Bin 844 -> 0 bytes 8 files changed, 2767 deletions(-) delete mode 100644 AndorsTrailEdit/inc/icons.gif delete mode 100644 AndorsTrailEdit/inc/jquery.dynatree.min.js delete mode 100644 AndorsTrailEdit/inc/loading.gif delete mode 100644 AndorsTrailEdit/inc/mustache.js delete mode 100644 AndorsTrailEdit/inc/qunit.js delete mode 100644 AndorsTrailEdit/inc/require.js delete mode 100644 AndorsTrailEdit/inc/ui.dynatree.css delete mode 100644 AndorsTrailEdit/inc/vline.gif diff --git a/AndorsTrailEdit/inc/icons.gif b/AndorsTrailEdit/inc/icons.gif deleted file mode 100644 index a58eb93f12a2c63382d6b47f070fa03ffec7fd5f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4041 zcmeH``#;l*AICqtvANV|6hqh|4Ch3Vxs*#6OiE7Ykc3h$jY>+izA}cHC6{5ea-FDF z%GoKG6=F@DhSCbPGo{8Mlgd!-^VPrb{rUTRyncA!9`7IC@5js6e+S9+U=$z*6dYg~ zG@1ec5CA3vI4Ta8jKfj6%T*#9=g0zFdC+p~!vlQy5E>1EAcVu=g6V`{IuIs;2n2{o zL`RDNiWG8m1d?R{oeofCkdF_@1_8PPB9jShLh$lFmI?|EhQh+a=sYS_5KZS1cmy0< z1#lrW7lNXrDJ&k5PoS{)5QP%VmQvV!91lun^SNBWRp-aul)@8; z=ps7nr&t1kP#};(JRV;t;tM4#35)$xY@tvj5X!g`Hdn%>N+6|(AP`9eA}J&gNF>oB zk%TAZ2_;fUC=^O$5{Z;A7LhQmWlPxqw8u}Q0BAJ; zVb=IHS9fKh^=-q&%{32mK?^e1Z-CL8Z-712)0h-3$};mb)`_pL^S!_cZg9$M8uu%; z+n-4v4*n3pu|HsNIPdv~U6rn}^Iu#Guad90<--r8eYSaCwY5ac$+%=u1G4T|m_?VOx*!tJ{bm&H;DT%&5LP7GaXv&S_(EW4Xi_>o&dNQii>1wAJ_=t?}r3dA-BP?sVr!zjaIuq_Z z5tTXVNFrn_wlngmYYxE)StciK@^U9%bjtE6v) zY$_PPy2jLHr8G6xY=tkr=jA?2i>WEt(AL;UWiAj)OQjgiv{{}lagF-AmTg?|)wA)| z{F0HjIDYd?CFPcDPO5D)U(20%yJha^6#sGedmf0kfhC2V+X+cJHp-w_dbr;j$SlQ(GUf)x$z{cUrL*ka>Hry-Ak z1E*hvy!_s~YR}Gt^Q-oAyH589 z`CnFfBMCiky=@$OM}n>I-vck0{5mHmdT08-$$a#~k6iZBgQRu-xLN8ywk2juvOT~c z0`vx8?FJ3Lra4p1Pt1D$#d28w5~n0}`|IkdH&ndMLf~04*Sf0hUyM1ujk4}}S&n!IGJ}A`lw!Gc@Ef{g|{MW^I zrjLUxJcMWm>>QGAMVc$&%`@bj6DykHk5pv%~E>>&{xs%?u795nAJLKus_ah zlMOcKIE;mlHpFyTOP=P8UaHma$7lbNnxwt&m5<57)$Ov)y39Qu#?K-&{@ke7aEx;J zUC(Q=xARSGoLNigqdCSSkIaPV^F5(>J5jTb@mwKeXZ>1;maXSkjSLO-vv3Cd{oU>q zYsHUSSXA@{oZLVt=^6JH;c5D$t`#998gk$S=oHt<4!q~1?bJ!mDx5=xcpcIHWB74! z1fi_`#u4u!dB7%dFg!Z$z1?|YK$tO7mq1#FpFVMChgAuF;8gdMIVsYS?Ztr`ZAITa zv5~#61wZheHx%(9@Prys85H%{lPvE<5yC-O+O2%RSQc@=U+0O zuy)Ng7@+BGgFoY@rv?Z@1jJGM&cUkkPa~_u6l?##2WV{A`0f_ra~d)EwRx(DS^* zwXlJFfk*gz6h{tvk$vYN#^Xen;guYXn_Bfq?2n_N!s_2!)Cj&|;J+U4_epP(e`!ih zobs}C2p-z(b8UC>gr`&UGteiKY5qeqa(5ZR>=l5-lj@?@$pxYj0EMr9dw8;M_?}i- zvtO^B2{`(q1pARy*f_P%;^?b~o4f_bg=+ZY`*QfIQ=QtCCJ!;w#u_7s%J{cV+l9H? zg>33H;GbEYD2pmGEXxC%tHH&IG)ZK(~n4RAHNQQckP?!87VC_WD8x6ie=;+zC~jAay7J}UF%LYp*(PohuY9{x!R%<2per_Bnbc9xzZmtO zl_g&a@QHIV9Fb)2I>kl>{uh4(c3qsvrD5;cva|S=p|`yp6xa?)q)y`HC*5Mx(#t z-QDYlwzqz6@;xAa&!Su6X9rY$-Zc!1MNe<@4<*E^!iL+@16yiLrxSfIt@~1(SKGCDeUizN)0mk{+Y|n=vefqB zkD{LTrv_sggb6{t^{A-=e=FF(cAs3}KjZhcGjn zzI(e=bo;a@N%-l)P~|)EAnCeVKj+`3#x}ybGoP>d9uu?MzmMyrxjxyi`#D>@=Dl-O z>*??}pW19R$30aG{A}50IY9jf8?x}wB1@TI@?M@uTN)%5D04zKj|H2jbYDL9DIAJfZ%zAwE)$(hC>JxgM}6yD=64!gdzMDF>dMsI8->(f$nYZfZ~gdaasG`tV|6N&J5g>9 zkN3+$m}O{A>&K+cyo{L*0o@AI=T*Q$x!&q#;1BtE;$S)l@A*iT-WLMeHv{$=nDN|< z_-Z}#X23!S5BNE!?mYZC_^&&aUoq&bWsw1Z$% z)>%L(Rh$c2;?Lm*Xttj;SIdDO>&%r5 zHa0TZAeQ3*+?mKj3^K2yvA=@=EC^`u1M?k_y9+g0AhZ8deiw-aV)I)y-0g)fjlyVQG44??z^D+`iYN@dsN!7w_UfYh0H8BmsOw({MHMbIUi{7h4IE&& ziXtN;1QQQFNJZy%YR-oip=lU+S}_pMFgGf;z+5nFDl(2&!))U(+NYr{(?H)sm|JU! zTPrLb)HI8~IP6!X1;hBBfcaIh{nL<{K!HzQp-VitqlvvY4M~%;37ArCnEoj|d~G2- zCrT4hQ}8a7?Mz4R?L@_Rp<aZ}nL>B5WD3rUxanDbpnKcX)xZ7w1RMPb9gZd4UJTdKhu*RFM|wG6AZI$LW~S!>%?Yd=!^>r$kvOgZ diff --git a/AndorsTrailEdit/inc/jquery.dynatree.min.js b/AndorsTrailEdit/inc/jquery.dynatree.min.js deleted file mode 100644 index 9791d55cb..000000000 --- a/AndorsTrailEdit/inc/jquery.dynatree.min.js +++ /dev/null @@ -1,252 +0,0 @@ -// jquery.dynatree.js build 1.1.1 -// Revision: 481, date: 2011-03-02 07:25:35 -// Copyright (c) 2008-10 Martin Wendt (http://dynatree.googlecode.com/) -// Dual licensed under the MIT or GPL Version 2 licenses. - -var _canLog=true;function _log(mode,msg){if(!_canLog){return;} -var args=Array.prototype.slice.apply(arguments,[1]);var dt=new Date();var tag=dt.getHours()+":"+dt.getMinutes()+":"+dt.getSeconds()+"."+dt.getMilliseconds();args[0]=tag+" - "+args[0];try{switch(mode){case"info":window.console.info.apply(window.console,args);break;case"warn":window.console.warn.apply(window.console,args);break;default:window.console.log.apply(window.console,args);break;}}catch(e){if(!window.console){_canLog=false;}}} -function logMsg(msg){Array.prototype.unshift.apply(arguments,["debug"]);_log.apply(this,arguments);} -var getDynaTreePersistData=null;var DTNodeStatus_Error=-1;var DTNodeStatus_Loading=1;var DTNodeStatus_Ok=0;(function($){var Class={create:function(){return function(){this.initialize.apply(this,arguments);};}};function getDtNodeFromElement(el){var iMax=5;while(el&&iMax--){if(el.dtnode){return el.dtnode;} -el=el.parentNode;} -return null;} -function noop(){} -var DynaTreeNode=Class.create();DynaTreeNode.prototype={initialize:function(parent,tree,data){this.parent=parent;this.tree=tree;if(typeof data==="string"){data={title:data};} -if(data.key===undefined){data.key="_"+tree._nodeCount++;} -this.data=$.extend({},$.ui.dynatree.nodedatadefaults,data);this.li=null;this.span=null;this.ul=null;this.childList=null;this.isLoading=false;this.hasSubSel=false;this.bExpanded=false;this.bSelected=false;},toString:function(){return"DynaTreeNode<"+this.data.key+">: '"+this.data.title+"'";},toDict:function(recursive,callback){var dict=$.extend({},this.data);dict.activate=(this.tree.activeNode===this);dict.focus=(this.tree.focusNode===this);dict.expand=this.bExpanded;dict.select=this.bSelected;if(callback){callback(dict);} -if(recursive&&this.childList){dict.children=[];for(var i=0,l=this.childList.length;i1){res+=cache.tagConnector;}}else if(this.hasChildren()!==false){res+=cache.tagExpander;}else{res+=cache.tagConnector;} -if(opts.checkbox&&data.hideCheckbox!==true&&!data.isStatusNode){res+=cache.tagCheckbox;} -if(data.icon){res+="";}else if(data.icon===false){noop();}else{res+=cache.tagNodeIcon;} -var nodeTitle="";if(opts.onCustomRender){nodeTitle=opts.onCustomRender.call(tree,this)||"";} -if(!nodeTitle){var tooltip=data.tooltip?" title='"+data.tooltip+"'":"";if(opts.noLink||data.noLink){nodeTitle=""+data.title+"";}else{nodeTitle=""+data.title+"";}} -res+=nodeTitle;return res;},_fixOrder:function(){var cl=this.childList;if(!cl||!this.ul){return;} -var childLI=this.ul.firstChild;for(var i=0,l=cl.length-1;i1){this.ul.className=cn.container+" "+cn.noConnector;}else{this.ul.className=cn.container;}}else if(parent){if(!this.li){this.li=document.createElement("li");this.li.dtnode=this;if(data.key&&opts.generateIds){this.li.id=opts.idPrefix+data.key;} -this.span=document.createElement("span");this.span.className=cn.title;this.li.appendChild(this.span);if(!parent.ul){parent.ul=document.createElement("ul");parent.ul.style.display="none";parent.li.appendChild(parent.ul);} -parent.ul.appendChild(this.li);} -this.span.innerHTML=this._getInnerHtml();var cnList=[];cnList.push(cn.node);if(data.isFolder){cnList.push(cn.folder);} -if(this.bExpanded){cnList.push(cn.expanded);} -if(this.hasChildren()!==false){cnList.push(cn.hasChildren);} -if(data.isLazy&&this.childList===null){cnList.push(cn.lazy);} -if(isLastSib){cnList.push(cn.lastsib);} -if(this.bSelected){cnList.push(cn.selected);} -if(this.hasSubSel){cnList.push(cn.partsel);} -if(tree.activeNode===this){cnList.push(cn.active);} -if(data.addClass){cnList.push(data.addClass);} -cnList.push(cn.combinedExpanderPrefix -+(this.bExpanded?"e":"c") -+(data.isLazy&&this.childList===null?"d":"") -+(isLastSib?"l":""));cnList.push(cn.combinedIconPrefix -+(this.bExpanded?"e":"c") -+(data.isFolder?"f":""));this.span.className=cnList.join(" ");this.li.className=isLastSib?cn.lastsib:"";if(opts.onRender){opts.onRender.call(tree,this,this.span);}} -if((this.bExpanded||includeInvisible===true)&&this.childList){for(var i=0,l=this.childList.length;ib.data.title?1:-1;};cl.sort(cmp);if(deep){for(var i=0,l=cl.length;i0){this.childList[0].focus();}else{this.focus();}} -break;case DTNodeStatus_Loading:this.isLoading=true;$(this.span).addClass(this.tree.options.classNames.nodeLoading);if(!this.parent){this._setStatusNode({title:this.tree.options.strings.loading+info,tooltip:tooltip,addClass:this.tree.options.classNames.nodeWait});} -break;case DTNodeStatus_Error:this.isLoading=false;this._setStatusNode({title:this.tree.options.strings.loadError+info,tooltip:tooltip,addClass:this.tree.options.classNames.nodeError});break;default:throw"Bad LazyNodeStatus: '"+lts+"'.";}},_parentList:function(includeRoot,includeSelf){var l=[];var dtn=includeSelf?this:this.parent;while(dtn){if(includeRoot||dtn.parent){l.unshift(dtn);} -dtn=dtn.parent;} -return l;},getLevel:function(){var level=0;var dtn=this.parent;while(dtn){level++;dtn=dtn.parent;} -return level;},_getTypeForOuterNodeEvent:function(event){var cns=this.tree.options.classNames;var target=event.target;if(target.className.indexOf(cns.node)<0){return null;} -var eventX=event.pageX-target.offsetLeft;var eventY=event.pageY-target.offsetTop;for(var i=0,l=target.childNodes.length;i=x&&eventX<=(x+nx)&&eventY>=y&&eventY<=(y+ny)){if(cn.className==cns.title){return"title";}else if(cn.className==cns.expander){return"expander";}else if(cn.className==cns.checkbox){return"checkbox";}else if(cn.className==cns.nodeIcon){return"icon";}}} -return"prefix";},getEventTargetType:function(event){var tcn=event&&event.target?event.target.className:"";var cns=this.tree.options.classNames;if(tcn===cns.title){return"title";}else if(tcn===cns.expander){return"expander";}else if(tcn===cns.checkbox){return"checkbox";}else if(tcn===cns.nodeIcon){return"icon";}else if(tcn===cns.empty||tcn===cns.vline||tcn===cns.connector){return"prefix";}else if(tcn.indexOf(cns.node)>=0){return this._getTypeForOuterNodeEvent(event);} -return null;},isVisible:function(){var parents=this._parentList(true,false);for(var i=0,l=parents.length;ia").focus();}catch(e){}},isFocused:function(){return(this.tree.tnFocused===this);},_activate:function(flag,fireEvents){this.tree.logDebug("dtnode._activate(%o, fireEvents=%o) - %o",flag,fireEvents,this);var opts=this.tree.options;if(this.data.isStatusNode){return;} -if(fireEvents&&opts.onQueryActivate&&opts.onQueryActivate.call(this.tree,flag,this)===false){return;} -if(flag){if(this.tree.activeNode){if(this.tree.activeNode===this){return;} -this.tree.activeNode.deactivate();} -if(opts.activeVisible){this.makeVisible();} -this.tree.activeNode=this;if(opts.persist){$.cookie(opts.cookieId+"-active",this.data.key,opts.cookie);} -this.tree.persistence.activeKey=this.data.key;$(this.span).addClass(opts.classNames.active);if(fireEvents&&opts.onActivate){opts.onActivate.call(this.tree,this);}}else{if(this.tree.activeNode===this){if(opts.onQueryActivate&&opts.onQueryActivate.call(this.tree,false,this)===false){return;} -$(this.span).removeClass(opts.classNames.active);if(opts.persist){$.cookie(opts.cookieId+"-active","",opts.cookie);} -this.tree.persistence.activeKey=null;this.tree.activeNode=null;if(fireEvents&&opts.onDeactivate){opts.onDeactivate.call(this.tree,this);}}}},activate:function(){this._activate(true,true);},activateSilently:function(){this._activate(true,false);},deactivate:function(){this._activate(false,true);},isActive:function(){return(this.tree.activeNode===this);},_userActivate:function(){var activate=true;var expand=false;if(this.data.isFolder){switch(this.tree.options.clickFolderMode){case 2:activate=false;expand=true;break;case 3:activate=expand=true;break;}} -if(this.parent===null){expand=false;} -if(expand){this.toggleExpand();this.focus();} -if(activate){this.activate();}},_setSubSel:function(hasSubSel){if(hasSubSel){this.hasSubSel=true;$(this.span).addClass(this.tree.options.classNames.partsel);}else{this.hasSubSel=false;$(this.span).removeClass(this.tree.options.classNames.partsel);}},_fixSelectionState:function(){var p,i,l;if(this.bSelected){this.visit(function(node){node.parent._setSubSel(true);node._select(true,false,false);});p=this.parent;while(p){p._setSubSel(true);var allChildsSelected=true;for(i=0,l=p.childList.length;i=0;i--){sib=parents[i].getNextSibling();if(sib){break;}}} -if(sib){sib.focus();} -break;default:handled=false;} -if(handled){event.preventDefault();}},_onKeypress:function(event){},_onFocus:function(event){var opts=this.tree.options;if(event.type=="blur"||event.type=="focusout"){if(opts.onBlur){opts.onBlur.call(this.tree,this);} -if(this.tree.tnFocused){$(this.tree.tnFocused.span).removeClass(opts.classNames.focused);} -this.tree.tnFocused=null;if(opts.persist){$.cookie(opts.cookieId+"-focus","",opts.cookie);}}else if(event.type=="focus"||event.type=="focusin"){if(this.tree.tnFocused&&this.tree.tnFocused!==this){this.tree.logDebug("dtnode.onFocus: out of sync: curFocus: %o",this.tree.tnFocused);$(this.tree.tnFocused.span).removeClass(opts.classNames.focused);} -this.tree.tnFocused=this;if(opts.onFocus){opts.onFocus.call(this.tree,this);} -$(this.tree.tnFocused.span).addClass(opts.classNames.focused);if(opts.persist){$.cookie(opts.cookieId+"-focus",this.data.key,opts.cookie);}}},visit:function(fn,includeSelf){var res=true;if(includeSelf===true){res=fn(this);if(res===false||res=="skip"){return res;}} -if(this.childList){for(var i=0,l=this.childList.length;i reloading %s...",this,keyPath,child);var self=this;child.reloadChildren(function(node,isOk){if(isOk){tree.logDebug("%s._loadKeyPath(%s) -> reloaded %s.",node,keyPath,node);callback.call(tree,child,"loaded");node._loadKeyPath(segList.join(tree.options.keyPathSeparator),callback);}else{tree.logWarning("%s._loadKeyPath(%s) -> reloadChildren() failed.",self,keyPath);callback.call(tree,child,"error");}});}else{callback.call(tree,child,"loaded");child._loadKeyPath(segList.join(tree.options.keyPathSeparator),callback);} -return;}} -tree.logWarning("Node not found: "+seg);return;},resetLazy:function(){if(this.parent===null){throw"Use tree.reload() instead";}else if(!this.data.isLazy){throw"node.resetLazy() requires lazy nodes.";} -this.expand(false);this.removeChildren();},_addChildNode:function(dtnode,beforeNode){var tree=this.tree;var opts=tree.options;var pers=tree.persistence;dtnode.parent=this;if(this.childList===null){this.childList=[];}else if(!beforeNode){if(this.childList.length>0){$(this.childList[this.childList.length-1].span).removeClass(opts.classNames.lastsib);}} -if(beforeNode){var iBefore=$.inArray(beforeNode,this.childList);if(iBefore<0){throw" must be a child of ";} -this.childList.splice(iBefore,0,dtnode);}else{this.childList.push(dtnode);} -var isInitializing=tree.isInitializing();if(opts.persist&&pers.cookiesFound&&isInitializing){if(pers.activeKey==dtnode.data.key){tree.activeNode=dtnode;} -if(pers.focusedKey==dtnode.data.key){tree.focusNode=dtnode;} -dtnode.bExpanded=($.inArray(dtnode.data.key,pers.expandedKeyList)>=0);dtnode.bSelected=($.inArray(dtnode.data.key,pers.selectedKeyList)>=0);}else{if(dtnode.data.activate){tree.activeNode=dtnode;if(opts.persist){pers.activeKey=dtnode.data.key;}} -if(dtnode.data.focus){tree.focusNode=dtnode;if(opts.persist){pers.focusedKey=dtnode.data.key;}} -dtnode.bExpanded=(dtnode.data.expand===true);if(dtnode.bExpanded&&opts.persist){pers.addExpand(dtnode.data.key);} -dtnode.bSelected=(dtnode.data.select===true);if(dtnode.bSelected&&opts.persist){pers.addSelect(dtnode.data.key);}} -if(opts.minExpandLevel>=dtnode.getLevel()){this.bExpanded=true;} -if(dtnode.bSelected&&opts.selectMode==3){var p=this;while(p){if(!p.hasSubSel){p._setSubSel(true);} -p=p.parent;}} -if(tree.bEnableUpdate){this.render();} -return dtnode;},addChild:function(obj,beforeNode){if(typeof(obj)=="string"){throw"Invalid data type for "+obj;}else if(!obj||obj.length===0){return;}else if(obj instanceof DynaTreeNode){return this._addChildNode(obj,beforeNode);} -if(!obj.length){obj=[obj];} -var prevFlag=this.tree.enableUpdate(false);var tnFirst=null;for(var i=0,l=obj.length;i=0){this.expandedKeyList.splice(idx,1);$.cookie(this.cookieId+"-expand",this.expandedKeyList.join(","),this.cookieOpts);}},addSelect:function(key){this._log("addSelect(%o)",key);if($.inArray(key,this.selectedKeyList)<0){this.selectedKeyList.push(key);$.cookie(this.cookieId+"-select",this.selectedKeyList.join(","),this.cookieOpts);}},clearSelect:function(key){this._log("clearSelect(%o)",key);var idx=$.inArray(key,this.selectedKeyList);if(idx>=0){this.selectedKeyList.splice(idx,1);$.cookie(this.cookieId+"-select",this.selectedKeyList.join(","),this.cookieOpts);}},isReloading:function(){return this.cookiesFound===true;},toDict:function(){return{cookiesFound:this.cookiesFound,activeKey:this.activeKey,focusedKey:this.activeKey,expandedKeyList:this.expandedKeyList,selectedKeyList:this.selectedKeyList};},lastentry:undefined};var DynaTree=Class.create();DynaTree.version="$Version: 1.1.1$";DynaTree.prototype={initialize:function($widget){this.phase="init";this.$widget=$widget;this.options=$widget.options;this.$tree=$widget.element;this.timer=null;this.divTree=this.$tree.get(0);_initDragAndDrop(this);},_load:function(callback){var $widget=this.$widget;var opts=this.options;this.bEnableUpdate=true;this._nodeCount=1;this.activeNode=null;this.focusNode=null;if(opts.rootVisible!==undefined){_log("warn","Option 'rootVisible' is no longer supported.");} -if(opts.minExpandLevel<1){_log("warn","Option 'minExpandLevel' must be >= 1.");opts.minExpandLevel=1;} -if(opts.classNames!==$.ui.dynatree.prototype.options.classNames){opts.classNames=$.extend({},$.ui.dynatree.prototype.options.classNames,opts.classNames);} -if(opts.ajaxDefaults!==$.ui.dynatree.prototype.options.ajaxDefaults){opts.ajaxDefaults=$.extend({},$.ui.dynatree.prototype.options.ajaxDefaults,opts.ajaxDefaults);} -if(opts.dnd!==$.ui.dynatree.prototype.options.dnd){opts.dnd=$.extend({},$.ui.dynatree.prototype.options.dnd,opts.dnd);} -if(!opts.imagePath){$("script").each(function(){var _rexDtLibName=/.*dynatree[^\/]*\.js$/i;if(this.src.search(_rexDtLibName)>=0){if(this.src.indexOf("/")>=0){opts.imagePath=this.src.slice(0,this.src.lastIndexOf("/"))+"/skin/";}else{opts.imagePath="skin/";} -logMsg("Guessing imagePath from '%s': '%s'",this.src,opts.imagePath);return false;}});} -this.persistence=new DynaTreeStatus(opts.cookieId,opts.cookie);if(opts.persist){if(!$.cookie){_log("warn","Please include jquery.cookie.js to use persistence.");} -this.persistence.read();} -this.logDebug("DynaTree.persistence: %o",this.persistence.toDict());this.cache={tagEmpty:"",tagVline:"",tagExpander:"",tagConnector:"",tagNodeIcon:"",tagCheckbox:"",lastentry:undefined};if(opts.children||(opts.initAjax&&opts.initAjax.url)||opts.initId){$(this.divTree).empty();} -var $ulInitialize=this.$tree.find(">ul:first").hide();this.tnRoot=new DynaTreeNode(null,this,{});this.tnRoot.bExpanded=true;this.tnRoot.render();this.divTree.appendChild(this.tnRoot.ul);var root=this.tnRoot;var isReloading=(opts.persist&&this.persistence.isReloading());var isLazy=false;var prevFlag=this.enableUpdate(false);this.logDebug("Dynatree._load(): read tree structure...");if(opts.children){root.addChild(opts.children);}else if(opts.initAjax&&opts.initAjax.url){isLazy=true;root.data.isLazy=true;this._reloadAjax(callback);}else if(opts.initId){this._createFromTag(root,$("#"+opts.initId));}else{this._createFromTag(root,$ulInitialize);$ulInitialize.remove();} -this._checkConsistency();this.logDebug("Dynatree._load(): render nodes...");this.enableUpdate(prevFlag);this.logDebug("Dynatree._load(): bind events...");this.$widget.bind();this.logDebug("Dynatree._load(): postInit...");this.phase="postInit";if(opts.persist){this.persistence.write();} -if(this.focusNode&&this.focusNode.isVisible()){this.logDebug("Focus on init: %o",this.focusNode);this.focusNode.focus();} -if(!isLazy&&opts.onPostInit){opts.onPostInit.call(this,isReloading,false);} -this.phase="idle";},_reloadAjax:function(callback){var opts=this.options;if(!opts.initAjax||!opts.initAjax.url){throw"tree.reload() requires 'initAjax' mode.";} -var pers=this.persistence;var ajaxOpts=$.extend({},opts.initAjax);if(ajaxOpts.addActiveKey){ajaxOpts.data.activeKey=pers.activeKey;} -if(ajaxOpts.addFocusedKey){ajaxOpts.data.focusedKey=pers.focusedKey;} -if(ajaxOpts.addExpandedKeyList){ajaxOpts.data.expandedKeyList=pers.expandedKeyList.join(",");} -if(ajaxOpts.addSelectedKeyList){ajaxOpts.data.selectedKeyList=pers.selectedKeyList.join(",");} -if(opts.onPostInit){if(ajaxOpts.success){this.logWarning("initAjax: success callback is ignored when onPostInit was specified.");} -if(ajaxOpts.error){this.logWarning("initAjax: error callback is ignored when onPostInit was specified.");} -var isReloading=pers.isReloading();ajaxOpts.success=function(dtnode){opts.onPostInit.call(dtnode.tree,isReloading,false);if(callback){callback.call(dtnode.tree,"ok");}};ajaxOpts.error=function(dtnode){opts.onPostInit.call(dtnode.tree,isReloading,true);if(callback){callback.call(dtnode.tree,"error");}};} -this.logDebug("Dynatree._init(): send Ajax request...");this.tnRoot.appendAjax(ajaxOpts);},toString:function(){return"Dynatree '"+this.$tree.attr("id")+"'";},toDict:function(){return this.tnRoot.toDict(true);},serializeArray:function(stopOnParents){var nodeList=this.getSelectedNodes(stopOnParents),name=this.$tree.attr("name")||this.$tree.attr("id"),arr=[];for(var i=0,l=nodeList.length;i=2){Array.prototype.unshift.apply(arguments,["debug"]);_log.apply(this,arguments);}},logInfo:function(msg){if(this.options.debugLevel>=1){Array.prototype.unshift.apply(arguments,["info"]);_log.apply(this,arguments);}},logWarning:function(msg){Array.prototype.unshift.apply(arguments,["warn"]);_log.apply(this,arguments);},isInitializing:function(){return(this.phase=="init"||this.phase=="postInit");},isReloading:function(){return(this.phase=="init"||this.phase=="postInit")&&this.options.persist&&this.persistence.cookiesFound;},isUserEvent:function(){return(this.phase=="userEvent");},redraw:function(){this.tnRoot.render(false,false);},renderInvisibleNodes:function(){this.tnRoot.render(false,true);},reload:function(callback){this._load(callback);},getRoot:function(){return this.tnRoot;},enable:function(){this.$widget.enable();},disable:function(){this.$widget.disable();},getNodeByKey:function(key){var el=document.getElementById(this.options.idPrefix+key);if(el){return el.dtnode?el.dtnode:null;} -var match=null;this.visit(function(node){if(node.data.key==key){match=node;return false;}},true);return match;},getActiveNode:function(){return this.activeNode;},reactivate:function(setFocus){var node=this.activeNode;if(node){this.activeNode=null;node.activate();if(setFocus){node.focus();}}},getSelectedNodes:function(stopOnParents){var nodeList=[];this.tnRoot.visit(function(node){if(node.bSelected){nodeList.push(node);if(stopOnParents===true){return"skip";}}});return nodeList;},activateKey:function(key){var dtnode=(key===null)?null:this.getNodeByKey(key);if(!dtnode){if(this.activeNode){this.activeNode.deactivate();} -this.activeNode=null;return null;} -dtnode.focus();dtnode.activate();return dtnode;},loadKeyPath:function(keyPath,callback){var segList=keyPath.split(this.options.keyPathSeparator);if(segList[0]===""){segList.shift();} -if(segList[0]==this.tnRoot.data.key){this.logDebug("Removed leading root key.");segList.shift();} -keyPath=segList.join(this.options.keyPathSeparator);return this.tnRoot._loadKeyPath(keyPath,callback);},selectKey:function(key,select){var dtnode=this.getNodeByKey(key);if(!dtnode){return null;} -dtnode.select(select);return dtnode;},enableUpdate:function(bEnable){if(this.bEnableUpdate==bEnable){return bEnable;} -this.bEnableUpdate=bEnable;if(bEnable){this.redraw();} -return!bEnable;},count:function(){return this.tnRoot.countChildren();},visit:function(fn,includeRoot){return this.tnRoot.visit(fn,includeRoot);},_createFromTag:function(parentTreeNode,$ulParent){var self=this;$ulParent.find(">li").each(function(){var $li=$(this);var $liSpan=$li.find(">span:first");var title;if($liSpan.length){title=$liSpan.html();}else{title=$li.html();var iPos=title.search(/
    =0){title=$.trim(title.substring(0,iPos));}else{title=$.trim(title);}} -var data={title:title,isFolder:$li.hasClass("folder"),isLazy:$li.hasClass("lazy"),expand:$li.hasClass("expanded"),select:$li.hasClass("selected"),activate:$li.hasClass("active"),focus:$li.hasClass("focused"),noLink:$li.hasClass("noLink")};if($li.attr("title")){data.tooltip=$li.attr("title");} -if($li.attr("id")){data.key=$li.attr("id");} -if($li.attr("data")){var dataAttr=$.trim($li.attr("data"));if(dataAttr){if(dataAttr.charAt(0)!="{"){dataAttr="{"+dataAttr+"}";} -try{$.extend(data,eval("("+dataAttr+")"));}catch(e){throw("Error parsing node data: "+e+"\ndata:\n'"+dataAttr+"'");}}} -var childNode=parentTreeNode.addChild(data);var $ul=$li.find(">ul:first");if($ul.length){self._createFromTag(childNode,$ul);}});},_checkConsistency:function(){},_setDndStatus:function(sourceNode,targetNode,helper,hitMode,accept){var $source=sourceNode?$(sourceNode.span):null;var $target=$(targetNode.span);if(!this.$dndMarker){this.$dndMarker=$("
    ").hide().prependTo($(this.divTree).parent());} -if(hitMode==="after"||hitMode==="before"||hitMode==="over"){var pos=$target.position();switch(hitMode){case"before":this.$dndMarker.removeClass("dynatree-drop-after dynatree-drop-over");this.$dndMarker.addClass("dynatree-drop-before");pos.top-=8;break;case"after":this.$dndMarker.removeClass("dynatree-drop-before dynatree-drop-over");this.$dndMarker.addClass("dynatree-drop-after");pos.top+=8;break;default:this.$dndMarker.removeClass("dynatree-drop-after dynatree-drop-before");this.$dndMarker.addClass("dynatree-drop-over");$target.addClass("dynatree-drop-target");pos.left+=8;} -this.$dndMarker.css({"left":(pos.left)+"px","top":(pos.top)+"px"}).show();}else{$target.removeClass("dynatree-drop-target");this.$dndMarker.hide();} -if(hitMode==="after"){$target.addClass("dynatree-drop-after");}else{$target.removeClass("dynatree-drop-after");} -if(hitMode==="before"){$target.addClass("dynatree-drop-before");}else{$target.removeClass("dynatree-drop-before");} -if(accept===true){if($source){$source.addClass("dynatree-drop-accept");} -$target.addClass("dynatree-drop-accept");helper.addClass("dynatree-drop-accept");}else{if($source){$source.removeClass("dynatree-drop-accept");} -$target.removeClass("dynatree-drop-accept");helper.removeClass("dynatree-drop-accept");} -if(accept===false){if($source){$source.addClass("dynatree-drop-reject");} -$target.addClass("dynatree-drop-reject");helper.addClass("dynatree-drop-reject");}else{if($source){$source.removeClass("dynatree-drop-reject");} -$target.removeClass("dynatree-drop-reject");helper.removeClass("dynatree-drop-reject");}},_onDragEvent:function(eventName,node,otherNode,event,ui,draggable){var opts=this.options;var dnd=this.options.dnd;var res=null;var nodeTag=$(node.span);var hitMode;switch(eventName){case"helper":var helper=$("
    ").append($(event.target).closest('a').clone());helper.data("dtSourceNode",node);res=helper;break;case"start":if(node.isStatusNode()){res=false;}else if(dnd.onDragStart){res=dnd.onDragStart(node);} -if(res===false){this.logDebug("tree.onDragStart() cancelled");ui.helper.trigger("mouseup");ui.helper.hide();}else{nodeTag.addClass("dynatree-drag-source");} -break;case"enter":res=dnd.onDragEnter?dnd.onDragEnter(node,otherNode):null;res={over:(res!==false)&&((res===true)||(res==="over")||$.inArray("over",res)>=0),before:(res!==false)&&((res===true)||(res==="before")||$.inArray("before",res)>=0),after:(res!==false)&&((res===true)||(res==="after")||$.inArray("after",res)>=0)};ui.helper.data("enterResponse",res);break;case"over":var enterResponse=ui.helper.data("enterResponse");hitMode=null;if(enterResponse===false){break;}else if(typeof enterResponse==="string"){hitMode=enterResponse;}else{var nodeOfs=nodeTag.offset();var relPos={x:event.pageX-nodeOfs.left,y:event.pageY-nodeOfs.top};var relPos2={x:relPos.x/nodeTag.width(),y:relPos.y/nodeTag.height()};if(enterResponse.after&&relPos2.y>0.75){hitMode="after";}else if(!enterResponse.over&&enterResponse.after&&relPos2.y>0.5){hitMode="after";}else if(enterResponse.before&&relPos2.y<=0.25){hitMode="before";}else if(!enterResponse.over&&enterResponse.before&&relPos2.y<=0.5){hitMode="before";}else if(enterResponse.over){hitMode="over";} -if(dnd.preventVoidMoves){if(node===otherNode){hitMode=null;}else if(hitMode==="before"&&otherNode&&node===otherNode.getNextSibling()){hitMode=null;}else if(hitMode==="after"&&otherNode&&node===otherNode.getPrevSibling()){hitMode=null;}else if(hitMode==="over"&&otherNode&&otherNode.parent===node&&otherNode.isLastSibling()){hitMode=null;}} -ui.helper.data("hitMode",hitMode);} -if(hitMode==="over"&&dnd.autoExpandMS&&node.hasChildren()!==false&&!node.bExpanded){node.scheduleAction("expand",dnd.autoExpandMS);} -if(hitMode&&dnd.onDragOver){res=dnd.onDragOver(node,otherNode,hitMode);} -this._setDndStatus(otherNode,node,ui.helper,hitMode,res!==false);break;case"drop":hitMode=ui.helper.data("hitMode");if(hitMode&&dnd.onDrop){dnd.onDrop(node,otherNode,hitMode,ui,draggable);} -break;case"leave":node.scheduleAction("cancel");ui.helper.data("enterResponse",null);ui.helper.data("hitMode",null);this._setDndStatus(otherNode,node,ui.helper,"out",undefined);if(dnd.onDragLeave){dnd.onDragLeave(node,otherNode);} -break;case"stop":nodeTag.removeClass("dynatree-drag-source");if(dnd.onDragStop){dnd.onDragStop(node);} -break;default:throw"Unsupported drag event: "+eventName;} -return res;},cancelDrag:function(){var dd=$.ui.ddmanager.current;if(dd){dd.cancel();}},lastentry:undefined};$.widget("ui.dynatree",{_init:function(){if(parseFloat($.ui.version)<1.8){_log("warn","ui.dynatree._init() was called; you should upgrade to jquery.ui.core.js v1.8 or higher.");return this._create();} -_log("debug","ui.dynatree._init() was called; no current default functionality.");},_create:function(){logMsg("Dynatree._create(): version='%s', debugLevel=%o.",DynaTree.version,this.options.debugLevel);var opts=this.options;this.options.event+=".dynatree";var divTree=this.element.get(0);this.tree=new DynaTree(this);this.tree._load();this.tree.logDebug("Dynatree._init(): done.");},bind:function(){this.unbind();var eventNames="click.dynatree dblclick.dynatree";if(this.options.keyboard){eventNames+=" keypress.dynatree keydown.dynatree";} -this.element.bind(eventNames,function(event){var dtnode=getDtNodeFromElement(event.target);if(!dtnode){return true;} -var tree=dtnode.tree;var o=tree.options;tree.logDebug("event(%s): dtnode: %s",event.type,dtnode);var prevPhase=tree.phase;tree.phase="userEvent";try{switch(event.type){case"click":return(o.onClick&&o.onClick.call(tree,dtnode,event)===false)?false:dtnode._onClick(event);case"dblclick":return(o.onDblClick&&o.onDblClick.call(tree,dtnode,event)===false)?false:dtnode._onDblClick(event);case"keydown":return(o.onKeydown&&o.onKeydown.call(tree,dtnode,event)===false)?false:dtnode._onKeydown(event);case"keypress":return(o.onKeypress&&o.onKeypress.call(tree,dtnode,event)===false)?false:dtnode._onKeypress(event);}}catch(e){var _=null;tree.logWarning("bind(%o): dtnode: %o, error: %o",event,dtnode,e);}finally{tree.phase=prevPhase;}});function __focusHandler(event){event=$.event.fix(event||window.event);var dtnode=getDtNodeFromElement(event.target);return dtnode?dtnode._onFocus(event):false;} -var div=this.tree.divTree;if(div.addEventListener){div.addEventListener("focus",__focusHandler,true);div.addEventListener("blur",__focusHandler,true);}else{div.onfocusin=div.onfocusout=__focusHandler;}},unbind:function(){this.element.unbind(".dynatree");},enable:function(){this.bind();$.Widget.prototype.enable.apply(this,arguments);},disable:function(){this.unbind();$.Widget.prototype.disable.apply(this,arguments);},getTree:function(){return this.tree;},getRoot:function(){return this.tree.getRoot();},getActiveNode:function(){return this.tree.getActiveNode();},getSelectedNodes:function(){return this.tree.getSelectedNodes();},lastentry:undefined});if(parseFloat($.ui.version)<1.8){$.ui.dynatree.getter="getTree getRoot getActiveNode getSelectedNodes";} -$.ui.dynatree.prototype.options={title:"Dynatree",minExpandLevel:1,imagePath:null,children:null,initId:null,initAjax:null,autoFocus:true,keyboard:true,persist:false,autoCollapse:false,clickFolderMode:3,activeVisible:true,checkbox:false,selectMode:2,fx:null,noLink:false,onClick:null,onDblClick:null,onKeydown:null,onKeypress:null,onFocus:null,onBlur:null,onQueryActivate:null,onQuerySelect:null,onQueryExpand:null,onPostInit:null,onActivate:null,onDeactivate:null,onSelect:null,onExpand:null,onLazyRead:null,onCustomRender:null,onRender:null,dnd:{onDragStart:null,onDragStop:null,autoExpandMS:1000,preventVoidMoves:true,onDragEnter:null,onDragOver:null,onDrop:null,onDragLeave:null},ajaxDefaults:{cache:false,dataType:"json"},strings:{loading:"Loading…",loadError:"Load error!"},generateIds:false,idPrefix:"dynatree-id-",keyPathSeparator:"/",cookieId:"dynatree",cookie:{expires:null},classNames:{container:"dynatree-container",node:"dynatree-node",folder:"dynatree-folder",empty:"dynatree-empty",vline:"dynatree-vline",expander:"dynatree-expander",connector:"dynatree-connector",checkbox:"dynatree-checkbox",nodeIcon:"dynatree-icon",title:"dynatree-title",noConnector:"dynatree-no-connector",nodeError:"dynatree-statusnode-error",nodeWait:"dynatree-statusnode-wait",hidden:"dynatree-hidden",combinedExpanderPrefix:"dynatree-exp-",combinedIconPrefix:"dynatree-ico-",nodeLoading:"dynatree-loading",hasChildren:"dynatree-has-children",active:"dynatree-active",selected:"dynatree-selected",expanded:"dynatree-expanded",lazy:"dynatree-lazy",focused:"dynatree-focused",partsel:"dynatree-partsel",lastsib:"dynatree-lastsib"},debugLevel:1,lastentry:undefined};if(parseFloat($.ui.version)<1.8){$.ui.dynatree.defaults=$.ui.dynatree.prototype.options;} -$.ui.dynatree.nodedatadefaults={title:null,key:null,isFolder:false,isLazy:false,tooltip:null,icon:null,addClass:null,noLink:false,activate:false,focus:false,expand:false,select:false,hideCheckbox:false,unselectable:false,children:null,lastentry:undefined};function _initDragAndDrop(tree){var dnd=tree.options.dnd||null;if(dnd&&(dnd.onDragStart||dnd.onDrop)){_registerDnd();} -if(dnd&&dnd.onDragStart){tree.$tree.draggable({addClasses:false,appendTo:"body",containment:false,delay:0,distance:4,revert:false,connectToDynatree:true,helper:function(event){var sourceNode=getDtNodeFromElement(event.target);return sourceNode.tree._onDragEvent("helper",sourceNode,null,event,null,null);},_last:null});} -if(dnd&&dnd.onDrop){tree.$tree.droppable({addClasses:false,tolerance:"intersect",greedy:false,_last:null});}} -var didRegisterDnd=false;var _registerDnd=function(){if(didRegisterDnd){return;} -$.ui.plugin.add("draggable","connectToDynatree",{start:function(event,ui){var draggable=$(this).data("draggable");var sourceNode=ui.helper.data("dtSourceNode")||null;if(sourceNode){draggable.offset.click.top=-2;draggable.offset.click.left=+16;return sourceNode.tree._onDragEvent("start",sourceNode,null,event,ui,draggable);}},drag:function(event,ui){var draggable=$(this).data("draggable");var sourceNode=ui.helper.data("dtSourceNode")||null;var prevTargetNode=ui.helper.data("dtTargetNode")||null;var targetNode=getDtNodeFromElement(event.target);if(event.target&&!targetNode){var isHelper=$(event.target).closest("div.dynatree-drag-helper,#dynatree-drop-marker").length>0;if(isHelper){return;}} -ui.helper.data("dtTargetNode",targetNode);if(prevTargetNode&&prevTargetNode!==targetNode){prevTargetNode.tree._onDragEvent("leave",prevTargetNode,sourceNode,event,ui,draggable);} -if(targetNode){if(!targetNode.tree.options.dnd.onDrop){noop();}else if(targetNode===prevTargetNode){targetNode.tree._onDragEvent("over",targetNode,sourceNode,event,ui,draggable);}else{targetNode.tree._onDragEvent("enter",targetNode,sourceNode,event,ui,draggable);}}},stop:function(event,ui){var draggable=$(this).data("draggable");var sourceNode=ui.helper.data("dtSourceNode")||null;var targetNode=ui.helper.data("dtTargetNode")||null;var mouseDownEvent=draggable._mouseDownEvent;var eventType=event.type;var dropped=(eventType=="mouseup"&&event.which==1);if(!dropped){logMsg("Drag was cancelled");} -if(targetNode){if(dropped){targetNode.tree._onDragEvent("drop",targetNode,sourceNode,event,ui,draggable);} -targetNode.tree._onDragEvent("leave",targetNode,sourceNode,event,ui,draggable);} -if(sourceNode){sourceNode.tree._onDragEvent("stop",sourceNode,null,event,ui,draggable);}}});didRegisterDnd=true;};})(jQuery); \ No newline at end of file diff --git a/AndorsTrailEdit/inc/loading.gif b/AndorsTrailEdit/inc/loading.gif deleted file mode 100644 index 251df0544cd63db56160b5a53c9e203999a561e6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 570 zcmZ?wbhEHb6krfwSj5Tz21}is{PSHlpTQ%ic>s*20?KO#JbB`JoX-PVwjtvhv)DQ}p7#JCNfEF?^3rDO{ z`kg!_%&DO$()C1j*!N6FCWJZ`pgL{_4xl=*2&=_$Eh1qp1s`u759OHqxi!UnQaqAU zcA!#rpkkoi9wBFNp|>|CHN@uv{OZ# zV43`6q`+WjU;$bUHZfwA%kH-)E!nmfb1nSIbx^$N(G(2}vOn0~gfWLK1;@d|WKqXXYeZXu6yfzU<41@HNCEU|$23t=045OkcT; z;~__8v>{Kcdao~%ubF^ug!o!mBJj*D13gJ?VWlK%w>PYgE=fr0KrsXHv~Yyf!lUbT TUrrHtcg?o#wX~xJP@OdZ_UVjb diff --git a/AndorsTrailEdit/inc/mustache.js b/AndorsTrailEdit/inc/mustache.js deleted file mode 100644 index 085d60b80..000000000 --- a/AndorsTrailEdit/inc/mustache.js +++ /dev/null @@ -1,597 +0,0 @@ -/*! - * mustache.js - Logic-less {{mustache}} templates with JavaScript - * http://github.com/janl/mustache.js - */ -var Mustache = (typeof module !== "undefined" && module.exports) || {}; - -(function (exports) { - - exports.name = "mustache.js"; - exports.version = "0.5.1-dev"; - exports.tags = ["{{", "}}"]; - - exports.parse = parse; - exports.clearCache = clearCache; - exports.compile = compile; - exports.compilePartial = compilePartial; - exports.render = render; - - exports.Scanner = Scanner; - exports.Context = Context; - exports.Renderer = Renderer; - - // This is here for backwards compatibility with 0.4.x. - exports.to_html = function (template, view, partials, send) { - var result = render(template, view, partials); - - if (typeof send === "function") { - send(result); - } else { - return result; - } - }; - - var whiteRe = /\s*/; - var spaceRe = /\s+/; - var nonSpaceRe = /\S/; - var eqRe = /\s*=/; - var curlyRe = /\s*\}/; - var tagRe = /#|\^|\/|>|\{|&|=|!/; - - // Workaround for https://issues.apache.org/jira/browse/COUCHDB-577 - // See https://github.com/janl/mustache.js/issues/189 - function testRe(re, string) { - return RegExp.prototype.test.call(re, string); - } - - function isWhitespace(string) { - return !testRe(nonSpaceRe, string); - } - - var isArray = Array.isArray || function (obj) { - return Object.prototype.toString.call(obj) === "[object Array]"; - }; - - // OSWASP Guidlines: escape all non alphanumeric characters in ASCII space. - var jsCharsRe = /[\x00-\x2F\x3A-\x40\x5B-\x60\x7B-\xFF\u2028\u2029]/gm; - - function quote(text) { - var escaped = text.replace(jsCharsRe, function (c) { - return "\\u" + ('0000' + c.charCodeAt(0).toString(16)).slice(-4); - }); - - return '"' + escaped + '"'; - } - - function escapeRe(string) { - return string.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); - } - - var entityMap = { - "&": "&", - "<": "<", - ">": ">", - '"': '"', - "'": ''', - "/": '/' - }; - - function escapeHtml(string) { - return String(string).replace(/[&<>"'\/]/g, function (s) { - return entityMap[s]; - }); - } - - // Export these utility functions. - exports.isWhitespace = isWhitespace; - exports.isArray = isArray; - exports.quote = quote; - exports.escapeRe = escapeRe; - exports.escapeHtml = escapeHtml; - - function Scanner(string) { - this.string = string; - this.tail = string; - this.pos = 0; - } - - /** - * Returns `true` if the tail is empty (end of string). - */ - Scanner.prototype.eos = function () { - return this.tail === ""; - }; - - /** - * Tries to match the given regular expression at the current position. - * Returns the matched text if it can match, `null` otherwise. - */ - Scanner.prototype.scan = function (re) { - var match = this.tail.match(re); - - if (match && match.index === 0) { - this.tail = this.tail.substring(match[0].length); - this.pos += match[0].length; - return match[0]; - } - - return null; - }; - - /** - * Skips all text until the given regular expression can be matched. Returns - * the skipped string, which is the entire tail of this scanner if no match - * can be made. - */ - Scanner.prototype.scanUntil = function (re) { - var match, pos = this.tail.search(re); - - switch (pos) { - case -1: - match = this.tail; - this.pos += this.tail.length; - this.tail = ""; - break; - case 0: - match = null; - break; - default: - match = this.tail.substring(0, pos); - this.tail = this.tail.substring(pos); - this.pos += pos; - } - - return match; - }; - - function Context(view, parent) { - this.view = view; - this.parent = parent; - this.clearCache(); - } - - Context.make = function (view) { - return (view instanceof Context) ? view : new Context(view); - }; - - Context.prototype.clearCache = function () { - this._cache = {}; - }; - - Context.prototype.push = function (view) { - return new Context(view, this); - }; - - Context.prototype.lookup = function (name) { - var value = this._cache[name]; - - if (!value) { - if (name === ".") { - value = this.view; - } else { - var context = this; - - while (context) { - if (name.indexOf(".") > 0) { - var names = name.split("."), i = 0; - - value = context.view; - - while (value && i < names.length) { - value = value[names[i++]]; - } - } else { - value = context.view[name]; - } - - if (value != null) { - break; - } - - context = context.parent; - } - } - - this._cache[name] = value; - } - - if (typeof value === "function") { - value = value.call(this.view); - } - - return value; - }; - - function Renderer() { - this.clearCache(); - } - - Renderer.prototype.clearCache = function () { - this._cache = {}; - this._partialCache = {}; - }; - - Renderer.prototype.compile = function (tokens, tags) { - var fn = compileTokens(tokens), - self = this; - - return function (view) { - return fn(Context.make(view), self); - }; - }; - - Renderer.prototype.compilePartial = function (name, tokens, tags) { - this._partialCache[name] = this.compile(tokens, tags); - return this._partialCache[name]; - }; - - Renderer.prototype.render = function (template, view) { - var fn = this._cache[template]; - - if (!fn) { - fn = this.compile(template); - this._cache[template] = fn; - } - - return fn(view); - }; - - Renderer.prototype._section = function (name, context, callback) { - var value = context.lookup(name); - - switch (typeof value) { - case "object": - if (isArray(value)) { - var buffer = ""; - for (var i = 0, len = value.length; i < len; ++i) { - buffer += callback(context.push(value[i]), this); - } - return buffer; - } else { - return callback(context.push(value), this); - } - break; - case "function": - var sectionText = callback(context, this), self = this; - var scopedRender = function (template) { - return self.render(template, context); - }; - return value.call(context.view, sectionText, scopedRender) || ""; - break; - default: - if (value) { - return callback(context, this); - } - } - - return ""; - }; - - Renderer.prototype._inverted = function (name, context, callback) { - var value = context.lookup(name); - - // From the spec: inverted sections may render text once based on the - // inverse value of the key. That is, they will be rendered if the key - // doesn't exist, is false, or is an empty list. - if (value == null || value === false || (isArray(value) && value.length === 0)) { - return callback(context, this); - } - - return ""; - }; - - Renderer.prototype._partial = function (name, context) { - var fn = this._partialCache[name]; - - if (fn) { - return fn(context, this); - } - - return ""; - }; - - Renderer.prototype._name = function (name, context, escape) { - var value = context.lookup(name); - - if (typeof value === "function") { - value = value.call(context.view); - } - - var string = (value == null) ? "" : String(value); - - if (escape) { - return escapeHtml(string); - } - - return string; - }; - - /** - * Low-level function that compiles the given `tokens` into a - * function that accepts two arguments: a Context and a - * Renderer. Returns the body of the function as a string if - * `returnBody` is true. - */ - function compileTokens(tokens, returnBody) { - if (typeof tokens === "string") { - tokens = parse(tokens); - } - - var body = ['""']; - var token, method, escape; - - for (var i = 0, len = tokens.length; i < len; ++i) { - token = tokens[i]; - - switch (token.type) { - case "#": - case "^": - method = (token.type === "#") ? "_section" : "_inverted"; - body.push("r." + method + "(" + quote(token.value) + ", c, function (c, r) {\n" + - " " + compileTokens(token.tokens, true) + "\n" + - "})"); - break; - case "{": - case "&": - case "name": - escape = token.type === "name" ? "true" : "false"; - body.push("r._name(" + quote(token.value) + ", c, " + escape + ")"); - break; - case ">": - body.push("r._partial(" + quote(token.value) + ", c)"); - break; - case "text": - body.push(quote(token.value)); - break; - } - } - - // Convert to a string body. - body = "return " + body.join(" + ") + ";"; - - // Good for debugging. - // console.log(body); - - if (returnBody) { - return body; - } - - // For great evil! - return new Function("c, r", body); - } - - function escapeTags(tags) { - if (tags.length === 2) { - return [ - new RegExp(escapeRe(tags[0]) + "\\s*"), - new RegExp("\\s*" + escapeRe(tags[1])) - ]; - } - - throw new Error("Invalid tags: " + tags.join(" ")); - } - - /** - * Forms the given linear array of `tokens` into a nested tree structure - * where tokens that represent a section have a "tokens" array property - * that contains all tokens that are in that section. - */ - function nestTokens(tokens) { - var tree = []; - var collector = tree; - var sections = []; - var token, section; - - for (var i = 0; i < tokens.length; ++i) { - token = tokens[i]; - - switch (token.type) { - case "#": - case "^": - token.tokens = []; - sections.push(token); - collector.push(token); - collector = token.tokens; - break; - case "/": - if (sections.length === 0) { - throw new Error("Unopened section: " + token.value); - } - - section = sections.pop(); - - if (section.value !== token.value) { - throw new Error("Unclosed section: " + section.value); - } - - if (sections.length > 0) { - collector = sections[sections.length - 1].tokens; - } else { - collector = tree; - } - break; - default: - collector.push(token); - } - } - - // Make sure there were no open sections when we're done. - section = sections.pop(); - - if (section) { - throw new Error("Unclosed section: " + section.value); - } - - return tree; - } - - /** - * Combines the values of consecutive text tokens in the given `tokens` array - * to a single token. - */ - function squashTokens(tokens) { - var lastToken; - - for (var i = 0; i < tokens.length; ++i) { - var token = tokens[i]; - - if (lastToken && lastToken.type === "text" && token.type === "text") { - lastToken.value += token.value; - tokens.splice(i--, 1); // Remove this token from the array. - } else { - lastToken = token; - } - } - } - - /** - * Breaks up the given `template` string into a tree of token objects. If - * `tags` is given here it must be an array with two string values: the - * opening and closing tags used in the template (e.g. ["<%", "%>"]). Of - * course, the default is to use mustaches (i.e. Mustache.tags). - */ - function parse(template, tags) { - tags = tags || exports.tags; - var tagRes = escapeTags(tags); - - var scanner = new Scanner(template); - - var tokens = [], // Buffer to hold the tokens - spaces = [], // Indices of whitespace tokens on the current line - hasTag = false, // Is there a {{tag}} on the current line? - nonSpace = false; // Is there a non-space char on the current line? - - // Strips all whitespace tokens array for the current line - // if there was a {{#tag}} on it and otherwise only space. - var stripSpace = function () { - if (hasTag && !nonSpace) { - while (spaces.length) { - tokens.splice(spaces.pop(), 1); - } - } else { - spaces = []; - } - - hasTag = false; - nonSpace = false; - }; - - var type, value, chr; - - while (!scanner.eos()) { - value = scanner.scanUntil(tagRes[0]); - - if (value) { - for (var i = 0, len = value.length; i < len; ++i) { - chr = value[i]; - - if (isWhitespace(chr)) { - spaces.push(tokens.length); - } else { - nonSpace = true; - } - - tokens.push({type: "text", value: chr}); - - if (chr === "\n") { - stripSpace(); // Check for whitespace on the current line. - } - } - } - - // Match the opening tag. - if (!scanner.scan(tagRes[0])) { - break; - } - - hasTag = true; - type = scanner.scan(tagRe) || "name"; - - // Skip any whitespace between tag and value. - scanner.scan(whiteRe); - - // Extract the tag value. - if (type === "=") { - value = scanner.scanUntil(eqRe); - scanner.scan(eqRe); - scanner.scanUntil(tagRes[1]); - } else if (type === "{") { - var closeRe = new RegExp("\\s*" + escapeRe("}" + tags[1])); - value = scanner.scanUntil(closeRe); - scanner.scan(curlyRe); - scanner.scanUntil(tagRes[1]); - } else { - value = scanner.scanUntil(tagRes[1]); - } - - // Match the closing tag. - if (!scanner.scan(tagRes[1])) { - throw new Error("Unclosed tag at " + scanner.pos); - } - - tokens.push({type: type, value: value}); - - if (type === "name" || type === "{" || type === "&") { - nonSpace = true; - } - - // Set the tags for the next time around. - if (type === "=") { - tags = value.split(spaceRe); - tagRes = escapeTags(tags); - } - } - - squashTokens(tokens); - - return nestTokens(tokens); - } - - // The high-level clearCache, compile, compilePartial, and render functions - // use this default renderer. - var _renderer = new Renderer; - - /** - * Clears all cached templates and partials. - */ - function clearCache() { - _renderer.clearCache(); - } - - /** - * High-level API for compiling the given `tokens` down to a reusable - * function. If `tokens` is a string it will be parsed using the given `tags` - * before it is compiled. - */ - function compile(tokens, tags) { - return _renderer.compile(tokens, tags); - } - - /** - * High-level API for compiling the `tokens` for the partial with the given - * `name` down to a reusable function. If `tokens` is a string it will be - * parsed using the given `tags` before it is compiled. - */ - function compilePartial(name, tokens, tags) { - return _renderer.compilePartial(name, tokens, tags); - } - - /** - * High-level API for rendering the `template` using the given `view`. The - * optional `partials` object may be given here for convenience, but note that - * it will cause all partials to be re-compiled, thus hurting performance. Of - * course, this only matters if you're going to render the same template more - * than once. If so, it is best to call `compilePartial` before calling this - * function and to leave the `partials` argument blank. - */ - function render(template, view, partials) { - if (partials) { - for (var name in partials) { - compilePartial(name, partials[name]); - } - } - - return _renderer.render(template, view); - } - -})(Mustache); diff --git a/AndorsTrailEdit/inc/qunit.js b/AndorsTrailEdit/inc/qunit.js deleted file mode 100644 index 9c1c9af17..000000000 --- a/AndorsTrailEdit/inc/qunit.js +++ /dev/null @@ -1,1442 +0,0 @@ -/* - * QUnit - A JavaScript Unit Testing Framework - * - * http://docs.jquery.com/QUnit - * - * Copyright (c) 2011 John Resig, Jörn Zaefferer - * Dual licensed under the MIT (MIT-LICENSE.txt) - * or GPL (GPL-LICENSE.txt) licenses. - */ - -(function(window) { - -var defined = { - setTimeout: typeof window.setTimeout !== "undefined", - sessionStorage: (function() { - try { - return !!sessionStorage.getItem; - } catch(e){ - return false; - } - })() -}; - -var testId = 0; - -var Test = function(name, testName, expected, testEnvironmentArg, async, callback) { - this.name = name; - this.testName = testName; - this.expected = expected; - this.testEnvironmentArg = testEnvironmentArg; - this.async = async; - this.callback = callback; - this.assertions = []; -}; -Test.prototype = { - init: function() { - var tests = id("qunit-tests"); - if (tests) { - var b = document.createElement("strong"); - b.innerHTML = "Running " + this.name; - var li = document.createElement("li"); - li.appendChild( b ); - li.className = "running"; - li.id = this.id = "test-output" + testId++; - tests.appendChild( li ); - } - }, - setup: function() { - if (this.module != config.previousModule) { - if ( config.previousModule ) { - QUnit.moduleDone( { - name: config.previousModule, - failed: config.moduleStats.bad, - passed: config.moduleStats.all - config.moduleStats.bad, - total: config.moduleStats.all - } ); - } - config.previousModule = this.module; - config.moduleStats = { all: 0, bad: 0 }; - QUnit.moduleStart( { - name: this.module - } ); - } - - config.current = this; - this.testEnvironment = extend({ - setup: function() {}, - teardown: function() {} - }, this.moduleTestEnvironment); - if (this.testEnvironmentArg) { - extend(this.testEnvironment, this.testEnvironmentArg); - } - - QUnit.testStart( { - name: this.testName - } ); - - // allow utility functions to access the current test environment - // TODO why?? - QUnit.current_testEnvironment = this.testEnvironment; - - try { - if ( !config.pollution ) { - saveGlobal(); - } - - this.testEnvironment.setup.call(this.testEnvironment); - } catch(e) { - QUnit.ok( false, "Setup failed on " + this.testName + ": " + e.message ); - } - }, - run: function() { - if ( this.async ) { - QUnit.stop(); - } - - if ( config.notrycatch ) { - this.callback.call(this.testEnvironment); - return; - } - try { - this.callback.call(this.testEnvironment); - } catch(e) { - fail("Test " + this.testName + " died, exception and test follows", e, this.callback); - QUnit.ok( false, "Died on test #" + (this.assertions.length + 1) + ": " + e.message + " - " + QUnit.jsDump.parse(e) ); - // else next test will carry the responsibility - saveGlobal(); - - // Restart the tests if they're blocking - if ( config.blocking ) { - start(); - } - } - }, - teardown: function() { - try { - checkPollution(); - this.testEnvironment.teardown.call(this.testEnvironment); - } catch(e) { - QUnit.ok( false, "Teardown failed on " + this.testName + ": " + e.message ); - } - }, - finish: function() { - if ( this.expected && this.expected != this.assertions.length ) { - QUnit.ok( false, "Expected " + this.expected + " assertions, but " + this.assertions.length + " were run" ); - } - - var good = 0, bad = 0, - tests = id("qunit-tests"); - - config.stats.all += this.assertions.length; - config.moduleStats.all += this.assertions.length; - - if ( tests ) { - var ol = document.createElement("ol"); - - for ( var i = 0; i < this.assertions.length; i++ ) { - var assertion = this.assertions[i]; - - var li = document.createElement("li"); - li.className = assertion.result ? "pass" : "fail"; - li.innerHTML = assertion.message || (assertion.result ? "okay" : "failed"); - ol.appendChild( li ); - - if ( assertion.result ) { - good++; - } else { - bad++; - config.stats.bad++; - config.moduleStats.bad++; - } - } - - // store result when possible - if ( QUnit.config.reorder && defined.sessionStorage ) { - if (bad) { - sessionStorage.setItem("qunit-" + this.module + "-" + this.testName, bad) - } else { - sessionStorage.removeItem("qunit-" + this.testName); - } - } - - if (bad == 0) { - ol.style.display = "none"; - } - - var b = document.createElement("strong"); - b.innerHTML = this.name + " (" + bad + ", " + good + ", " + this.assertions.length + ")"; - - var a = document.createElement("a"); - a.innerHTML = "Rerun"; - a.href = QUnit.url({ filter: getText([b]).replace(/\([^)]+\)$/, "").replace(/(^\s*|\s*$)/g, "") }); - - addEvent(b, "click", function() { - var next = b.nextSibling.nextSibling, - display = next.style.display; - next.style.display = display === "none" ? "block" : "none"; - }); - - addEvent(b, "dblclick", function(e) { - var target = e && e.target ? e.target : window.event.srcElement; - if ( target.nodeName.toLowerCase() == "span" || target.nodeName.toLowerCase() == "b" ) { - target = target.parentNode; - } - if ( window.location && target.nodeName.toLowerCase() === "strong" ) { - window.location = QUnit.url({ filter: getText([target]).replace(/\([^)]+\)$/, "").replace(/(^\s*|\s*$)/g, "") }); - } - }); - - var li = id(this.id); - li.className = bad ? "fail" : "pass"; - li.removeChild( li.firstChild ); - li.appendChild( b ); - li.appendChild( a ); - li.appendChild( ol ); - - } else { - for ( var i = 0; i < this.assertions.length; i++ ) { - if ( !this.assertions[i].result ) { - bad++; - config.stats.bad++; - config.moduleStats.bad++; - } - } - } - - try { - QUnit.reset(); - } catch(e) { - fail("reset() failed, following Test " + this.testName + ", exception and reset fn follows", e, QUnit.reset); - } - - QUnit.testDone( { - name: this.testName, - failed: bad, - passed: this.assertions.length - bad, - total: this.assertions.length - } ); - }, - - queue: function() { - var test = this; - synchronize(function() { - test.init(); - }); - function run() { - // each of these can by async - synchronize(function() { - test.setup(); - }); - synchronize(function() { - test.run(); - }); - synchronize(function() { - test.teardown(); - }); - synchronize(function() { - test.finish(); - }); - } - // defer when previous test run passed, if storage is available - var bad = QUnit.config.reorder && defined.sessionStorage && +sessionStorage.getItem("qunit-" + this.module + "-" + this.testName); - if (bad) { - run(); - } else { - synchronize(run); - }; - } - -}; - -var QUnit = { - - // call on start of module test to prepend name to all tests - module: function(name, testEnvironment) { - config.currentModule = name; - config.currentModuleTestEnviroment = testEnvironment; - }, - - asyncTest: function(testName, expected, callback) { - if ( arguments.length === 2 ) { - callback = expected; - expected = 0; - } - - QUnit.test(testName, expected, callback, true); - }, - - test: function(testName, expected, callback, async) { - var name = '' + testName + '', testEnvironmentArg; - - if ( arguments.length === 2 ) { - callback = expected; - expected = null; - } - // is 2nd argument a testEnvironment? - if ( expected && typeof expected === 'object') { - testEnvironmentArg = expected; - expected = null; - } - - if ( config.currentModule ) { - name = '' + config.currentModule + ": " + name; - } - - if ( !validTest(config.currentModule + ": " + testName) ) { - return; - } - - var test = new Test(name, testName, expected, testEnvironmentArg, async, callback); - test.module = config.currentModule; - test.moduleTestEnvironment = config.currentModuleTestEnviroment; - test.queue(); - }, - - /** - * Specify the number of expected assertions to gurantee that failed test (no assertions are run at all) don't slip through. - */ - expect: function(asserts) { - config.current.expected = asserts; - }, - - /** - * Asserts true. - * @example ok( "asdfasdf".length > 5, "There must be at least 5 chars" ); - */ - ok: function(a, msg) { - a = !!a; - var details = { - result: a, - message: msg - }; - msg = escapeHtml(msg); - QUnit.log(details); - config.current.assertions.push({ - result: a, - message: msg - }); - }, - - /** - * Checks that the first two arguments are equal, with an optional message. - * Prints out both actual and expected values. - * - * Prefered to ok( actual == expected, message ) - * - * @example equal( format("Received {0} bytes.", 2), "Received 2 bytes." ); - * - * @param Object actual - * @param Object expected - * @param String message (optional) - */ - equal: function(actual, expected, message) { - QUnit.push(expected == actual, actual, expected, message); - }, - - notEqual: function(actual, expected, message) { - QUnit.push(expected != actual, actual, expected, message); - }, - - deepEqual: function(actual, expected, message) { - QUnit.push(QUnit.equiv(actual, expected), actual, expected, message); - }, - - notDeepEqual: function(actual, expected, message) { - QUnit.push(!QUnit.equiv(actual, expected), actual, expected, message); - }, - - strictEqual: function(actual, expected, message) { - QUnit.push(expected === actual, actual, expected, message); - }, - - notStrictEqual: function(actual, expected, message) { - QUnit.push(expected !== actual, actual, expected, message); - }, - - raises: function(block, expected, message) { - var actual, ok = false; - - if (typeof expected === 'string') { - message = expected; - expected = null; - } - - try { - block(); - } catch (e) { - actual = e; - } - - if (actual) { - // we don't want to validate thrown error - if (!expected) { - ok = true; - // expected is a regexp - } else if (QUnit.objectType(expected) === "regexp") { - ok = expected.test(actual); - // expected is a constructor - } else if (actual instanceof expected) { - ok = true; - // expected is a validation function which returns true is validation passed - } else if (expected.call({}, actual) === true) { - ok = true; - } - } - - QUnit.ok(ok, message); - }, - - start: function() { - config.semaphore--; - if (config.semaphore > 0) { - // don't start until equal number of stop-calls - return; - } - if (config.semaphore < 0) { - // ignore if start is called more often then stop - config.semaphore = 0; - } - // A slight delay, to avoid any current callbacks - if ( defined.setTimeout ) { - window.setTimeout(function() { - if ( config.timeout ) { - clearTimeout(config.timeout); - } - - config.blocking = false; - process(); - }, 13); - } else { - config.blocking = false; - process(); - } - }, - - stop: function(timeout) { - config.semaphore++; - config.blocking = true; - - if ( timeout && defined.setTimeout ) { - clearTimeout(config.timeout); - config.timeout = window.setTimeout(function() { - QUnit.ok( false, "Test timed out" ); - QUnit.start(); - }, timeout); - } - } -}; - -// Backwards compatibility, deprecated -QUnit.equals = QUnit.equal; -QUnit.same = QUnit.deepEqual; - -// Maintain internal state -var config = { - // The queue of tests to run - queue: [], - - // block until document ready - blocking: true, - - // by default, run previously failed tests first - // very useful in combination with "Hide passed tests" checked - reorder: true, - - noglobals: false, - notrycatch: false -}; - -// Load paramaters -(function() { - var location = window.location || { search: "", protocol: "file:" }, - params = location.search.slice( 1 ).split( "&" ), - length = params.length, - urlParams = {}, - current; - - if ( params[ 0 ] ) { - for ( var i = 0; i < length; i++ ) { - current = params[ i ].split( "=" ); - current[ 0 ] = decodeURIComponent( current[ 0 ] ); - // allow just a key to turn on a flag, e.g., test.html?noglobals - current[ 1 ] = current[ 1 ] ? decodeURIComponent( current[ 1 ] ) : true; - urlParams[ current[ 0 ] ] = current[ 1 ]; - if ( current[ 0 ] in config ) { - config[ current[ 0 ] ] = current[ 1 ]; - } - } - } - - QUnit.urlParams = urlParams; - config.filter = urlParams.filter; - - // Figure out if we're running the tests from a server or not - QUnit.isLocal = !!(location.protocol === 'file:'); -})(); - -// Expose the API as global variables, unless an 'exports' -// object exists, in that case we assume we're in CommonJS -if ( typeof exports === "undefined" || typeof require === "undefined" ) { - extend(window, QUnit); - window.QUnit = QUnit; -} else { - extend(exports, QUnit); - exports.QUnit = QUnit; -} - -// define these after exposing globals to keep them in these QUnit namespace only -extend(QUnit, { - config: config, - - // Initialize the configuration options - init: function() { - extend(config, { - stats: { all: 0, bad: 0 }, - moduleStats: { all: 0, bad: 0 }, - started: +new Date, - updateRate: 1000, - blocking: false, - autostart: true, - autorun: false, - filter: "", - queue: [], - semaphore: 0 - }); - - var tests = id( "qunit-tests" ), - banner = id( "qunit-banner" ), - result = id( "qunit-testresult" ); - - if ( tests ) { - tests.innerHTML = ""; - } - - if ( banner ) { - banner.className = ""; - } - - if ( result ) { - result.parentNode.removeChild( result ); - } - - if ( tests ) { - result = document.createElement( "p" ); - result.id = "qunit-testresult"; - result.className = "result"; - tests.parentNode.insertBefore( result, tests ); - result.innerHTML = 'Running...
     '; - } - }, - - /** - * Resets the test setup. Useful for tests that modify the DOM. - * - * If jQuery is available, uses jQuery's html(), otherwise just innerHTML. - */ - reset: function() { - if ( window.jQuery ) { - jQuery( "#main, #qunit-fixture" ).html( config.fixture ); - } else { - var main = id( 'main' ) || id( 'qunit-fixture' ); - if ( main ) { - main.innerHTML = config.fixture; - } - } - }, - - /** - * Trigger an event on an element. - * - * @example triggerEvent( document.body, "click" ); - * - * @param DOMElement elem - * @param String type - */ - triggerEvent: function( elem, type, event ) { - if ( document.createEvent ) { - event = document.createEvent("MouseEvents"); - event.initMouseEvent(type, true, true, elem.ownerDocument.defaultView, - 0, 0, 0, 0, 0, false, false, false, false, 0, null); - elem.dispatchEvent( event ); - - } else if ( elem.fireEvent ) { - elem.fireEvent("on"+type); - } - }, - - // Safe object type checking - is: function( type, obj ) { - return QUnit.objectType( obj ) == type; - }, - - objectType: function( obj ) { - if (typeof obj === "undefined") { - return "undefined"; - - // consider: typeof null === object - } - if (obj === null) { - return "null"; - } - - var type = Object.prototype.toString.call( obj ) - .match(/^\[object\s(.*)\]$/)[1] || ''; - - switch (type) { - case 'Number': - if (isNaN(obj)) { - return "nan"; - } else { - return "number"; - } - case 'String': - case 'Boolean': - case 'Array': - case 'Date': - case 'RegExp': - case 'Function': - return type.toLowerCase(); - } - if (typeof obj === "object") { - return "object"; - } - return undefined; - }, - - push: function(result, actual, expected, message) { - var details = { - result: result, - message: message, - actual: actual, - expected: expected - }; - - message = escapeHtml(message) || (result ? "okay" : "failed"); - message = '' + message + ""; - expected = escapeHtml(QUnit.jsDump.parse(expected)); - actual = escapeHtml(QUnit.jsDump.parse(actual)); - var output = message + ''; - if (actual != expected) { - output += ''; - output += ''; - } - if (!result) { - var source = sourceFromStacktrace(); - if (source) { - details.source = source; - output += ''; - } - } - output += "
    Expected:
    ' + expected + '
    Result:
    ' + actual + '
    Diff:
    ' + QUnit.diff(expected, actual) +'
    Source:
    ' + source +'
    "; - - QUnit.log(details); - - config.current.assertions.push({ - result: !!result, - message: output - }); - }, - - url: function( params ) { - params = extend( extend( {}, QUnit.urlParams ), params ); - var querystring = "?", - key; - for ( key in params ) { - querystring += encodeURIComponent( key ) + "=" + - encodeURIComponent( params[ key ] ) + "&"; - } - return window.location.pathname + querystring.slice( 0, -1 ); - }, - - // Logging callbacks; all receive a single argument with the listed properties - // run test/logs.html for any related changes - begin: function() {}, - // done: { failed, passed, total, runtime } - done: function() {}, - // log: { result, actual, expected, message } - log: function() {}, - // testStart: { name } - testStart: function() {}, - // testDone: { name, failed, passed, total } - testDone: function() {}, - // moduleStart: { name } - moduleStart: function() {}, - // moduleDone: { name, failed, passed, total } - moduleDone: function() {} -}); - -if ( typeof document === "undefined" || document.readyState === "complete" ) { - config.autorun = true; -} - -addEvent(window, "load", function() { - QUnit.begin({}); - - // Initialize the config, saving the execution queue - var oldconfig = extend({}, config); - QUnit.init(); - extend(config, oldconfig); - - config.blocking = false; - - var userAgent = id("qunit-userAgent"); - if ( userAgent ) { - userAgent.innerHTML = navigator.userAgent; - } - var banner = id("qunit-header"); - if ( banner ) { - banner.innerHTML = ' ' + banner.innerHTML + ' ' + - '' + - ''; - addEvent( banner, "change", function( event ) { - var params = {}; - params[ event.target.name ] = event.target.checked ? true : undefined; - window.location = QUnit.url( params ); - }); - } - - var toolbar = id("qunit-testrunner-toolbar"); - if ( toolbar ) { - var filter = document.createElement("input"); - filter.type = "checkbox"; - filter.id = "qunit-filter-pass"; - addEvent( filter, "click", function() { - var ol = document.getElementById("qunit-tests"); - if ( filter.checked ) { - ol.className = ol.className + " hidepass"; - } else { - var tmp = " " + ol.className.replace( /[\n\t\r]/g, " " ) + " "; - ol.className = tmp.replace(/ hidepass /, " "); - } - if ( defined.sessionStorage ) { - if (filter.checked) { - sessionStorage.setItem("qunit-filter-passed-tests", "true"); - } else { - sessionStorage.removeItem("qunit-filter-passed-tests"); - } - } - }); - if ( defined.sessionStorage && sessionStorage.getItem("qunit-filter-passed-tests") ) { - filter.checked = true; - var ol = document.getElementById("qunit-tests"); - ol.className = ol.className + " hidepass"; - } - toolbar.appendChild( filter ); - - var label = document.createElement("label"); - label.setAttribute("for", "qunit-filter-pass"); - label.innerHTML = "Hide passed tests"; - toolbar.appendChild( label ); - } - - var main = id('main') || id('qunit-fixture'); - if ( main ) { - config.fixture = main.innerHTML; - } - - if (config.autostart) { - QUnit.start(); - } -}); - -function done() { - config.autorun = true; - - // Log the last module results - if ( config.currentModule ) { - QUnit.moduleDone( { - name: config.currentModule, - failed: config.moduleStats.bad, - passed: config.moduleStats.all - config.moduleStats.bad, - total: config.moduleStats.all - } ); - } - - var banner = id("qunit-banner"), - tests = id("qunit-tests"), - runtime = +new Date - config.started, - passed = config.stats.all - config.stats.bad, - html = [ - 'Tests completed in ', - runtime, - ' milliseconds.
    ', - '', - passed, - ' tests of ', - config.stats.all, - ' passed, ', - config.stats.bad, - ' failed.' - ].join(''); - - if ( banner ) { - banner.className = (config.stats.bad ? "qunit-fail" : "qunit-pass"); - } - - if ( tests ) { - id( "qunit-testresult" ).innerHTML = html; - } - - QUnit.done( { - failed: config.stats.bad, - passed: passed, - total: config.stats.all, - runtime: runtime - } ); -} - -function validTest( name ) { - var filter = config.filter, - run = false; - - if ( !filter ) { - return true; - } - - not = filter.charAt( 0 ) === "!"; - if ( not ) { - filter = filter.slice( 1 ); - } - - if ( name.indexOf( filter ) !== -1 ) { - return !not; - } - - if ( not ) { - run = true; - } - - return run; -} - -// so far supports only Firefox, Chrome and Opera (buggy) -// could be extended in the future to use something like https://github.com/csnover/TraceKit -function sourceFromStacktrace() { - try { - throw new Error(); - } catch ( e ) { - if (e.stacktrace) { - // Opera - return e.stacktrace.split("\n")[6]; - } else if (e.stack) { - // Firefox, Chrome - return e.stack.split("\n")[4]; - } - } -} - -function escapeHtml(s) { - if (!s) { - return ""; - } - s = s + ""; - return s.replace(/[\&"<>\\]/g, function(s) { - switch(s) { - case "&": return "&"; - case "\\": return "\\\\"; - case '"': return '\"'; - case "<": return "<"; - case ">": return ">"; - default: return s; - } - }); -} - -function synchronize( callback ) { - config.queue.push( callback ); - - if ( config.autorun && !config.blocking ) { - process(); - } -} - -function process() { - var start = (new Date()).getTime(); - - while ( config.queue.length && !config.blocking ) { - if ( config.updateRate <= 0 || (((new Date()).getTime() - start) < config.updateRate) ) { - config.queue.shift()(); - } else { - window.setTimeout( process, 13 ); - break; - } - } - if (!config.blocking && !config.queue.length) { - done(); - } -} - -function saveGlobal() { - config.pollution = []; - - if ( config.noglobals ) { - for ( var key in window ) { - config.pollution.push( key ); - } - } -} - -function checkPollution( name ) { - var old = config.pollution; - saveGlobal(); - - var newGlobals = diff( config.pollution, old ); - if ( newGlobals.length > 0 ) { - ok( false, "Introduced global variable(s): " + newGlobals.join(", ") ); - } - - var deletedGlobals = diff( old, config.pollution ); - if ( deletedGlobals.length > 0 ) { - ok( false, "Deleted global variable(s): " + deletedGlobals.join(", ") ); - } -} - -// returns a new Array with the elements that are in a but not in b -function diff( a, b ) { - var result = a.slice(); - for ( var i = 0; i < result.length; i++ ) { - for ( var j = 0; j < b.length; j++ ) { - if ( result[i] === b[j] ) { - result.splice(i, 1); - i--; - break; - } - } - } - return result; -} - -function fail(message, exception, callback) { - if ( typeof console !== "undefined" && console.error && console.warn ) { - console.error(message); - console.error(exception); - console.warn(callback.toString()); - - } else if ( window.opera && opera.postError ) { - opera.postError(message, exception, callback.toString); - } -} - -function extend(a, b) { - for ( var prop in b ) { - if ( b[prop] === undefined ) { - delete a[prop]; - } else { - a[prop] = b[prop]; - } - } - - return a; -} - -function addEvent(elem, type, fn) { - if ( elem.addEventListener ) { - elem.addEventListener( type, fn, false ); - } else if ( elem.attachEvent ) { - elem.attachEvent( "on" + type, fn ); - } else { - fn(); - } -} - -function id(name) { - return !!(typeof document !== "undefined" && document && document.getElementById) && - document.getElementById( name ); -} - -// Test for equality any JavaScript type. -// Discussions and reference: http://philrathe.com/articles/equiv -// Test suites: http://philrathe.com/tests/equiv -// Author: Philippe Rathé -QUnit.equiv = function () { - - var innerEquiv; // the real equiv function - var callers = []; // stack to decide between skip/abort functions - var parents = []; // stack to avoiding loops from circular referencing - - // Call the o related callback with the given arguments. - function bindCallbacks(o, callbacks, args) { - var prop = QUnit.objectType(o); - if (prop) { - if (QUnit.objectType(callbacks[prop]) === "function") { - return callbacks[prop].apply(callbacks, args); - } else { - return callbacks[prop]; // or undefined - } - } - } - - var callbacks = function () { - - // for string, boolean, number and null - function useStrictEquality(b, a) { - if (b instanceof a.constructor || a instanceof b.constructor) { - // to catch short annotaion VS 'new' annotation of a declaration - // e.g. var i = 1; - // var j = new Number(1); - return a == b; - } else { - return a === b; - } - } - - return { - "string": useStrictEquality, - "boolean": useStrictEquality, - "number": useStrictEquality, - "null": useStrictEquality, - "undefined": useStrictEquality, - - "nan": function (b) { - return isNaN(b); - }, - - "date": function (b, a) { - return QUnit.objectType(b) === "date" && a.valueOf() === b.valueOf(); - }, - - "regexp": function (b, a) { - return QUnit.objectType(b) === "regexp" && - a.source === b.source && // the regex itself - a.global === b.global && // and its modifers (gmi) ... - a.ignoreCase === b.ignoreCase && - a.multiline === b.multiline; - }, - - // - skip when the property is a method of an instance (OOP) - // - abort otherwise, - // initial === would have catch identical references anyway - "function": function () { - var caller = callers[callers.length - 1]; - return caller !== Object && - typeof caller !== "undefined"; - }, - - "array": function (b, a) { - var i, j, loop; - var len; - - // b could be an object literal here - if ( ! (QUnit.objectType(b) === "array")) { - return false; - } - - len = a.length; - if (len !== b.length) { // safe and faster - return false; - } - - //track reference to avoid circular references - parents.push(a); - for (i = 0; i < len; i++) { - loop = false; - for(j=0;j= 0) { - type = "array"; - } else { - type = typeof obj; - } - return type; - }, - separator:function() { - return this.multiline ? this.HTML ? '
    ' : '\n' : this.HTML ? ' ' : ' '; - }, - indent:function( extra ) {// extra can be a number, shortcut for increasing-calling-decreasing - if ( !this.multiline ) - return ''; - var chr = this.indentChar; - if ( this.HTML ) - chr = chr.replace(/\t/g,' ').replace(/ /g,' '); - return Array( this._depth_ + (extra||0) ).join(chr); - }, - up:function( a ) { - this._depth_ += a || 1; - }, - down:function( a ) { - this._depth_ -= a || 1; - }, - setParser:function( name, parser ) { - this.parsers[name] = parser; - }, - // The next 3 are exposed so you can use them - quote:quote, - literal:literal, - join:join, - // - _depth_: 1, - // This is the list of parsers, to modify them, use jsDump.setParser - parsers:{ - window: '[Window]', - document: '[Document]', - error:'[ERROR]', //when no parser is found, shouldn't happen - unknown: '[Unknown]', - 'null':'null', - 'undefined':'undefined', - 'function':function( fn ) { - var ret = 'function', - name = 'name' in fn ? fn.name : (reName.exec(fn)||[])[1];//functions never have name in IE - if ( name ) - ret += ' ' + name; - ret += '('; - - ret = [ ret, QUnit.jsDump.parse( fn, 'functionArgs' ), '){'].join(''); - return join( ret, QUnit.jsDump.parse(fn,'functionCode'), '}' ); - }, - array: array, - nodelist: array, - arguments: array, - object:function( map ) { - var ret = [ ]; - QUnit.jsDump.up(); - for ( var key in map ) - ret.push( QUnit.jsDump.parse(key,'key') + ': ' + QUnit.jsDump.parse(map[key]) ); - QUnit.jsDump.down(); - return join( '{', ret, '}' ); - }, - node:function( node ) { - var open = QUnit.jsDump.HTML ? '<' : '<', - close = QUnit.jsDump.HTML ? '>' : '>'; - - var tag = node.nodeName.toLowerCase(), - ret = open + tag; - - for ( var a in QUnit.jsDump.DOMAttrs ) { - var val = node[QUnit.jsDump.DOMAttrs[a]]; - if ( val ) - ret += ' ' + a + '=' + QUnit.jsDump.parse( val, 'attribute' ); - } - return ret + close + open + '/' + tag + close; - }, - functionArgs:function( fn ) {//function calls it internally, it's the arguments part of the function - var l = fn.length; - if ( !l ) return ''; - - var args = Array(l); - while ( l-- ) - args[l] = String.fromCharCode(97+l);//97 is 'a' - return ' ' + args.join(', ') + ' '; - }, - key:quote, //object calls it internally, the key part of an item in a map - functionCode:'[code]', //function calls it internally, it's the content of the function - attribute:quote, //node calls it internally, it's an html attribute value - string:quote, - date:quote, - regexp:literal, //regex - number:literal, - 'boolean':literal - }, - DOMAttrs:{//attributes to dump from nodes, name=>realName - id:'id', - name:'name', - 'class':'className' - }, - HTML:false,//if true, entities are escaped ( <, >, \t, space and \n ) - indentChar:' ',//indentation unit - multiline:true //if true, items in a collection, are separated by a \n, else just a space. - }; - - return jsDump; -})(); - -// from Sizzle.js -function getText( elems ) { - var ret = "", elem; - - for ( var i = 0; elems[i]; i++ ) { - elem = elems[i]; - - // Get the text from text nodes and CDATA nodes - if ( elem.nodeType === 3 || elem.nodeType === 4 ) { - ret += elem.nodeValue; - - // Traverse everything else, except comment nodes - } else if ( elem.nodeType !== 8 ) { - ret += getText( elem.childNodes ); - } - } - - return ret; -}; - -/* - * Javascript Diff Algorithm - * By John Resig (http://ejohn.org/) - * Modified by Chu Alan "sprite" - * - * Released under the MIT license. - * - * More Info: - * http://ejohn.org/projects/javascript-diff-algorithm/ - * - * Usage: QUnit.diff(expected, actual) - * - * QUnit.diff("the quick brown fox jumped over", "the quick fox jumps over") == "the quick brown fox jumped jumps over" - */ -QUnit.diff = (function() { - function diff(o, n){ - var ns = new Object(); - var os = new Object(); - - for (var i = 0; i < n.length; i++) { - if (ns[n[i]] == null) - ns[n[i]] = { - rows: new Array(), - o: null - }; - ns[n[i]].rows.push(i); - } - - for (var i = 0; i < o.length; i++) { - if (os[o[i]] == null) - os[o[i]] = { - rows: new Array(), - n: null - }; - os[o[i]].rows.push(i); - } - - for (var i in ns) { - if (ns[i].rows.length == 1 && typeof(os[i]) != "undefined" && os[i].rows.length == 1) { - n[ns[i].rows[0]] = { - text: n[ns[i].rows[0]], - row: os[i].rows[0] - }; - o[os[i].rows[0]] = { - text: o[os[i].rows[0]], - row: ns[i].rows[0] - }; - } - } - - for (var i = 0; i < n.length - 1; i++) { - if (n[i].text != null && n[i + 1].text == null && n[i].row + 1 < o.length && o[n[i].row + 1].text == null && - n[i + 1] == o[n[i].row + 1]) { - n[i + 1] = { - text: n[i + 1], - row: n[i].row + 1 - }; - o[n[i].row + 1] = { - text: o[n[i].row + 1], - row: i + 1 - }; - } - } - - for (var i = n.length - 1; i > 0; i--) { - if (n[i].text != null && n[i - 1].text == null && n[i].row > 0 && o[n[i].row - 1].text == null && - n[i - 1] == o[n[i].row - 1]) { - n[i - 1] = { - text: n[i - 1], - row: n[i].row - 1 - }; - o[n[i].row - 1] = { - text: o[n[i].row - 1], - row: i - 1 - }; - } - } - - return { - o: o, - n: n - }; - } - - return function(o, n){ - o = o.replace(/\s+$/, ''); - n = n.replace(/\s+$/, ''); - var out = diff(o == "" ? [] : o.split(/\s+/), n == "" ? [] : n.split(/\s+/)); - - var str = ""; - - var oSpace = o.match(/\s+/g); - if (oSpace == null) { - oSpace = [" "]; - } - else { - oSpace.push(" "); - } - var nSpace = n.match(/\s+/g); - if (nSpace == null) { - nSpace = [" "]; - } - else { - nSpace.push(" "); - } - - if (out.n.length == 0) { - for (var i = 0; i < out.o.length; i++) { - str += '' + out.o[i] + oSpace[i] + ""; - } - } - else { - if (out.n[0].text == null) { - for (n = 0; n < out.o.length && out.o[n].text == null; n++) { - str += '' + out.o[n] + oSpace[n] + ""; - } - } - - for (var i = 0; i < out.n.length; i++) { - if (out.n[i].text == null) { - str += '' + out.n[i] + nSpace[i] + ""; - } - else { - var pre = ""; - - for (n = out.n[i].row + 1; n < out.o.length && out.o[n].text == null; n++) { - pre += '' + out.o[n] + oSpace[n] + ""; - } - str += " " + out.n[i].text + nSpace[i] + pre; - } - } - } - - return str; - }; -})(); - -})(this); diff --git a/AndorsTrailEdit/inc/require.js b/AndorsTrailEdit/inc/require.js deleted file mode 100644 index 8de013dc9..000000000 --- a/AndorsTrailEdit/inc/require.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - RequireJS 2.1.2 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved. - Available via the MIT or new BSD license. - see: http://github.com/jrburke/requirejs for details -*/ -var requirejs,require,define; -(function(Y){function H(b){return"[object Function]"===L.call(b)}function I(b){return"[object Array]"===L.call(b)}function x(b,c){if(b){var d;for(d=0;dthis.depCount&&!this.defined){if(H(n)){if(this.events.error)try{e=j.execCb(c,n,b,e)}catch(d){a=d}else e=j.execCb(c,n,b,e);this.map.isDefine&&((b=this.module)&&void 0!==b.exports&&b.exports!==this.exports?e=b.exports:void 0===e&&this.usingExports&&(e=this.exports));if(a)return a.requireMap=this.map,a.requireModules=[this.map.id],a.requireType="define",C(this.error=a)}else e=n;this.exports=e;if(this.map.isDefine&& -!this.ignore&&(p[c]=e,l.onResourceLoad))l.onResourceLoad(j,this.map,this.depMaps);delete k[c];this.defined=!0}this.defining=!1;this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else this.fetch()}},callPlugin:function(){var a=this.map,b=a.id,d=h(a.prefix);this.depMaps.push(d);s(d,"defined",t(this,function(e){var n,d;d=this.map.name;var v=this.map.parentMap?this.map.parentMap.name:null,f=j.makeRequire(a.parentMap,{enableBuildCallback:!0, -skipMap:!0});if(this.map.unnormalized){if(e.normalize&&(d=e.normalize(d,function(a){return c(a,v,!0)})||""),e=h(a.prefix+"!"+d,this.map.parentMap),s(e,"defined",t(this,function(a){this.init([],function(){return a},null,{enabled:!0,ignore:!0})})),d=i(k,e.id)){this.depMaps.push(e);if(this.events.error)d.on("error",t(this,function(a){this.emit("error",a)}));d.enable()}}else n=t(this,function(a){this.init([],function(){return a},null,{enabled:!0})}),n.error=t(this,function(a){this.inited=!0;this.error= -a;a.requireModules=[b];E(k,function(a){0===a.map.id.indexOf(b+"_unnormalized")&&delete k[a.map.id]});C(a)}),n.fromText=t(this,function(e,c){var d=a.name,u=h(d),v=O;c&&(e=c);v&&(O=!1);q(u);r(m.config,b)&&(m.config[d]=m.config[b]);try{l.exec(e)}catch(k){throw Error("fromText eval for "+d+" failed: "+k);}v&&(O=!0);this.depMaps.push(u);j.completeLoad(d);f([d],n)}),e.load(a.name,f,n,m)}));j.enable(d,this);this.pluginMaps[d.id]=d},enable:function(){this.enabling=this.enabled=!0;x(this.depMaps,t(this,function(a, -b){var c,e;if("string"===typeof a){a=h(a,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap);this.depMaps[b]=a;if(c=i(N,a.id)){this.depExports[b]=c(this);return}this.depCount+=1;s(a,"defined",t(this,function(a){this.defineDep(b,a);this.check()}));this.errback&&s(a,"error",this.errback)}c=a.id;e=k[c];!r(N,c)&&(e&&!e.enabled)&&j.enable(a,this)}));E(this.pluginMaps,t(this,function(a){var b=i(k,a.id);b&&!b.enabled&&j.enable(a,this)}));this.enabling=!1;this.check()},on:function(a,b){var c= -this.events[a];c||(c=this.events[a]=[]);c.push(b)},emit:function(a,b){x(this.events[a],function(a){a(b)});"error"===a&&delete this.events[a]}};j={config:m,contextName:b,registry:k,defined:p,urlFetched:S,defQueue:F,Module:W,makeModuleMap:h,nextTick:l.nextTick,configure:function(a){a.baseUrl&&"/"!==a.baseUrl.charAt(a.baseUrl.length-1)&&(a.baseUrl+="/");var b=m.pkgs,c=m.shim,e={paths:!0,config:!0,map:!0};E(a,function(a,b){e[b]?"map"===b?Q(m[b],a,!0,!0):Q(m[b],a,!0):m[b]=a});a.shim&&(E(a.shim,function(a, -b){I(a)&&(a={deps:a});if((a.exports||a.init)&&!a.exportsFn)a.exportsFn=j.makeShimExports(a);c[b]=a}),m.shim=c);a.packages&&(x(a.packages,function(a){a="string"===typeof a?{name:a}:a;b[a.name]={name:a.name,location:a.location||a.name,main:(a.main||"main").replace(ga,"").replace(aa,"")}}),m.pkgs=b);E(k,function(a,b){!a.inited&&!a.map.unnormalized&&(a.map=h(b))});if(a.deps||a.callback)j.require(a.deps||[],a.callback)},makeShimExports:function(a){return function(){var b;a.init&&(b=a.init.apply(Y,arguments)); -return b||a.exports&&Z(a.exports)}},makeRequire:function(a,d){function f(e,c,u){var i,m;d.enableBuildCallback&&(c&&H(c))&&(c.__requireJsBuild=!0);if("string"===typeof e){if(H(c))return C(J("requireargs","Invalid require call"),u);if(a&&r(N,e))return N[e](k[a.id]);if(l.get)return l.get(j,e,a);i=h(e,a,!1,!0);i=i.id;return!r(p,i)?C(J("notloaded",'Module name "'+i+'" has not been loaded yet for context: '+b+(a?"":". Use require([])"))):p[i]}K();j.nextTick(function(){K();m=q(h(null,a));m.skipMap=d.skipMap; -m.init(e,c,u,{enabled:!0});B()});return f}d=d||{};Q(f,{isBrowser:z,toUrl:function(b){var d=b.lastIndexOf("."),g=null;-1!==d&&(g=b.substring(d,b.length),b=b.substring(0,d));return j.nameToUrl(c(b,a&&a.id,!0),g)},defined:function(b){return r(p,h(b,a,!1,!0).id)},specified:function(b){b=h(b,a,!1,!0).id;return r(p,b)||r(k,b)}});a||(f.undef=function(b){w();var c=h(b,a,!0),d=i(k,b);delete p[b];delete S[c.url];delete X[b];d&&(d.events.defined&&(X[b]=d.events),delete k[b])});return f},enable:function(a){i(k, -a.id)&&q(a).enable()},completeLoad:function(a){var b,c,d=i(m.shim,a)||{},h=d.exports;for(w();F.length;){c=F.shift();if(null===c[0]){c[0]=a;if(b)break;b=!0}else c[0]===a&&(b=!0);D(c)}c=i(k,a);if(!b&&!r(p,a)&&c&&!c.inited){if(m.enforceDefine&&(!h||!Z(h)))return y(a)?void 0:C(J("nodefine","No define call for "+a,null,[a]));D([a,d.deps||[],d.exportsFn])}B()},nameToUrl:function(a,b){var c,d,h,f,j,k;if(l.jsExtRegExp.test(a))f=a+(b||"");else{c=m.paths;d=m.pkgs;f=a.split("/");for(j=f.length;0f.attachEvent.toString().indexOf("[native code"))&&!V?(O=!0,f.attachEvent("onreadystatechange", -b.onScriptLoad)):(f.addEventListener("load",b.onScriptLoad,!1),f.addEventListener("error",b.onScriptError,!1)),f.src=d,K=f,D?A.insertBefore(f,D):A.appendChild(f),K=null,f;$&&(importScripts(d),b.completeLoad(c))};z&&M(document.getElementsByTagName("script"),function(b){A||(A=b.parentNode);if(s=b.getAttribute("data-main"))return q.baseUrl||(G=s.split("/"),ba=G.pop(),ca=G.length?G.join("/")+"/":"./",q.baseUrl=ca,s=ba),s=s.replace(aa,""),q.deps=q.deps?q.deps.concat(s):[s],!0});define=function(b,c,d){var i, -f;"string"!==typeof b&&(d=c,c=b,b=null);I(c)||(d=c,c=[]);!c.length&&H(d)&&d.length&&(d.toString().replace(ia,"").replace(ja,function(b,d){c.push(d)}),c=(1===d.length?["require"]:["require","exports","module"]).concat(c));if(O){if(!(i=K))P&&"interactive"===P.readyState||M(document.getElementsByTagName("script"),function(b){if("interactive"===b.readyState)return P=b}),i=P;i&&(b||(b=i.getAttribute("data-requiremodule")),f=B[i.getAttribute("data-requirecontext")])}(f?f.defQueue:R).push([b,c,d])};define.amd= -{jQuery:!0};l.exec=function(b){return eval(b)};l(q)}})(this); diff --git a/AndorsTrailEdit/inc/ui.dynatree.css b/AndorsTrailEdit/inc/ui.dynatree.css deleted file mode 100644 index d2c1fc53c..000000000 --- a/AndorsTrailEdit/inc/ui.dynatree.css +++ /dev/null @@ -1,441 +0,0 @@ -/******************************************************************************* - * Tree container - */ -ul.dynatree-container -{ - font-family: tahoma, arial, helvetica; - font-size: 10pt; /* font size should not be too big */ - white-space: nowrap; - padding: 3px; - - background-color: white; - border: 1px dotted gray; - - overflow: auto; -} - -ul.dynatree-container ul -{ - padding: 0 0 0 8px; - margin: 0; -} - -ul.dynatree-container li -{ - list-style-image: none; - list-style-position: outside; - list-style-type: none; - -moz-background-clip:border; - -moz-background-inline-policy: continuous; - -moz-background-origin: padding; - background-attachment: scroll; - background-color: transparent; - background-repeat: repeat-y; - background-image: url("vline.gif"); - background-position: 0 0; - /* - background-image: url("icons_96x256.gif"); - background-position: -80px -64px; - */ - margin: 0; - padding: 1px 0 0 0; -} -/* Suppress lines for last child node */ -ul.dynatree-container li.dynatree-lastsib -{ - background-image: none; -} -/* Suppress lines if level is fixed expanded (option minExpandLevel) */ -ul.dynatree-no-connector > li -{ - background-image: none; -} - -/* Style, when control is disabled */ -.ui-dynatree-disabled ul.dynatree-container -{ - opacity: 0.5; -/* filter: alpha(opacity=50); /* Yields a css warning */ - background-color: silver; -} - -/******************************************************************************* - * Common icon definitions - */ -span.dynatree-empty, -span.dynatree-vline, -span.dynatree-connector, -span.dynatree-expander, -span.dynatree-icon, -span.dynatree-checkbox, -span.dynatree-radio, -span.dynatree-drag-helper-img, -#dynatree-drop-marker -{ - width: 16px; - height: 16px; - display: -moz-inline-box; /* @ FF 1+2 */ - display: inline-block; /* Required to make a span sizeable */ - vertical-align: top; - background-repeat: no-repeat; - background-position: left; - background-image: url("icons.gif"); - background-position: 0 0; -} - -/** Used by 'icon' node option: */ -ul.dynatree-container img -{ - width: 16px; - height: 16px; - margin-left: 3px; - vertical-align: top; - border-style: none; -} - - -/******************************************************************************* - * Lines and connectors - */ - -span.dynatree-connector -{ - background-position: -16px -64px; -} - -/******************************************************************************* - * Expander icon - * Note: IE6 doesn't correctly evaluate multiples class names, - * so we create combined class names that can be used in the CSS. - * - * Prefix: dynatree-exp- - * 1st character: 'e': expanded, 'c': collapsed - * 2nd character (optional): 'd': lazy (Delayed) - * 3rd character (optional): 'l': Last sibling - */ - -span.dynatree-expander -{ - background-position: 0px -80px; - cursor: pointer; -} -.dynatree-exp-cl span.dynatree-expander /* Collapsed, not delayed, last sibling */ -{ - background-position: 0px -96px; -} -.dynatree-exp-cd span.dynatree-expander /* Collapsed, delayed, not last sibling */ -{ - background-position: -64px -80px; -} -.dynatree-exp-cdl span.dynatree-expander /* Collapsed, delayed, last sibling */ -{ - background-position: -64px -96px; -} -.dynatree-exp-e span.dynatree-expander, /* Expanded, not delayed, not last sibling */ -.dynatree-exp-ed span.dynatree-expander /* Expanded, delayed, not last sibling */ -{ - background-position: -32px -80px; -} -.dynatree-exp-el span.dynatree-expander, /* Expanded, not delayed, last sibling */ -.dynatree-exp-edl span.dynatree-expander /* Expanded, delayed, last sibling */ -{ - background-position: -32px -96px; -} -.dynatree-loading span.dynatree-expander /* 'Loading' status overrides all others */ -{ - background-position: 0 0; - background-image: url("loading.gif"); -} - - -/******************************************************************************* - * Checkbox icon - */ -span.dynatree-checkbox -{ - margin-left: 3px; - background-position: 0px -32px; -} -span.dynatree-checkbox:hover -{ - background-position: -16px -32px; -} - -.dynatree-partsel span.dynatree-checkbox -{ - background-position: -64px -32px; -} -.dynatree-partsel span.dynatree-checkbox:hover -{ - background-position: -80px -32px; -} - -.dynatree-selected span.dynatree-checkbox -{ - background-position: -32px -32px; -} -.dynatree-selected span.dynatree-checkbox:hover -{ - background-position: -48px -32px; -} - -/******************************************************************************* - * Radiobutton icon - * This is a customization, that may be activated by overriding the 'checkbox' - * class name as 'dynatree-radio' in the tree options. - */ -span.dynatree-radio -{ - margin-left: 3px; - background-position: 0px -48px; -} -span.dynatree-radio:hover -{ - background-position: -16px -48px; -} - -.dynatree-partsel span.dynatree-radio -{ - background-position: -64px -48px; -} -.dynatree-partsel span.dynatree-radio:hover -{ - background-position: -80px -48px; -} - -.dynatree-selected span.dynatree-radio -{ - background-position: -32px -48px; -} -.dynatree-selected span.dynatree-radio:hover -{ - background-position: -48px -48px; -} - -/******************************************************************************* - * Node type icon - * Note: IE6 doesn't correctly evaluate multiples class names, - * so we create combined class names that can be used in the CSS. - * - * Prefix: dynatree-ico- - * 1st character: 'e': expanded, 'c': collapsed - * 2nd character (optional): 'f': folder - */ - -span.dynatree-icon /* Default icon */ -{ - margin-left: 3px; - background-position: 0px 0px; -} - -.dynatree-ico-cf span.dynatree-icon /* Collapsed Folder */ -{ - background-position: 0px -16px; -} - -.dynatree-ico-ef span.dynatree-icon /* Expanded Folder */ -{ - background-position: -64px -16px; -} - -/* Status node icons */ - -.dynatree-statusnode-wait span.dynatree-icon -{ - background-image: url("loading.gif"); -} - -.dynatree-statusnode-error span.dynatree-icon -{ - background-position: 0px -112px; -/* background-image: url("ltError.gif");*/ -} - -/******************************************************************************* - * Node titles - */ - -/* @Chrome: otherwise hit area of node titles is broken (issue 133) - Removed again for issue 165; (133 couldn't be reproduced) */ -span.dynatree-node -{ -/* display: -moz-inline-box; /* @ FF 1+2 */ -/* display: inline-block; /* Required to make a span sizeable */ -} - - -/* Remove blue color and underline from title links */ -ul.dynatree-container a -/*, ul.dynatree-container a:visited*/ -{ - color: black; /* inherit doesn't work on IE */ - text-decoration: none; - vertical-align: top; - margin: 0px; - margin-left: 3px; -/* outline: 0; /* @ Firefox, prevent dotted border after click */ -} - -ul.dynatree-container a:hover -{ -/* text-decoration: underline; */ - background: #F2F7FD; /* light blue */ - border-color: #B8D6FB; /* darker light blue */ -} - -span.dynatree-node a -{ - display: inline-block; /* Better alignment, when title contains
    */ -/* vertical-align: top;*/ - padding-left: 3px; - padding-right: 3px; /* Otherwise italic font will be outside bounds */ - /* line-height: 16px; /* should be the same as img height, in case 16 px */ -} -span.dynatree-folder a -{ - font-weight: bold; -} - -ul.dynatree-container a:focus, -span.dynatree-focused a:link /* @IE */ -{ - background-color: #EFEBDE; /* gray */ -} - -span.dynatree-has-children a -{ -} - -span.dynatree-expanded a -{ -} - -span.dynatree-selected a -{ - color: green; - font-style: italic; -} - -span.dynatree-active a -{ - background-color: #3169C6 !important; - color: white !important; /* @ IE6 */ -} - -/******************************************************************************* - * Drag'n'drop support - */ - -/*** Helper object ************************************************************/ -div.dynatree-drag-helper -{ -} -div.dynatree-drag-helper a -{ - border: 1px solid gray; - background-color: white; - padding-left: 5px; - padding-right: 5px; - opacity: 0.8; -} -span.dynatree-drag-helper-img -{ - /* - position: relative; - left: -16px; - */ -} -div.dynatree-drag-helper /*.dynatree-drop-accept*/ -{ - -/* border-color: green; - background-color: red;*/ -} -div.dynatree-drop-accept span.dynatree-drag-helper-img -{ - background-position: -32px -112px; -} -div.dynatree-drag-helper.dynatree-drop-reject -{ - border-color: red; -} -div.dynatree-drop-reject span.dynatree-drag-helper-img -{ - background-position: -16px -112px; -} - -/*** Drop marker icon *********************************************************/ - -#dynatree-drop-marker -{ - width: 24px; - position: absolute; - background-position: 0 -128px; -} -#dynatree-drop-marker.dynatree-drop-after, -#dynatree-drop-marker.dynatree-drop-before -{ - width:64px; - background-position: 0 -144px; -} -#dynatree-drop-marker.dynatree-drop-copy -{ - background-position: -64px -128px; -} -#dynatree-drop-marker.dynatree-drop-move -{ - background-position: -64px -128px; -} - -/*** Source node while dragging ***********************************************/ - -span.dynatree-drag-source -{ - /* border: 1px dotted gray; */ - background-color: #e0e0e0; -} -span.dynatree-drag-source a -{ - color: gray; -} - -/*** Target node while dragging cursor is over it *****************************/ - -span.dynatree-drop-target -{ - /*border: 1px solid gray;*/ -} -span.dynatree-drop-target a -{ - /*background-repeat: no-repeat; - background-position: right; - background-image: url("drop_child.gif");*/ -} -span.dynatree-drop-target.dynatree-drop-accept a -{ - /*border: 1px solid green;*/ - background-color: #3169C6 !important; - color: white !important; /* @ IE6 */ - text-decoration: none; -} -span.dynatree-drop-target.dynatree-drop-reject -{ - /*border: 1px solid red;*/ -} -span.dynatree-drop-target.dynatree-drop-after a -{ - /*background-repeat: repeat-x; - background-position: bottom; - background-image: url("drop_append.gif");*/ -} - - -/******************************************************************************* - * Custom node classes (sample) - */ - -span.custom1 a -{ - background-color: maroon; - color: yellow; -} diff --git a/AndorsTrailEdit/inc/vline.gif b/AndorsTrailEdit/inc/vline.gif deleted file mode 100644 index 1b00ae50e0f1538d985811207b0af2a85d1d128b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 844 zcmZ?wbhEHb6krfw_|52S|G#wUQXn}BMnhnzhQRL+ z3l=PCXlVEkOy~a@{(~tX4P*g<;!hSv28MqOIzUNaju2pA;Lv3F%PCTkzu;gqhp>{) jiVX`7H}c4P#aL`ybg)BAJ?YGk0_Edva`s$291PX~%%k&-