rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 15
136k
|
---|---|---|
debugConsole.displayFPS = this.originalDisplayFPS;
|
this.performCleanUp = function () { debugConsole.shaderMode = this.originalShaderMode; debugConsole.displayFPS = this.originalDisplayFPS; debugConsole.debugFlags = this.originalDebugFlags; delete this.passID; delete this.maxPassID; delete this.nextTestIndex; delete this.originalShaderMode; delete this.originalDisplayFPS; delete this.originalDebugFlags; delete this.shipLaunchedFromStation; }
|
|
delete this.originalHUD;
|
this.performCleanUp = function () { debugConsole.shaderMode = this.originalShaderMode; debugConsole.displayFPS = this.originalDisplayFPS; debugConsole.debugFlags = this.originalDebugFlags; delete this.passID; delete this.maxPassID; delete this.nextTestIndex; delete this.originalShaderMode; delete this.originalDisplayFPS; delete this.originalDebugFlags; delete this.shipLaunchedFromStation; }
|
|
delete this.originalReducedDetailMode;
|
this.performCleanUp = function () { debugConsole.shaderMode = this.originalShaderMode; debugConsole.debugFlags = this.originalDebugFlags; player.ship.hud = this.originalHUD; delete this.passID; delete this.maxPassID; delete this.nextTestIndex; delete this.originalShaderMode; delete this.originalDisplayFPS; delete this.originalDebugFlags; delete this.shipWillLaunchFromStation; delete this.originalHUD; }
|
|
delete this.maxPassID;
|
this.performCleanUp = function () { debugConsole.shaderMode = this.originalShaderMode; debugConsole.displayFPS = this.originalDisplayFPS; debugConsole.debugFlags = this.originalDebugFlags; delete this.passID; delete this.nextTestIndex; delete this.originalShaderMode; delete this.originalDisplayFPS; delete this.originalDebugFlags; delete this.shipLaunchedFromStation; }
|
|
delete this.originalDebugFlags;
|
this.performCleanUp = function () { debugConsole.shaderMode = this.originalShaderMode; debugConsole.displayFPS = this.originalDisplayFPS; delete this.passID; delete this.nextTestIndex; delete this.originalShaderMode; delete this.originalDisplayFPS; delete this.shipLaunchedFromStation; }
|
|
drawBar(points[i], points[i + 1], points[i + 2], barLeft, barRight, offset, fillStyleCallback, axisx, axisy, ctx, series.bars.horizontal);
|
drawBar(points[i], points[i + 1], points[i + 2], barLeft, barRight, offset, fillStyleCallback, axisx, axisy, ctx, series.bars.horizontal, series.bars.lineWidth);
|
function plotBars(datapoints, barLeft, barRight, offset, fillStyleCallback, axisx, axisy) { var points = datapoints.points, ps = datapoints.pointsize; for (var i = 0; i < points.length; i += ps) { if (points[i] == null) continue; drawBar(points[i], points[i + 1], points[i + 2], barLeft, barRight, offset, fillStyleCallback, axisx, axisy, ctx, series.bars.horizontal); } }
|
nodeTitleChanged: function PM_nodeTitleChanged(aPlacesNode, aNewTitle) {
|
function PM_nodeTitleChanged(aPlacesNode, aNewTitle) {
|
nodeTitleChanged: function PM_nodeTitleChanged(aPlacesNode, aNewTitle) { let elt = aPlacesNode._DOMElement; if (!elt) throw "aPlacesNode must have _DOMElement set"; // There's no UI representation for the root node, thus there's // nothing to be done when the title changes. if (elt == this._rootElt) return; elt.label = aNewTitle || PlacesUIUtils.getBestTitle(aPlacesNode); },
|
elt.label = aNewTitle || PlacesUIUtils.getBestTitle(aPlacesNode);
|
if (elt.localName == "menupopup") elt = elt.parentNode; if (!aNewTitle && elt.localName != "toolbarbutton") { elt.label = PlacesUIUtils.getBestTitle(aPlacesNode); } else { elt.label = aNewTitle; }
|
nodeTitleChanged: function PM_nodeTitleChanged(aPlacesNode, aNewTitle) { let elt = aPlacesNode._DOMElement; if (!elt) throw "aPlacesNode must have _DOMElement set"; // There's no UI representation for the root node, thus there's // nothing to be done when the title changes. if (elt == this._rootElt) return; elt.label = aNewTitle || PlacesUIUtils.getBestTitle(aPlacesNode); },
|
}
|
},
|
pop: function () { return this.scope.shift(); }
|
"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,k,l,q,p){h=g[1].replace(/\\/g,"");if(!p&&m.attrMap[h])g[1]=m.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,k,l,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=o(g[3],null,null,h);else{g=o.filter(g[3],h,k,true^q);k||l.push.apply(l,g);return false}else if(m.match.POS.test(g[0])||m.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true); return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,k){return!!o(k[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===
|
g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},
|
"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,k,l,q,p){h=g[1].replace(/\\/g,"");if(!p&&m.attrMap[h])g[1]=m.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,k,l,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=o(g[3],null,null,h);else{g=o.filter(g[3],h,k,true^q);k||l.push.apply(l,g);return false}else if(m.match.POS.test(g[0])||m.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,k){return!!o(k[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===
|
(function(c){c.ui=c.ui||{};var m=/left|center|right/,n=/top|center|bottom/,p=c.fn.position,q=c.fn.offset;c.fn.position=function(a){if(!a||!a.of)return p.apply(this,arguments);a=c.extend({},a);var b=c(a.of),d=(a.collision||"flip").split(" "),e=a.offset?a.offset.split(" "):[0,0],g,h,i;if(a.of.nodeType===9){g=b.width();h=b.height();i={top:0,left:0}}else if(a.of.scrollTo&&a.of.document){g=b.width();h=b.height();i={top:b.scrollTop(),left:b.scrollLeft()}}else if(a.of.preventDefault){a.at="left top";g=h= 0;i={top:a.of.pageY,left:a.of.pageX}}else{g=b.outerWidth();h=b.outerHeight();i=b.offset()}c.each(["my","at"],function(){var f=(a[this]||"").split(" ");if(f.length===1)f=m.test(f[0])?f.concat(["center"]):n.test(f[0])?["center"].concat(f):["center","center"];f[0]=m.test(f[0])?f[0]:"center";f[1]=n.test(f[1])?f[1]:"center";a[this]=f});if(d.length===1)d[1]=d[0];e[0]=parseInt(e[0],10)||0;if(e.length===1)e[1]=e[0];e[1]=parseInt(e[1],10)||0;if(a.at[0]==="right")i.left+=g;else if(a.at[0]==="center")i.left+= g/2;if(a.at[1]==="bottom")i.top+=h;else if(a.at[1]==="center")i.top+=h/2;i.left+=e[0];i.top+=e[1];return this.each(function(){var f=c(this),k=f.outerWidth(),l=f.outerHeight(),j=c.extend({},i);if(a.my[0]==="right")j.left-=k;else if(a.my[0]==="center")j.left-=k/2;if(a.my[1]==="bottom")j.top-=l;else if(a.my[1]==="center")j.top-=l/2;j.left=parseInt(j.left);j.top=parseInt(j.top);c.each(["left","top"],function(o,r){c.ui.position[d[o]]&&c.ui.position[d[o]][r](j,{targetWidth:g,targetHeight:h,elemWidth:k, elemHeight:l,offset:e,my:a.my,at:a.at})});c.fn.bgiframe&&f.bgiframe();f.offset(c.extend(j,{using:a.using}))})};c.ui.position={fit:{left:function(a,b){var d=c(window);b=a.left+b.elemWidth-d.width()-d.scrollLeft();a.left=b>0?a.left-b:Math.max(0,a.left)},top:function(a,b){var d=c(window);b=a.top+b.elemHeight-d.height()-d.scrollTop();a.top=b>0?a.top-b:Math.max(0,a.top)}},flip:{left:function(a,b){if(b.at[0]!=="center"){var d=c(window);d=a.left+b.elemWidth-d.width()-d.scrollLeft();var e=b.my[0]==="left"?
|
(function(c){c.ui=c.ui||{};var n=/left|center|right/,o=/top|center|bottom/,t=c.fn.position,u=c.fn.offset;c.fn.position=function(b){if(!b||!b.of)return t.apply(this,arguments);b=c.extend({},b);var a=c(b.of),d=a[0],g=(b.collision||"flip").split(" "),e=b.offset?b.offset.split(" "):[0,0],h,k,j;if(d.nodeType===9){h=a.width();k=a.height();j={top:0,left:0}}else if(d.setTimeout){h=a.width();k=a.height();j={top:a.scrollTop(),left:a.scrollLeft()}}else if(d.preventDefault){b.at="left top";h=k=0;j={top:b.of.pageY, left:b.of.pageX}}else{h=a.outerWidth();k=a.outerHeight();j=a.offset()}c.each(["my","at"],function(){var f=(b[this]||"").split(" ");if(f.length===1)f=n.test(f[0])?f.concat(["center"]):o.test(f[0])?["center"].concat(f):["center","center"];f[0]=n.test(f[0])?f[0]:"center";f[1]=o.test(f[1])?f[1]:"center";b[this]=f});if(g.length===1)g[1]=g[0];e[0]=parseInt(e[0],10)||0;if(e.length===1)e[1]=e[0];e[1]=parseInt(e[1],10)||0;if(b.at[0]==="right")j.left+=h;else if(b.at[0]==="center")j.left+=h/2;if(b.at[1]==="bottom")j.top+= k;else if(b.at[1]==="center")j.top+=k/2;j.left+=e[0];j.top+=e[1];return this.each(function(){var f=c(this),l=f.outerWidth(),m=f.outerHeight(),p=parseInt(c.curCSS(this,"marginLeft",true))||0,q=parseInt(c.curCSS(this,"marginTop",true))||0,v=l+p+parseInt(c.curCSS(this,"marginRight",true))||0,w=m+q+parseInt(c.curCSS(this,"marginBottom",true))||0,i=c.extend({},j),r;if(b.my[0]==="right")i.left-=l;else if(b.my[0]==="center")i.left-=l/2;if(b.my[1]==="bottom")i.top-=m;else if(b.my[1]==="center")i.top-=m/2; i.left=parseInt(i.left);i.top=parseInt(i.top);r={left:i.left-p,top:i.top-q};c.each(["left","top"],function(s,x){c.ui.position[g[s]]&&c.ui.position[g[s]][x](i,{targetWidth:h,targetHeight:k,elemWidth:l,elemHeight:m,collisionPosition:r,collisionWidth:v,collisionHeight:w,offset:e,my:b.my,at:b.at})});c.fn.bgiframe&&f.bgiframe();f.offset(c.extend(i,{using:b.using}))})};c.ui.position={fit:{left:function(b,a){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();b.left=d>0?
|
(function(c){c.ui=c.ui||{};var m=/left|center|right/,n=/top|center|bottom/,p=c.fn.position,q=c.fn.offset;c.fn.position=function(a){if(!a||!a.of)return p.apply(this,arguments);a=c.extend({},a);var b=c(a.of),d=(a.collision||"flip").split(" "),e=a.offset?a.offset.split(" "):[0,0],g,h,i;if(a.of.nodeType===9){g=b.width();h=b.height();i={top:0,left:0}}else if(a.of.scrollTo&&a.of.document){g=b.width();h=b.height();i={top:b.scrollTop(),left:b.scrollLeft()}}else if(a.of.preventDefault){a.at="left top";g=h=0;i={top:a.of.pageY,left:a.of.pageX}}else{g=b.outerWidth();h=b.outerHeight();i=b.offset()}c.each(["my","at"],function(){var f=(a[this]||"").split(" ");if(f.length===1)f=m.test(f[0])?f.concat(["center"]):n.test(f[0])?["center"].concat(f):["center","center"];f[0]=m.test(f[0])?f[0]:"center";f[1]=n.test(f[1])?f[1]:"center";a[this]=f});if(d.length===1)d[1]=d[0];e[0]=parseInt(e[0],10)||0;if(e.length===1)e[1]=e[0];e[1]=parseInt(e[1],10)||0;if(a.at[0]==="right")i.left+=g;else if(a.at[0]==="center")i.left+=g/2;if(a.at[1]==="bottom")i.top+=h;else if(a.at[1]==="center")i.top+=h/2;i.left+=e[0];i.top+=e[1];return this.each(function(){var f=c(this),k=f.outerWidth(),l=f.outerHeight(),j=c.extend({},i);if(a.my[0]==="right")j.left-=k;else if(a.my[0]==="center")j.left-=k/2;if(a.my[1]==="bottom")j.top-=l;else if(a.my[1]==="center")j.top-=l/2;j.left=parseInt(j.left);j.top=parseInt(j.top);c.each(["left","top"],function(o,r){c.ui.position[d[o]]&&c.ui.position[d[o]][r](j,{targetWidth:g,targetHeight:h,elemWidth:k,elemHeight:l,offset:e,my:a.my,at:a.at})});c.fn.bgiframe&&f.bgiframe();f.offset(c.extend(j,{using:a.using}))})};c.ui.position={fit:{left:function(a,b){var d=c(window);b=a.left+b.elemWidth-d.width()-d.scrollLeft();a.left=b>0?a.left-b:Math.max(0,a.left)},top:function(a,b){var d=c(window);b=a.top+b.elemHeight-d.height()-d.scrollTop();a.top=b>0?a.top-b:Math.max(0,a.top)}},flip:{left:function(a,b){if(b.at[0]!=="center"){var d=c(window);d=a.left+b.elemWidth-d.width()-d.scrollLeft();var e=b.my[0]==="left"?
|
d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top- f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset":
|
e):f.css(e)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),e=Ia.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.css(a,"marginTop"))||0;d.left-=parseFloat(c.css(a,"marginLeft"))||0;e.top+=parseFloat(c.css(b[0],"borderTopWidth"))||0;e.left+=parseFloat(c.css(b[0],"borderLeftWidth"))||0;return{top:d.top-e.top,left:d.left-e.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||t.body;a&&!Ia.test(a.nodeName)&&
|
d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset":
|
d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?
|
c.makeArray(a),e=c.merge(this.get(),d);return this.pushStack(!d[0]||!d[0].parentNode||d[0].parentNode.nodeType===11||!e[0]||!e[0].parentNode||e[0].parentNode.nodeType===11?e:c.unique(e))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a, 2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,
|
d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?
|
a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y,
|
c.now();this[c.expando]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=ca;var a=this.originalEvent;if(a)if(a.preventDefault)a.preventDefault();else a.returnValue=false},stopPropagation:function(){this.isPropagationStopped=ca;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=ca;this.stopPropagation()},isDefaultPrevented:U,isPropagationStopped:U,isImmediatePropagationStopped:U};
|
a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y,
|
this.element.children(b))},nextPage:function(a){if(this.hasScroll())if(!this.active||this.last())this.activate(a,this.element.children(":first"));else{var b=this.active.offset().top,c=this.element.height(),d=this.element.children("li").filter(function(){var f=e(this).offset().top-b-c+e(this).height();return f<10&&f>-10});d.length||(d=this.element.children(":last"));this.activate(a,d)}else this.activate(a,this.element.children(!this.active||this.last()?":first":":last"))},previousPage:function(a){if(this.hasScroll())if(!this.active|| this.first())this.activate(a,this.element.children(":last"));else{var b=this.active.offset().top,c=this.element.height();result=this.element.children("li").filter(function(){var d=e(this).offset().top-b+c-e(this).height();return d<10&&d>-10});result.length||(result=this.element.children(":first"));this.activate(a,result)}else this.activate(a,this.element.children(!this.active||this.first()?":last":":first"))},hasScroll:function(){return this.element.height()<this.element.attr("scrollHeight")},select:function(a){this._trigger("selected",
|
c)}else this.activate(a,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))},previousPage:function(a){if(this.hasScroll())if(!this.active||this.first())this.activate(a,this.element.children(".ui-menu-item:last"));else{var b=this.active.offset().top,f=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var c=e(this).offset().top-b+f-e(this).height();return c<10&&c>-10});result.length||(result=this.element.children(".ui-menu-item:first")); this.activate(a,result)}else this.activate(a,this.element.children(".ui-menu-item").filter(!this.active||this.first()?":last":":first"))},hasScroll:function(){return this.element.height()<this.element.attr("scrollHeight")},select:function(a){this._trigger("selected",a,{item:this.active})}})})(jQuery);
|
this.element.children(b))},nextPage:function(a){if(this.hasScroll())if(!this.active||this.last())this.activate(a,this.element.children(":first"));else{var b=this.active.offset().top,c=this.element.height(),d=this.element.children("li").filter(function(){var f=e(this).offset().top-b-c+e(this).height();return f<10&&f>-10});d.length||(d=this.element.children(":last"));this.activate(a,d)}else this.activate(a,this.element.children(!this.active||this.last()?":first":":last"))},previousPage:function(a){if(this.hasScroll())if(!this.active||this.first())this.activate(a,this.element.children(":last"));else{var b=this.active.offset().top,c=this.element.height();result=this.element.children("li").filter(function(){var d=e(this).offset().top-b+c-e(this).height();return d<10&&d>-10});result.length||(result=this.element.children(":first"));this.activate(a,result)}else this.activate(a,this.element.children(!this.active||this.first()?":last":":first"))},hasScroll:function(){return this.element.height()<this.element.attr("scrollHeight")},select:function(a){this._trigger("selected",
|
printAttr: function(attr) {
|
printAttr: function(attr, first) {
|
printAttr: function(attr) { this.writer.write({ prefix: this.prefCache.getPref("attribute.listSeparator"), value: attr.nodeName, join: this.prefCache.getPref("attribute.separatorBeforeEquals") }); this.writer.write({ value: "=", join: this.prefCache.getPref("attribute.separatorBeforeValue"), nowrap: true }); this.writer.write({ value: "\"" + replaceEntities(attr.nodeValue) + "\"", nowrap: true, preformatted: true }); },
|
prefix: this.prefCache.getPref("attribute.listSeparator"),
|
prefix: first ? "" : this.prefCache.getPref("attribute.listSeparator"),
|
printAttr: function(attr) { this.writer.write({ prefix: this.prefCache.getPref("attribute.listSeparator"), value: attr.nodeName, join: this.prefCache.getPref("attribute.separatorBeforeEquals") }); this.writer.write({ value: "=", join: this.prefCache.getPref("attribute.separatorBeforeValue"), nowrap: true }); this.writer.write({ value: "\"" + replaceEntities(attr.nodeValue) + "\"", nowrap: true, preformatted: true }); },
|
this.printAttr(sortedAttrs[i]);
|
this.printAttr(sortedAttrs[i], !i);
|
printElement: function(el) { var childNodes = el.childNodes, tagName = el.tagName; if (!this.isXML && this.prefCache.getPref("element.htmlNameToLower")) { tagName = tagName.toLowerCase(); } this.writer.write({ value: "<" + tagName, nowrap: true, indentOffset: true }); var attrs = el.attributes; if (attrs.length) { var attrsPerLine = this.prefCache.getPref("attribute.attrsPerLine"); this.writer.setIndent(this.prefCache.getPref("attribute.indentLevel")); this.writer.write({ value: this.prefCache.getPref("element.separatorBeforeAttributes"), nowrap: true }); var curLineCount = 0, curLine = this.writer.lineCount; var idAttr, classAttr, sortedAttrs = []; for (var i = 0; i < attrs.length; i++) { var attr = attrs[i]; if (attr.name == "id") { idAttr = attr; } else if (attr.name == "class") { classAttr = attr; } else { sortedAttrs.push(attr); } } sortedAttrs.sort(function(a, b) { return a.name.localeCompare(b.name); }); if (classAttr) { sortedAttrs.unshift(classAttr); } if (idAttr) { sortedAttrs.unshift(idAttr); } for (var i = 0; i < sortedAttrs.length; i++) { if (attrsPerLine >= 0 && curLineCount >= attrsPerLine) { this.writer.write("\n"); } curLine = this.writer.lineCount; this.printAttr(sortedAttrs[i]); curLineCount++; } this.writer.setIndent(0); } if (childNodes.length || !this.isXML) { this.writer.write({ value: this.prefCache.getPref("element.separatorBeforeClose"), nowrap: true }); this.writer.write({ value: ">", nowrap: true, resetOffset: true }); for (var i = 0; i < childNodes.length; i++) { this.printNode(childNodes[i]); } if (childNodes.length || !FBL.selfClosingTags[tagName.toLowerCase()]) { this.writer.write({ value: "</" + tagName + ">", nowrap: true }); } } else { // Not joining as this is simplier and there will never a be a wrap for this case, unless the separator itself is a wrap this.writer.write({ value: this.prefCache.getPref("element.separatorBeforeSelfClose"), nowrap: true }); this.writer.write({ value: "/>", nowrap: true, resetOffset: true }); this.writer.setIndent(0); } },
|
if (curLineCount >= attrsPerLine) {
|
if (attrsPerLine >= 0 && curLineCount >= attrsPerLine) {
|
printElement: function(el) { var childNodes = el.childNodes, tagName = el.tagName; if (!this.isXML && this.prefCache.getPref("element.htmlNameToLower")) { tagName = tagName.toLowerCase(); } this.writer.write({ value: "<" + tagName, nowrap: true, indentOffset: true }); var attrs = el.attributes; if (attrs.length) { var attrsPerLine = this.prefCache.getPref("attribute.attrsPerLine"); this.writer.setIndent(this.prefCache.getPref("attribute.indentLevel")); this.writer.write({ value: this.prefCache.getPref("element.separatorBeforeAttributes"), nowrap: true }); var curLineCount = 0, curLine = this.writer.lineCount; var idAttr, classAttr, sortedAttrs = []; for (var i = 0; i < attrs.length; i++) { var attr = attrs[i]; if (attr.name == "id") { idAttr = attr; } else if (attr.name == "class") { classAttr = attr; } else { sortedAttrs.push(attr); } } sortedAttrs.sort(function(a, b) { return a.name.localeCompare(b.name); }); if (classAttr) { sortedAttrs.unshift(classAttr); } if (idAttr) { sortedAttrs.unshift(idAttr); } for (var i = 0; i < sortedAttrs.length; i++) { if (curLineCount >= attrsPerLine) { this.writer.write("\n"); } curLine = this.writer.lineCount; this.printAttr(sortedAttrs[i]); curLineCount++; } this.writer.setIndent(0); } if (childNodes.length || !this.isXML) { this.writer.write({ value: this.prefCache.getPref("element.separatorBeforeClose"), nowrap: true }); this.writer.write({ value: ">", nowrap: true, resetOffset: true }); for (var i = 0; i < childNodes.length; i++) { this.printNode(childNodes[i]); } if (childNodes.length || !FBL.selfClosingTags[tagName.toLowerCase()]) { this.writer.write({ value: "</" + tagName + ">", nowrap: true }); } } else { // Not joining as this is simplier and there will never a be a wrap for this case, unless the separator itself is a wrap this.writer.write({ value: this.prefCache.getPref("element.separatorBeforeSelfClose"), nowrap: true }); this.writer.write({ value: "/>", nowrap: true, resetOffset: true }); this.writer.setIndent(0); } },
|
this.writer.write({ value: replaceEntities(text.data), nowrap: true, preformatted: true });
|
var parentTag = ((text.parentNode || {}).tagName || ""), cdata = parentTag == "SCRIPT" || parentTag == "STYLE"; this.writer.write({ value: !cdata ? replaceEntities(text.data) : text.data, nowrap: true, preformatted: true });
|
printText: function(text) { this.writer.write({ value: replaceEntities(text.data), nowrap: true, preformatted: true }); },
|
logger.log("Check if ", propName, ':', value, compareOperator, compareValue, '[is/should]BeInSet', isInSet, couldBeInSet)
|
logger.log("Check if ", propName, ':', value, compareOperator, compareValue, 'couldBeInSet', couldBeInSet)
|
function processProperty(propIndex) { var propName = properties[propIndex], itemPropKey = shared.keys.getItemPropertyKey(itemId, propName) self._redisCommandClient.get(itemPropKey, function(err, valueBytes) { var value = valueBytes ? bytesToString(valueBytes) : null, propCondition = query[propName], isLiteral = (typeof propCondition != 'object'), compareOperator = isLiteral ? '=' : propCondition[0], compareValue = isLiteral ? propCondition : propCondition[1] var couldBeInSet = (compareOperator == '=') ? (value == compareValue) : (compareOperator == '<') ? (value < compareValue) : (compareOperator == '>') ? (value > compareValue) : logger.error('Unknown compare operator', compareOperator, queryKey, query, propName) logger.log("Check if ", propName, ':', value, compareOperator, compareValue, '[is/should]BeInSet', isInSet, couldBeInSet) if (!couldBeInSet) { if (!isInSet) { return } self._mutate('srem', itemId) } else { if (propIndex == 0) { if (isInSet) { return } self._mutate('sadd', itemId) } else { processProperty(propIndex - 1) } } }) }
|
if (!isInSet) { return } self._mutate('srem', itemId)
|
self._maybeRemove(itemId)
|
function processProperty(propIndex) { var propName = properties[propIndex], itemPropKey = shared.keys.getItemPropertyKey(itemId, propName) self._redisCommandClient.get(itemPropKey, function(err, valueBytes) { var value = valueBytes ? bytesToString(valueBytes) : null, propCondition = query[propName], isLiteral = (typeof propCondition != 'object'), compareOperator = isLiteral ? '=' : propCondition[0], compareValue = isLiteral ? propCondition : propCondition[1] var couldBeInSet = (compareOperator == '=') ? (value == compareValue) : (compareOperator == '<') ? (value < compareValue) : (compareOperator == '>') ? (value > compareValue) : logger.error('Unknown compare operator', compareOperator, queryKey, query, propName) logger.log("Check if ", propName, ':', value, compareOperator, compareValue, '[is/should]BeInSet', isInSet, couldBeInSet) if (!couldBeInSet) { if (!isInSet) { return } self._mutate('srem', itemId) } else { if (propIndex == 0) { if (isInSet) { return } self._mutate('sadd', itemId) } else { processProperty(propIndex - 1) } } }) }
|
if (isInSet) { return } self._mutate('sadd', itemId)
|
self._maybeAdd(itemId)
|
function processProperty(propIndex) { var propName = properties[propIndex], itemPropKey = shared.keys.getItemPropertyKey(itemId, propName) self._redisCommandClient.get(itemPropKey, function(err, valueBytes) { var value = valueBytes ? bytesToString(valueBytes) : null, propCondition = query[propName], isLiteral = (typeof propCondition != 'object'), compareOperator = isLiteral ? '=' : propCondition[0], compareValue = isLiteral ? propCondition : propCondition[1] var couldBeInSet = (compareOperator == '=') ? (value == compareValue) : (compareOperator == '<') ? (value < compareValue) : (compareOperator == '>') ? (value > compareValue) : logger.error('Unknown compare operator', compareOperator, queryKey, query, propName) logger.log("Check if ", propName, ':', value, compareOperator, compareValue, '[is/should]BeInSet', isInSet, couldBeInSet) if (!couldBeInSet) { if (!isInSet) { return } self._mutate('srem', itemId) } else { if (propIndex == 0) { if (isInSet) { return } self._mutate('sadd', itemId) } else { processProperty(propIndex - 1) } } }) }
|
logger.log('Check property "' + propName +'":', '[db: ' + JSON.stringify(value) + ']', compareOperator, '[query: ' + JSON.stringify(compareValue) + ']', 'match?', couldBeInSet)
|
logger.log('Check ' + itemPropKey +':', '[in db: ' + JSON.stringify(value) + ']', compareOperator, '[query wants: ' + JSON.stringify(compareValue) + ']', 'match?', couldBeInSet)
|
function processProperty(propIndex) { var propName = properties[propIndex], itemPropKey = shared.keys.getItemPropertyKey(itemId, propName) self._redisCommandClient.get(itemPropKey, function(err, valueBytes) { var value = valueBytes ? bytesToString(valueBytes) : false, propCondition = query[propName], isLiteral = (typeof propCondition != 'object' || propCondition == null), compareOperator = isLiteral ? '=' : propCondition.op, compareValue = isLiteral ? propCondition : propCondition.value // an unset value is interpreted as the same as a null value, // e.g. { type: null } matches both items with type set to null // and items with type unset logger.debug("Retrieved for JSON parsing", ':', typeof value, value) if (value) { value = JSON.parse(value) } logger.debug("After JSON parsing", ':', typeof value, value) var couldBeInSet = (compareOperator == '=') ? (value == compareValue) : (compareOperator == '!=') ? (value != compareValue) : (compareOperator == '<') ? (value < compareValue) : (compareOperator == '>') ? (value > compareValue) : logger.error('Unknown compare operator', compareOperator, queryKey, query, propName) logger.log('Check property "' + propName +'":', '[db: ' + JSON.stringify(value) + ']', compareOperator, '[query: ' + JSON.stringify(compareValue) + ']', 'match?', couldBeInSet) if (!couldBeInSet) { self._maybeRemove(itemId) } else { if (propIndex == 0) { self._maybeAdd(itemId) } else { processProperty(propIndex - 1) } } }) }
|
self._maybeRemove(itemId)
|
self._removeIfMember(itemId)
|
function processProperty(propIndex) { var propName = properties[propIndex], itemPropKey = shared.keys.getItemPropertyKey(itemId, propName) self._redisCommandClient.get(itemPropKey, function(err, valueBytes) { var value = valueBytes ? bytesToString(valueBytes) : false, propCondition = query[propName], isLiteral = (typeof propCondition != 'object' || propCondition == null), compareOperator = isLiteral ? '=' : propCondition.op, compareValue = isLiteral ? propCondition : propCondition.value // an unset value is interpreted as the same as a null value, // e.g. { type: null } matches both items with type set to null // and items with type unset logger.debug("Retrieved for JSON parsing", ':', typeof value, value) if (value) { value = JSON.parse(value) } logger.debug("After JSON parsing", ':', typeof value, value) var couldBeInSet = (compareOperator == '=') ? (value == compareValue) : (compareOperator == '!=') ? (value != compareValue) : (compareOperator == '<') ? (value < compareValue) : (compareOperator == '>') ? (value > compareValue) : logger.error('Unknown compare operator', compareOperator, queryKey, query, propName) logger.log('Check property "' + propName +'":', '[db: ' + JSON.stringify(value) + ']', compareOperator, '[query: ' + JSON.stringify(compareValue) + ']', 'match?', couldBeInSet) if (!couldBeInSet) { self._maybeRemove(itemId) } else { if (propIndex == 0) { self._maybeAdd(itemId) } else { processProperty(propIndex - 1) } } }) }
|
if (propIndex == 0) { self._maybeAdd(itemId) } else { processProperty(propIndex - 1) }
|
if (propIndex == 0) { self._addIfNotMember(itemId) } else { processProperty(propIndex - 1) }
|
function processProperty(propIndex) { var propName = properties[propIndex], itemPropKey = shared.keys.getItemPropertyKey(itemId, propName) self._redisCommandClient.get(itemPropKey, function(err, valueBytes) { var value = valueBytes ? bytesToString(valueBytes) : false, propCondition = query[propName], isLiteral = (typeof propCondition != 'object' || propCondition == null), compareOperator = isLiteral ? '=' : propCondition.op, compareValue = isLiteral ? propCondition : propCondition.value // an unset value is interpreted as the same as a null value, // e.g. { type: null } matches both items with type set to null // and items with type unset logger.debug("Retrieved for JSON parsing", ':', typeof value, value) if (value) { value = JSON.parse(value) } logger.debug("After JSON parsing", ':', typeof value, value) var couldBeInSet = (compareOperator == '=') ? (value == compareValue) : (compareOperator == '!=') ? (value != compareValue) : (compareOperator == '<') ? (value < compareValue) : (compareOperator == '>') ? (value > compareValue) : logger.error('Unknown compare operator', compareOperator, queryKey, query, propName) logger.log('Check property "' + propName +'":', '[db: ' + JSON.stringify(value) + ']', compareOperator, '[query: ' + JSON.stringify(compareValue) + ']', 'match?', couldBeInSet) if (!couldBeInSet) { self._maybeRemove(itemId) } else { if (propIndex == 0) { self._maybeAdd(itemId) } else { processProperty(propIndex - 1) } } }) }
|
new Ajax.Request(url + '?' + param + '=' + encodeURIComponent(value), {asynchronous:true, evalScripts:true});
|
var sep = (url.indexOf('?') < 0 ? '?' : '&' ) new Ajax.Request(url + sep + param + '=' + encodeURIComponent(value), {asynchronous:true, evalScripts:true});
|
function promptToRemote(text, param, url) { value = prompt(text + ':'); if (value) { new Ajax.Request(url + '?' + param + '=' + encodeURIComponent(value), {asynchronous:true, evalScripts:true}); return false; }}
|
ORBEON.util.Property = function(name, defaultValue) { this.name = name; this.defaultValue = defaultValue; };
|
Property: function() { var Property = function(name, defaultValue) { this.name = name; this.defaultValue = defaultValue; }; Property.prototype.get = function() { return YAHOO.lang.isUndefined(opsXFormsProperties) || YAHOO.lang.isUndefined(opsXFormsProperties[this.name]) ? this.defaultValue : opsXFormsProperties[this.name]; }; return Property; }(),
|
ORBEON.util.Property = function(name, defaultValue) { this.name = name; this.defaultValue = defaultValue;};
|
a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,j=a.length;e<j;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,j=0,i=a.length;j<i;j++){e=b(a[j],j,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b==="string"){d=a;a=d[b];b=w}else if(b&& !c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari=
|
s){var v=j.length,z=0;if(typeof s.length==="number")for(var H=s.length;z<H;z++)j[v++]=s[z];else for(;s[z]!==B;)j[v++]=s[z++];j.length=v;return j},grep:function(j,s,v){var z=[],H;v=!!v;for(var G=0,K=j.length;G<K;G++){H=!!s(j[G],G);v!==H&&z.push(j[G])}return z},map:function(j,s,v){for(var z=[],H,G=0,K=j.length;G<K;G++){H=s(j[G],G,v);if(H!=null)z[z.length]=H}return z.concat.apply([],z)},guid:1,proxy:function(j,s,v){if(arguments.length===2)if(typeof s==="string"){v=j;j=v[s];s=B}else if(s&&!b.isFunction(s)){v= s;s=B}if(!s&&j)s=function(){return j.apply(v||this,arguments)};if(j)s.guid=j.guid=j.guid||s.guid||b.guid++;return s},access:function(j,s,v,z,H,G){var K=j.length;if(typeof s==="object"){for(var Q in s)b.access(j,Q,s[Q],z,H,v);return j}if(v!==B){z=!G&&z&&b.isFunction(v);for(Q=0;Q<K;Q++)H(j[Q],s,z?v.call(j[Q],Q,H(j[Q],s)):v,G);return j}return K?H(j[0],s):B},now:function(){return(new Date).getTime()},uaMatch:function(j){j=j.toLowerCase();j=L.exec(j)||g.exec(j)||i.exec(j)||j.indexOf("compatible")<0&&n.exec(j)||
|
a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,j=a.length;e<j;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,j=0,i=a.length;j<i;j++){e=b(a[j],j,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b==="string"){d=a;a=d[b];b=w}else if(b&&!c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari=
|
"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,k,l,q,p){h=g[1].replace(/\\/g,"");if(!p&&m.attrMap[h])g[1]=m.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,k,l,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=o(g[3],null,null,h);else{g=o.filter(g[3],h,k,true^q);k||l.push.apply(l,g);return false}else if(m.match.POS.test(g[0])||m.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);
|
CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m, g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},
|
"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,k,l,q,p){h=g[1].replace(/\\/g,"");if(!p&&m.attrMap[h])g[1]=m.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,k,l,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=o(g[3],null,null,h);else{g=o.filter(g[3],h,k,true^q);k||l.push.apply(l,g);return false}else if(m.match.POS.test(g[0])||m.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);
|
a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b=== "find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,
|
toArray:function(){return N.call(this,0)},get:function(j){return j==null?this.toArray():j<0?this.slice(j)[0]:this[j]},pushStack:function(j,s,v){var z=b();b.isArray(j)?M.apply(z,j):b.merge(z,j);z.prevObject=this;z.context=this.context;if(s==="find")z.selector=this.selector+(this.selector?" ":"")+v;else if(s)z.selector=this.selector+"."+s+"("+v+")";return z},each:function(j,s){return b.each(this,j,s)},ready:function(j){b.bindReady();if(b.isReady)j.call(t,b);else q&&q.push(j);return this},eq:function(j){return j===
|
a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b==="find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,
|
"&")}function qa(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function ra(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var j in f)for(var i in f[j])c.event.add(this,j,f[j][i],f[j][i].data)}}})}function sa(a,b,d){var f,e,j;b=b&&b[0]?b[0].ownerDocument||b[0]:s;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===s&&!ta.test(a[0])&&(c.support.checkClone||!ua.test(a[0]))){e=
|
"margin"+this))||0;else e-=parseFloat(c.css(a,"border"+this+"Width"))||0});return e}function da(a,b,d,e){if(c.isArray(b)&&b.length)c.each(b,function(f,h){d||Ra.test(a)?e(a,h):da(a+"["+(typeof h==="object"||c.isArray(h)?f:"")+"]",h,d,e)});else if(!d&&b!=null&&typeof b==="object")c.isEmptyObject(b)?e(a,""):c.each(b,function(f,h){da(a+"["+f+"]",h,d,e)});else e(a,b)}function S(a,b){var d={};c.each(pa.concat.apply([],pa.slice(0,b)),function(){d[this]=a});return d}function qa(a){if(!ea[a]){var b=c("<"+ a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d==="")d="block";ea[a]=d}return ea[a]}function fa(a){return c.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var t=E.document,c=function(){function a(){if(!b.isReady){try{t.documentElement.doScroll("left")}catch(j){setTimeout(a,1);return}b.ready()}}var b=function(j,s){return new b.fn.init(j,s)},d=E.jQuery,e=E.$,f,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,l=/\S/,k=/^\s+/,o=/\s+$/,x=/\W/,r=/\d/,A=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,
|
"&")}function qa(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function ra(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var j in f)for(var i in f[j])c.event.add(this,j,f[j][i],f[j][i].data)}}})}function sa(a,b,d){var f,e,j;b=b&&b[0]?b[0].ownerDocument||b[0]:s;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===s&&!ta.test(a[0])&&(c.support.checkClone||!ua.test(a[0]))){e=
|
if (!query || !callback) { logger.error("query requires two arguments", query, callback); debugger }
|
if (!query || !callback) { logger.error("query requires two arguments", query, callback); }
|
this.query = function(query, callback) { if (!query || !callback) { logger.error("query requires two arguments", query, callback); debugger } var queryJSON = JSON.stringify(query), queryChannel = shared.keys.getQueryChannel(queryJSON), subId = this._subscriptionPool.add(queryChannel, callback) if (this._subscriptionPool.count(queryChannel) == 1) { this.send('FIN_REQUEST_QUERY', queryJSON) } else if (this._mutationCache[queryChannel]) { setTimeout(bind(this, '_handleQueryMutation', this._mutationCache[queryChannel], true)) } return subId }
|
queryChannel = shared.keys.getQueryChannel(queryJSON), subId = this._subscriptionPool.add(queryChannel, callback), cachedMutation = this._mutationCache[queryChannel] if (this._subscriptionPool.count(queryChannel) == 1) { this.send('FIN_REQUEST_QUERY', queryJSON) } else if (cachedMutation) { this._handleQueryMutation(cachedMutation, callback)
|
key = shared.keys.getQueryKey(queryJSON), subId = this._observe({ key: key, type: 'SET' }, callback) if (this._subscriptionPool.count(key) == 1) { this.send('FIN_REQUEST_MONITOR_QUERY', queryJSON)
|
this.query = function(query, callback) { if (!query || !callback) { logger.error("query requires two arguments", query, callback) } var queryJSON = JSON.stringify(query), queryChannel = shared.keys.getQueryChannel(queryJSON), subId = this._subscriptionPool.add(queryChannel, callback), cachedMutation = this._mutationCache[queryChannel] if (this._subscriptionPool.count(queryChannel) == 1) { this.send('FIN_REQUEST_QUERY', queryJSON) } else if (cachedMutation) { this._handleQueryMutation(cachedMutation, callback) } return subId }
|
for (var key in query) { var value = query[key] if (typeof value == 'boolean') { query[key] = (value ? 1 : 0) } }
|
this.query = function(query, callback) { if (!query || !callback) { logger.error("query requires two arguments", query, callback); debugger } var queryJSON = JSON.stringify(query), queryChannel = shared.keys.getQueryChannel(queryJSON), subId = this._subscriptionPool.add(queryChannel, callback) if (this._subscriptionPool.count(queryChannel) == 1) { this.send('FIN_REQUEST_QUERY', queryJSON) } else if (this._queryMutationCache[queryChannel]) { setTimeout(bind(this, '_handleQueryMutation', this._queryMutationCache[queryChannel], true)) } return subId }
|
|
a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b=== w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i,
|
c.data(a,b);if(!d)return e||[];if(!e||c.isArray(d))e=c.data(a,b,c.makeArray(d));else e.push(d);return e}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),e=d.shift();if(e==="inprogress")e=d.shift();if(e){b==="fx"&&d.unshift("inprogress");e.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===B)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,
|
a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i,
|
16),parseInt(a[2],16),parseInt(a[3],16)];if(a=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c))return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(c))return m.transparent;return m[f.trim(c).toLowerCase()]}function r(c,a){var b;do{b=f.curCSS(c,a);if(b!=""&&b!="transparent"||f.nodeName(c,"body"))break;a="backgroundColor"}while(c=c.parentNode);return l(b)}function n(){var c=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,
|
3:2)+"}");p=b.substring(s).match(p);if(!p)throw"Missing number at position "+s;s+=p[0].length;return parseInt(p[0],10)},n=function(p,w,H){p=o(p)?H:w;for(w=0;w<p.length;w++)if(b.substr(s,p[w].length).toLowerCase()==p[w].toLowerCase()){s+=p[w].length;return w+1}throw"Unknown name at position "+s;},r=function(){if(b.charAt(s)!=a.charAt(z))throw"Unexpected literal at position "+s;s++},s=0,z=0;z<a.length;z++)if(j)if(a.charAt(z)=="'"&&!o("'"))j=false;else r();else switch(a.charAt(z)){case "d":l=m("d");
|
16),parseInt(a[2],16),parseInt(a[3],16)];if(a=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c))return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(c))return m.transparent;return m[f.trim(c).toLowerCase()]}function r(c,a){var b;do{b=f.curCSS(c,a);if(b!=""&&b!="transparent"||f.nodeName(c,"body"))break;a="backgroundColor"}while(c=c.parentNode);return l(b)}function n(){var c=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,
|
return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,k){return!!o(k[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===
|
text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},
|
return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,k){return!!o(k[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===
|
var xhr = new XMLHttpRequest(); xhr.onreadystatechange = function () { if (xhr.readyState === 4) { if (request.results.inline) { chrome.extension.sendRequest({ validateLocal : true, html : xhr.responseText } );
|
if (request.results.inline) { chrome.extension.sendRequest({ validateLocal : true, html : getPageHTMLCode()
|
receiveRequest = function (request, sender, sendResponse) { var requestResults = request.results, showFailedValidation = function () { chrome.extension.sendRequest({ setBadgeValues : true, errors : "X" } ); showMessage('Validation failed. Please try again or <a href="http://validator.w3.org/check?uri=' + encodeURIComponent(location.href) + '" target="_blank">validate this page at W3C</a>'); }; if (typeof requestResults === "object") { var requestResultsMessage = requestResults.message; if (requestResultsMessage === "show-loading") { loading.show(); } else if (requestResultsMessage === "hide-loading") { loading.hide(); } else if (requestResultsMessage === "hide-message") { messagePresentation.hide(); } else if (requestResultsMessage === "show-failed-validation") { loading.hide(); showFailedValidation(); } else if (requestResultsMessage === "create-error-list") { createErrorList(); } else if (requestResultsMessage === "hide-error-list") { hideResultsPresentation(); } else if (requestResultsMessage === "validate-local-html") { var xhr = new XMLHttpRequest(); // If the result is finished, send complete page HTML code to W3C validator xhr.onreadystatechange = function () { if (xhr.readyState === 4) { if (request.results.inline) { chrome.extension.sendRequest({ validateLocal : true, html : xhr.responseText } ); } else { var htmlForm = document.createElement("form"), htmlInput = document.createElement("input"); htmlForm.action = "http://validator.w3.org/check"; htmlForm.method = "post"; htmlForm.enctype = "multipart/form-data"; htmlForm.target = "_blank"; htmlInput.type = "text"; htmlInput.name = "fragment"; htmlInput.value = xhr.responseText; htmlForm.appendChild(htmlInput); document.body.appendChild(htmlForm); htmlForm.submit(); htmlForm.parentNode.removeChild(htmlForm); } } }; // Send XHR request to itself to get the entire HTML code xhr.open("GET", location.href, true); xhr.send(null); } else { loading.hide(); showMessage(requestResultsMessage); } } else { loading.hide(); hasBeenValidated = true; try { var results = JSON.parse(requestResults), messages = results.messages, showErrorList = request.showErrorList, resultsPresentationContent, message, error, validationInfoLink; url = results.url; errors = []; } catch (e) { showFailedValidation(); } for (var i=0, il=messages.length; i<il; i++) { message = messages[i]; if (message.type === "error") { errors.push({ "line" : message.lastLine, "column" : message.lastColumn, "message" : message.message }); } else if (message.type === "non-document-error" && message.message.indexOf("HTTP resource not retrievable") !== -1) { chrome.extension.sendRequest({ setBadgeValues : true, errors : "X" } ); errorLength = "Can't validate this document"; return showMessage('Validation failed since this is a <br>protecteded page/local file. <br><br>Please use the option "Validate local HTML" in the menu instead'); } } errorLength = errors.length; if (showErrorList === "showerrorlist") { createErrorList(); } } return requestResults; },
|
else { var htmlForm = document.createElement("form"), htmlInput = document.createElement("input"); htmlForm.action = "http: htmlForm.method = "post"; htmlForm.enctype = "multipart/form-data"; htmlForm.target = "_blank"; htmlInput.type = "text"; htmlInput.name = "fragment"; htmlInput.value = xhr.responseText; htmlForm.appendChild(htmlInput); document.body.appendChild(htmlForm); htmlForm.submit(); htmlForm.parentNode.removeChild(htmlForm);
|
); } else { chrome.extension.sendRequest({ openNewTabForForm : true, url : location.href
|
receiveRequest = function (request, sender, sendResponse) { var requestResults = request.results, showFailedValidation = function () { chrome.extension.sendRequest({ setBadgeValues : true, errors : "X" } ); showMessage('Validation failed. Please try again or <a href="http://validator.w3.org/check?uri=' + encodeURIComponent(location.href) + '" target="_blank">validate this page at W3C</a>'); }; if (typeof requestResults === "object") { var requestResultsMessage = requestResults.message; if (requestResultsMessage === "show-loading") { loading.show(); } else if (requestResultsMessage === "hide-loading") { loading.hide(); } else if (requestResultsMessage === "hide-message") { messagePresentation.hide(); } else if (requestResultsMessage === "show-failed-validation") { loading.hide(); showFailedValidation(); } else if (requestResultsMessage === "create-error-list") { createErrorList(); } else if (requestResultsMessage === "hide-error-list") { hideResultsPresentation(); } else if (requestResultsMessage === "validate-local-html") { var xhr = new XMLHttpRequest(); // If the result is finished, send complete page HTML code to W3C validator xhr.onreadystatechange = function () { if (xhr.readyState === 4) { if (request.results.inline) { chrome.extension.sendRequest({ validateLocal : true, html : xhr.responseText } ); } else { var htmlForm = document.createElement("form"), htmlInput = document.createElement("input"); htmlForm.action = "http://validator.w3.org/check"; htmlForm.method = "post"; htmlForm.enctype = "multipart/form-data"; htmlForm.target = "_blank"; htmlInput.type = "text"; htmlInput.name = "fragment"; htmlInput.value = xhr.responseText; htmlForm.appendChild(htmlInput); document.body.appendChild(htmlForm); htmlForm.submit(); htmlForm.parentNode.removeChild(htmlForm); } } }; // Send XHR request to itself to get the entire HTML code xhr.open("GET", location.href, true); xhr.send(null); } else { loading.hide(); showMessage(requestResultsMessage); } } else { loading.hide(); hasBeenValidated = true; try { var results = JSON.parse(requestResults), messages = results.messages, showErrorList = request.showErrorList, resultsPresentationContent, message, error, validationInfoLink; url = results.url; errors = []; } catch (e) { showFailedValidation(); } for (var i=0, il=messages.length; i<il; i++) { message = messages[i]; if (message.type === "error") { errors.push({ "line" : message.lastLine, "column" : message.lastColumn, "message" : message.message }); } else if (message.type === "non-document-error" && message.message.indexOf("HTTP resource not retrievable") !== -1) { chrome.extension.sendRequest({ setBadgeValues : true, errors : "X" } ); errorLength = "Can't validate this document"; return showMessage('Validation failed since this is a <br>protecteded page/local file. <br><br>Please use the option "Validate local HTML" in the menu instead'); } } errorLength = errors.length; if (showErrorList === "showerrorlist") { createErrorList(); } } return requestResults; },
|
} }; xhr.open("GET", location.href, true); xhr.send(null);
|
); }
|
receiveRequest = function (request, sender, sendResponse) { var requestResults = request.results, showFailedValidation = function () { chrome.extension.sendRequest({ setBadgeValues : true, errors : "X" } ); showMessage('Validation failed. Please try again or <a href="http://validator.w3.org/check?uri=' + encodeURIComponent(location.href) + '" target="_blank">validate this page at W3C</a>'); }; if (typeof requestResults === "object") { var requestResultsMessage = requestResults.message; if (requestResultsMessage === "show-loading") { loading.show(); } else if (requestResultsMessage === "hide-loading") { loading.hide(); } else if (requestResultsMessage === "hide-message") { messagePresentation.hide(); } else if (requestResultsMessage === "show-failed-validation") { loading.hide(); showFailedValidation(); } else if (requestResultsMessage === "create-error-list") { createErrorList(); } else if (requestResultsMessage === "hide-error-list") { hideResultsPresentation(); } else if (requestResultsMessage === "validate-local-html") { var xhr = new XMLHttpRequest(); // If the result is finished, send complete page HTML code to W3C validator xhr.onreadystatechange = function () { if (xhr.readyState === 4) { if (request.results.inline) { chrome.extension.sendRequest({ validateLocal : true, html : xhr.responseText } ); } else { var htmlForm = document.createElement("form"), htmlInput = document.createElement("input"); htmlForm.action = "http://validator.w3.org/check"; htmlForm.method = "post"; htmlForm.enctype = "multipart/form-data"; htmlForm.target = "_blank"; htmlInput.type = "text"; htmlInput.name = "fragment"; htmlInput.value = xhr.responseText; htmlForm.appendChild(htmlInput); document.body.appendChild(htmlForm); htmlForm.submit(); htmlForm.parentNode.removeChild(htmlForm); } } }; // Send XHR request to itself to get the entire HTML code xhr.open("GET", location.href, true); xhr.send(null); } else { loading.hide(); showMessage(requestResultsMessage); } } else { loading.hide(); hasBeenValidated = true; try { var results = JSON.parse(requestResults), messages = results.messages, showErrorList = request.showErrorList, resultsPresentationContent, message, error, validationInfoLink; url = results.url; errors = []; } catch (e) { showFailedValidation(); } for (var i=0, il=messages.length; i<il; i++) { message = messages[i]; if (message.type === "error") { errors.push({ "line" : message.lastLine, "column" : message.lastColumn, "message" : message.message }); } else if (message.type === "non-document-error" && message.message.indexOf("HTTP resource not retrievable") !== -1) { chrome.extension.sendRequest({ setBadgeValues : true, errors : "X" } ); errorLength = "Can't validate this document"; return showMessage('Validation failed since this is a <br>protecteded page/local file. <br><br>Please use the option "Validate local HTML" in the menu instead'); } } errorLength = errors.length; if (showErrorList === "showerrorlist") { createErrorList(); } } return requestResults; },
|
var htmlForm = $("#post-html-for-validation"); if (htmlForm.length === 0) { htmlForm = $('<form id="post-html-for-validation" method="post" action="' + "http: } htmlForm[0].submit();
|
var htmlForm = document.createElement("form"), htmlInput = document.createElement("input"); htmlForm.action = "http: htmlForm.method = "post"; htmlForm.enctype = "multipart/form-data"; htmlForm.target = "_blank"; htmlInput.type = "text"; htmlInput.name = "fragment"; htmlInput.value = xhr.responseText; htmlForm.appendChild(htmlInput); document.body.appendChild(htmlForm); htmlForm.submit(); htmlForm.parentNode.removeChild(htmlForm);
|
receiveRequest = function (request, sender, sendResponse) { var requestResults = request.results; if (typeof requestResults === "object") { var requestResultsMessage = requestResults.message; if (requestResultsMessage === "show-loading") { loading.show(); } else if (requestResultsMessage === "hide-loading") { loading.hide(); } else if (requestResultsMessage === "create-error-list") { createErrorList(); } else if (requestResultsMessage === "hide-error-list") { hideResultsPresentation(); } else if (requestResultsMessage === "validate-local-html") { var xhr = new XMLHttpRequest(); // If the result is finished, send complete page HTML code to W3C validator xhr.onreadystatechange = function () { if (xhr.readyState === 4) { var htmlForm = $("#post-html-for-validation"); if (htmlForm.length === 0) { htmlForm = $('<form id="post-html-for-validation" method="post" action="' + "http://validator.w3.org/check" + '" target="_blank"><input type="text" id="fragment" name="fragment" value=\'' + xhr.responseText.replace(/'/g, "‘") + '\'></form>').appendTo(document.body); } htmlForm[0].submit(); } }; // Send XHR request to itself to get the entire HTML code xhr.open("GET", location.href, true); xhr.send(null); } else { loading.hide(); showMessage(requestResultsMessage); } } else { loading.hide(); hasBeenValidated = true; try { var results = JSON.parse(requestResults), messages = results.messages, showErrorList = request.showErrorList, resultsPresentationContent, message, error, validationInfoLink; url = results.url; errors = []; } catch (e) { chrome.extension.sendRequest({ setBadgeValues : true, errors : "X" } ); showMessage('Validation failed. Please try again or <a href="http://validator.w3.org/check?uri=' + encodeURIComponent(location.href) + '" target="_blank">validate this page at W3C</a>'); } for (var i=0, il=messages.length; i<il; i++) { message = messages[i]; if (message.type === "error") { errors.push({ "line" : message.lastLine, "column" : message.lastColumn, "message" : message.message }); } else if (message.type === "non-document-error" && message.message.indexOf("HTTP resource not retrievable") !== -1) { chrome.extension.sendRequest({ setBadgeValues : true, errors : "X" } ); errorLength = "Can't validate this document"; return showMessage('Validation failed since this is a <br>protecteded page/local file. <br><br>Please use the option "Validate local HTML" in the menu instead'); } } errorLength = errors.length; chrome.extension.sendRequest({ setBadgeValues : true, errors : errorLength } ); if (showErrorList === "showerrorlist") { createErrorList(); } } return requestResults; },
|
$('<form id="post-html-for-validation" method="post" action="' + "http:
|
htmlForm = $('<form id="post-html-for-validation" method="post" action="' + "http:
|
receiveRequest = function (request, sender, sendResponse) { var requestResults = request.results; if (typeof requestResults === "object") { var requestResultsMessage = requestResults.message; if (requestResultsMessage === "show-loading") { loading.show(); } else if (requestResultsMessage === "hide-loading") { loading.hide(); } else if (requestResultsMessage === "create-error-list") { createErrorList(); } else if (requestResultsMessage === "hide-error-list") { hideResultsPresentation(); } else if (requestResultsMessage === "validate-local-html") { var xhr = new XMLHttpRequest(); // If the result is finished, send complete page HTML code to W3C validator xhr.onreadystatechange = function () { if (xhr.readyState === 4) { var htmlForm = $("#post-html-for-validation"); if (htmlForm.length === 0) { $('<form id="post-html-for-validation" method="post" action="' + "http://validator.w3.org/check" + '" target="_blank"><input type="text" id="fragment" name="fragment" value=\'' + xhr.responseText.replace(/'/g, "‘") + '\'></form>').appendTo(document.body); } htmlForm[0].submit(); } }; // Send XHR request to itself to get the entire HTML code xhr.open("GET", location.href, true); xhr.send(null); } else { loading.hide(); showMessage(requestResultsMessage); } } else { loading.hide(); hasBeenValidated = true; try { var results = JSON.parse(requestResults), messages = results.messages, showErrorList = request.showErrorList, showErrorList = request.showErrorList, resultsPresentationContent, message, error, validationInfoLink; url = results.url; errors = []; } catch (e) { showMessage('Validation failed. Please try again or <a href="http://validator.w3.org/check?uri=' + encodeURIComponent(location.href) + '" target="_blank">validate this page at W3C</a>'); } for (var i=0, il=messages.length; i<il; i++) { message = messages[i]; if (message.type === "error") { errors.push({ "line" : message.lastLine, "column" : message.lastColumn, "message" : message.message }); } else if (message.type === "non-document-error" && message.message.indexOf("HTTP resource not retrievable") !== -1) { return showMessage('Validation failed since this is a local file. <br>Please use the option "Validate local HTML" in the menu instead'); } } errorLength = errors.length; chrome.extension.sendRequest({ setBadgeValues : true, errors : errorLength } ); if (showErrorList === "showerrorlist") { createErrorList(); } } },
|
chrome.extension.sendRequest({ sendPageHTMLToValidator : true, pageHTML : xhr.responseText } );
|
$('<form id="post-html-for-validation" method="post" action="' + "http:
|
receiveRequest = function (request, sender, sendResponse) { var requestResults = request.results; if (typeof requestResults === "object") { var requestResultsMessage = requestResults.message; if (requestResultsMessage === "show-loading") { loading.show(); } else if (requestResultsMessage === "hide-loading") { loading.hide(); } else if (requestResultsMessage === "create-error-list") { createErrorList(); } else if (requestResultsMessage === "hide-error-list") { hideResultsPresentation(); } else if (requestResultsMessage === "validate-local-html") { var xhr = new XMLHttpRequest(); // If the result is finished, send complete page HTML code to W3C validator xhr.onreadystatechange = function () { if (xhr.readyState === 4) { chrome.extension.sendRequest({ sendPageHTMLToValidator : true, pageHTML : xhr.responseText } ); } }; // Send XHR request to itself to get the entire HTML code xhr.open("GET", location.href, true); xhr.send(null); } else { loading.hide(); showMessage(requestResultsMessage); } } else { loading.hide(); hasBeenValidated = true; try { var results = JSON.parse(requestResults), messages = results.messages, showErrorList = request.showErrorList, showErrorList = request.showErrorList, resultsPresentationContent, message, error, validationInfoLink; url = results.url; errors = []; } catch (e) { showMessage('Validation failed. Please try again or <a href="http://validator.w3.org/check?uri=' + encodeURIComponent(location.href) + '" target="_blank">validate this page at W3C</a>'); } for (var i=0, il=messages.length; i<il; i++) { message = messages[i]; if (message.type === "error") { errors.push({ "line" : message.lastLine, "column" : message.lastColumn, "message" : message.message }); } else if (message.type === "non-document-error" && message.message.indexOf("HTTP resource not retrievable") !== -1) { return showMessage('Validation failed since this is a local file. <br>Please use the option "Validate local HTML" in the menu instead'); } } errorLength = errors.length; chrome.extension.sendRequest({ setBadgeValues : true, errors : errorLength } ); if (showErrorList === "showerrorlist") { createErrorList(); } } },
|
$('<form id="post-html-for-validation" method="post" action="' + "http:
|
var htmlForm = $("#post-html-for-validation"); if (htmlForm.length === 0) { $('<form id="post-html-for-validation" method="post" action="' + "http: } htmlForm[0].submit();
|
receiveRequest = function (request, sender, sendResponse) { var requestResults = request.results; if (typeof requestResults === "object") { var requestResultsMessage = requestResults.message; if (requestResultsMessage === "show-loading") { loading.show(); } else if (requestResultsMessage === "hide-loading") { loading.hide(); } else if (requestResultsMessage === "create-error-list") { createErrorList(); } else if (requestResultsMessage === "hide-error-list") { hideResultsPresentation(); } else if (requestResultsMessage === "validate-local-html") { var xhr = new XMLHttpRequest(); // If the result is finished, send complete page HTML code to W3C validator xhr.onreadystatechange = function () { if (xhr.readyState === 4) { $('<form id="post-html-for-validation" method="post" action="' + "http://validator.w3.org/check" + '" target="_blank"><input type="text" id="fragment" name="fragment" value=\'' + xhr.responseText.replace(/'/g, "‘") + '\'></form>').appendTo(document.body)[0].submit(); } }; // Send XHR request to itself to get the entire HTML code xhr.open("GET", location.href, true); xhr.send(null); } else { loading.hide(); showMessage(requestResultsMessage); } } else { loading.hide(); hasBeenValidated = true; try { var results = JSON.parse(requestResults), messages = results.messages, showErrorList = request.showErrorList, showErrorList = request.showErrorList, resultsPresentationContent, message, error, validationInfoLink; url = results.url; errors = []; } catch (e) { showMessage('Validation failed. Please try again or <a href="http://validator.w3.org/check?uri=' + encodeURIComponent(location.href) + '" target="_blank">validate this page at W3C</a>'); } for (var i=0, il=messages.length; i<il; i++) { message = messages[i]; if (message.type === "error") { errors.push({ "line" : message.lastLine, "column" : message.lastColumn, "message" : message.message }); } else if (message.type === "non-document-error" && message.message.indexOf("HTTP resource not retrievable") !== -1) { return showMessage('Validation failed since this is a local file. <br>Please use the option "Validate local HTML" in the menu instead'); } } errorLength = errors.length; chrome.extension.sendRequest({ setBadgeValues : true, errors : errorLength } ); if (showErrorList === "showerrorlist") { createErrorList(); } } },
|
__.rect = function(pos, width, height, attrs){ return __.raphael.rect(pos.x, pos.y, width, height).attr(attrs); };
|
rect: function(pos, width, height, attrs){ return this.raphael.rect(pos.x, pos.y, width, height).attr(attrs); },
|
__.rect = function(pos, width, height, attrs){ return __.raphael.rect(pos.x, pos.y, width, height).attr(attrs); };
|
res.sendBody('Redirecting...'); res.finish();
|
res.write('Redirecting...'); res.close();
|
exports.redirect = redirect = function(res, location, status) { status = status || 301; res.sendHeader(status || 200, { 'Content-Type': 'text/html; charset=utf-8', 'Location': location }); res.sendBody('Redirecting...'); res.finish();}
|
if (error) { result_callback(error); }
|
if (error) { return result_callback(error); }
|
exports.reduce = function reduce(array, iter_callback, initial, result_callback) { var index = 0; var depth = 0; if (!result_callback) { throw 'no result callback!!!'; } (function inner (error, value) { if (error) { result_callback(error); } if (index < array.length) { process.nextTick( function () { try { index = index + 1; iter_callback( value, array[index - 1], index, array, inner ); } catch (e) { result_callback(e); } }); } else { result_callback( false, value ); } })( false, initial );}
|
var depth = 0;
|
exports.reduce = function reduce(array, iter_callback, initial, result_callback) { var index = 0; var depth = 0; if (!result_callback) { throw 'no result callback!!!'; } (function inner (error, value) { if (error) { return result_callback(error); } if (index < array.length) { process.nextTick( function () { try { index = index + 1; iter_callback( value, array[index - 1], index, array, inner ); } catch (e) { result_callback(e); } }); } else { result_callback( false, value ); } })( false, initial );}
|
|
if (ORBEON.util.Dom.hasClass(repeatElement, "xforms-dnd-vertical"))
|
if (YAHOO.util.Dom.hasClass(repeatElement, "xforms-dnd-vertical"))
|
registerDraggableListenersOnRepeatElement: function(repeatElement) { var draggableItem = new ORBEON.xforms.DnD.DraggableItem(repeatElement); if (ORBEON.util.Dom.hasClass(repeatElement, "xforms-dnd-vertical")) draggableItem.setXConstraint(0, 0); else if (ORBEON.util.Dom.hasClass(repeatElement, "xforms-dnd-horizontal")) draggableItem.setYConstraint(0, 0); },
|
else if (ORBEON.util.Dom.hasClass(repeatElement, "xforms-dnd-horizontal"))
|
else if (YAHOO.util.Dom.hasClass(repeatElement, "xforms-dnd-horizontal"))
|
registerDraggableListenersOnRepeatElement: function(repeatElement) { var draggableItem = new ORBEON.xforms.DnD.DraggableItem(repeatElement); if (ORBEON.util.Dom.hasClass(repeatElement, "xforms-dnd-vertical")) draggableItem.setXConstraint(0, 0); else if (ORBEON.util.Dom.hasClass(repeatElement, "xforms-dnd-horizontal")) draggableItem.setYConstraint(0, 0); },
|
this._subscriptionPool.remove(channel)
|
this._subscriptionPool.remove(channel, subId)
|
this.release = function(subId, options) { options = options || {} if (typeof subId == 'string') { var channel = this._subIdToChannel[subId] this._subscriptionPool.remove(channel) if (this._subscriptionPool.count() == 0) { if (options.local !== true) { this.send('FIN_REQUEST_UNSUBSCRIBE', channel) } delete this._listLength[channel] } delete this._subIdToChannel[subId] } else { // it's a fin template element this._templateFactory.releaseTemplate(subId) } }
|
if (this._subscriptionPool.count() == 0) {
|
if (this._subscriptionPool.count(channel) == 0) {
|
this.release = function(subId, options) { options = options || {} if (typeof subId == 'string') { var channel = this._subIdToChannel[subId] this._subscriptionPool.remove(channel) if (this._subscriptionPool.count() == 0) { if (options.local !== true) { this.send('FIN_REQUEST_UNSUBSCRIBE', channel) } delete this._listLength[channel] } delete this._subIdToChannel[subId] } else { // it's a fin template element this._templateFactory.releaseTemplate(subId) } }
|
var channel = this._subIdToChannel[subId], key = this._subscriptionPool.remove(channel, subId),
|
var key = this._subIdToKey[subId],
|
this.release = function(subId) { if (typeof subId == 'string') { var channel = this._subIdToChannel[subId], key = this._subscriptionPool.remove(channel, subId), keyInfo = shared.keys.getKeyInfo(key), itemID = keyInfo.id if (this._subscriptionPool.count(channel) == 0) { if (itemID != this._localID) { this.send('FIN_REQUEST_UNSUBSCRIBE', channel) } delete this._listLength[channel] } delete this._subIdToChannel[subId] } else { // it's a fin template element this._templateFactory.releaseTemplate(subId) } }
|
if (this._subscriptionPool.count(channel) == 0) {
|
this._subscriptionPool.remove(key, subId) if (this._subscriptionPool.count(key) == 0) {
|
this.release = function(subId) { if (typeof subId == 'string') { var channel = this._subIdToChannel[subId], key = this._subscriptionPool.remove(channel, subId), keyInfo = shared.keys.getKeyInfo(key), itemID = keyInfo.id if (this._subscriptionPool.count(channel) == 0) { if (itemID != this._localID) { this.send('FIN_REQUEST_UNSUBSCRIBE', channel) } delete this._listLength[channel] } delete this._subIdToChannel[subId] } else { // it's a fin template element this._templateFactory.releaseTemplate(subId) } }
|
this.send('FIN_REQUEST_UNSUBSCRIBE', channel)
|
this.send('FIN_REQUEST_UNSUBSCRIBE', key)
|
this.release = function(subId) { if (typeof subId == 'string') { var channel = this._subIdToChannel[subId], key = this._subscriptionPool.remove(channel, subId), keyInfo = shared.keys.getKeyInfo(key), itemID = keyInfo.id if (this._subscriptionPool.count(channel) == 0) { if (itemID != this._localID) { this.send('FIN_REQUEST_UNSUBSCRIBE', channel) } delete this._listLength[channel] } delete this._subIdToChannel[subId] } else { // it's a fin template element this._templateFactory.releaseTemplate(subId) } }
|
delete this._listLength[channel]
|
delete this._listLength[key]
|
this.release = function(subId) { if (typeof subId == 'string') { var channel = this._subIdToChannel[subId], key = this._subscriptionPool.remove(channel, subId), keyInfo = shared.keys.getKeyInfo(key), itemID = keyInfo.id if (this._subscriptionPool.count(channel) == 0) { if (itemID != this._localID) { this.send('FIN_REQUEST_UNSUBSCRIBE', channel) } delete this._listLength[channel] } delete this._subIdToChannel[subId] } else { // it's a fin template element this._templateFactory.releaseTemplate(subId) } }
|
delete this._subIdToChannel[subId]
|
delete this._subIdToKey[subId]
|
this.release = function(subId) { if (typeof subId == 'string') { var channel = this._subIdToChannel[subId], key = this._subscriptionPool.remove(channel, subId), keyInfo = shared.keys.getKeyInfo(key), itemID = keyInfo.id if (this._subscriptionPool.count(channel) == 0) { if (itemID != this._localID) { this.send('FIN_REQUEST_UNSUBSCRIBE', channel) } delete this._listLength[channel] } delete this._subIdToChannel[subId] } else { // it's a fin template element this._templateFactory.releaseTemplate(subId) } }
|
Ext.getCmp("tabs").setActiveTab(1);
|
function reloadData(){ s = Ext.getCmp("wfoselector").getValue(); sts = Ext.getCmp("datepicker1").getValue().format('m/d/Y') +" "+ Ext.getCmp("timepicker1").getValue(); sdt = new Date(sts); start_utc = sdt.toUTC(); /* Set the nexradSlider to the top of the hour */ nexradSlider.minValue = (start_utc.fromUTC()).add(Date.MINUTE, 0 - parseInt(start_utc.format('i')) ); ets = Ext.getCmp("datepicker2").getValue().format('m/d/Y') +" "+ Ext.getCmp("timepicker2").getValue(); edt = new Date(ets); end_utc = edt.toUTC(); /* Set the nexradSlider to the top of the next hour */ nexradSlider.maxValue = (end_utc.fromUTC()).add(Date.MINUTE, 60 - parseInt(start_utc.format('i')) ); nexradSlider.setValue( 0 ); nexradSlider.fireEvent('changecomplete'); lsrGridPanel.getStore().reload({ add : false, params : { 'sts': start_utc.format('YmdHi'), 'ets': end_utc.format('YmdHi'), 'wfos': s } }); sbwGridPanel.getStore().reload({ add : false, params : { 'sts': start_utc.format('YmdHi'), 'ets': end_utc.format('YmdHi'), 'wfos': s } }); window.location.href = "#"+ s +"/"+ start_utc.format('YmdHi') + "/"+ end_utc.format('YmdHi');}
|
|
nexradSlider.enable();
|
nexradSlider.fireEvent('changecomplete');
|
function reloadData(){ s = Ext.getCmp("wfoselector").getValue(); sts = Ext.getCmp("datepicker1").getValue().format('m/d/Y') +" "+ Ext.getCmp("timepicker1").getValue(); sdt = new Date(sts); start_utc = sdt.toUTC(); /* Set the nexradSlider to the top of the hour */ nexradSlider.minValue = (start_utc.fromUTC()).add(Date.MINUTE, 0 - parseInt(start_utc.format('i')) ); ets = Ext.getCmp("datepicker2").getValue().format('m/d/Y') +" "+ Ext.getCmp("timepicker2").getValue(); edt = new Date(ets); end_utc = edt.toUTC(); /* Set the nexradSlider to the top of the next hour */ nexradSlider.maxValue = (end_utc.fromUTC()).add(Date.MINUTE, 60 - parseInt(start_utc.format('i')) ); nexradSlider.setValue( 0 ); nexradSlider.enable(); lsrGridPanel.getStore().reload({ add : false, params : { 'sts': start_utc.format('YmdHi'), 'ets': end_utc.format('YmdHi'), 'wfos': s } }); sbwGridPanel.getStore().reload({ add : false, params : { 'sts': start_utc.format('YmdHi'), 'ets': end_utc.format('YmdHi'), 'wfos': s } }); window.location.href = "#"+ s +"/"+ start_utc.format('YmdHi') + "/"+ end_utc.format('YmdHi');}
|
k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a), C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B<r.length;B++){u=r[B];if(d.guid===u.guid){if(i||k.test(u.namespace)){f==null&&r.splice(B--,1);n.remove&&n.remove.call(a,u)}if(f!= null)break}}if(r.length===0||f!=null&&r.length===1){if(!n.teardown||n.teardown.call(a,o)===false)Ca(a,e,z.handle);delete C[e]}}else for(var B=0;B<r.length;B++){u=r[B];if(i||k.test(u.namespace)){c.event.remove(a,n,u.handler,B);r.splice(B--,1)}}}if(c.isEmptyObject(C)){if(b=z.handle)b.elem=null;delete z.events;delete z.handle;c.isEmptyObject(z)&&c.removeData(a)}}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=
|
d.guid}A.push(h);c.event.global[l]=true}a=null}}},global:{},remove:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(d===false)d=U;var f,h,l=0,k,o,x,r,A,C,J=a.nodeType?"events":"__events__",w=c.data(a),I=w&&w[J];if(w&&I){if(typeof I==="function"){w=I;I=I.events}if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(f in I)c.event.remove(a,f+b)}else{for(b=b.split(" ");f=b[l++];){r=f;k=f.indexOf(".")<0;o=[];if(!k){o=f.split(".");f=o.shift();x=RegExp("(^|\\.)"+ c.map(o.slice(0).sort(),Ya).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(A=I[f])if(d){r=c.event.special[f]||{};for(h=e||0;h<A.length;h++){C=A[h];if(d.guid===C.guid){if(k||x.test(C.namespace)){e==null&&A.splice(h--,1);r.remove&&r.remove.call(a,C)}if(e!=null)break}}if(A.length===0||e!=null&&A.length===1){if(!r.teardown||r.teardown.call(a,o)===false)c.removeEvent(a,f,w.handle);delete I[f]}}else for(h=0;h<A.length;h++){C=A[h];if(k||x.test(C.namespace)){c.event.remove(a,r,C.handler,h);A.splice(h--,1)}}}if(c.isEmptyObject(I)){if(b= w.handle)b.elem=null;delete w.events;delete w.handle;if(typeof w==="function")c.removeData(a,J);else c.isEmptyObject(w)&&c.removeData(a)}}}}},trigger:function(a,b,d,e){var f=a.type||a;if(!e){a=typeof a==="object"?a[c.expando]?a:c.extend(c.Event(f),a):c.Event(f);if(f.indexOf("!")>=0){a.type=f=f.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[f]&&c.each(c.cache,function(){this.events&&this.events[f]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===
|
k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a),C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B<r.length;B++){u=r[B];if(d.guid===u.guid){if(i||k.test(u.namespace)){f==null&&r.splice(B--,1);n.remove&&n.remove.call(a,u)}if(f!=null)break}}if(r.length===0||f!=null&&r.length===1){if(!n.teardown||n.teardown.call(a,o)===false)Ca(a,e,z.handle);delete C[e]}}else for(var B=0;B<r.length;B++){u=r[B];if(i||k.test(u.namespace)){c.event.remove(a,n,u.handler,B);r.splice(B--,1)}}}if(c.isEmptyObject(C)){if(b=z.handle)b.elem=null;delete z.events;delete z.handle;c.isEmptyObject(z)&&c.removeData(a)}}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=
|
this.remove = function(signal, id) { delete this._pool[signal][id]
|
this.remove = function(name, id) { delete this._pool[name][id] if (this._counts[name]-- == 0) { delete this._counts[name] }
|
this.remove = function(signal, id) { delete this._pool[signal][id] }
|
cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className){for(var j=" "+e.className+" ",
|
colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};c.fn.extend({attr:function(a,b){return c.access(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(x){var r=c(this);r.addClass(a.call(this,x,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ha),d=0,e=this.length;d<e;d++){var f=this[d];if(f.nodeType===
|
cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className){for(var j=" "+e.className+" ",
|
i){c[i]&&e[i+"Class"](c[i])});q=o(n.call(this));e.attr("className",u);e.animate(t(h,q),a,b,function(){f.each(p,function(v,i){c[i]&&e[i+"Class"](c[i])});if(typeof e.attr("style")=="object"){e.attr("style").cssText="";e.attr("style").cssText=g}else e.attr("style",g);d&&d.apply(this,arguments)})})};f.fn.extend({_addClass:f.fn.addClass,addClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{add:c},a,b,d]):this._addClass(c)},_removeClass:f.fn.removeClass,removeClass:function(c,a,b,d){return a? f.effects.animateClass.apply(this,[{remove:c},a,b,d]):this._removeClass(c)},_toggleClass:f.fn.toggleClass,toggleClass:function(c,a,b,d,e){return typeof a=="boolean"||a===j?b?f.effects.animateClass.apply(this,[a?{add:c}:{remove:c},b,d,e]):this._toggleClass(c,a):f.effects.animateClass.apply(this,[{toggle:c},a,b,d])},switchClass:function(c,a,b,d,e){return f.effects.animateClass.apply(this,[{add:a,remove:c},b,d,e])}});f.extend(f.effects,{version:"1.8.4",save:function(c,a){for(var b=0;b<a.length;b++)a[b]!==
|
f.effects.animateClass.apply(this,[{add:c},a,b,d]):this._addClass(c)},_removeClass:f.fn.removeClass,removeClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{remove:c},a,b,d]):this._removeClass(c)},_toggleClass:f.fn.toggleClass,toggleClass:function(c,a,b,d,e){return typeof a=="boolean"||a===j?b?f.effects.animateClass.apply(this,[a?{add:c}:{remove:c},b,d,e]):this._toggleClass(c,a):f.effects.animateClass.apply(this,[{toggle:c},a,b,d])},switchClass:function(c,a,b,d,e){return f.effects.animateClass.apply(this,
|
i){c[i]&&e[i+"Class"](c[i])});q=o(n.call(this));e.attr("className",u);e.animate(t(h,q),a,b,function(){f.each(p,function(v,i){c[i]&&e[i+"Class"](c[i])});if(typeof e.attr("style")=="object"){e.attr("style").cssText="";e.attr("style").cssText=g}else e.attr("style",g);d&&d.apply(this,arguments)})})};f.fn.extend({_addClass:f.fn.addClass,addClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{add:c},a,b,d]):this._addClass(c)},_removeClass:f.fn.removeClass,removeClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{remove:c},a,b,d]):this._removeClass(c)},_toggleClass:f.fn.toggleClass,toggleClass:function(c,a,b,d,e){return typeof a=="boolean"||a===j?b?f.effects.animateClass.apply(this,[a?{add:c}:{remove:c},b,d,e]):this._toggleClass(c,a):f.effects.animateClass.apply(this,[{toggle:c},a,b,d])},switchClass:function(c,a,b,d,e){return f.effects.animateClass.apply(this,[{add:a,remove:c},b,d,e])}});f.extend(f.effects,{version:"1.8.4",save:function(c,a){for(var b=0;b<a.length;b++)a[b]!==
|
i=e.className,o=0,k=b.length;o<k;o++)if(j.indexOf(" "+b[o]+" ")<0)i+=" "+b[o];e.className=c.trim(i)}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(k){var n=c(this);n.removeClass(a.call(this,k,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var j=(" "+e.className+" ").replace(Aa," "),i=0,o=b.length;i<o;i++)j=j.replace(" "+b[i]+" ", " ");e.className=c.trim(j)}else e.className=""}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var j=c(this);j.toggleClass(a.call(this,e,j.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,j=0,i=c(this),o=b,k=a.split(ca);e=k[j++];){o=f?o:!i.hasClass(e);i[o?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=
|
1)if(f.className){for(var h=" "+f.className+" ",l=f.className,k=0,o=b.length;k<o;k++)if(h.indexOf(" "+b[k]+" ")<0)l+=" "+b[k];f.className=c.trim(l)}else f.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(o){var x=c(this);x.removeClass(a.call(this,o,x.attr("class")))});if(a&&typeof a==="string"||a===B)for(var b=(a||"").split(ha),d=0,e=this.length;d<e;d++){var f=this[d];if(f.nodeType===1&&f.className)if(a){for(var h=(" "+f.className+" ").replace(sa," "), l=0,k=b.length;l<k;l++)h=h.replace(" "+b[l]+" "," ");f.className=c.trim(h)}else f.className=""}return this},toggleClass:function(a,b){var d=typeof a,e=typeof b==="boolean";if(c.isFunction(a))return this.each(function(f){var h=c(this);h.toggleClass(a.call(this,f,h.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var f,h=0,l=c(this),k=b,o=a.split(ha);f=o[h++];){k=e?k:!l.hasClass(f);l[k?"addClass":"removeClass"](f)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,
|
i=e.className,o=0,k=b.length;o<k;o++)if(j.indexOf(" "+b[o]+" ")<0)i+=" "+b[o];e.className=c.trim(i)}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(k){var n=c(this);n.removeClass(a.call(this,k,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var j=(" "+e.className+" ").replace(Aa," "),i=0,o=b.length;i<o;i++)j=j.replace(" "+b[i]+" "," ");e.className=c.trim(j)}else e.className=""}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var j=c(this);j.toggleClass(a.call(this,e,j.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,j=0,i=c(this),o=b,k=a.split(ca);e=k[j++];){o=f?o:!i.hasClass(e);i[o?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=
|
a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===
|
a)});var k=a.split(".");k[1]=k[1]?"."+k[1]:"";if(b===B){d=this.triggerHandler("getData"+k[1]+"!",[k[0]]);if(d===B&&this.length){d=c.data(this[0],a);d=ka(this[0],a,d)}return d===B&&k[1]?this.data(k[0]):d}else return this.each(function(){var o=c(this),x=[k[0],b];o.triggerHandler("setData"+k[1]+"!",x);c.data(this,a,b);o.triggerHandler("changeData"+k[1]+"!",x)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var e=
|
a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===
|
this.removeFromSet = function(setId, itemId, callback) {
|
this.removeFromSet = function(setId, itemIds, callback) {
|
this.removeFromSet = function(setId, itemId, callback) { if (!isArray(itemIds)) { itemIds = [itemIds] } for (var i=0, itemId; itemId = itemIds[i]; i++) { delete this._itemSets[setId][itemId] } setTimeout(function() { callback(null) }) }
|
this.removeFromSet = function(setId, itemId, callback) {
|
this.removeFromSet = function(setId, itemIds, callback) {
|
this.removeFromSet = function(setId, itemId, callback) { if (!isArray(itemIds)) { itemIds = [itemIds] } var remaining = itemIds.length function onItemRemoved(err) { if (err) { throw err } if (--remaining == 0) { callback(null) } } for (var i=0, itemId; itemId = itemIds[i]; i++) { this._redisClient.sadd(setId, itemId, onItemRemoved) } }
|
this._redisClient.sadd(setId, itemId, onItemRemoved)
|
this._redisClient.srem(setId, itemId, onItemRemoved)
|
this.removeFromSet = function(setId, itemId, callback) { if (!isArray(itemIds)) { itemIds = [itemIds] } var remaining = itemIds.length function onItemRemoved(err) { if (err) { throw err } if (--remaining == 0) { callback(null) } } for (var i=0, itemId; itemId = itemIds[i]; i++) { this._redisClient.sadd(setId, itemId, onItemRemoved) } }
|
if (!this._panels || !(panel in this._panels)) { return; }
|
this.removePanel = function(panel) { var panelId = this._extractPanelFromOrder(panel); delete this._panels[panelId]; this._element.removeChild(panel.getElement()); if (panel == this._focusedPanel) { this.focusPanel(this._panels[this._panelOrder[0]]); } this._positionPanels(); }
|
|
if (panelIndex > this._panelsByIndex.length) { panelIndex -= 1; }
|
if (panelIndex >= this._panelsByIndex.length) { panelIndex -= 1; }
|
this.removePanel = function(panel) { var panelIndex = this._getPanelIndex(panel); this._panelsByIndex.splice(panelIndex, 1); delete this._panelsByItem[panel.getItem()]; dom.remove(panel.getElement()); if (panelIndex == this._focusIndex) { // panelIndex will now refer to panel on the right of removed panel if (panelIndex > this._panelsByIndex.length) { panelIndex -= 1; } this.focusPanel(this._panelsByIndex[panelIndex]); } this._positionPanels(); }
|
this.removePanel = function() { if (!this._labelViewPanel) { return; }
|
this.removePanel = function(panel) { if (!panel || panel != this._labelViewPanel) { return; }
|
this.removePanel = function() { if (!this._labelViewPanel) { return; } this.removeClassName('labelListOpen'); this._labelViewPanel.unsubscribe('ItemSelected', this._itemViewClickCallback); dom.remove(this._labelViewPanel.getElement()); this._labelViewPanel = null; browser.resizeManager.fireResize(); }
|
this.focus();
|
this.removePanel = function() { if (!this._labelViewPanel) { return; } this.removeClassName('labelListOpen'); this._labelViewPanel.unsubscribe('ItemSelected', this._itemViewClickCallback); dom.remove(this._labelViewPanel.getElement()); this._labelViewPanel = null; browser.resizeManager.fireResize(); }
|
|
c.css({position:"relative",top:0,left:0})}return b.css(a).show()},removeWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent().replaceWith(c);return c},setTransition:function(c,a,b,d){d=d||{};f.each(a,function(e,g){unit=c.cssUnit(g);if(unit[0]>0)d[g]=unit[0]*b+unit[1]});return d}});f.fn.extend({effect:function(c){var a=k.apply(this,arguments);a={options:a[1],duration:a[2],callback:a[3]};var b=f.effects[c];return b&&!f.fx.off?b.call(this,a):this},_show:f.fn.show,show:function(c){if(!c||
|
{position:c.css("position"),zIndex:c.css("z-index")});f.each(["top","left","bottom","right"],function(d,e){a[e]=c.css(e);if(isNaN(parseInt(a[e],10)))a[e]="auto"});c.css({position:"relative",top:0,left:0})}return b.css(a).show()},removeWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent().replaceWith(c);return c},setTransition:function(c,a,b,d){d=d||{};f.each(a,function(e,g){unit=c.cssUnit(g);if(unit[0]>0)d[g]=unit[0]*b+unit[1]});return d}});f.fn.extend({effect:function(c){var a=
|
c.css({position:"relative",top:0,left:0})}return b.css(a).show()},removeWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent().replaceWith(c);return c},setTransition:function(c,a,b,d){d=d||{};f.each(a,function(e,g){unit=c.cssUnit(g);if(unit[0]>0)d[g]=unit[0]*b+unit[1]});return d}});f.fn.extend({effect:function(c){var a=k.apply(this,arguments);a={options:a[1],duration:a[2],callback:a[3]};var b=f.effects[c];return b&&!f.fx.off?b.call(this,a):this},_show:f.fn.show,show:function(c){if(!c||
|
var parent_template = template_loader.load(context.extends);
|
var parent_template = exports.load(context.extends);
|
render: function (o) { var context = (o instanceof Context) ? o : new Context(o || {}); context.extends = ''; var rendered = this.node_list.evaluate(context); if (context.extends) { var parent_template = template_loader.load(context.extends); rendered = parent_template.render(context); } return rendered; }
|
if (error) { callback(error); }
|
if (error) { return callback(error); }
|
render: function (o, callback) { if (!callback) { throw 'template.render() must be called with a callback'; } var context = (o instanceof Context) ? o : new Context(o || {}); context.extends = ''; this.node_list.evaluate(context, function (error, rendered) { if (error) { callback(error); } if (context.extends) { var template_loader = require('./loader'); template_loader.load_and_render(context.extends, context, callback); } else { callback(false, rendered); } }); }
|
exports.load(context.extends, function (error, parent_template) { parent_template.render(context, callback); });
|
var template_loader = require('./loader'); template_loader.load_and_render(context.extends, context, callback);
|
render: function (o, callback) { if (!callback) { throw 'template.render() must be called with a callback'; } var context = (o instanceof Context) ? o : new Context(o || {}); context.extends = ''; this.node_list.evaluate(context, function (error, rendered) { if (error) { callback(error); } if (context.extends) { exports.load(context.extends, function (error, parent_template) { parent_template.render(context, callback); }); } else { callback(false, rendered); } }); }
|
var control = YAHOO.util.Dom.get(fullId); var formElement = ORBEON.util.Dom.getElementByTagName(control, ["input", "textarea"]); YAHOO.util.Assert.isFalse(formElement.disabled, "form element must not be disabled after recreation");
|
repeatRebuildWorker: function(controlId) { var fullId = controlId + XFORMS_SEPARATOR_1 + "1"; YAHOO.util.Assert.areEqual("true", ORBEON.xforms.Document.getValue(fullId)); ORBEON.util.Test.executeCausingAjaxRequest(this, function() { ORBEON.xforms.Document.setValue("repeat-shown", "false"); }, function() { ORBEON.util.Test.executeCausingAjaxRequest(this, function() { ORBEON.xforms.Document.setValue("repeat-shown", "true"); }, function() { YAHOO.util.Assert.areEqual("true", ORBEON.xforms.Document.getValue(fullId)); YAHOO.util.Assert.areEqual("Label", ORBEON.xforms.Controls.getLabelMessage(YAHOO.util.Dom.get(fullId))); }); }); },
|
|
""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}}else c.isFunction(a)?this.each(function(e){var j=c(this),i=j.html();j.empty().append(function(){return a.call(this,e,i)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&& this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),f=d.html();d.replaceWith(a.call(this,b,f))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(u){return c.nodeName(u,"table")?u.getElementsByTagName("tbody")[0]||
|
else if(typeof a==="string"&&!Ca.test(a)&&(c.support.leadingWhitespace||!$.test(a))&&!P[(Ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Aa,"<$1></$2>");try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(e){this.empty().append(a)}}else c.isFunction(a)?this.each(function(f){var h=c(this);h.html(a.call(this,f,h.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d= c(this),e=d.html();d.replaceWith(a.call(this,b,e))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){var e,f,h,l=a[0],k=[];if(!c.support.checkClone&&arguments.length===3&&typeof l==="string"&&Da.test(l))return this.each(function(){c(this).domManip(a,
|
""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}}else c.isFunction(a)?this.each(function(e){var j=c(this),i=j.html();j.empty().append(function(){return a.call(this,e,i)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),f=d.html();d.replaceWith(a.call(this,b,f))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(u){return c.nodeName(u,"table")?u.getElementsByTagName("tbody")[0]||
|
height:b.size.height,width:b.size.width})},stop:function(){var b=e(this).data("resizable");b.ghost&&b.helper&&b.helper.get(0).removeChild(b.ghost.get(0))}});e.ui.plugin.add("resizable","grid",{resize:function(){var b=e(this).data("resizable"),a=b.options,c=b.size,d=b.originalSize,f=b.originalPosition,g=b.axis;a.grid=typeof a.grid=="number"?[a.grid,a.grid]:a.grid;var h=Math.round((c.width-d.width)/(a.grid[0]||1))*(a.grid[0]||1);a=Math.round((c.height-d.height)/(a.grid[1]||1))*(a.grid[1]||1);if(/^(se|s|e)$/.test(g)){b.size.width= d.width+h;b.size.height=d.height+a}else if(/^(ne)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}else{if(/^(sw)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a}else{b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}b.position.left=f.left-h}}});var m=function(b){return parseInt(b,10)||0},l=function(b){return!isNaN(parseInt(b,10))}})(jQuery);
|
a.preventDefault()}if(g){c(a.target).attr("tabIndex",-1);c(g).attr("tabIndex",0);g.focus();return false}return true}},resize:function(){var a=this.options,b;if(a.fillSpace){if(c.browser.msie){var d=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}b=this.element.parent().height();c.browser.msie&&this.element.parent().css("overflow",d);this.headers.each(function(){b-=c(this).outerHeight(true)});this.headers.next().each(function(){c(this).height(Math.max(0,b-c(this).innerHeight()+ c(this).height()))}).css("overflow","auto")}else if(a.autoHeight){b=0;this.headers.next().each(function(){b=Math.max(b,c(this).height("").height())}).height(b)}return this},activate:function(a){this.options.active=a;a=this._findActive(a)[0];this._clickHandler({target:a},a);return this},_findActive:function(a){return a?typeof a==="number"?this.headers.filter(":eq("+a+")"):this.headers.not(this.headers.not(a)):a===false?c([]):this.headers.filter(":eq(0)")},_clickHandler:function(a,b){var d=this.options;
|
height:b.size.height,width:b.size.width})},stop:function(){var b=e(this).data("resizable");b.ghost&&b.helper&&b.helper.get(0).removeChild(b.ghost.get(0))}});e.ui.plugin.add("resizable","grid",{resize:function(){var b=e(this).data("resizable"),a=b.options,c=b.size,d=b.originalSize,f=b.originalPosition,g=b.axis;a.grid=typeof a.grid=="number"?[a.grid,a.grid]:a.grid;var h=Math.round((c.width-d.width)/(a.grid[0]||1))*(a.grid[0]||1);a=Math.round((c.height-d.height)/(a.grid[1]||1))*(a.grid[1]||1);if(/^(se|s|e)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a}else if(/^(ne)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}else{if(/^(sw)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a}else{b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}b.position.left=f.left-h}}});var m=function(b){return parseInt(b,10)||0},l=function(b){return!isNaN(parseInt(b,10))}})(jQuery);
|
resizeInfo.snap('topleft', false, self.keepProportional);
|
resizeInfo.snap(UI.rtl ? 'topright' : 'topleft', false, self.keepProportional);
|
resize: function(e,ui) { // TODO: maybe the stationaryCorner should be topright for rtl langs? resizeInfo.snap('topleft', false, self.keepProportional); },
|
datatable.reset();
|
if (datatable.isDisplayed()) datatable.reset();
|
resizeWhenStabilized: function () { var width = YAHOO.util.Dom.getViewportWidth(); if (YAHOO.xbl.fr.DatatableManager.previousBodyWidth != width) { // The window width is still changing, wait till it get stabilized YAHOO.xbl.fr.DatatableManager.previousBodyWidth = width; setTimeout("YAHOO.xbl.fr.DatatableManager.resizeWhenStabilized()", 200); return; } // The window size seems to be stable, resize the datatables YAHOO.xbl.fr.DatatableManager.waitingToResize = false; if (YAHOO.xbl.fr.DatatableManager.bodyWidthWhenResized == width) { // The datatables have already been resized for that window width, nothing to do... return; } // To restore the original look and feel, we need to undo the changes done to all the datatables first // and then to reinit them. YAHOO.xbl.fr.DatatableManager.bodyWidthWhenResized = width; // Reset for (var id in YAHOO.xbl.fr.Datatable._instances) { var datatable = YAHOO.xbl.fr.Datatable._instances[id]; datatable.reset(); } // And draw again for (var id in YAHOO.xbl.fr.Datatable._instances) { var datatable = YAHOO.xbl.fr.Datatable._instances[id]; datatable.isInitialized = false; datatable.draw(datatable.innerTableWidth); } } ,
|
datatable.isInitialized = false; datatable.draw(datatable.innerTableWidth);
|
if (datatable.isDisplayed()) { datatable.isInitialized = false; datatable.draw(datatable.innerTableWidth); }
|
resizeWhenStabilized: function () { var width = YAHOO.util.Dom.getViewportWidth(); if (YAHOO.xbl.fr.DatatableManager.previousBodyWidth != width) { // The window width is still changing, wait till it get stabilized YAHOO.xbl.fr.DatatableManager.previousBodyWidth = width; setTimeout("YAHOO.xbl.fr.DatatableManager.resizeWhenStabilized()", 200); return; } // The window size seems to be stable, resize the datatables YAHOO.xbl.fr.DatatableManager.waitingToResize = false; if (YAHOO.xbl.fr.DatatableManager.bodyWidthWhenResized == width) { // The datatables have already been resized for that window width, nothing to do... return; } // To restore the original look and feel, we need to undo the changes done to all the datatables first // and then to reinit them. YAHOO.xbl.fr.DatatableManager.bodyWidthWhenResized = width; // Reset for (var id in YAHOO.xbl.fr.Datatable._instances) { var datatable = YAHOO.xbl.fr.Datatable._instances[id]; datatable.reset(); } // And draw again for (var id in YAHOO.xbl.fr.Datatable._instances) { var datatable = YAHOO.xbl.fr.Datatable._instances[id]; datatable.isInitialized = false; datatable.draw(datatable.innerTableWidth); } } ,
|
datatable.draw(datatable.innerTableWidth);
|
datatable.draw();
|
resizeWhenStabilized: function () { var width = YAHOO.util.Dom.getViewportWidth(); if (YAHOO.xbl.fr.DatatableManager.previousBodyWidth != width) { // The window width is still changing, wait till it get stabilized YAHOO.xbl.fr.DatatableManager.previousBodyWidth = width; setTimeout("YAHOO.xbl.fr.DatatableManager.resizeWhenStabilized()", 200); return; } // The window size seems to be stable, resize the datatables YAHOO.xbl.fr.DatatableManager.waitingToResize = false; if (YAHOO.xbl.fr.DatatableManager.bodyWidthWhenResized == width) { // The datatables have already been resized for that window width, nothing to do... return; } // To restore the original look and feel, we need to undo the changes done to all the datatables first // and then to reinit them. YAHOO.xbl.fr.DatatableManager.bodyWidthWhenResized = width; // Reset for (var id in YAHOO.xbl.fr.Datatable._instances) { var datatable = YAHOO.xbl.fr.Datatable._instances[id]; if (datatable.isDisplayed()) datatable.reset(); } // And draw again for (var id in YAHOO.xbl.fr.Datatable._instances) { var datatable = YAHOO.xbl.fr.Datatable._instances[id]; if (datatable.isDisplayed()) { datatable.isInitialized = false; datatable.draw(datatable.innerTableWidth); } } },
|
return out.map( utils.html.escape );
|
return out.map( function (o) { return typeof o === 'string' ? utils.html.escape(o) : o; } );
|
resolve: function (context) { var value; if (this.hasOwnProperty('constant')) { value = this.constant; } else { value = context.get(this.variable); } var safety = { is_safe: false, must_escape: context.autoescaping, }; var out = this.filter_list.reduce( function (p,c) { var filter = template_defaults.filters[c.name]; if ( filter && typeof filter === 'function') { return filter(p, c.arg, safety); } else { // throw 'Cannot find filter'; sys.debug('Cannot find filter ' + c.name); return p; } }, value); if (safety.must_escape && !safety.is_safe) { if (typeof out === 'string') { return utils.html.escape(out) } else if (out instanceof Array) { return out.map( utils.html.escape ); } } return out; }
|
var filter = template_defaults.filters[c.name];
|
var filter = context.filters[c.name];
|
resolve: function (context) { var value; if (this.hasOwnProperty('constant')) { value = this.constant; } else { value = context.get(this.variable); } var safety = { is_safe: false, must_escape: context.autoescaping }; var out = this.filter_list.reduce( function (p,c) { var filter = template_defaults.filters[c.name]; var arg; if (c.arg) { arg = c.arg; } else if (c.var_arg) { arg = context.get(c.var_arg); } if ( filter && typeof filter === 'function') { return filter(p, arg, safety); } else { // throw 'Cannot find filter'; sys.debug('Cannot find filter ' + c.name); return p; } }, value); if (safety.must_escape && !safety.is_safe) { if (typeof out === 'string') { return utils.html.escape(out); } else if (out instanceof Array) { return out.map( function (o) { return typeof o === 'string' ? utils.html.escape(o) : o; } ); } } return out; }
|
return utils.html.escape(out);
|
return html.escape(out);
|
resolve: function (context) { var value; if (this.hasOwnProperty('constant')) { value = this.constant; } else { value = context.get(this.variable); } var safety = { is_safe: false, must_escape: context.autoescaping }; var out = this.filter_list.reduce( function (p,c) { var filter = template_defaults.filters[c.name]; var arg; if (c.arg) { arg = c.arg; } else if (c.var_arg) { arg = context.get(c.var_arg); } if ( filter && typeof filter === 'function') { return filter(p, arg, safety); } else { // throw 'Cannot find filter'; sys.debug('Cannot find filter ' + c.name); return p; } }, value); if (safety.must_escape && !safety.is_safe) { if (typeof out === 'string') { return utils.html.escape(out); } else if (out instanceof Array) { return out.map( function (o) { return typeof o === 'string' ? utils.html.escape(o) : o; } ); } } return out; }
|
return out.map( function (o) { return typeof o === 'string' ? utils.html.escape(o) : o; } );
|
return out.map( function (o) { return typeof o === 'string' ? html.escape(o) : o; } );
|
resolve: function (context) { var value; if (this.hasOwnProperty('constant')) { value = this.constant; } else { value = context.get(this.variable); } var safety = { is_safe: false, must_escape: context.autoescaping }; var out = this.filter_list.reduce( function (p,c) { var filter = template_defaults.filters[c.name]; var arg; if (c.arg) { arg = c.arg; } else if (c.var_arg) { arg = context.get(c.var_arg); } if ( filter && typeof filter === 'function') { return filter(p, arg, safety); } else { // throw 'Cannot find filter'; sys.debug('Cannot find filter ' + c.name); return p; } }, value); if (safety.must_escape && !safety.is_safe) { if (typeof out === 'string') { return utils.html.escape(out); } else if (out instanceof Array) { return out.map( function (o) { return typeof o === 'string' ? utils.html.escape(o) : o; } ); } } return out; }
|
res.sendBody(body, 'utf8'); res.finish();
|
res.write(body, 'utf8'); res.close();
|
function respond(res, body, content_type, status) { content_type = content_type || 'text/html'; res.sendHeader(status || 200, { 'Content-Type': content_type + '; charset=utf-8' }); res.sendBody(body, 'utf8'); res.finish();}
|
break}}}).bind("focus.autocomplete",function(){if(!a.options.disabled){a.selectedItem=null;a.previous=a.element.val()}}).bind("blur.autocomplete",function(c){if(!a.options.disabled){clearTimeout(a.searching);a.closing=setTimeout(function(){a.close(c);a._change(c)},150)}});this._initSource();this.response=function(){return a._response.apply(a,arguments)};this.menu=e("<ul></ul>").addClass("ui-autocomplete").appendTo(e(this.options.appendTo||"body",b)[0]).mousedown(function(c){var d=a.menu.element[0];
|
break}}}).bind("keypress.autocomplete",function(c){if(f){f=false;c.preventDefault()}}).bind("focus.autocomplete",function(){if(!a.options.disabled){a.selectedItem=null;a.previous=a.element.val()}}).bind("blur.autocomplete",function(c){if(!a.options.disabled){clearTimeout(a.searching);a.closing=setTimeout(function(){a.close(c);a._change(c)},150)}});this._initSource();this.response=function(){return a._response.apply(a,arguments)};this.menu=e("<ul></ul>").addClass("ui-autocomplete").appendTo(e(this.options.appendTo||
|
break}}}).bind("focus.autocomplete",function(){if(!a.options.disabled){a.selectedItem=null;a.previous=a.element.val()}}).bind("blur.autocomplete",function(c){if(!a.options.disabled){clearTimeout(a.searching);a.closing=setTimeout(function(){a.close(c);a._change(c)},150)}});this._initSource();this.response=function(){return a._response.apply(a,arguments)};this.menu=e("<ul></ul>").addClass("ui-autocomplete").appendTo(e(this.options.appendTo||"body",b)[0]).mousedown(function(c){var d=a.menu.element[0];
|
null&&c.data("ec.storage."+a[b],c[0].style[a[b]])},restore:function(c,a){for(var b=0;b<a.length;b++)a[b]!==null&&c.css(a[b],c.data("ec.storage."+a[b]))},setMode:function(c,a){if(a=="toggle")a=c.is(":hidden")?"show":"hide";return a},getBaseline:function(c,a){var b;switch(c[0]){case "top":b=0;break;case "middle":b=0.5;break;case "bottom":b=1;break;default:b=c[0]/a.height}switch(c[1]){case "left":c=0;break;case "center":c=0.5;break;case "right":c=1;break;default:c=c[1]/a.width}return{x:c,y:b}},createWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent();
|
[{add:a,remove:c},b,d,e])}});f.extend(f.effects,{version:"1.8.6",save:function(c,a){for(var b=0;b<a.length;b++)a[b]!==null&&c.data("ec.storage."+a[b],c[0].style[a[b]])},restore:function(c,a){for(var b=0;b<a.length;b++)a[b]!==null&&c.css(a[b],c.data("ec.storage."+a[b]))},setMode:function(c,a){if(a=="toggle")a=c.is(":hidden")?"show":"hide";return a},getBaseline:function(c,a){var b;switch(c[0]){case "top":b=0;break;case "middle":b=0.5;break;case "bottom":b=1;break;default:b=c[0]/a.height}switch(c[1]){case "left":c=
|
null&&c.data("ec.storage."+a[b],c[0].style[a[b]])},restore:function(c,a){for(var b=0;b<a.length;b++)a[b]!==null&&c.css(a[b],c.data("ec.storage."+a[b]))},setMode:function(c,a){if(a=="toggle")a=c.is(":hidden")?"show":"hide";return a},getBaseline:function(c,a){var b;switch(c[0]){case "top":b=0;break;case "middle":b=0.5;break;case "bottom":b=1;break;default:b=c[0]/a.height}switch(c[1]){case "left":c=0;break;case "center":c=0.5;break;case "right":c=1;break;default:c=c[1]/a.width}return{x:c,y:b}},createWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent();
|
return utils.string.sprintf('%' + arg + 's', value).substr(0, arg);
|
return string_utils.sprintf('%' + arg + 's', value).substr(0, arg);
|
rjust: function (value, arg) { try { return utils.string.sprintf('%' + arg + 's', value).substr(0, arg); } catch (e) { return ''; } },
|
e){this.anchors.eq(a).removeData("cache.tabs").data("load.tabs",e);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.4"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(a,e){var b=this,c=this.options,h=b._rotate||(b._rotate=function(i){clearTimeout(b.rotation);b.rotation=setTimeout(function(){var k=c.selected;b.select(++k<b.anchors.length?k:0)},a);i&&i.stopPropagation()});e=b._unrotate||(b._unrotate=!e?function(i){i.clientX&&b.rotate(null)}: function(){t=c.selected;h()});if(a){this.element.bind("tabsshow",h);this.anchors.bind(c.event+".tabs",e);h()}else{clearTimeout(b.rotation);this.element.unbind("tabsshow",h);this.anchors.unbind(c.event+".tabs",e);delete this._rotate;delete this._unrotate}return this}})})(jQuery);
|
e){this.anchors.eq(b).removeData("cache.tabs").data("load.tabs",e);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.6"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(b,e){var a=this,c=this.options,h=a._rotate||(a._rotate=function(j){clearTimeout(a.rotation);a.rotation=setTimeout(function(){var k=c.selected;a.select(++k<a.anchors.length?k:0)},b);j&&j.stopPropagation()});e=a._unrotate||(a._unrotate=!e?function(j){j.clientX&&a.rotate(null)}: function(){t=c.selected;h()});if(b){this.element.bind("tabsshow",h);this.anchors.bind(c.event+".tabs",e);h()}else{clearTimeout(a.rotation);this.element.unbind("tabsshow",h);this.anchors.unbind(c.event+".tabs",e);delete this._rotate;delete this._unrotate}return this}})})(jQuery);
|
e){this.anchors.eq(a).removeData("cache.tabs").data("load.tabs",e);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.4"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(a,e){var b=this,c=this.options,h=b._rotate||(b._rotate=function(i){clearTimeout(b.rotation);b.rotation=setTimeout(function(){var k=c.selected;b.select(++k<b.anchors.length?k:0)},a);i&&i.stopPropagation()});e=b._unrotate||(b._unrotate=!e?function(i){i.clientX&&b.rotate(null)}:function(){t=c.selected;h()});if(a){this.element.bind("tabsshow",h);this.anchors.bind(c.event+".tabs",e);h()}else{clearTimeout(b.rotation);this.element.unbind("tabsshow",h);this.anchors.unbind(c.event+".tabs",e);delete this._rotate;delete this._unrotate}return this}})})(jQuery);
|
if (window.event) k=window.event.keyCode; else if (event) k=event.which;
|
if (event) k=event.keyCode; else if (event) var k=event.which;
|
function rTN(event){if (window.event) k=window.event.keyCode;else if (event) k=event.which;else return true;kC=String.fromCharCode(k);if ((k==null) || (k==0) || (k==8) || (k==9) || (k==13) || (k==27)) return true;else if ((("0123456789,.-").indexOf(kC)>-1)) return true;else return false;}
|
kC=String.fromCharCode(k);
|
var kC=String.fromCharCode(k);
|
function rTN(event){if (window.event) k=window.event.keyCode;else if (event) k=event.which;else return true;kC=String.fromCharCode(k);if ((k==null) || (k==0) || (k==8) || (k==9) || (k==13) || (k==27)) return true;else if ((("0123456789,.-").indexOf(kC)>-1)) return true;else return false;}
|
var count = 0, failed = 0, errors = 0;
|
var count = 0, error_cnt = 0, failed_cnt = 0; var testcase_idx = testcases.length - 1;
|
run: function (stop_on_error) { var count = 0, failed = 0, errors = 0; testcases.reverse(); try { testcases.forEach( function (testcase) { sys.puts('\n[Testcase: ' + testcase.name + ']'); testcase.tests.forEach( function (test) { count++; var context = testcase.setup ? testcase.setup() : {}; try { test.body(context); sys.puts(' [OK] ' + test.name + ': passed'); } catch (e) { if (e instanceof AssertFailedException) { sys.puts(' [--] ' + test.name + ': failed. ' + e.message); failed++; } else { sys.print(' [!!] ' + test.name + ': error. '); if (e.stack && e.type) { sys.puts(e.type + '\n' + e.stack); } else { sys.puts(JSON.stringify(e, 0, 2)); } errors++; } if (stop_on_error) { throw 'stopping on first error'; } } if (testcase.teardown) { testcase.teardown(context); } }); sys.puts('----'); }); } catch (e) { if (e === 'stopping on first error') { sys.puts(e); } else { throw e; } } sys.puts('\nTotal: ' + count + ', Failures: ' + failed + ', Errors: ' + errors + ''); },
|
testcases.reverse();
|
(function run_testcases() {
|
run: function (stop_on_error) { var count = 0, failed = 0, errors = 0; testcases.reverse(); try { testcases.forEach( function (testcase) { sys.puts('\n[Testcase: ' + testcase.name + ']'); testcase.tests.forEach( function (test) { count++; var context = testcase.setup ? testcase.setup() : {}; try { test.body(context); sys.puts(' [OK] ' + test.name + ': passed'); } catch (e) { if (e instanceof AssertFailedException) { sys.puts(' [--] ' + test.name + ': failed. ' + e.message); failed++; } else { sys.print(' [!!] ' + test.name + ': error. '); if (e.stack && e.type) { sys.puts(e.type + '\n' + e.stack); } else { sys.puts(JSON.stringify(e, 0, 2)); } errors++; } if (stop_on_error) { throw 'stopping on first error'; } } if (testcase.teardown) { testcase.teardown(context); } }); sys.puts('----'); }); } catch (e) { if (e === 'stopping on first error') { sys.puts(e); } else { throw e; } } sys.puts('\nTotal: ' + count + ', Failures: ' + failed + ', Errors: ' + errors + ''); },
|
try {
|
var idx = 0; var testcase = testcases[testcase_idx--];
|
run: function (stop_on_error) { var count = 0, failed = 0, errors = 0; testcases.reverse(); try { testcases.forEach( function (testcase) { sys.puts('\n[Testcase: ' + testcase.name + ']'); testcase.tests.forEach( function (test) { count++; var context = testcase.setup ? testcase.setup() : {}; try { test.body(context); sys.puts(' [OK] ' + test.name + ': passed'); } catch (e) { if (e instanceof AssertFailedException) { sys.puts(' [--] ' + test.name + ': failed. ' + e.message); failed++; } else { sys.print(' [!!] ' + test.name + ': error. '); if (e.stack && e.type) { sys.puts(e.type + '\n' + e.stack); } else { sys.puts(JSON.stringify(e, 0, 2)); } errors++; } if (stop_on_error) { throw 'stopping on first error'; } } if (testcase.teardown) { testcase.teardown(context); } }); sys.puts('----'); }); } catch (e) { if (e === 'stopping on first error') { sys.puts(e); } else { throw e; } } sys.puts('\nTotal: ' + count + ', Failures: ' + failed + ', Errors: ' + errors + ''); },
|
testcases.forEach( function (testcase) {
|
if (testcase) {
|
run: function (stop_on_error) { var count = 0, failed = 0, errors = 0; testcases.reverse(); try { testcases.forEach( function (testcase) { sys.puts('\n[Testcase: ' + testcase.name + ']'); testcase.tests.forEach( function (test) { count++; var context = testcase.setup ? testcase.setup() : {}; try { test.body(context); sys.puts(' [OK] ' + test.name + ': passed'); } catch (e) { if (e instanceof AssertFailedException) { sys.puts(' [--] ' + test.name + ': failed. ' + e.message); failed++; } else { sys.print(' [!!] ' + test.name + ': error. '); if (e.stack && e.type) { sys.puts(e.type + '\n' + e.stack); } else { sys.puts(JSON.stringify(e, 0, 2)); } errors++; } if (stop_on_error) { throw 'stopping on first error'; } } if (testcase.teardown) { testcase.teardown(context); } }); sys.puts('----'); }); } catch (e) { if (e === 'stopping on first error') { sys.puts(e); } else { throw e; } } sys.puts('\nTotal: ' + count + ', Failures: ' + failed + ', Errors: ' + errors + ''); },
|
testcase.tests.forEach( function (test) {
|
(function run_tests() {
|
run: function (stop_on_error) { var count = 0, failed = 0, errors = 0; testcases.reverse(); try { testcases.forEach( function (testcase) { sys.puts('\n[Testcase: ' + testcase.name + ']'); testcase.tests.forEach( function (test) { count++; var context = testcase.setup ? testcase.setup() : {}; try { test.body(context); sys.puts(' [OK] ' + test.name + ': passed'); } catch (e) { if (e instanceof AssertFailedException) { sys.puts(' [--] ' + test.name + ': failed. ' + e.message); failed++; } else { sys.print(' [!!] ' + test.name + ': error. '); if (e.stack && e.type) { sys.puts(e.type + '\n' + e.stack); } else { sys.puts(JSON.stringify(e, 0, 2)); } errors++; } if (stop_on_error) { throw 'stopping on first error'; } } if (testcase.teardown) { testcase.teardown(context); } }); sys.puts('----'); }); } catch (e) { if (e === 'stopping on first error') { sys.puts(e); } else { throw e; } } sys.puts('\nTotal: ' + count + ', Failures: ' + failed + ', Errors: ' + errors + ''); },
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.