rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 15
136k
|
|---|---|---|
setRgOpacitySlider(evt, $(this)); bSlidingOpacity = false;
|
setRadiusSlider(evt, $(this)); bSlidingRadius = false;
|
}).mouseup(function(evt) { setRgOpacitySlider(evt, $(this)); bSlidingOpacity = false; evt.preventDefault(); });
|
(function(d){d.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"},_create:function(){var a=this.options,b=a.accept;this.isover=0;this.isout=1;this.accept=d.isFunction(b)?b:function(c){return c.is(b)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};d.ui.ddmanager.droppables[a.scope]=d.ui.ddmanager.droppables[a.scope]||[];d.ui.ddmanager.droppables[a.scope].push(this); a.addClasses&&this.element.addClass("ui-droppable")},destroy:function(){for(var a=d.ui.ddmanager.droppables[this.options.scope],b=0;b<a.length;b++)a[b]==this&&a.splice(b,1);this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable");return this},_setOption:function(a,b){if(a=="accept")this.accept=d.isFunction(b)?b:function(c){return c.is(b)};d.Widget.prototype._setOption.apply(this,arguments)},_activate:function(a){var b=d.ui.ddmanager.current;this.options.activeClass&& this.element.addClass(this.options.activeClass);b&&this._trigger("activate",a,this.ui(b))},_deactivate:function(a){var b=d.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass);b&&this._trigger("deactivate",a,this.ui(b))},_over:function(a){var b=d.ui.ddmanager.current;if(!(!b||(b.currentItem||b.element)[0]==this.element[0]))if(this.accept.call(this.element[0],b.currentItem||b.element)){this.options.hoverClass&&this.element.addClass(this.options.hoverClass); this._trigger("over",a,this.ui(b))}},_out:function(a){var b=d.ui.ddmanager.current;if(!(!b||(b.currentItem||b.element)[0]==this.element[0]))if(this.accept.call(this.element[0],b.currentItem||b.element)){this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("out",a,this.ui(b))}},_drop:function(a,b){var c=b||d.ui.ddmanager.current;if(!c||(c.currentItem||c.element)[0]==this.element[0])return false;var e=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var g= d.data(this,"droppable");if(g.options.greedy&&!g.options.disabled&&g.options.scope==c.options.scope&&g.accept.call(g.element[0],c.currentItem||c.element)&&d.ui.intersect(c,d.extend(g,{offset:g.element.offset()}),g.options.tolerance)){e=true;return false}});if(e)return false;if(this.accept.call(this.element[0],c.currentItem||c.element)){this.options.activeClass&&this.element.removeClass(this.options.activeClass);this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("drop", a,this.ui(c));return this.element}return false},ui:function(a){return{draggable:a.currentItem||a.element,helper:a.helper,position:a.position,offset:a.positionAbs}}});d.extend(d.ui.droppable,{version:"1.8.4"});d.ui.intersect=function(a,b,c){if(!b.offset)return false;var e=(a.positionAbs||a.position.absolute).left,g=e+a.helperProportions.width,f=(a.positionAbs||a.position.absolute).top,h=f+a.helperProportions.height,i=b.offset.left,k=i+b.proportions.width,j=b.offset.top,l=j+b.proportions.height; switch(c){case "fit":return i<=e&&g<=k&&j<=f&&h<=l;case "intersect":return i<e+a.helperProportions.width/2&&g-a.helperProportions.width/2<k&&j<f+a.helperProportions.height/2&&h-a.helperProportions.height/2<l;case "pointer":return d.ui.isOver((a.positionAbs||a.position.absolute).top+(a.clickOffset||a.offset.click).top,(a.positionAbs||a.position.absolute).left+(a.clickOffset||a.offset.click).left,j,i,b.proportions.height,b.proportions.width);case "touch":return(f>=j&&f<=l||h>=j&&h<=l||f<j&&h>l)&&(e>= i&&e<=k||g>=i&&g<=k||e<i&&g>k);default:return false}};d.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(a,b){var c=d.ui.ddmanager.droppables[a.options.scope]||[],e=b?b.type:null,g=(a.currentItem||a.element).find(":data(droppable)").andSelf(),f=0;a:for(;f<c.length;f++)if(!(c[f].options.disabled||a&&!c[f].accept.call(c[f].element[0],a.currentItem||a.element))){for(var h=0;h<g.length;h++)if(g[h]==c[f].element[0]){c[f].proportions.height=0;continue a}c[f].visible=c[f].element.css("display")!= "none";if(c[f].visible){c[f].offset=c[f].element.offset();c[f].proportions={width:c[f].element[0].offsetWidth,height:c[f].element[0].offsetHeight};e=="mousedown"&&c[f]._activate.call(c[f],b)}}},drop:function(a,b){var c=false;d.each(d.ui.ddmanager.droppables[a.options.scope]||[],function(){if(this.options){if(!this.options.disabled&&this.visible&&d.ui.intersect(a,this,this.options.tolerance))c=c||this._drop.call(this,b);if(!this.options.disabled&&this.visible&&this.accept.call(this.element[0],a.currentItem|| a.element)){this.isout=1;this.isover=0;this._deactivate.call(this,b)}}});return c},drag:function(a,b){a.options.refreshPositions&&d.ui.ddmanager.prepareOffsets(a,b);d.each(d.ui.ddmanager.droppables[a.options.scope]||[],function(){if(!(this.options.disabled||this.greedyChild||!this.visible)){var c=d.ui.intersect(a,this,this.options.tolerance);if(c=!c&&this.isover==1?"isout":c&&this.isover==0?"isover":null){var e;if(this.options.greedy){var g=this.element.parents(":data(droppable):eq(0)");if(g.length){e= d.data(g[0],"droppable");e.greedyChild=c=="isover"?1:0}}if(e&&c=="isover"){e.isover=0;e.isout=1;e._out.call(e,b)}this[c]=1;this[c=="isout"?"isover":"isout"]=0;this[c=="isover"?"_over":"_out"].call(this,b);if(e&&c=="isout"){e.isout=0;e.isover=1;e._over.call(e,b)}}}})}}})(jQuery);
|
if(g&&!g.options.disabled){c.sortables.push({instance:g,shouldRevert:g.options.revert});g._refreshItems();g._trigger("activate",a,e)}})},stop:function(a,b){var c=d(this).data("draggable"),f=d.extend({},b,{item:c.element});d.each(c.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;c.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert)this.instance.options.revert=true;this.instance._mouseStop(a);this.instance.options.helper=this.instance.options._helper; c.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",a,f)}})},drag:function(a,b){var c=d(this).data("draggable"),f=this;d.each(c.sortables,function(){this.instance.positionAbs=c.positionAbs;this.instance.helperProportions=c.helperProportions;this.instance.offset.click=c.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=
|
(function(d){d.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"},_create:function(){var a=this.options,b=a.accept;this.isover=0;this.isout=1;this.accept=d.isFunction(b)?b:function(c){return c.is(b)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};d.ui.ddmanager.droppables[a.scope]=d.ui.ddmanager.droppables[a.scope]||[];d.ui.ddmanager.droppables[a.scope].push(this);a.addClasses&&this.element.addClass("ui-droppable")},destroy:function(){for(var a=d.ui.ddmanager.droppables[this.options.scope],b=0;b<a.length;b++)a[b]==this&&a.splice(b,1);this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable");return this},_setOption:function(a,b){if(a=="accept")this.accept=d.isFunction(b)?b:function(c){return c.is(b)};d.Widget.prototype._setOption.apply(this,arguments)},_activate:function(a){var b=d.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass);b&&this._trigger("activate",a,this.ui(b))},_deactivate:function(a){var b=d.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass);b&&this._trigger("deactivate",a,this.ui(b))},_over:function(a){var b=d.ui.ddmanager.current;if(!(!b||(b.currentItem||b.element)[0]==this.element[0]))if(this.accept.call(this.element[0],b.currentItem||b.element)){this.options.hoverClass&&this.element.addClass(this.options.hoverClass);this._trigger("over",a,this.ui(b))}},_out:function(a){var b=d.ui.ddmanager.current;if(!(!b||(b.currentItem||b.element)[0]==this.element[0]))if(this.accept.call(this.element[0],b.currentItem||b.element)){this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("out",a,this.ui(b))}},_drop:function(a,b){var c=b||d.ui.ddmanager.current;if(!c||(c.currentItem||c.element)[0]==this.element[0])return false;var e=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var g=d.data(this,"droppable");if(g.options.greedy&&!g.options.disabled&&g.options.scope==c.options.scope&&g.accept.call(g.element[0],c.currentItem||c.element)&&d.ui.intersect(c,d.extend(g,{offset:g.element.offset()}),g.options.tolerance)){e=true;return false}});if(e)return false;if(this.accept.call(this.element[0],c.currentItem||c.element)){this.options.activeClass&&this.element.removeClass(this.options.activeClass);this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("drop",a,this.ui(c));return this.element}return false},ui:function(a){return{draggable:a.currentItem||a.element,helper:a.helper,position:a.position,offset:a.positionAbs}}});d.extend(d.ui.droppable,{version:"1.8.4"});d.ui.intersect=function(a,b,c){if(!b.offset)return false;var e=(a.positionAbs||a.position.absolute).left,g=e+a.helperProportions.width,f=(a.positionAbs||a.position.absolute).top,h=f+a.helperProportions.height,i=b.offset.left,k=i+b.proportions.width,j=b.offset.top,l=j+b.proportions.height;switch(c){case "fit":return i<=e&&g<=k&&j<=f&&h<=l;case "intersect":return i<e+a.helperProportions.width/2&&g-a.helperProportions.width/2<k&&j<f+a.helperProportions.height/2&&h-a.helperProportions.height/2<l;case "pointer":return d.ui.isOver((a.positionAbs||a.position.absolute).top+(a.clickOffset||a.offset.click).top,(a.positionAbs||a.position.absolute).left+(a.clickOffset||a.offset.click).left,j,i,b.proportions.height,b.proportions.width);case "touch":return(f>=j&&f<=l||h>=j&&h<=l||f<j&&h>l)&&(e>=i&&e<=k||g>=i&&g<=k||e<i&&g>k);default:return false}};d.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(a,b){var c=d.ui.ddmanager.droppables[a.options.scope]||[],e=b?b.type:null,g=(a.currentItem||a.element).find(":data(droppable)").andSelf(),f=0;a:for(;f<c.length;f++)if(!(c[f].options.disabled||a&&!c[f].accept.call(c[f].element[0],a.currentItem||a.element))){for(var h=0;h<g.length;h++)if(g[h]==c[f].element[0]){c[f].proportions.height=0;continue a}c[f].visible=c[f].element.css("display")!="none";if(c[f].visible){c[f].offset=c[f].element.offset();c[f].proportions={width:c[f].element[0].offsetWidth,height:c[f].element[0].offsetHeight};e=="mousedown"&&c[f]._activate.call(c[f],b)}}},drop:function(a,b){var c=false;d.each(d.ui.ddmanager.droppables[a.options.scope]||[],function(){if(this.options){if(!this.options.disabled&&this.visible&&d.ui.intersect(a,this,this.options.tolerance))c=c||this._drop.call(this,b);if(!this.options.disabled&&this.visible&&this.accept.call(this.element[0],a.currentItem||a.element)){this.isout=1;this.isover=0;this._deactivate.call(this,b)}}});return c},drag:function(a,b){a.options.refreshPositions&&d.ui.ddmanager.prepareOffsets(a,b);d.each(d.ui.ddmanager.droppables[a.options.scope]||[],function(){if(!(this.options.disabled||this.greedyChild||!this.visible)){var c=d.ui.intersect(a,this,this.options.tolerance);if(c=!c&&this.isover==1?"isout":c&&this.isover==0?"isover":null){var e;if(this.options.greedy){var g=this.element.parents(":data(droppable):eq(0)");if(g.length){e=d.data(g[0],"droppable");e.greedyChild=c=="isover"?1:0}}if(e&&c=="isover"){e.isover=0;e.isout=1;e._out.call(e,b)}this[c]=1;this[c=="isout"?"isover":"isout"]=0;this[c=="isover"?"_over":"_out"].call(this,b);if(e&&c=="isout"){e.isout=0;e.isover=1;e._over.call(e,b)}}}})}}})(jQuery);
|
yuiRTE.on("editorContentLoaded", function() { if (!ORBEON.util.Utils.isNewXHTMLLayout()) { var rteContainer = control.parentNode; rteContainer.className += " " + control.className; } var controlCurrentValue = ORBEON.xforms.Controls.getCurrentValue(control); ORBEON.xforms.ServerValueStore.set(control.id, controlCurrentValue); if (YAHOO.lang.isObject(renderedCustomEvents[control.id])) renderedCustomEvents[control.id].fire(); renderedCustomEvents[control.id] = true; });
|
(function () { var methodsFrom = ORBEON.xforms.Globals.isRenderingEngineTrident ? ORBEON.util.IEDom : ORBEON.util.MozDom; for (var method in methodsFrom) ORBEON.util.Dom[method] = methodsFrom[method]; }());
|
yuiRTE.on("editorContentLoaded", function() { if (!ORBEON.util.Utils.isNewXHTMLLayout()) { var rteContainer = control.parentNode; rteContainer.className += " " + control.className; } // Store initial server value // If we don't and user's JS code calls ORBEON.xforms.Document.setValue(), the value of the RTE is changed, our RFE changeEvent() is called, // it sets the focus on the RTE, which calls focus(), which stores the current value (newly set) as the server value if no server value is defined. // Then in executeNextRequest() we ignore the value change because it is the same the server value. var controlCurrentValue = ORBEON.xforms.Controls.getCurrentValue(control); ORBEON.xforms.ServerValueStore.set(control.id, controlCurrentValue); // Fire event we have a custom event listener from this RTE if (YAHOO.lang.isObject(renderedCustomEvents[control.id])) renderedCustomEvents[control.id].fire(); // Set to true, so future listeners are called back right away renderedCustomEvents[control.id] = true; });
|
window.setTimeout(function() { ORBEON.xforms.Events.orbeonLoadedEvent.fire(); }, ORBEON.util.Properties.internalShortDelay.get());
|
yuiRTE.on("editorContentLoaded", function() { if (!ORBEON.util.Utils.isNewXHTMLLayout()) { var rteContainer = control.parentNode; rteContainer.className += " " + control.className; } var controlCurrentValue = ORBEON.xforms.Controls.getCurrentValue(control); ORBEON.xforms.ServerValueStore.set(control.id, controlCurrentValue); if (YAHOO.lang.isObject(renderedCustomEvents[control.id])) renderedCustomEvents[control.id].fire(); renderedCustomEvents[control.id] = true; });
|
window.setTimeout(function() { ORBEON.xforms.Events.orbeonLoadedEvent.fire(); }, ORBEON.util.Properties.internalShortDelay.get());
|
YAHOO.util.Dom.getElementsByClassName("xforms-control", null, lastElementToDelete, function(control) { ORBEON.xforms.Globals.serverValue[control.id] = null; });
|
var timerId = window.setTimeout(function () { var event = new ORBEON.xforms.Server.Event(ORBEON.util.Dom.getElementById(formID), null, null, serverEvents, "server-events", null, null, null, showProgress, progressMessage); ORBEON.xforms.Server.fireEvents([event]); }, delay);
|
YAHOO.util.Dom.getElementsByClassName("xforms-control", null, lastElementToDelete, function(control) { ORBEON.xforms.Globals.serverValue[control.id] = null; });
|
toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Ga={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,f,e,j){var i,o=0,k,n,r=j||this.selector, u=j?this:c(this.context);if(c.isFunction(f)){e=f;f=w}for(d=(d||"").split(" ");(i=d[o++])!=null;){j=O.exec(i);k="";if(j){k=j[0];i=i.replace(O,"")}if(i==="hover")d.push("mouseenter"+k,"mouseleave"+k);else{n=i;if(i==="focus"||i==="blur"){d.push(Ga[i]+k);i+=k}else i=(Ga[i]||i)+k;b==="live"?u.each(function(){c.event.add(this,pa(i,r),{data:f,selector:r,handler:e,origType:i,origHandler:e,preType:n})}):u.unbind(pa(i,r),e)}}return this}});c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),
|
"form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length){a.liveFired=B;return la("submit",this,arguments)}});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13){a.liveFired=B;return la("submit",this,arguments)}})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};if(!c.support.changeBubbles){var V,
|
toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Ga={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,f,e,j){var i,o=0,k,n,r=j||this.selector,u=j?this:c(this.context);if(c.isFunction(f)){e=f;f=w}for(d=(d||"").split(" ");(i=d[o++])!=null;){j=O.exec(i);k="";if(j){k=j[0];i=i.replace(O,"")}if(i==="hover")d.push("mouseenter"+k,"mouseleave"+k);else{n=i;if(i==="focus"||i==="blur"){d.push(Ga[i]+k);i+=k}else i=(Ga[i]||i)+k;b==="live"?u.each(function(){c.event.add(this,pa(i,r),{data:f,selector:r,handler:e,origType:i,origHandler:e,preType:n})}):u.unbind(pa(i,r),e)}}return this}});c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),
|
$('#seg_type').change(function() { svgCanvas.setSegType($(this).val()); });
|
callback:C.cbHandler(function(result){ if (result.success){ var grid = Ext.getCmp("manage_user_group_members_grid") grid.getStore().reload(); C.infoMsg("User Added.") } })
|
$('#seg_type').change(function() { svgCanvas.setSegType($(this).val()); });
|
var table = YAHOO.util.Dom.get('my-accordion$table-widths-resizeable$table-widths-resizeable-table'); var th1 = table.tHead.rows[0].cells[0]; var th2 = table.tHead.rows[0].cells[1]; var width1 = th1.clientWidth; var width2 = th2.clientWidth; thiss.resizeColumn(th2, 100, 10); thiss.checkTableAndContainerWidths(table); YAHOO.util.Assert.areEqual(width1, th1.clientWidth, "The width of the first column shouldn't change (before: " + width1 + ", after: " + width2 + ")."); YAHOO.util.Assert.areEqual(width2 + 100, th2.clientWidth, "The width of the second column should be " + (width2 + 100) + ", not " + th2.clientWidth); thiss.checkRowWidth(table.tHead.rows[0]); thiss.closeAccordionCase(thiss, 'widths-resizeable'); });
|
var table = YAHOO.util.Dom.get('my-accordion$table-widths-resizeable$table-widths-resizeable-table'); thiss.checkRowWidth(table.tHead.rows[0]); thiss.checkTableAndContainerWidths(table); thiss.closeAccordionCase(thiss, 'widths-resizeable'); });
|
thiss.openAccordionCase(thiss, 'widths-resizeable', function() { var table = YAHOO.util.Dom.get('my-accordion$table-widths-resizeable$table-widths-resizeable-table'); var th1 = table.tHead.rows[0].cells[0]; var th2 = table.tHead.rows[0].cells[1]; var width1 = th1.clientWidth; var width2 = th2.clientWidth; thiss.resizeColumn(th2, 100, 10); thiss.checkTableAndContainerWidths(table); YAHOO.util.Assert.areEqual(width1, th1.clientWidth, "The width of the first column shouldn't change (before: " + width1 + ", after: " + width2 + ")."); YAHOO.util.Assert.areEqual(width2 + 100, th2.clientWidth, "The width of the second column should be " + (width2 + 100) + ", not " + th2.clientWidth); thiss.checkRowWidth(table.tHead.rows[0]); thiss.closeAccordionCase(thiss, 'widths-resizeable'); });
|
$('#' + id + '_jGraduate_Radius').mousedown(function(evt) { setRadiusSlider(evt, $(this)); bSlidingRadius = true;
|
$('.stop, #color_picker_rg_jGraduate_GradContainer image').mousedown(function(evt) { draggingStop = this; startx = evt.clientX; starty = evt.clientY;
|
$('#' + id + '_jGraduate_Radius').mousedown(function(evt) { setRadiusSlider(evt, $(this)); bSlidingRadius = true; evt.preventDefault(); }).mousemove(function(evt) {
|
(function () { var methodsFrom = ORBEON.xforms.Globals.isRenderingEngineTrident ? ORBEON.util.IEDom : ORBEON.util.MozDom; for (var method in methodsFrom) ORBEON.util.Dom[method] = methodsFrom[method]; }());
|
window.setInterval(function() { ORBEON.xforms.Events.sendHeartBeatIfNeeded(heartBeatDelay); }, heartBeatDelay / 10);
|
(function () { var methodsFrom = ORBEON.xforms.Globals.isRenderingEngineTrident ? ORBEON.util.IEDom : ORBEON.util.MozDom; for (var method in methodsFrom) ORBEON.util.Dom[method] = methodsFrom[method]; }());
|
$('#' + id + '_jGraduate_Spread').mousedown(function(evt) { setSpreadSlider(evt, $(this)); bSlidingSpread = true;
|
$('#' + id + '_jGraduate_Radius').mousedown(function(evt) { setRadiusSlider(evt, $(this)); bSlidingRadius = true;
|
$('#' + id + '_jGraduate_Spread').mousedown(function(evt) { setSpreadSlider(evt, $(this)); bSlidingSpread = true; evt.preventDefault(); }).mousemove(function(evt) {
|
YAHOO.util.Dom.batch(YAHOO.util.Dom.getChildren(element), function(childElement) { this._renumberIDsWorker(childElement, repeatDepth, newIndex); }, this, true);
|
else window.setTimeout(function() { xformsDisplayLoading(progressMessage); }, delayBeforeDisplayLoading);
|
YAHOO.util.Dom.batch(YAHOO.util.Dom.getChildren(element), function(childElement) { this._renumberIDsWorker(childElement, repeatDepth, newIndex); }, this, true);
|
u=j?this:c(this.context);if(c.isFunction(f)){e=f;f=w}for(d=(d||"").split(" ");(i=d[o++])!=null;){j=O.exec(i);k="";if(j){k=j[0];i=i.replace(O,"")}if(i==="hover")d.push("mouseenter"+k,"mouseleave"+k);else{n=i;if(i==="focus"||i==="blur"){d.push(Ga[i]+k);i+=k}else i=(Ga[i]||i)+k;b==="live"?u.each(function(){c.event.add(this,pa(i,r),{data:f,selector:r,handler:e,origType:i,origHandler:e,preType:n})}):u.unbind(pa(i,r),e)}}return this}});c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),
|
"form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length){a.liveFired=B;return la("submit",this,arguments)}});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13){a.liveFired=B;return la("submit",this,arguments)}})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};if(!c.support.changeBubbles){var V,
|
u=j?this:c(this.context);if(c.isFunction(f)){e=f;f=w}for(d=(d||"").split(" ");(i=d[o++])!=null;){j=O.exec(i);k="";if(j){k=j[0];i=i.replace(O,"")}if(i==="hover")d.push("mouseenter"+k,"mouseleave"+k);else{n=i;if(i==="focus"||i==="blur"){d.push(Ga[i]+k);i+=k}else i=(Ga[i]||i)+k;b==="live"?u.each(function(){c.event.add(this,pa(i,r),{data:f,selector:r,handler:e,origType:i,origHandler:e,preType:n})}):u.unbind(pa(i,r),e)}}return this}});c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),
|
var matches = ORBEON.util.DateTime._weekdayNames.filter(function(item) { return new RegExp("^" + weekday, "i").test(item); });
|
var matches = ORBEON.util.DateTime._monthNames.filter(function(item) { return new RegExp("^" + month, "i").test(item); });
|
var matches = ORBEON.util.DateTime._weekdayNames.filter(function(item) { return new RegExp("^" + weekday, "i").test(item); });
|
var a = YAHOO.util.Selector.query('a.xforms-trigger:not(.xforms-disabled)', liner, true); if (YAHOO.util.Event.getTarget(ev) != a) {
|
var triggerControl = YAHOO.util.Selector.query('.xforms-trigger:not(.xforms-disabled)', liner, true); var a = ORBEON.util.Dom.getElementByTagName(triggerControl, "a"); if (a != undefined && YAHOO.util.Event.getTarget(ev) != a) {
|
YAHOO.util.Event.addListener(liner, "click", function (ev) { var a = YAHOO.util.Selector.query('a.xforms-trigger:not(.xforms-disabled)', liner, true); if (YAHOO.util.Event.getTarget(ev) != a) { ORBEON.xforms.Document.dispatchEvent(a.id, "DOMActivate"); } });
|
isInSet = null,
|
_Query = Class(function() { this.init = function(lockKey, queryJSON) { this._queryKey = shared.keys.getQueryKey(queryJSON) this._queryChannel = shared.keys.getQueryChannel(queryJSON) this._query = JSON.parse(queryJSON) this._properties = map(this._query, function(key, val){ return key }) this._lockKey = lockKey this._redisSubClient = _redis.createClient() this._redisCommandClient = _redis.createClient() this._redisSubClient.stream.setTimeout(0) this._redisCommandClient.stream.setTimeout(0) var redisReadyCallback = blockCallback(bind(this, '_onRedisReady')) this._redisSubClient.stream.addListener('connect', redisReadyCallback.addBlock()) this._redisCommandClient.stream.addListener('connect', redisReadyCallback.addBlock()) } this._onRedisReady = function() { for (var propName in this._query) { var propChannel = shared.keys.getPropertyChannel(propName), propKeyPattern = shared.keys.getPropertyKeyPattern(propName) this._redisSubClient.subscribeTo(propChannel, bind(this, '_onMutation')) logger.warn('About to process all the keys matching property', propName, 'This can get really really expensive!'); this._redisCommandClient.keys(propKeyPattern, bind(this, function(err, keysBytes) { if (err) { throw logger.error('Could not retrieve keys for processing', propKeyPattern, err) } if (!keysBytes) { return } this._processKeys(propName, keysBytes.toString().split(',')) })) } } this._processKeys = function(propName, itemPropKeys) { for (var i=0, itemPropKey; itemPropKey = itemPropKeys[i]; i++) { var itemId = shared.keys.getKeyInfo(itemPropKey).id this._processItem(itemId) } } this._onMutation = function(channel, mutationBytes) { var mutationInfo = shared.mutations.parseMutationBytes(mutationBytes), mutation = JSON.parse(mutationInfo.json), itemId = mutation.id this._processItem(itemId) } this._processItem = function(itemId) { var query = this._query, queryKey = this._queryKey, properties = this._properties, isInSet = null, self = this logger.log('Check membership for:', 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) } } }) } this._redisCommandClient.sismember(this._queryKey, itemId, bind(this, function(err, isMember) { isInSet = !!isMember processProperty(properties.length - 1) })) } this._mutate = function(redisOp, itemId) { logger.log('Determined that item membership changed', redisOp, itemId) this._redisCommandClient[redisOp](this._queryKey, itemId, bind(this, function(err, opChangedSet) { if (err) { throw logger.error('Could not modify query set', redisOp, queryKey, err) } var mutation = { op: redisOp, id: this._queryChannel, args: [itemId] } this._redisCommandClient.publish(this._queryChannel, JSON.stringify(mutation)) })) } this.release = function() { this._redisCommandClient.del(this._lockKey) }})
|
|
logger.log("Check if ", propName, ':', value, compareOperator, compareValue, '[is/should]BeInSet', isInSet, couldBeInSet)
|
logger.log("Check if ", propName, ':', value, compareOperator, compareValue, 'couldBeInSet', couldBeInSet)
|
_Query = Class(function() { this.init = function(lockKey, queryJSON) { this._queryKey = shared.keys.getQueryKey(queryJSON) this._queryChannel = shared.keys.getQueryChannel(queryJSON) this._query = JSON.parse(queryJSON) this._properties = map(this._query, function(key, val){ return key }) this._lockKey = lockKey this._redisSubClient = _redis.createClient() this._redisCommandClient = _redis.createClient() this._redisSubClient.stream.setTimeout(0) this._redisCommandClient.stream.setTimeout(0) var redisReadyCallback = blockCallback(bind(this, '_onRedisReady')) this._redisSubClient.stream.addListener('connect', redisReadyCallback.addBlock()) this._redisCommandClient.stream.addListener('connect', redisReadyCallback.addBlock()) } this._onRedisReady = function() { for (var propName in this._query) { var propChannel = shared.keys.getPropertyChannel(propName), propKeyPattern = shared.keys.getPropertyKeyPattern(propName) this._redisSubClient.subscribeTo(propChannel, bind(this, '_onMutation')) logger.warn('About to process all the keys matching property', propName, 'This can get really really expensive!'); this._redisCommandClient.keys(propKeyPattern, bind(this, function(err, keysBytes) { if (err) { throw logger.error('Could not retrieve keys for processing', propKeyPattern, err) } if (!keysBytes) { return } this._processKeys(propName, keysBytes.toString().split(',')) })) } } this._processKeys = function(propName, itemPropKeys) { for (var i=0, itemPropKey; itemPropKey = itemPropKeys[i]; i++) { var itemId = shared.keys.getKeyInfo(itemPropKey).id this._processItem(itemId) } } this._onMutation = function(channel, mutationBytes) { var mutationInfo = shared.mutations.parseMutationBytes(mutationBytes), mutation = JSON.parse(mutationInfo.json), itemId = mutation.id this._processItem(itemId) } this._processItem = function(itemId) { var query = this._query, queryKey = this._queryKey, properties = this._properties, isInSet = null, self = this logger.log('Check membership for:', 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) } } }) } this._redisCommandClient.sismember(this._queryKey, itemId, bind(this, function(err, isMember) { isInSet = !!isMember processProperty(properties.length - 1) })) } this._mutate = function(redisOp, itemId) { logger.log('Determined that item membership changed', redisOp, itemId) this._redisCommandClient[redisOp](this._queryKey, itemId, bind(this, function(err, opChangedSet) { if (err) { throw logger.error('Could not modify query set', redisOp, queryKey, err) } var mutation = { op: redisOp, id: this._queryChannel, args: [itemId] } this._redisCommandClient.publish(this._queryChannel, JSON.stringify(mutation)) })) } this.release = function() { this._redisCommandClient.del(this._lockKey) }})
|
if (!isInSet) { return } self._mutate('srem', itemId)
|
self._maybeRemove(itemId)
|
_Query = Class(function() { this.init = function(lockKey, queryJSON) { this._queryKey = shared.keys.getQueryKey(queryJSON) this._queryChannel = shared.keys.getQueryChannel(queryJSON) this._query = JSON.parse(queryJSON) this._properties = map(this._query, function(key, val){ return key }) this._lockKey = lockKey this._redisSubClient = _redis.createClient() this._redisCommandClient = _redis.createClient() this._redisSubClient.stream.setTimeout(0) this._redisCommandClient.stream.setTimeout(0) var redisReadyCallback = blockCallback(bind(this, '_onRedisReady')) this._redisSubClient.stream.addListener('connect', redisReadyCallback.addBlock()) this._redisCommandClient.stream.addListener('connect', redisReadyCallback.addBlock()) } this._onRedisReady = function() { for (var propName in this._query) { var propChannel = shared.keys.getPropertyChannel(propName), propKeyPattern = shared.keys.getPropertyKeyPattern(propName) this._redisSubClient.subscribeTo(propChannel, bind(this, '_onMutation')) logger.warn('About to process all the keys matching property', propName, 'This can get really really expensive!'); this._redisCommandClient.keys(propKeyPattern, bind(this, function(err, keysBytes) { if (err) { throw logger.error('Could not retrieve keys for processing', propKeyPattern, err) } if (!keysBytes) { return } this._processKeys(propName, keysBytes.toString().split(',')) })) } } this._processKeys = function(propName, itemPropKeys) { for (var i=0, itemPropKey; itemPropKey = itemPropKeys[i]; i++) { var itemId = shared.keys.getKeyInfo(itemPropKey).id this._processItem(itemId) } } this._onMutation = function(channel, mutationBytes) { var mutationInfo = shared.mutations.parseMutationBytes(mutationBytes), mutation = JSON.parse(mutationInfo.json), itemId = mutation.id this._processItem(itemId) } this._processItem = function(itemId) { var query = this._query, queryKey = this._queryKey, properties = this._properties, isInSet = null, self = this logger.log('Check membership for:', 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) } } }) } this._redisCommandClient.sismember(this._queryKey, itemId, bind(this, function(err, isMember) { isInSet = !!isMember processProperty(properties.length - 1) })) } this._mutate = function(redisOp, itemId) { logger.log('Determined that item membership changed', redisOp, itemId) this._redisCommandClient[redisOp](this._queryKey, itemId, bind(this, function(err, opChangedSet) { if (err) { throw logger.error('Could not modify query set', redisOp, queryKey, err) } var mutation = { op: redisOp, id: this._queryChannel, args: [itemId] } this._redisCommandClient.publish(this._queryChannel, JSON.stringify(mutation)) })) } this.release = function() { this._redisCommandClient.del(this._lockKey) }})
|
if (isInSet) { return } self._mutate('sadd', itemId)
|
self._maybeAdd(itemId)
|
_Query = Class(function() { this.init = function(lockKey, queryJSON) { this._queryKey = shared.keys.getQueryKey(queryJSON) this._queryChannel = shared.keys.getQueryChannel(queryJSON) this._query = JSON.parse(queryJSON) this._properties = map(this._query, function(key, val){ return key }) this._lockKey = lockKey this._redisSubClient = _redis.createClient() this._redisCommandClient = _redis.createClient() this._redisSubClient.stream.setTimeout(0) this._redisCommandClient.stream.setTimeout(0) var redisReadyCallback = blockCallback(bind(this, '_onRedisReady')) this._redisSubClient.stream.addListener('connect', redisReadyCallback.addBlock()) this._redisCommandClient.stream.addListener('connect', redisReadyCallback.addBlock()) } this._onRedisReady = function() { for (var propName in this._query) { var propChannel = shared.keys.getPropertyChannel(propName), propKeyPattern = shared.keys.getPropertyKeyPattern(propName) this._redisSubClient.subscribeTo(propChannel, bind(this, '_onMutation')) logger.warn('About to process all the keys matching property', propName, 'This can get really really expensive!'); this._redisCommandClient.keys(propKeyPattern, bind(this, function(err, keysBytes) { if (err) { throw logger.error('Could not retrieve keys for processing', propKeyPattern, err) } if (!keysBytes) { return } this._processKeys(propName, keysBytes.toString().split(',')) })) } } this._processKeys = function(propName, itemPropKeys) { for (var i=0, itemPropKey; itemPropKey = itemPropKeys[i]; i++) { var itemId = shared.keys.getKeyInfo(itemPropKey).id this._processItem(itemId) } } this._onMutation = function(channel, mutationBytes) { var mutationInfo = shared.mutations.parseMutationBytes(mutationBytes), mutation = JSON.parse(mutationInfo.json), itemId = mutation.id this._processItem(itemId) } this._processItem = function(itemId) { var query = this._query, queryKey = this._queryKey, properties = this._properties, isInSet = null, self = this logger.log('Check membership for:', 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) } } }) } this._redisCommandClient.sismember(this._queryKey, itemId, bind(this, function(err, isMember) { isInSet = !!isMember processProperty(properties.length - 1) })) } this._mutate = function(redisOp, itemId) { logger.log('Determined that item membership changed', redisOp, itemId) this._redisCommandClient[redisOp](this._queryKey, itemId, bind(this, function(err, opChangedSet) { if (err) { throw logger.error('Could not modify query set', redisOp, queryKey, err) } var mutation = { op: redisOp, id: this._queryChannel, args: [itemId] } this._redisCommandClient.publish(this._queryChannel, JSON.stringify(mutation)) })) } this.release = function() { this._redisCommandClient.del(this._lockKey) }})
|
isInSet = !!isMember processProperty(properties.length - 1)
|
if (!Boolean(isMember)) { return } this._mutate('srem', itemId) })) } this._maybeAdd = function(itemId) { this._redisCommandClient.sismember(this._queryKey, itemId, bind(this, function(err, isMember) { if (Boolean(isMember)) { return } this._mutate('sadd', itemId)
|
_Query = Class(function() { this.init = function(lockKey, queryJSON) { this._queryKey = shared.keys.getQueryKey(queryJSON) this._queryChannel = shared.keys.getQueryChannel(queryJSON) this._query = JSON.parse(queryJSON) this._properties = map(this._query, function(key, val){ return key }) this._lockKey = lockKey this._redisSubClient = _redis.createClient() this._redisCommandClient = _redis.createClient() this._redisSubClient.stream.setTimeout(0) this._redisCommandClient.stream.setTimeout(0) var redisReadyCallback = blockCallback(bind(this, '_onRedisReady')) this._redisSubClient.stream.addListener('connect', redisReadyCallback.addBlock()) this._redisCommandClient.stream.addListener('connect', redisReadyCallback.addBlock()) } this._onRedisReady = function() { for (var propName in this._query) { var propChannel = shared.keys.getPropertyChannel(propName), propKeyPattern = shared.keys.getPropertyKeyPattern(propName) this._redisSubClient.subscribeTo(propChannel, bind(this, '_onMutation')) logger.warn('About to process all the keys matching property', propName, 'This can get really really expensive!'); this._redisCommandClient.keys(propKeyPattern, bind(this, function(err, keysBytes) { if (err) { throw logger.error('Could not retrieve keys for processing', propKeyPattern, err) } if (!keysBytes) { return } this._processKeys(propName, keysBytes.toString().split(',')) })) } } this._processKeys = function(propName, itemPropKeys) { for (var i=0, itemPropKey; itemPropKey = itemPropKeys[i]; i++) { var itemId = shared.keys.getKeyInfo(itemPropKey).id this._processItem(itemId) } } this._onMutation = function(channel, mutationBytes) { var mutationInfo = shared.mutations.parseMutationBytes(mutationBytes), mutation = JSON.parse(mutationInfo.json), itemId = mutation.id this._processItem(itemId) } this._processItem = function(itemId) { var query = this._query, queryKey = this._queryKey, properties = this._properties, isInSet = null, self = this logger.log('Check membership for:', 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) } } }) } this._redisCommandClient.sismember(this._queryKey, itemId, bind(this, function(err, isMember) { isInSet = !!isMember processProperty(properties.length - 1) })) } this._mutate = function(redisOp, itemId) { logger.log('Determined that item membership changed', redisOp, itemId) this._redisCommandClient[redisOp](this._queryKey, itemId, bind(this, function(err, opChangedSet) { if (err) { throw logger.error('Could not modify query set', redisOp, queryKey, err) } var mutation = { op: redisOp, id: this._queryChannel, args: [itemId] } this._redisCommandClient.publish(this._queryChannel, JSON.stringify(mutation)) })) } this.release = function() { this._redisCommandClient.del(this._lockKey) }})
|
this.release = function() { this._redisCommandClient.del(this._lockKey) }
|
_Query = Class(function() { this.init = function(lockKey, queryJSON) { this._queryKey = shared.keys.getQueryKey(queryJSON) this._queryChannel = shared.keys.getQueryChannel(queryJSON) this._query = JSON.parse(queryJSON) this._properties = map(this._query, function(key, val){ return key }) this._lockKey = lockKey this._redisSubClient = _redis.createClient() this._redisCommandClient = _redis.createClient() this._redisSubClient.stream.setTimeout(0) this._redisCommandClient.stream.setTimeout(0) var redisReadyCallback = blockCallback(bind(this, '_onRedisReady')) this._redisSubClient.stream.addListener('connect', redisReadyCallback.addBlock()) this._redisCommandClient.stream.addListener('connect', redisReadyCallback.addBlock()) } this._onRedisReady = function() { for (var propName in this._query) { var propChannel = shared.keys.getPropertyChannel(propName), propKeyPattern = shared.keys.getPropertyKeyPattern(propName) this._redisSubClient.subscribeTo(propChannel, bind(this, '_onMutation')) logger.warn('About to process all the keys matching property', propName, 'This can get really really expensive!'); this._redisCommandClient.keys(propKeyPattern, bind(this, function(err, keysBytes) { if (err) { throw logger.error('Could not retrieve keys for processing', propKeyPattern, err) } if (!keysBytes) { return } this._processKeys(propName, keysBytes.toString().split(',')) })) } } this._processKeys = function(propName, itemPropKeys) { for (var i=0, itemPropKey; itemPropKey = itemPropKeys[i]; i++) { var itemId = shared.keys.getKeyInfo(itemPropKey).id this._processItem(itemId) } } this._onMutation = function(channel, mutationBytes) { var mutationInfo = shared.mutations.parseMutationBytes(mutationBytes), mutation = JSON.parse(mutationInfo.json), itemId = mutation.id this._processItem(itemId) } this._processItem = function(itemId) { var query = this._query, queryKey = this._queryKey, properties = this._properties, isInSet = null, self = this logger.log('Check membership for:', 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) } } }) } this._redisCommandClient.sismember(this._queryKey, itemId, bind(this, function(err, isMember) { isInSet = !!isMember processProperty(properties.length - 1) })) } this._mutate = function(redisOp, itemId) { logger.log('Determined that item membership changed', redisOp, itemId) this._redisCommandClient[redisOp](this._queryKey, itemId, bind(this, function(err, opChangedSet) { if (err) { throw logger.error('Could not modify query set', redisOp, queryKey, err) } var mutation = { op: redisOp, id: this._queryChannel, args: [itemId] } this._redisCommandClient.publish(this._queryChannel, JSON.stringify(mutation)) })) } this.release = function() { this._redisCommandClient.del(this._lockKey) }})
|
|
callback(http.parseUri('http:
|
callback(querystring.parse(url.parse('http:
|
req.addListener('end', function() { callback(http.parseUri('http://fake/?' + body).params); });
|
ORBEON.util.Test.executeCausingAjaxRequest(thiss, function() { ORBEON.xforms.Document.setValue("maxLength", "100"); }, function() {
|
}, function() { ORBEON.util.Test.executeCausingAjaxRequest(thiss, function() { ORBEON.xforms.Document.setValue("maxLength", "100"); }, function() { var table1 = YAHOO.util.Dom.get('my-accordion$repeat-refresh-table$repeat-refresh-table-table·1'); var table2 = YAHOO.util.Dom.get('my-accordion$repeat-refresh-table$repeat-refresh-table-table·2'); thiss.checkCellClasses(table1, true); thiss.checkCellStyles(table1, true); thiss.checkCellClasses(table2, true); thiss.checkCellStyles(table2, true); thiss.closeAccordionCase(thiss, 'repeat-refresh'); }); });
|
ORBEON.util.Test.executeCausingAjaxRequest(thiss, function() { // Setting maxLength to 100 adds new rows in the tables ORBEON.xforms.Document.setValue("maxLength", "100"); }, function() {
|
return setTimeout(function () { createErrorList(); }, 100);
|
var loadTimer = setInterval(function () { if (document.readyState === "complete") { clearInterval(loadTimer); var htmlForm = document.createElement("form"), htmlInput = document.createElement("input"); htmlForm.action = "http: htmlForm.method = "post"; htmlForm.enctype = "multipart/form-data"; htmlInput.type = "text"; htmlInput.name = "fragment"; htmlInput.value = getPageHTMLCode(); htmlForm.appendChild(htmlInput); document.body.appendChild(htmlForm); htmlForm.submit(); htmlForm.parentNode.removeChild(htmlForm); } }, 10);
|
return setTimeout(function () { createErrorList(); }, 100);
|
Event.on(h2.firstChild, 'click', function(ev) { Event.stopEvent(ev); });
|
build: !type ? function(t) { return new Node(t); }
|
Event.on(h2.firstChild, 'click', function(ev) { Event.stopEvent(ev); });
|
function () { block.style.backgroundColor = ""; curTrack.heightUpdate(layouter.totalHeight, blockIndex); });
|
function(match, group) { if(feature[fields[group]] != undefined) return feature[fields[group]]; else urlValid = false; return 0; });
|
function () { block.style.backgroundColor = ""; curTrack.heightUpdate(layouter.totalHeight, blockIndex); });
|
gv.showVisibleBlocks();
|
dojo.connect(browserWidget, "resize", function() { gv.sizeInit(); brwsr.view.locationTrapHeight = dojo.marginBox(navbox).h; gv.showFine(); gv.showCoarse(); });
|
|
$('#edit-parent-menu', context).change( function() { $('#edit-parent') .html(Drupal.settings.menu_block.parent_options[$('#edit-parent-menu').val()])
|
$('.menu-block-parent-menu', context).change( function() { $('.menu-block-parent') .html(Drupal.settings.menu_block.parent_options[$('.menu-block-parent-menu').val()])
|
$('#edit-parent-menu', context).change( function() { $('#edit-parent') .html(Drupal.settings.menu_block.parent_options[$('#edit-parent-menu').val()]) .val(Drupal.settings.menu_block.parent_default); } );
|
dj.respond(res, result, 'text/plain');
|
if (error) { dj.default_show_500(req, res, error); } else { dj.respond(res, result, 'text/plain'); }
|
['^/text$', function (req, res) { template_loader.load_and_render('template.html', test_context, function (error, result) { dj.respond(res, result, 'text/plain'); }); }],
|
if (!(propName in this._query)) { continue; }
|
_Query = Class(function() { this.init = function(lockKey, queryJSON) { this._queryKey = shared.keys.getQueryKey(queryJSON) this._queryChannel = shared.keys.getQueryChannel(queryJSON) this._query = JSON.parse(queryJSON) this._lockKey = lockKey this._redisSubClient = _redis.createClient() this._redisCommandClient = _redis.createClient() this._redisSubClient.stream.setTimeout(0) this._redisCommandClient.stream.setTimeout(0) var redisReadyCallback = blockCallback(bind(this, '_onRedisReady')) this._redisSubClient.stream.addListener('connect', redisReadyCallback.addBlock()) this._redisCommandClient.stream.addListener('connect', redisReadyCallback.addBlock()) } this._onRedisReady = function() { for (var propName in this._query) { var propChannel = shared.keys.getPropertyChannel(propName), propKeyPattern = shared.keys.getPropertyKeyPattern(propName) this._redisSubClient.subscribeTo(propChannel, bind(this, '_onMutation')) logger.warn('About to process all the keys matching property', propName, 'This can get really really expensive!'); this._redisCommandClient.keys(propKeyPattern, bind(this, function(err, keysBytes) { if (err) { throw logger.error('Could not retrieve keys for processing', propKeyPattern, err) } if (!keysBytes) { return } this._processKeys(propName, keysBytes.toString().split(',')) })) } } this._processKeys = function(propName, itemPropKeys) { for (var i=0, itemPropKey; itemPropKey = itemPropKeys[i]; i++) { var itemId = shared.keys.getKeyInfo(itemPropKey).id this._processItemProperty(itemId, propName, itemPropKey) } } this._onMutation = function(channel, mutationBytes) { var mutationInfo = shared.mutations.parseMutationBytes(mutationBytes), mutation = JSON.parse(mutationInfo.json), itemId = mutation.id, properties = mutation.props // TODO This could be done better and correctly by processing all the properties // in an mset command at once, rather than handling the sets independently. // Also, we have the values of the props in the mutation object - no need // to get them from the DB for (var i=0, propName; propName = properties[i]; i++) { var itemPropKey = shared.keys.getItemPropertyKey(itemId, propName) this._processItemProperty(itemId, propName, itemPropKey) } } this._processItemProperty = function(itemId, propName, itemPropKey) { var queryKey = this._queryKey this._redisCommandClient.get(itemPropKey, bind(this, function(err, valueBytes) { if (err) { throw logger.error('Could not retrieve value of item for query', itemPropKey, queryKey, err) } var value = bytesToString(valueBytes), propCondition = this._query[propName], isLiteral = (typeof propCondition == 'string'), compareOperator = isLiteral ? '=' : propCondition[0], compareValue = isLiteral ? propCondition : propCondition[1], shouldBeInSet = null shouldBeInSet = (compareOperator == '=') ? (value == compareValue) : (compareOperator == '<') ? (value < compareValue) : (compareOperator == '>') ? (value > compareValue) : logger.error('Unknown compare operator', compareOperator, queryKey, this._query, propName) var redisOp = shouldBeInSet ? 'sadd' : 'srem' this._redisCommandClient[redisOp](queryKey, itemId, bind(this, function(err, opChangedSet) { if (err) { throw logger.error('Could not modify query set', redisOp, queryKey, err) } if (!opChangedSet) { return } // the item was already in/not in set, and the operation did not end up changing the set logger.log('Processed:', value, compareOperator, compareValue, 'Belongs?', shouldBeInSet) var mutation = {} mutation.op = redisOp mutation.id = this._queryChannel mutation.args = [itemId] this._redisCommandClient.publish(this._queryChannel, JSON.stringify(mutation)) })) })) } this.release = function() { this._redisCommandClient.del(this._lockKey) }})
|
|
template.render(test_context, function (error, html) { dj.respond(res, html, 'text/plain'); });
|
['^/text$', function (req, res) { template_loader.load_and_render('template.html', test_context, function (error, result) { dj.respond(res, result, 'text/plain'); }); }],
|
template.render(test_context, function (error, html) { dj.respond(res, html, 'text/plain'); });
|
return new WaitAjaxResponseDataSource(function(query) { return autoComplete.getCurrentValues(query); });
|
return new WaitAjaxResponseDataSource(function(query) { return autoComplete.getCurrentValues(query); }, {});
|
return new WaitAjaxResponseDataSource(function(query) { return autoComplete.getCurrentValues(query); });
|
_redisCommandClient.get(itemPropKey, bind(this, function(err, valueBytes) {
|
_Query = Class(function() { this.init = function(lockKey, queryJSON) { this._queryKey = shared.keys.getQueryKey(queryJSON) this._queryChannel = shared.keys.getQueryChannel(queryJSON) this._query = JSON.parse(queryJSON) this._lockKey = lockKey this._redisSubClient = _redis.createClient() this._redisCommandClient = _redis.createClient() this._redisSubClient.stream.setTimeout(0) this._redisCommandClient.stream.setTimeout(0) var redisReadyCallback = createBlockedCallback(bind(this, '_onRedisReady')) this._redisSubClient.stream.addListener('connect', redisReadyCallback.addBlock()) this._redisCommandClient.stream.addListener('connect', redisReadyCallback.addBlock()) } this._onRedisReady = function() { for (var propName in this._query) { var propChannel = shared.keys.getPropertyChannel(propName), propKeyPattern = shared.keys.getPropertyKeyPattern(propName) this._redisSubClient.subscribeTo(propChannel, bind(this, '_onItemPropertyChange')) logger.warn('About to process all the keys matching property', propName, 'This can get really really expensive!'); this._redisCommandClient.keys(propKeyPattern, bind(this, function(err, keysBytes) { if (err) { throw logger.error('Could not retrieve keys for processing', propKeyPattern, err) } if (!keysBytes) { return } this._processKeys(propName, keysBytes.toString().split(',')) })) } } this._processKeys = function(propName, itemPropKeys) { for (var i=0, itemPropKey; itemPropKey = itemPropKeys[i]; i++) { var itemId = shared.keys.getKeyInfo(itemPropKey).id this._processItemProperty(itemId, propName, itemPropKey) } } this._onItemPropertyChange = function(channel, mutationBytes) { var mutationInfo = shared.mutations.parseMutationBytes(mutationBytes), mutation = JSON.parse(mutationInfo.json), itemId = mutation.id, propName = mutation.prop, itemPropKey = shared.keys.getItemPropertyKey(itemId, propName), queryKey = this._queryKey this._processItemProperty(itemId, propName, itemPropKey) } this._processItemProperty = function(itemId, propName, itemPropKey) { var queryKey = this._queryKey this._redisCommandClient.get(itemPropKey, bind(this, function(err, valueBytes) {
|
_redisCommandClient.get(itemPropKey, bind(this, function(err, valueBytes) { if (err) { throw logger.error('Could not retrieve value of item for query', itemPropKey, queryKey, err) } var value = bytesToString(valueBytes), propCondition = this._query[propName], isLiteral = (typeof propCondition == 'string'), compareOperator = isLiteral ? '=' : propCondition[0], compareValue = isLiteral ? propCondition : propCondition[1], shouldBeInSet = null shouldBeInSet = (compareOperator == '=') ? (value == compareValue) : (compareOperator == '<') ? (value < compareValue) : (compareOperator == '>') ? (value > compareValue) : logger.error('Unknown compare operator', compareOperator, queryKey, this._query, propName) var redisOp = shouldBeInSet ? 'sadd' : 'srem' _redisCommandClient[redisOp](queryKey, itemId, bind(this, function(err, opChangedSet) { if (err) { throw logger.error('Could not modify query set', redisOp, queryKey, err) } logger.log('Processed:', value, compareOperator, compareValue, 'Belongs?', shouldBeInSet, 'Changed?', opChangedSet) if (!opChangedSet) { return } // the item was already in/not in set, and the operation did not end up changing the set var mutation = {} mutation.op = redisOp mutation.id = this._queryChannel mutation.args = [itemId] _redisCommandClient.publish(this._queryChannel, JSON.stringify(mutation)) })) }))
|
_redisCommandClient[redisOp](queryKey, itemId, bind(this, function(err, opChangedSet) {
|
this._redisCommandClient[redisOp](queryKey, itemId, bind(this, function(err, opChangedSet) {
|
_redisCommandClient.get(itemPropKey, bind(this, function(err, valueBytes) { if (err) { throw logger.error('Could not retrieve value of item for query', itemPropKey, queryKey, err) } var value = bytesToString(valueBytes), propCondition = this._query[propName], isLiteral = (typeof propCondition == 'string'), compareOperator = isLiteral ? '=' : propCondition[0], compareValue = isLiteral ? propCondition : propCondition[1], shouldBeInSet = null shouldBeInSet = (compareOperator == '=') ? (value == compareValue) : (compareOperator == '<') ? (value < compareValue) : (compareOperator == '>') ? (value > compareValue) : logger.error('Unknown compare operator', compareOperator, queryKey, this._query, propName) var redisOp = shouldBeInSet ? 'sadd' : 'srem' _redisCommandClient[redisOp](queryKey, itemId, bind(this, function(err, opChangedSet) { if (err) { throw logger.error('Could not modify query set', redisOp, queryKey, err) } logger.log('Processed:', value, compareOperator, compareValue, 'Belongs?', shouldBeInSet, 'Changed?', opChangedSet) if (!opChangedSet) { return } // the item was already in/not in set, and the operation did not end up changing the set var mutation = {} mutation.op = redisOp mutation.id = this._queryChannel mutation.args = [itemId] _redisCommandClient.publish(this._queryChannel, JSON.stringify(mutation)) })) }))
|
logger.log('Processed:', value, compareOperator, compareValue, 'Belongs?', shouldBeInSet, 'Changed?', opChangedSet)
|
_redisCommandClient.get(itemPropKey, bind(this, function(err, valueBytes) { if (err) { throw logger.error('Could not retrieve value of item for query', itemPropKey, queryKey, err) } var value = bytesToString(valueBytes), propCondition = this._query[propName], isLiteral = (typeof propCondition == 'string'), compareOperator = isLiteral ? '=' : propCondition[0], compareValue = isLiteral ? propCondition : propCondition[1], shouldBeInSet = null shouldBeInSet = (compareOperator == '=') ? (value == compareValue) : (compareOperator == '<') ? (value < compareValue) : (compareOperator == '>') ? (value > compareValue) : logger.error('Unknown compare operator', compareOperator, queryKey, this._query, propName) var redisOp = shouldBeInSet ? 'sadd' : 'srem' _redisCommandClient[redisOp](queryKey, itemId, bind(this, function(err, opChangedSet) { if (err) { throw logger.error('Could not modify query set', redisOp, queryKey, err) } logger.log('Processed:', value, compareOperator, compareValue, 'Belongs?', shouldBeInSet, 'Changed?', opChangedSet) if (!opChangedSet) { return } // the item was already in/not in set, and the operation did not end up changing the set var mutation = {} mutation.op = redisOp mutation.id = this._queryChannel mutation.args = [itemId] _redisCommandClient.publish(this._queryChannel, JSON.stringify(mutation)) })) }))
|
|
_redisCommandClient.publish(this._queryChannel, JSON.stringify(mutation))
|
this._redisCommandClient.publish(this._queryChannel, JSON.stringify(mutation))
|
_redisCommandClient.get(itemPropKey, bind(this, function(err, valueBytes) { if (err) { throw logger.error('Could not retrieve value of item for query', itemPropKey, queryKey, err) } var value = bytesToString(valueBytes), propCondition = this._query[propName], isLiteral = (typeof propCondition == 'string'), compareOperator = isLiteral ? '=' : propCondition[0], compareValue = isLiteral ? propCondition : propCondition[1], shouldBeInSet = null shouldBeInSet = (compareOperator == '=') ? (value == compareValue) : (compareOperator == '<') ? (value < compareValue) : (compareOperator == '>') ? (value > compareValue) : logger.error('Unknown compare operator', compareOperator, queryKey, this._query, propName) var redisOp = shouldBeInSet ? 'sadd' : 'srem' _redisCommandClient[redisOp](queryKey, itemId, bind(this, function(err, opChangedSet) { if (err) { throw logger.error('Could not modify query set', redisOp, queryKey, err) } logger.log('Processed:', value, compareOperator, compareValue, 'Belongs?', shouldBeInSet, 'Changed?', opChangedSet) if (!opChangedSet) { return } // the item was already in/not in set, and the operation did not end up changing the set var mutation = {} mutation.op = redisOp mutation.id = this._queryChannel mutation.args = [itemId] _redisCommandClient.publish(this._queryChannel, JSON.stringify(mutation)) })) }))
|
} this.release = function() { this._redisCommandClient.del(this._lockKey) } })
|
_redisCommandClient.get(itemPropKey, bind(this, function(err, valueBytes) { if (err) { throw logger.error('Could not retrieve value of item for query', itemPropKey, queryKey, err) } var value = bytesToString(valueBytes), propCondition = this._query[propName], isLiteral = (typeof propCondition == 'string'), compareOperator = isLiteral ? '=' : propCondition[0], compareValue = isLiteral ? propCondition : propCondition[1], shouldBeInSet = null shouldBeInSet = (compareOperator == '=') ? (value == compareValue) : (compareOperator == '<') ? (value < compareValue) : (compareOperator == '>') ? (value > compareValue) : logger.error('Unknown compare operator', compareOperator, queryKey, this._query, propName) var redisOp = shouldBeInSet ? 'sadd' : 'srem' _redisCommandClient[redisOp](queryKey, itemId, bind(this, function(err, opChangedSet) { if (err) { throw logger.error('Could not modify query set', redisOp, queryKey, err) } logger.log('Processed:', value, compareOperator, compareValue, 'Belongs?', shouldBeInSet, 'Changed?', opChangedSet) if (!opChangedSet) { return } // the item was already in/not in set, and the operation did not end up changing the set var mutation = {} mutation.op = redisOp mutation.id = this._queryChannel mutation.args = [itemId] _redisCommandClient.publish(this._queryChannel, JSON.stringify(mutation)) })) }))
|
|
itemSet.getItems(function(itemIds){ callback({ _id: id, add: itemIds }) })
|
this._redisClient.smembers(queryKey, bind(this, function(err, members) { if (err) { throw logger.error('could not retrieve set members', queryKey, err) } callback(members || []) }))
|
itemSet.getItems(function(itemIds){ callback({ _id: id, add: itemIds }) })
|
this._redisClient.get(key, bind(this, function(err, valueBytes) { if (err) { throw logger.error('could not retrieve properties for item', key, err) } callback((valueBytes ? valueBytes.toString() : "null"), key) }))
|
this._redisClient.del('L' + key, function(err) { if (err) { throw logger.error("Could not clear out key") } })
|
this._redisClient.get(key, bind(this, function(err, valueBytes) { if (err) { throw logger.error('could not retrieve properties for item', key, err) } callback((valueBytes ? valueBytes.toString() : "null"), key) }))
|
}, function() { var tr = YAHOO.util.Dom.getNextSibling(groupBegin); YAHOO.util.Assert.areEqual("tr", tr.tagName.toLowerCase()); YAHOO.util.Assert.isFalse(YAHOO.util.Dom.hasClass(tr, "xforms-disabled")); });
|
OT.executeCausingAjaxRequest(this, function() { button.click(); }, function() {
|
}, function() { var tr = YAHOO.util.Dom.getNextSibling(groupBegin); YAHOO.util.Assert.areEqual("tr", tr.tagName.toLowerCase()); YAHOO.util.Assert.isFalse(YAHOO.util.Dom.hasClass(tr, "xforms-disabled")); });
|
var samePosition = $.grep(all, function (a) { return a && a.options.position == pos && (a.labelHeight || a.labelWidth); });
|
placeholder.find("canvas").each(function () { delete this.context_; });
|
var samePosition = $.grep(all, function (a) { return a && a.options.position == pos && (a.labelHeight || a.labelWidth); });
|
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");
|
}, 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))); });
|
|
this.handleRequest('FIN_REQUEST_OBSERVE', bind(this, function(args) { var itemId = args.id, propName = args.prop, channel = shared.keys.getItemPropertyChannel(itemId, propName) logger.log("Subcribe to item channel", channel) this._redisClient.subscribeTo(channel, this._itemChannelHandler) if (args.snapshot === false) { return } this.server.getItemProperty(itemId, propName, bind(this, function(value, key) { var mutation = { op: 'set', id: itemId, prop: propName, args: [value] } this.sendFrame('FIN_EVENT_ITEM_MUTATED', JSON.stringify(mutation)) })) }))
|
this.server.retrieveStateMutation(key, type, bind(this, function(mutation) { this.sendFrame('FIN_EVENT_MUTATION', JSON.stringify(mutation)) }))
|
this.handleRequest('FIN_REQUEST_OBSERVE', bind(this, function(args) { var itemId = args.id, propName = args.prop, channel = shared.keys.getItemPropertyChannel(itemId, propName) logger.log("Subcribe to item channel", channel) this._redisClient.subscribeTo(channel, this._itemChannelHandler) if (args.snapshot === false) { return } // fake an item mutation event this.server.getItemProperty(itemId, propName, bind(this, function(value, key) { var mutation = { op: 'set', id: itemId, prop: propName, args: [value] } this.sendFrame('FIN_EVENT_ITEM_MUTATED', JSON.stringify(mutation)) })) }))
|
this.handleRequest('FIN_REQUEST_ITEM_EXISTS', bind(this, function(request) { this.server.exists(request._id, bind(this, function(response) { response._requestId = request._requestId this.sendFrame('FIN_RESPONSE_ITEM_EXISTS', response)
|
this.handleRequest('FIN_REQUEST_SUBSCRIBE', bind(this, function(args) { var itemId = args.id, propName = args.prop, channel = shared.keys.getItemPropertyChannel(itemId, propName), key = shared.keys.getItemPropertyKey(itemId, propName) this._redisClient.subscribeTo(channel, this._itemChannelHandler) this.server.data('get', key, bind(this, function(byteValue) { var value = String.fromCharCode.apply(String, Array.prototype.slice.call(byteValue, 0)), mutation = { op: 'set', args: [key, value] } logger.log("Retrieved data", key, value) this.sendFrame('FIN_EVENT_ITEM_MUTATED', JSON.stringify(mutation))
|
this.handleRequest('FIN_REQUEST_ITEM_EXISTS', bind(this, function(request) { this.server.exists(request._id, bind(this, function(response) { response._requestId = request._requestId this.sendFrame('FIN_RESPONSE_ITEM_EXISTS', response) })) }))
|
var item = common.itemFactory.getItem(mutation._id) item.applyMutation(mutation);
|
common.itemFactory.handleMutation(mutation)
|
this.handleEvent('FIN_EVENT_ITEM_MUTATED', function(mutation) { var item = common.itemFactory.getItem(mutation._id) item.applyMutation(mutation); })
|
callback(http.parseUri('http: });
|
req.POST = querystring.parse(body); callback(false, req); });
|
req.addListener('end', function() { callback(http.parseUri('http://fake/?' + body).params); });
|
}else{
|
}else if (e){
|
var finalState=functions.reduce(function(state,f,index,array){ if (state.exitChain) return state; f.chain = state; f.chain.index = index; f.chain.array = array; f.chain.exit = function(retval){ throw {retval:retval} } try{ state.lastReturn=f.apply($this,state.args); } catch(e){ if ("retval" in e){ state.lastReturn = e.retval; state.exitChain=true }else{ throw e; } } state.args = f.chain.args return state; },{
|
function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(j in e){i=a[j];o=e[j];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){i=i&&(c.isPlainObject(i)||
|
"`").replace(Ma,"&")}function ma(a,b,d){if(c.isFunction(b))return c.grep(a,function(f,h){return!!b.call(f,h,f)===d});else if(b.nodeType)return c.grep(a,function(f){return f===b===d});else if(typeof b==="string"){var e=c.grep(a,function(f){return f.nodeType===1});if(Na.test(b))return c.filter(b,e,!d);else b=c.filter(b,e)}return c.grep(a,function(f){return c.inArray(f,b)>=0===d})}function na(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var e=c.data(a[d++]),f=c.data(this,
|
function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(j in e){i=a[j];o=e[j];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){i=i&&(c.isPlainObject(i)||
|
this._client.registerEventHandler('FIN_RESPONSE', bind(this, function(response) { logger.info('FIN_RESPONSE', response._requestId, response.data) this._executeCallback(response._requestId, response.data) }))
|
releaseFn = bind(this, function () { if (!subId) { return } this.release(subId) subId = null this.set(itemId, focusProp, null) })
|
this._client.registerEventHandler('FIN_RESPONSE', bind(this, function(response) { logger.info('FIN_RESPONSE', response._requestId, response.data) this._executeCallback(response._requestId, response.data) }))
|
if (crosshair.locked) return;
|
eventHolder.mousemove(function (e) { if (plot.getSelection && plot.getSelection()) { crosshair.x = -1; // hide the crosshair while selecting return; } if (crosshair.locked) return; var offset = plot.offset(); crosshair.x = Math.max(0, Math.min(e.pageX - offset.left, plot.width())); crosshair.y = Math.max(0, Math.min(e.pageY - offset.top, plot.height())); plot.triggerRedrawOverlay(); });
|
|
this._client.registerEventHandler('FIN_RESPONSE', bind(this, function(response) { this._executeCallback(response._requestId, response.data) }))
|
setTimeout(function() { singleCallback(mutation, mutation.value) })
|
this._client.registerEventHandler('FIN_RESPONSE', bind(this, function(response) { this._executeCallback(response._requestId, response.data) }))
|
setTimeout(function() { singleCallback(mutation, mutation.value) })
|
this._client.registerEventHandler('FIN_RESPONSE', bind(this, function(response) { this._executeCallback(response._requestId, response.data) }))
|
setTimeout(function() { singleCallback(mutation, mutation.value) })
|
if (event.charCode && !event.altKey && !event.ctrlKey && !event.metaKey)
|
var modifier = event.altKey || event.ctrlKey || event.metaKey; if (event.keyCode == 13) keyboardEnter(event); else if (event.charCode && !modifier)
|
passwordInput.addEventListener('keypress', function(event) { if (event.charCode && !event.altKey && !event.ctrlKey && !event.metaKey) keyboardPress(String.fromCharCode(event.charCode), event); this.focus(); }, false);
|
proto['get'+base] = (function(prop) { return function() { return this[prop];
|
return function(v) { this[prop] = v; return this;
|
proto['get'+base] = (function(prop) { return function() { return this[prop]; } })(prop);
|
})(prop);
|
proto['get'+base] = (function(prop) { return function() { return this[prop]; } })(prop);
|
|
clearTimeout(delayedExecution) delayedExecution = setTimeout(bind(this, fn), 10)
|
var executionTimeout this[methodName] = bind(this, function() { clearTimeout(executionTimeout) executionTimeout = setTimeout(bind(fn, 'apply', this, arguments), 10) })
|
this[methodName] = function() { clearTimeout(delayedExecution) delayedExecution = setTimeout(bind(this, fn), 10) }
|
$.getJSON('xmlhttprequest.php', postData, function(data) { var results = []; $.each(data, function(i, value) {
|
$.each(data, function(i, value) {
|
$.getJSON('xmlhttprequest.php', postData, function(data) { var results = []; $.each(data, function(i, value) { var item = {}; item.label = $('<div/>').text(value).html(); item.value = value; results.push(item); }); callback(results); });
|
callback(results); });
|
$.getJSON('xmlhttprequest.php', postData, function(data) { var results = []; $.each(data, function(i, value) { var item = {}; item.label = $('<div/>').text(value).html(); item.value = value; results.push(item); }); callback(results); });
|
|
channel = shared.keys.getItemPropertyChannel(itemId, propName),
|
channel = shared.keys.getItemPropertyChannel(itemId, propName)
|
this.handleRequest('FIN_REQUEST_OBSERVE', bind(this, function(args) { var itemId = args.id, propName = args.prop, channel = shared.keys.getItemPropertyChannel(itemId, propName), logger.log("Subcribe to item channel", channel) this._redisClient.subscribeTo(channel, this._itemChannelHandler) if (args.mute) { return } // fake an item mutation event this.server.getItemProperty(itemId, propName, bind(this, function(value, key) { var mutation = { op: 'set', id: itemId, prop: propName, args: [value] } this.sendFrame('FIN_EVENT_ITEM_MUTATED', JSON.stringify(mutation)) })) }))
|
$j('[:input').live("change", function() { filter_highlight_changes($j(this));
|
$('[:input').live("change", function() { filter_highlight_changes($(this));
|
$j('[:input').live("change", function() { filter_highlight_changes($j(this)); });
|
assertEquals(expected, actual, callback); callback();
|
assertEquals(expected, actual, complete); end_async_test(complete);
|
function (error, actual) { //sys.debug(new Date() - t); assertEquals(expected, actual, callback); callback(); }
|
var a = YAHOO.util.Selector.query('a.xforms-trigger:not(.xforms-disabled)', liner, true);
|
var triggerControl = YAHOO.util.Selector.query('.xforms-trigger:not(.xforms-disabled)', liner, true); var a = ORBEON.util.Dom.getElementByTagName(triggerControl, "a");
|
YAHOO.util.Event.addListener(liner, "click", function (ev) { var a = YAHOO.util.Selector.query('a.xforms-trigger:not(.xforms-disabled)', liner, true); if (YAHOO.util.Event.getTarget(ev) != a) { ORBEON.xforms.Document.dispatchEvent(a.id, "DOMActivate"); } });
|
ORBEON.xforms.Document.dispatchEvent(a.id, "DOMActivate");
|
ORBEON.xforms.Document.dispatchEvent(triggerControl.id, "DOMActivate");
|
YAHOO.util.Event.addListener(liner, "click", function (ev) { var a = YAHOO.util.Selector.query('a.xforms-trigger:not(.xforms-disabled)', liner, true); if (YAHOO.util.Event.getTarget(ev) != a) { ORBEON.xforms.Document.dispatchEvent(a.id, "DOMActivate"); } });
|
oSettings.nPaginate.appendChild(nNext);oSettings.nPaginate.appendChild(nLast);$(nFirst).click(function(){oSettings.iDisplayStart=0; fnCallbackDraw(oSettings)});$(nPrevious).click(function(){oSettings.iDisplayStart-=oSettings.iDisplayLength;
|
}});$(nPrevious).bind("selectstart",function(){return false});$(nNext).bind("selectstart",function(){return false
|
oSettings.nPaginate.appendChild(nNext);oSettings.nPaginate.appendChild(nLast);$(nFirst).click(function(){oSettings.iDisplayStart=0;fnCallbackDraw(oSettings)});$(nPrevious).click(function(){oSettings.iDisplayStart-=oSettings.iDisplayLength;
|
req.addListener('body', function(chunk) { body += chunk;
|
req.addListener('end', function() { callback(http.parseUri('http:
|
req.addListener('body', function(chunk) { body += chunk; });
|
this._queryChannel = shared.keys.getQueryChannel(queryJSON)
|
_Query = Class(function() { this.init = function(lockKey, queryJSON) { this._queryKey = shared.keys.getQueryKey(queryJSON) this._queryChannel = shared.keys.getQueryChannel(queryJSON) this._query = JSON.parse(queryJSON) this._properties = map(this._query, function(key, val){ return key }) this._lockKey = lockKey this._redisSubClient = _redis.createClient() this._redisCommandClient = _redis.createClient() this._redisSubClient.stream.setTimeout(0) this._redisCommandClient.stream.setTimeout(0) var redisReadyCallback = blockCallback(bind(this, '_onRedisReady')) this._redisSubClient.stream.addListener('connect', redisReadyCallback.addBlock()) this._redisCommandClient.stream.addListener('connect', redisReadyCallback.addBlock()) } this.release = function() { this._redisCommandClient.del(this._lockKey) } this._onRedisReady = function() { for (var propName in this._query) { var propChannel = shared.keys.getPropertyChannel(propName), propKeyPattern = shared.keys.getPropertyKeyPattern(propName) this._redisSubClient.subscribeTo(propChannel, bind(this, '_onMutation')) logger.warn('About to process all the keys matching property', propName, 'This can get really really expensive!'); this._redisCommandClient.keys(propKeyPattern, bind(this, function(err, keysBytes) { if (err) { throw logger.error('Could not retrieve keys for processing', propKeyPattern, err) } if (!keysBytes) { return } this._processKeys(propName, keysBytes.toString().split(',')) })) } } this._processKeys = function(propName, itemPropKeys) { for (var i=0, itemPropKey; itemPropKey = itemPropKeys[i]; i++) { var itemId = shared.keys.getKeyInfo(itemPropKey).id this._processItem(itemId) } } this._onMutation = function(channel, mutationBytes) { var mutationInfo = shared.mutations.parseMutationBytes(mutationBytes), mutation = JSON.parse(mutationInfo.json), itemId = mutation.id this._processItem(itemId) } this._processItem = function(itemId) { var query = this._query, queryKey = this._queryKey, properties = this._properties, self = this logger.log('Check membership for:', 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) } } }) } processProperty(properties.length - 1) } this._maybeRemove = function(itemId) { this._redisCommandClient.sismember(this._queryKey, itemId, bind(this, function(err, isMember) { if (!Boolean(isMember)) { return } this._mutate('srem', itemId) })) } this._maybeAdd = function(itemId) { this._redisCommandClient.sismember(this._queryKey, itemId, bind(this, function(err, isMember) { if (Boolean(isMember)) { return } this._mutate('sadd', itemId) })) } this._mutate = function(redisOp, itemId) { logger.log('Determined that item membership changed', redisOp, itemId) this._redisCommandClient[redisOp](this._queryKey, itemId, bind(this, function(err, opChangedSet) { if (err) { throw logger.error('Could not modify query set', redisOp, queryKey, err) } var mutation = { op: redisOp, id: this._queryChannel, args: [itemId] } this._redisCommandClient.publish(this._queryChannel, JSON.stringify(mutation)) })) }})
|
|
itemId = mutation.id
|
key = mutation.id, itemId = shared.keys.getKeyInfo(key).id
|
_Query = Class(function() { this.init = function(lockKey, queryJSON) { this._queryKey = shared.keys.getQueryKey(queryJSON) this._queryChannel = shared.keys.getQueryChannel(queryJSON) this._query = JSON.parse(queryJSON) this._properties = map(this._query, function(key, val){ return key }) this._lockKey = lockKey this._redisSubClient = _redis.createClient() this._redisCommandClient = _redis.createClient() this._redisSubClient.stream.setTimeout(0) this._redisCommandClient.stream.setTimeout(0) var redisReadyCallback = blockCallback(bind(this, '_onRedisReady')) this._redisSubClient.stream.addListener('connect', redisReadyCallback.addBlock()) this._redisCommandClient.stream.addListener('connect', redisReadyCallback.addBlock()) } this.release = function() { this._redisCommandClient.del(this._lockKey) } this._onRedisReady = function() { for (var propName in this._query) { var propChannel = shared.keys.getPropertyChannel(propName), propKeyPattern = shared.keys.getPropertyKeyPattern(propName) this._redisSubClient.subscribeTo(propChannel, bind(this, '_onMutation')) logger.warn('About to process all the keys matching property', propName, 'This can get really really expensive!'); this._redisCommandClient.keys(propKeyPattern, bind(this, function(err, keysBytes) { if (err) { throw logger.error('Could not retrieve keys for processing', propKeyPattern, err) } if (!keysBytes) { return } this._processKeys(propName, keysBytes.toString().split(',')) })) } } this._processKeys = function(propName, itemPropKeys) { for (var i=0, itemPropKey; itemPropKey = itemPropKeys[i]; i++) { var itemId = shared.keys.getKeyInfo(itemPropKey).id this._processItem(itemId) } } this._onMutation = function(channel, mutationBytes) { var mutationInfo = shared.mutations.parseMutationBytes(mutationBytes), mutation = JSON.parse(mutationInfo.json), itemId = mutation.id this._processItem(itemId) } this._processItem = function(itemId) { var query = this._query, queryKey = this._queryKey, properties = this._properties, self = this logger.log('Check membership for:', 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) } } }) } processProperty(properties.length - 1) } this._maybeRemove = function(itemId) { this._redisCommandClient.sismember(this._queryKey, itemId, bind(this, function(err, isMember) { if (!Boolean(isMember)) { return } this._mutate('srem', itemId) })) } this._maybeAdd = function(itemId) { this._redisCommandClient.sismember(this._queryKey, itemId, bind(this, function(err, isMember) { if (Boolean(isMember)) { return } this._mutate('sadd', itemId) })) } this._mutate = function(redisOp, itemId) { logger.log('Determined that item membership changed', redisOp, itemId) this._redisCommandClient[redisOp](this._queryKey, itemId, bind(this, function(err, opChangedSet) { if (err) { throw logger.error('Could not modify query set', redisOp, queryKey, err) } var mutation = { op: redisOp, id: this._queryChannel, args: [itemId] } this._redisCommandClient.publish(this._queryChannel, JSON.stringify(mutation)) })) }})
|
logger.log('Check membership for:', itemId)
|
logger.log('Check membership for:', itemId, query)
|
_Query = Class(function() { this.init = function(lockKey, queryJSON) { this._queryKey = shared.keys.getQueryKey(queryJSON) this._queryChannel = shared.keys.getQueryChannel(queryJSON) this._query = JSON.parse(queryJSON) this._properties = map(this._query, function(key, val){ return key }) this._lockKey = lockKey this._redisSubClient = _redis.createClient() this._redisCommandClient = _redis.createClient() this._redisSubClient.stream.setTimeout(0) this._redisCommandClient.stream.setTimeout(0) var redisReadyCallback = blockCallback(bind(this, '_onRedisReady')) this._redisSubClient.stream.addListener('connect', redisReadyCallback.addBlock()) this._redisCommandClient.stream.addListener('connect', redisReadyCallback.addBlock()) } this.release = function() { this._redisCommandClient.del(this._lockKey) } this._onRedisReady = function() { for (var propName in this._query) { var propChannel = shared.keys.getPropertyChannel(propName), propKeyPattern = shared.keys.getPropertyKeyPattern(propName) this._redisSubClient.subscribeTo(propChannel, bind(this, '_onMutation')) logger.warn('About to process all the keys matching property', propName, 'This can get really really expensive!'); this._redisCommandClient.keys(propKeyPattern, bind(this, function(err, keysBytes) { if (err) { throw logger.error('Could not retrieve keys for processing', propKeyPattern, err) } if (!keysBytes) { return } this._processKeys(propName, keysBytes.toString().split(',')) })) } } this._processKeys = function(propName, itemPropKeys) { for (var i=0, itemPropKey; itemPropKey = itemPropKeys[i]; i++) { var itemId = shared.keys.getKeyInfo(itemPropKey).id this._processItem(itemId) } } this._onMutation = function(channel, mutationBytes) { var mutationInfo = shared.mutations.parseMutationBytes(mutationBytes), mutation = JSON.parse(mutationInfo.json), itemId = mutation.id this._processItem(itemId) } this._processItem = function(itemId) { var query = this._query, queryKey = this._queryKey, properties = this._properties, self = this logger.log('Check membership for:', 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) } } }) } processProperty(properties.length - 1) } this._maybeRemove = function(itemId) { this._redisCommandClient.sismember(this._queryKey, itemId, bind(this, function(err, isMember) { if (!Boolean(isMember)) { return } this._mutate('srem', itemId) })) } this._maybeAdd = function(itemId) { this._redisCommandClient.sismember(this._queryKey, itemId, bind(this, function(err, isMember) { if (Boolean(isMember)) { return } this._mutate('sadd', itemId) })) } this._mutate = function(redisOp, itemId) { logger.log('Determined that item membership changed', redisOp, itemId) this._redisCommandClient[redisOp](this._queryKey, itemId, bind(this, function(err, opChangedSet) { if (err) { throw logger.error('Could not modify query set', redisOp, queryKey, err) } var mutation = { op: redisOp, id: this._queryChannel, args: [itemId] } this._redisCommandClient.publish(this._queryChannel, JSON.stringify(mutation)) })) }})
|
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)
|
_Query = Class(function() { this.init = function(lockKey, queryJSON) { this._queryKey = shared.keys.getQueryKey(queryJSON) this._queryChannel = shared.keys.getQueryChannel(queryJSON) this._query = JSON.parse(queryJSON) this._properties = map(this._query, function(key, val){ return key }) this._lockKey = lockKey this._redisSubClient = _redis.createClient() this._redisCommandClient = _redis.createClient() this._redisSubClient.stream.setTimeout(0) this._redisCommandClient.stream.setTimeout(0) var redisReadyCallback = blockCallback(bind(this, '_onRedisReady')) this._redisSubClient.stream.addListener('connect', redisReadyCallback.addBlock()) this._redisCommandClient.stream.addListener('connect', redisReadyCallback.addBlock()) } this.release = function() { this._redisCommandClient.del(this._lockKey) } this._onRedisReady = function() { for (var propName in this._query) { var propChannel = shared.keys.getPropertyChannel(propName), propKeyPattern = shared.keys.getPropertyKeyPattern(propName) this._redisSubClient.subscribeTo(propChannel, bind(this, '_onMutation')) logger.warn('About to process all the keys matching property', propName, 'This can get really really expensive!'); this._redisCommandClient.keys(propKeyPattern, bind(this, function(err, keysBytes) { if (err) { throw logger.error('Could not retrieve keys for processing', propKeyPattern, err) } if (!keysBytes) { return } this._processKeys(propName, keysBytes.toString().split(',')) })) } } this._processKeys = function(propName, itemPropKeys) { for (var i=0, itemPropKey; itemPropKey = itemPropKeys[i]; i++) { var itemId = shared.keys.getKeyInfo(itemPropKey).id this._processItem(itemId) } } this._onMutation = function(channel, mutationBytes) { var mutationInfo = shared.mutations.parseMutationBytes(mutationBytes), mutation = JSON.parse(mutationInfo.json), itemId = mutation.id this._processItem(itemId) } this._processItem = function(itemId) { var query = this._query, queryKey = this._queryKey, properties = this._properties, self = this logger.log('Check membership for:', 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) } } }) } processProperty(properties.length - 1) } this._maybeRemove = function(itemId) { this._redisCommandClient.sismember(this._queryKey, itemId, bind(this, function(err, isMember) { if (!Boolean(isMember)) { return } this._mutate('srem', itemId) })) } this._maybeAdd = function(itemId) { this._redisCommandClient.sismember(this._queryKey, itemId, bind(this, function(err, isMember) { if (Boolean(isMember)) { return } this._mutate('sadd', itemId) })) } this._mutate = function(redisOp, itemId) { logger.log('Determined that item membership changed', redisOp, itemId) this._redisCommandClient[redisOp](this._queryKey, itemId, bind(this, function(err, opChangedSet) { if (err) { throw logger.error('Could not modify query set', redisOp, queryKey, err) } var mutation = { op: redisOp, id: this._queryChannel, args: [itemId] } this._redisCommandClient.publish(this._queryChannel, JSON.stringify(mutation)) })) }})
|
self._maybeRemove(itemId)
|
self._removeIfMember(itemId)
|
_Query = Class(function() { this.init = function(lockKey, queryJSON) { this._queryKey = shared.keys.getQueryKey(queryJSON) this._queryChannel = shared.keys.getQueryChannel(queryJSON) this._query = JSON.parse(queryJSON) this._properties = map(this._query, function(key, val){ return key }) this._lockKey = lockKey this._redisSubClient = _redis.createClient() this._redisCommandClient = _redis.createClient() this._redisSubClient.stream.setTimeout(0) this._redisCommandClient.stream.setTimeout(0) var redisReadyCallback = blockCallback(bind(this, '_onRedisReady')) this._redisSubClient.stream.addListener('connect', redisReadyCallback.addBlock()) this._redisCommandClient.stream.addListener('connect', redisReadyCallback.addBlock()) } this.release = function() { this._redisCommandClient.del(this._lockKey) } this._onRedisReady = function() { for (var propName in this._query) { var propChannel = shared.keys.getPropertyChannel(propName), propKeyPattern = shared.keys.getPropertyKeyPattern(propName) this._redisSubClient.subscribeTo(propChannel, bind(this, '_onMutation')) logger.warn('About to process all the keys matching property', propName, 'This can get really really expensive!'); this._redisCommandClient.keys(propKeyPattern, bind(this, function(err, keysBytes) { if (err) { throw logger.error('Could not retrieve keys for processing', propKeyPattern, err) } if (!keysBytes) { return } this._processKeys(propName, keysBytes.toString().split(',')) })) } } this._processKeys = function(propName, itemPropKeys) { for (var i=0, itemPropKey; itemPropKey = itemPropKeys[i]; i++) { var itemId = shared.keys.getKeyInfo(itemPropKey).id this._processItem(itemId) } } this._onMutation = function(channel, mutationBytes) { var mutationInfo = shared.mutations.parseMutationBytes(mutationBytes), mutation = JSON.parse(mutationInfo.json), itemId = mutation.id this._processItem(itemId) } this._processItem = function(itemId) { var query = this._query, queryKey = this._queryKey, properties = this._properties, self = this logger.log('Check membership for:', 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) } } }) } processProperty(properties.length - 1) } this._maybeRemove = function(itemId) { this._redisCommandClient.sismember(this._queryKey, itemId, bind(this, function(err, isMember) { if (!Boolean(isMember)) { return } this._mutate('srem', itemId) })) } this._maybeAdd = function(itemId) { this._redisCommandClient.sismember(this._queryKey, itemId, bind(this, function(err, isMember) { if (Boolean(isMember)) { return } this._mutate('sadd', itemId) })) } this._mutate = function(redisOp, itemId) { logger.log('Determined that item membership changed', redisOp, itemId) this._redisCommandClient[redisOp](this._queryKey, itemId, bind(this, function(err, opChangedSet) { if (err) { throw logger.error('Could not modify query set', redisOp, queryKey, err) } var mutation = { op: redisOp, id: this._queryChannel, args: [itemId] } this._redisCommandClient.publish(this._queryChannel, JSON.stringify(mutation)) })) }})
|
if (propIndex == 0) { self._maybeAdd(itemId) } else { processProperty(propIndex - 1) }
|
if (propIndex == 0) { self._addIfNotMember(itemId) } else { processProperty(propIndex - 1) }
|
_Query = Class(function() { this.init = function(lockKey, queryJSON) { this._queryKey = shared.keys.getQueryKey(queryJSON) this._queryChannel = shared.keys.getQueryChannel(queryJSON) this._query = JSON.parse(queryJSON) this._properties = map(this._query, function(key, val){ return key }) this._lockKey = lockKey this._redisSubClient = _redis.createClient() this._redisCommandClient = _redis.createClient() this._redisSubClient.stream.setTimeout(0) this._redisCommandClient.stream.setTimeout(0) var redisReadyCallback = blockCallback(bind(this, '_onRedisReady')) this._redisSubClient.stream.addListener('connect', redisReadyCallback.addBlock()) this._redisCommandClient.stream.addListener('connect', redisReadyCallback.addBlock()) } this.release = function() { this._redisCommandClient.del(this._lockKey) } this._onRedisReady = function() { for (var propName in this._query) { var propChannel = shared.keys.getPropertyChannel(propName), propKeyPattern = shared.keys.getPropertyKeyPattern(propName) this._redisSubClient.subscribeTo(propChannel, bind(this, '_onMutation')) logger.warn('About to process all the keys matching property', propName, 'This can get really really expensive!'); this._redisCommandClient.keys(propKeyPattern, bind(this, function(err, keysBytes) { if (err) { throw logger.error('Could not retrieve keys for processing', propKeyPattern, err) } if (!keysBytes) { return } this._processKeys(propName, keysBytes.toString().split(',')) })) } } this._processKeys = function(propName, itemPropKeys) { for (var i=0, itemPropKey; itemPropKey = itemPropKeys[i]; i++) { var itemId = shared.keys.getKeyInfo(itemPropKey).id this._processItem(itemId) } } this._onMutation = function(channel, mutationBytes) { var mutationInfo = shared.mutations.parseMutationBytes(mutationBytes), mutation = JSON.parse(mutationInfo.json), itemId = mutation.id this._processItem(itemId) } this._processItem = function(itemId) { var query = this._query, queryKey = this._queryKey, properties = this._properties, self = this logger.log('Check membership for:', 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) } } }) } processProperty(properties.length - 1) } this._maybeRemove = function(itemId) { this._redisCommandClient.sismember(this._queryKey, itemId, bind(this, function(err, isMember) { if (!Boolean(isMember)) { return } this._mutate('srem', itemId) })) } this._maybeAdd = function(itemId) { this._redisCommandClient.sismember(this._queryKey, itemId, bind(this, function(err, isMember) { if (Boolean(isMember)) { return } this._mutate('sadd', itemId) })) } this._mutate = function(redisOp, itemId) { logger.log('Determined that item membership changed', redisOp, itemId) this._redisCommandClient[redisOp](this._queryKey, itemId, bind(this, function(err, opChangedSet) { if (err) { throw logger.error('Could not modify query set', redisOp, queryKey, err) } var mutation = { op: redisOp, id: this._queryChannel, args: [itemId] } this._redisCommandClient.publish(this._queryChannel, JSON.stringify(mutation)) })) }})
|
this._maybeRemove = function(itemId) {
|
this._removeIfMember = function(itemId) {
|
_Query = Class(function() { this.init = function(lockKey, queryJSON) { this._queryKey = shared.keys.getQueryKey(queryJSON) this._queryChannel = shared.keys.getQueryChannel(queryJSON) this._query = JSON.parse(queryJSON) this._properties = map(this._query, function(key, val){ return key }) this._lockKey = lockKey this._redisSubClient = _redis.createClient() this._redisCommandClient = _redis.createClient() this._redisSubClient.stream.setTimeout(0) this._redisCommandClient.stream.setTimeout(0) var redisReadyCallback = blockCallback(bind(this, '_onRedisReady')) this._redisSubClient.stream.addListener('connect', redisReadyCallback.addBlock()) this._redisCommandClient.stream.addListener('connect', redisReadyCallback.addBlock()) } this.release = function() { this._redisCommandClient.del(this._lockKey) } this._onRedisReady = function() { for (var propName in this._query) { var propChannel = shared.keys.getPropertyChannel(propName), propKeyPattern = shared.keys.getPropertyKeyPattern(propName) this._redisSubClient.subscribeTo(propChannel, bind(this, '_onMutation')) logger.warn('About to process all the keys matching property', propName, 'This can get really really expensive!'); this._redisCommandClient.keys(propKeyPattern, bind(this, function(err, keysBytes) { if (err) { throw logger.error('Could not retrieve keys for processing', propKeyPattern, err) } if (!keysBytes) { return } this._processKeys(propName, keysBytes.toString().split(',')) })) } } this._processKeys = function(propName, itemPropKeys) { for (var i=0, itemPropKey; itemPropKey = itemPropKeys[i]; i++) { var itemId = shared.keys.getKeyInfo(itemPropKey).id this._processItem(itemId) } } this._onMutation = function(channel, mutationBytes) { var mutationInfo = shared.mutations.parseMutationBytes(mutationBytes), mutation = JSON.parse(mutationInfo.json), itemId = mutation.id this._processItem(itemId) } this._processItem = function(itemId) { var query = this._query, queryKey = this._queryKey, properties = this._properties, self = this logger.log('Check membership for:', 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) } } }) } processProperty(properties.length - 1) } this._maybeRemove = function(itemId) { this._redisCommandClient.sismember(this._queryKey, itemId, bind(this, function(err, isMember) { if (!Boolean(isMember)) { return } this._mutate('srem', itemId) })) } this._maybeAdd = function(itemId) { this._redisCommandClient.sismember(this._queryKey, itemId, bind(this, function(err, isMember) { if (Boolean(isMember)) { return } this._mutate('sadd', itemId) })) } this._mutate = function(redisOp, itemId) { logger.log('Determined that item membership changed', redisOp, itemId) this._redisCommandClient[redisOp](this._queryKey, itemId, bind(this, function(err, opChangedSet) { if (err) { throw logger.error('Could not modify query set', redisOp, queryKey, err) } var mutation = { op: redisOp, id: this._queryChannel, args: [itemId] } this._redisCommandClient.publish(this._queryChannel, JSON.stringify(mutation)) })) }})
|
this._maybeAdd = function(itemId) {
|
this._addIfNotMember = function(itemId) {
|
_Query = Class(function() { this.init = function(lockKey, queryJSON) { this._queryKey = shared.keys.getQueryKey(queryJSON) this._queryChannel = shared.keys.getQueryChannel(queryJSON) this._query = JSON.parse(queryJSON) this._properties = map(this._query, function(key, val){ return key }) this._lockKey = lockKey this._redisSubClient = _redis.createClient() this._redisCommandClient = _redis.createClient() this._redisSubClient.stream.setTimeout(0) this._redisCommandClient.stream.setTimeout(0) var redisReadyCallback = blockCallback(bind(this, '_onRedisReady')) this._redisSubClient.stream.addListener('connect', redisReadyCallback.addBlock()) this._redisCommandClient.stream.addListener('connect', redisReadyCallback.addBlock()) } this.release = function() { this._redisCommandClient.del(this._lockKey) } this._onRedisReady = function() { for (var propName in this._query) { var propChannel = shared.keys.getPropertyChannel(propName), propKeyPattern = shared.keys.getPropertyKeyPattern(propName) this._redisSubClient.subscribeTo(propChannel, bind(this, '_onMutation')) logger.warn('About to process all the keys matching property', propName, 'This can get really really expensive!'); this._redisCommandClient.keys(propKeyPattern, bind(this, function(err, keysBytes) { if (err) { throw logger.error('Could not retrieve keys for processing', propKeyPattern, err) } if (!keysBytes) { return } this._processKeys(propName, keysBytes.toString().split(',')) })) } } this._processKeys = function(propName, itemPropKeys) { for (var i=0, itemPropKey; itemPropKey = itemPropKeys[i]; i++) { var itemId = shared.keys.getKeyInfo(itemPropKey).id this._processItem(itemId) } } this._onMutation = function(channel, mutationBytes) { var mutationInfo = shared.mutations.parseMutationBytes(mutationBytes), mutation = JSON.parse(mutationInfo.json), itemId = mutation.id this._processItem(itemId) } this._processItem = function(itemId) { var query = this._query, queryKey = this._queryKey, properties = this._properties, self = this logger.log('Check membership for:', 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) } } }) } processProperty(properties.length - 1) } this._maybeRemove = function(itemId) { this._redisCommandClient.sismember(this._queryKey, itemId, bind(this, function(err, isMember) { if (!Boolean(isMember)) { return } this._mutate('srem', itemId) })) } this._maybeAdd = function(itemId) { this._redisCommandClient.sismember(this._queryKey, itemId, bind(this, function(err, isMember) { if (Boolean(isMember)) { return } this._mutate('sadd', itemId) })) } this._mutate = function(redisOp, itemId) { logger.log('Determined that item membership changed', redisOp, itemId) this._redisCommandClient[redisOp](this._queryKey, itemId, bind(this, function(err, opChangedSet) { if (err) { throw logger.error('Could not modify query set', redisOp, queryKey, err) } var mutation = { op: redisOp, id: this._queryChannel, args: [itemId] } this._redisCommandClient.publish(this._queryChannel, JSON.stringify(mutation)) })) }})
|
var mutation = { op: redisOp, id: this._queryChannel, args: [itemId] } this._redisCommandClient.publish(this._queryChannel, JSON.stringify(mutation))
|
var queryKey = this._queryKey, mutation = { op: redisOp, id: queryKey, args: [itemId] } this._redisCommandClient.publish(queryKey, JSON.stringify(mutation))
|
_Query = Class(function() { this.init = function(lockKey, queryJSON) { this._queryKey = shared.keys.getQueryKey(queryJSON) this._queryChannel = shared.keys.getQueryChannel(queryJSON) this._query = JSON.parse(queryJSON) this._properties = map(this._query, function(key, val){ return key }) this._lockKey = lockKey this._redisSubClient = _redis.createClient() this._redisCommandClient = _redis.createClient() this._redisSubClient.stream.setTimeout(0) this._redisCommandClient.stream.setTimeout(0) var redisReadyCallback = blockCallback(bind(this, '_onRedisReady')) this._redisSubClient.stream.addListener('connect', redisReadyCallback.addBlock()) this._redisCommandClient.stream.addListener('connect', redisReadyCallback.addBlock()) } this.release = function() { this._redisCommandClient.del(this._lockKey) } this._onRedisReady = function() { for (var propName in this._query) { var propChannel = shared.keys.getPropertyChannel(propName), propKeyPattern = shared.keys.getPropertyKeyPattern(propName) this._redisSubClient.subscribeTo(propChannel, bind(this, '_onMutation')) logger.warn('About to process all the keys matching property', propName, 'This can get really really expensive!'); this._redisCommandClient.keys(propKeyPattern, bind(this, function(err, keysBytes) { if (err) { throw logger.error('Could not retrieve keys for processing', propKeyPattern, err) } if (!keysBytes) { return } this._processKeys(propName, keysBytes.toString().split(',')) })) } } this._processKeys = function(propName, itemPropKeys) { for (var i=0, itemPropKey; itemPropKey = itemPropKeys[i]; i++) { var itemId = shared.keys.getKeyInfo(itemPropKey).id this._processItem(itemId) } } this._onMutation = function(channel, mutationBytes) { var mutationInfo = shared.mutations.parseMutationBytes(mutationBytes), mutation = JSON.parse(mutationInfo.json), itemId = mutation.id this._processItem(itemId) } this._processItem = function(itemId) { var query = this._query, queryKey = this._queryKey, properties = this._properties, self = this logger.log('Check membership for:', 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) } } }) } processProperty(properties.length - 1) } this._maybeRemove = function(itemId) { this._redisCommandClient.sismember(this._queryKey, itemId, bind(this, function(err, isMember) { if (!Boolean(isMember)) { return } this._mutate('srem', itemId) })) } this._maybeAdd = function(itemId) { this._redisCommandClient.sismember(this._queryKey, itemId, bind(this, function(err, isMember) { if (Boolean(isMember)) { return } this._mutate('sadd', itemId) })) } this._mutate = function(redisOp, itemId) { logger.log('Determined that item membership changed', redisOp, itemId) this._redisCommandClient[redisOp](this._queryKey, itemId, bind(this, function(err, opChangedSet) { if (err) { throw logger.error('Could not modify query set', redisOp, queryKey, err) } var mutation = { op: redisOp, id: this._queryChannel, args: [itemId] } this._redisCommandClient.publish(this._queryChannel, JSON.stringify(mutation)) })) }})
|
select.click(function() {
|
select.change(function() {
|
select.click(function() { pickables.hide().filter('#' + $(this).val()).show(); }).click();
|
}).click();
|
}).change();
|
select.click(function() { pickables.hide().filter('#' + $(this).val()).show(); }).click();
|
browser.panelManager.setOffset(drawerSize.width + 50); browser.panelManager.layout({ width: size.width, height: size.height - 100 });
|
gPanelManager.setOffset(drawerSize.width + 50); gPanelManager.layout({ width: size.width, height: size.height - 100 });
|
browser.resizeManager.onWindowResize(function(size) { var drawerSize = gDrawer.layout(); browser.panelManager.setOffset(drawerSize.width + 50); browser.panelManager.layout({ width: size.width, height: size.height - 100 }); });
|
ORBEON.util.Test.executeCausingAjaxRequest(this, function() { ORBEON.xforms.Document.setValue("repeat-shown", "true"); }, function() { var trigger = YAHOO.util.Dom.get(this.triggerId); var link = ORBEON.util.Utils.isNewXHTMLLayout() ? YAHOO.util.Dom.getFirstChild(trigger) : trigger; YAHOO.util.Assert.areEqual("a", link.tagName.toLowerCase()); YAHOO.util.Assert.areEqual("Label", link.innerHTML); });
|
ORBEON.xforms.Events.click({target: YAHOO.util.Dom.get(this.dateValueInputId), button: 0 }); var nextYear = YAHOO.util.Dom.getElementsByClassName("calyearright", null, "orbeon-calendar-div")[0]; YAHOO.util.UserAction.click(nextYear); this.wait(function() { var monthYear = YAHOO.util.Dom.getElementsByClassName("calnav", null, "orbeon-calendar-div")[0]; YAHOO.util.Assert.areEqual("October 2031", monthYear.innerHTML); var previousYear = YAHOO.util.Dom.getElementsByClassName("calyearleft", null, "orbeon-calendar-div")[0]; YAHOO.util.UserAction.click(previousYear); YAHOO.util.UserAction.click(previousYear); this.wait(function() { monthYear = YAHOO.util.Dom.getElementsByClassName("calnav", null, "orbeon-calendar-div")[0]; YAHOO.util.Assert.areEqual("October 2029", monthYear.innerHTML); YAHOO.util.UserAction.click(document.body); }, XFORMS_INTERNAL_SHORT_DELAY_IN_MS); }, XFORMS_INTERNAL_SHORT_DELAY_IN_MS);
|
}, function() { ORBEON.util.Test.executeCausingAjaxRequest(this, function() { ORBEON.xforms.Document.setValue("repeat-shown", "true"); }, function() { var trigger = YAHOO.util.Dom.get(this.triggerId); var link = ORBEON.util.Utils.isNewXHTMLLayout() ? YAHOO.util.Dom.getFirstChild(trigger) : trigger; YAHOO.util.Assert.areEqual("a", link.tagName.toLowerCase()); YAHOO.util.Assert.areEqual("Label", link.innerHTML); }); });
|
$('#text').keyup(function(){ svgCanvas.setTextContent(this.value); });
|
callback:C.cbHandler(function(result){ if (result.success){ C.body.unmask(); C.infoMsg("removed '" + name + "'"); Ext.getCmp("manage_user_group_members_grid") .getBottomToolbar().onClick("refresh") } else return false })
|
$('#text').keyup(function(){ svgCanvas.setTextContent(this.value); });
|
var table = YAHOO.util.Dom.get('my-accordion$table-widths-resizeable$table-widths-resizeable-table'); var th1 = table.tHead.rows[0].cells[0]; var th2 = table.tHead.rows[0].cells[1]; var width1 = th1.clientWidth; var width2 = th2.clientWidth; thiss.resizeColumn(th2, -50, 10); thiss.checkTableAndContainerWidths(table); YAHOO.util.Assert.areEqual(width1, th1.clientWidth, "The width of the first column shouldn't change (before: " + width1 + ", after: " + width2 + ")."); YAHOO.util.Assert.areEqual(width2 - 50, th2.clientWidth, "The width of the second column should be " + (width2 - 50) + ", not " + th2.clientWidth); thiss.checkRowWidth(table.tHead.rows[0]); thiss.closeAccordionCase(thiss, 'widths-resizeable'); });
|
var table = YAHOO.util.Dom.get('my-accordion$table-widths-resizeable$table-widths-resizeable-table'); var th1 = table.tHead.rows[0].cells[0]; var th2 = table.tHead.rows[0].cells[1]; var width1 = th1.clientWidth; var width2 = th2.clientWidth; thiss.resizeColumn(th2, 100, 10); thiss.checkTableAndContainerWidths(table); YAHOO.util.Assert.areEqual(width1, th1.clientWidth, "The width of the first column shouldn't change (before: " + width1 + ", after: " + width2 + ")."); YAHOO.util.Assert.areEqual(width2 + 100, th2.clientWidth, "The width of the second column should be " + (width2 + 100) + ", not " + th2.clientWidth); thiss.checkRowWidth(table.tHead.rows[0]); thiss.closeAccordionCase(thiss, 'widths-resizeable'); });
|
thiss.openAccordionCase(thiss, 'widths-resizeable', function() { var table = YAHOO.util.Dom.get('my-accordion$table-widths-resizeable$table-widths-resizeable-table'); var th1 = table.tHead.rows[0].cells[0]; var th2 = table.tHead.rows[0].cells[1]; var width1 = th1.clientWidth; var width2 = th2.clientWidth; thiss.resizeColumn(th2, -50, 10); thiss.checkTableAndContainerWidths(table); YAHOO.util.Assert.areEqual(width1, th1.clientWidth, "The width of the first column shouldn't change (before: " + width1 + ", after: " + width2 + ")."); YAHOO.util.Assert.areEqual(width2 - 50, th2.clientWidth, "The width of the second column should be " + (width2 - 50) + ", not " + th2.clientWidth); thiss.checkRowWidth(table.tHead.rows[0]); thiss.closeAccordionCase(thiss, 'widths-resizeable'); });
|
var table = YAHOO.util.Dom.get('my-accordion$table-314379$table-314379-table');
|
var table = YAHOO.util.Dom.get('my-accordion$table-314379').getElementsByTagName("table")[0];
|
}, function() { var table = YAHOO.util.Dom.get('my-accordion$table-314379$table-314379-table'); var th = thiss.getSignificantElementByIndex(table.tHead.rows[0].cells, 1); var width; width = th.clientWidth; // resize the first column thiss.resizeColumn(th, 100, 10); // check the result YAHOO.util.Assert.areEqual(width + 100, th.clientWidth, "The width of the first column should be " + (width + 100) + ", not " + th.clientWidth); width = th.clientWidth; // Hide the table using the loading indicator ORBEON.util.Test.executeCausingAjaxRequest(thiss, function() { ORBEON.xforms.Document.setValue("loading", "true"); }, function() { // Test that the loading indicator is visible var loading = thiss.getLoadingIndicator(table); thiss.checkVisibility(loading, true); // Display the table again ORBEON.util.Test.executeCausingAjaxRequest(thiss, function() { ORBEON.xforms.Document.setValue("loading", "false"); }, function() { // Test that the column of the first column has been preserved YAHOO.util.Assert.areEqual(width, th.clientWidth, "The width of the first column should be " + width + ", not " + th.clientWidth); thiss.checkCellClasses(table, true); thiss.checkCellStyles(table, true); thiss.closeAccordionCase(thiss, '_314379'); }); }); });
|
}).mousemove(function(evt) { if (bSlidingRadius) { setRadiusSlider(evt, $(this));
|
$('#'+id+'_rg_jgraduate_svg').mousemove(function(evt) { if (null != draggingStop) { var dx = evt.clientX - startx; var dy = evt.clientY - starty; startx += dx; starty += dy; var x = parseFloat(draggingStop.getAttribute('x')) + dx; var y = parseFloat(draggingStop.getAttribute('y')) + dy; if (x < MARGINX - STOP_RADIUS) x = MARGINX - STOP_RADIUS; if (y < MARGINY - STOP_RADIUS) y = MARGINY - STOP_RADIUS; if (x > MARGINX + SIZEX - STOP_RADIUS) x = MARGINX + SIZEX - STOP_RADIUS; if (y > MARGINY + SIZEY - STOP_RADIUS) y = MARGINY + SIZEY - STOP_RADIUS; draggingStop.setAttribute('x', x); draggingStop.setAttribute('y', y); var fracx = (x - MARGINX + STOP_RADIUS)/SIZEX; var fracy = (y - MARGINY + STOP_RADIUS)/SIZEY; if (draggingStop.id == (id+'_center_pt')) { cxInput.val(fracx); cyInput.val(fracy); $this.paint.radialGradient.setAttribute('cx', fracx); $this.paint.radialGradient.setAttribute('cy', fracy); if(!showFocus) { $this.paint.radialGradient.setAttribute('fx', fracx); $this.paint.radialGradient.setAttribute('fy', fracy); } } else { fxInput.val(fracx); fyInput.val(fracy); $this.paint.radialGradient.setAttribute('fx', fracx); $this.paint.radialGradient.setAttribute('fy', fracy); }
|
}).mousemove(function(evt) { if (bSlidingRadius) { setRadiusSlider(evt, $(this)); evt.preventDefault(); } }).mouseup(function(evt) {
|
}).mouseup(function(evt) {
|
});
|
}).mousemove(function(evt) { if (bSlidingRadius) { setRadiusSlider(evt, $(this)); evt.preventDefault(); } }).mouseup(function(evt) {
|
window.setInterval(function() { ORBEON.xforms.Events.sendHeartBeatIfNeeded(heartBeatDelay); }, heartBeatDelay / 10);
|
window.setTimeout(function() { ORBEON.xforms.Events.orbeonLoadedEvent.fire(); }, ORBEON.util.Properties.internalShortDelay.get());
|
window.setInterval(function() { ORBEON.xforms.Events.sendHeartBeatIfNeeded(heartBeatDelay); }, heartBeatDelay / 10); // say session is 30 mn, heartbeat must come after 24 mn, we check every 2.4 mn so we should
|
if (bSlidingSpread) { setSpreadSlider(evt, $(this));
|
if (bSlidingRadius) { setRadiusSlider(evt, $(this));
|
}).mousemove(function(evt) { if (bSlidingSpread) { setSpreadSlider(evt, $(this)); evt.preventDefault(); } }).mouseup(function(evt) {
|
FunctionCallExpr.prototype.xpathfunctions["xxforms:if"] = function(ctx) { var test = this.args[0].evaluate(ctx).booleanValue(); return new StringValue(this.args[test ? 1 : 2].evaluate(ctx).stringValue()); };
|
YAHOO.util.Dom.getElementsBy(function(element) { var localName = ORBEON.util.Utils.getLocalName(element); var hasTargetAttribute = ORBEON.util.Dom.getAttribute(element, "target") == null; if ((localName == "submission" || localName == "load")) { if (ORBEON.util.Dom.getAttribute(element, "target") == null && ORBEON.util.Dom.getAttribute(element, "show-progress") == null) foundLoadOrSubmissionOrLoadWithNoTargetNoDownload = true; } }, null, responseXML.documentElement);
|
FunctionCallExpr.prototype.xpathfunctions["xxforms:if"] = function(ctx) { var test = this.args[0].evaluate(ctx).booleanValue(); return new StringValue(this.args[test ? 1 : 2].evaluate(ctx).stringValue()); };
|
X<S.length;X++){c=S[X].tagName.toLowerCase();if(S[X].getAttribute("tag")){c=S[X].getAttribute("tag").toLowerCase();}W=this._tag2cmd[c];if(W===undefined){W=[];}if(!D.isArray(W)){W=[W];}if(S[X].style.fontWeight.toLowerCase()=="bold"){W[W.length]="bold";}if(S[X].style.fontStyle.toLowerCase()=="italic"){W[W.length]="italic";}if(S[X].style.textDecoration.toLowerCase()=="underline"){W[W.length]="underline";}if(S[X].style.textDecoration.toLowerCase()=="line-through"){W[W.length]="strikethrough";}if(W.length>0){for(var V=0;V<W.length;V++){this.toolbar.selectButton(W[V]);this.toolbar.enableButton(W[V]);}}switch(S[X].style.textAlign.toLowerCase()){case"left":case"right":case"center":case"justify":var U=S[X].style.textAlign.toLowerCase();if(S[X].style.textAlign.toLowerCase()=="justify"){U="full";}this.toolbar.selectButton("justify"+U);this.toolbar.enableButton("justify"+U);break;}}if(M){var Y=M._configs.label._initialConfig.value;M.set("label",'<span class="yui-toolbar-fontname-'+this._cleanClassName(Y)+'">'+Y+"</span>");this._updateMenuChecked("fontname",Y);}if(L){L.set("label",L._configs.label._initialConfig.value);}var K=this.toolbar.getButtonByValue("heading");if(K){K.set("label",K._configs.label._initialConfig.value);this._updateMenuChecked("heading","none");}var I=this.toolbar.getButtonByValue("insertimage");if(I&&this.currentWindow&&(this.currentWindow.name=="insertimage")){this.toolbar.disableButton(I);}if(this._lastButton&&this._lastButton.isSelected){this.toolbar.deselectButton(this._lastButton.id);}this._undoNodeChange();}}this.fireEvent("afterNodeChange",{type:"afterNodeChange",target:this});},_updateMenuChecked:function(E,F,H){if(!H){H=this.toolbar;}var G=H.getButtonByValue(E);G.checkValue(F);},_handleToolbarClick:function(F){var H="";var I="";var G=F.button.value;if(F.button.menucmd){H=G;G=F.button.menucmd;}this._lastButton=F.button;if(this.STOP_EXEC_COMMAND){this.STOP_EXEC_COMMAND=false;return false;}else{this.execCommand(G,H);if(!this.browser.webkit){var E=this;setTimeout(function(){E._focusWindow.call(E);},5);}}A.stopEvent(F);},_setupAfterElement:function(){if(!this.beforeElement){this.beforeElement=document.createElement("h2");this.beforeElement.className="yui-editor-skipheader";this.beforeElement.tabIndex="-1";this.beforeElement.innerHTML=this.STR_BEFORE_EDITOR;this.get("element_cont").get("firstChild").insertBefore(this.beforeElement,this.toolbar.get("nextSibling"));}if(!this.afterElement){this.afterElement=document.createElement("h2");this.afterElement.className="yui-editor-skipheader";this.afterElement.tabIndex="-1";this.afterElement.innerHTML=this.STR_LEAVE_EDITOR;this.get("element_cont").get("firstChild").appendChild(this.afterElement);}},_disableEditor:function(F){if(F){this._removeEditorEvents();if(!this._mask){if(!!this.browser.ie){this._setDesignMode("off");}if(this.toolbar){this.toolbar.set("disabled",true);}this._mask=document.createElement("DIV");C.setStyle(this._mask,"height","100%");C.setStyle(this._mask,"width","100%");C.setStyle(this._mask,"position","absolute");C.setStyle(this._mask,"top","0");C.setStyle(this._mask,"left","0");C.setStyle(this._mask,"opacity",".5");C.addClass(this._mask,"yui-editor-masked");this.get("iframe").get("parentNode").appendChild(this._mask);}}else{this._initEditorEvents();if(this._mask){this._mask.parentNode.removeChild(this._mask);this._mask=null;if(this.toolbar){this.toolbar.set("disabled",false);}this._setDesignMode("on");this._focusWindow();var E=this;window.setTimeout(function(){E.nodeChange.call(E);},100);}}},SEP_DOMPATH:"<",STR_LEAVE_EDITOR:"You have left the Rich Text Editor.",STR_BEFORE_EDITOR:"This text field can contain stylized text and graphics. To cycle through all formatting options, use the keyboard shortcut Shift + Escape to place focus on the toolbar and navigate between options with your arrow keys. To exit this text editor use the Escape key and continue tabbing. <h4>Common formatting keyboard shortcuts:</h4><ul><li>Control Shift B sets text to bold</li> <li>Control Shift I sets text to italic</li> <li>Control Shift U underlines text</li> <li>Control Shift L adds an HTML link</li></ul>",STR_TITLE:"Rich Text Area.",STR_IMAGE_HERE:"Image URL Here",STR_LINK_URL:"Link URL",STOP_EXEC_COMMAND:false,STOP_NODE_CHANGE:false,CLASS_NOEDIT:"yui-noedit",CLASS_CONTAINER:"yui-editor-container",CLASS_EDITABLE:"yui-editor-editable",CLASS_EDITABLE_CONT:"yui-editor-editable-container",CLASS_PREFIX:"yui-editor",browser:function(){var E=YAHOO.env.ua;if(E.webkit>=420){E.webkit3=E.webkit;}else{E.webkit3=0;}E.mac=false;if(navigator.userAgent.indexOf("Macintosh")!==-1){E.mac=true;}return E;}(),init:function(F,E){if(!this._defaultToolbar){this._defaultToolbar={collapse:true,titlebar:"Text Editing Tools",draggable:false,buttons:[{group:"fontstyle",label:"Font Name and Size",buttons:[{type:"select",label:"Arial",value:"fontname",disabled:true,menu:[{text:"Arial",checked:true},{text:"Arial Black"},{text:"Comic Sans MS"},{text:"Courier New"},{text:"Lucida Console"},{text:"Tahoma"},{text:"Times New Roman"},{text:"Trebuchet MS"},{text:"Verdana"}]},{type:"spin",label:"13",value:"fontsize",range:[9,75],disabled:true}]},{type:"separator"},{group:"textstyle",label:"Font Style",buttons:[{type:"push",label:"Bold CTRL + SHIFT + B",value:"bold"},{type:"push",label:"Italic CTRL + SHIFT + I",value:"italic"},{type:"push",label:"Underline CTRL + SHIFT + U",value:"underline"},{type:"push",label:"Strike Through",value:"strikethrough"},{type:"separator"},{type:"color",label:"Font Color",value:"forecolor",disabled:true},{type:"color",label:"Background Color",value:"backcolor",disabled:true}]},{type:"separator"},{group:"indentlist",label:"Lists",buttons:[{type:"push",label:"Create an Unordered List",value:"insertunorderedlist"},{type:"push",label:"Create an Ordered List",value:"insertorderedlist"}]},{type:"separator"},{group:"insertitem",label:"Insert Item",buttons:[{type:"push",label:"HTML Link CTRL + SHIFT + L",value:"createlink",disabled:true},{type:"push",label:"Insert Image",value:"insertimage"}]}]};
|
(function(){var b=YAHOO.util.Dom,a=YAHOO.util.Event,c=YAHOO.lang;if(YAHOO.widget.Button){YAHOO.widget.ToolbarButtonAdvanced=YAHOO.widget.Button;YAHOO.widget.ToolbarButtonAdvanced.prototype.buttonType="rich";YAHOO.widget.ToolbarButtonAdvanced.prototype.checkValue=function(f){var e=this.getMenu().getItems();if(e.length===0){this.getMenu()._onBeforeShow();e=this.getMenu().getItems()}for(var d=0;d<e.length;d++){e[d].cfg.setProperty("checked",false);if(e[d].value==f){e[d].cfg.setProperty("checked",true)}}}}else{YAHOO.widget.ToolbarButtonAdvanced=function(){}}YAHOO.widget.ToolbarButton=function(e,d){if(c.isObject(arguments[0])&&!b.get(e).nodeType){d=e}var g=(d||{});var f={element:null,attributes:g};if(!f.attributes.type){f.attributes.type="push"}f.element=document.createElement("span");f.element.setAttribute("unselectable","on");f.element.className="yui-button yui-"+f.attributes.type+"-button";f.element.innerHTML='<span class="first-child"><a href="#">LABEL</a></span>';f.element.firstChild.firstChild.tabIndex="-1";f.attributes.id=b.generateId();YAHOO.widget.ToolbarButton.superclass.constructor.call(this,f.element,f.attributes)};YAHOO.extend(YAHOO.widget.ToolbarButton,YAHOO.util.Element,{buttonType:"normal",_handleMouseOver:function(){if(!this.get("disabled")){this.addClass("yui-button-hover");this.addClass("yui-"+this.get("type")+"-button-hover")}},_handleMouseOut:function(){this.removeClass("yui-button-hover");this.removeClass("yui-"+this.get("type")+"-button-hover")},checkValue:function(f){if(this.get("type")=="menu"){var e=this._button.options;for(var d=0;d<e.length;d++){if(e[d].value==f){e.selectedIndex=d}}}},init:function(e,d){YAHOO.widget.ToolbarButton.superclass.init.call(this,e,d);this.on("mouseover",this._handleMouseOver,this,true);this.on("mouseout",this._handleMouseOut,this,true)},initAttributes:function(d){YAHOO.widget.ToolbarButton.superclass.initAttributes.call(this,d);this.setAttributeConfig("value",{value:d.value});this.setAttributeConfig("menu",{value:d.menu||false});this.setAttributeConfig("type",{value:d.type,writeOnce:true,method:function(h){var g,f;if(!this._button){this._button=this.get("element").getElementsByTagName("a")[0]}switch(h){case"select":case"menu":g=document.createElement("select");var j=this.get("menu");for(var e=0;e<j.length;e++){f=document.createElement("option");f.innerHTML=j[e].text;f.value=j[e].value;if(j[e].checked){f.selected=true}g.appendChild(f)}this._button.parentNode.replaceChild(g,this._button);a.on(g,"change",this._handleSelect,this,true);this._button=g;break}}});this.setAttributeConfig("disabled",{value:d.disabled||false,method:function(e){if(e){this.addClass("yui-button-disabled");this.addClass("yui-"+this.get("type")+"-button-disabled")}else{this.removeClass("yui-button-disabled");this.removeClass("yui-"+this.get("type")+"-button-disabled")}if(this.get("type")=="menu"){this._button.disabled=e}}});this.setAttributeConfig("label",{value:d.label,method:function(e){if(!this._button){this._button=this.get("element").getElementsByTagName("a")[0]}if(this.get("type")=="push"){this._button.innerHTML=e}}});this.setAttributeConfig("title",{value:d.title});this.setAttributeConfig("container",{value:null,writeOnce:true,method:function(e){this.appendTo(e)}})},_handleSelect:function(e){var d=a.getTarget(e);var f=d.options[d.selectedIndex].value;this.fireEvent("change",{type:"change",value:f})},getMenu:function(){return this.get("menu")},destroy:function(){a.purgeElement(this.get("element"),true);this.get("element").parentNode.removeChild(this.get("element"));for(var d in this){if(c.hasOwnProperty(this,d)){this[d]=null}}},fireEvent:function(e,d){if(this.DOM_EVENTS[e]&&this.get("disabled")){return}YAHOO.widget.ToolbarButton.superclass.fireEvent.call(this,e,d)},toString:function(){return"ToolbarButton ("+this.get("id")+")"}})})();(function(){var c=YAHOO.util.Dom,a=YAHOO.util.Event,d=YAHOO.lang;var b=function(f){var e=f;if(d.isString(f)){e=this.getButtonById(f)}if(d.isNumber(f)){e=this.getButtonByIndex(f)}if((!(e instanceof YAHOO.widget.ToolbarButton))&&(!(e instanceof YAHOO.widget.ToolbarButtonAdvanced))){e=this.getButtonByValue(f)}if((e instanceof YAHOO.widget.ToolbarButton)||(e instanceof YAHOO.widget.ToolbarButtonAdvanced)){return e}return false};YAHOO.widget.Toolbar=function(i,h){if(d.isObject(arguments[0])&&!c.get(i).nodeType){h=i}var k={};if(h){d.augmentObject(k,h)}var j={element:null,attributes:k};if(d.isString(i)&&c.get(i)){j.element=c.get(i)}else{if(d.isObject(i)&&c.get(i)&&c.get(i).nodeType){j.element=c.get(i)}}if(!j.element){j.element=document.createElement("DIV");j.element.id=c.generateId();if(k.container&&c.get(k.container)){c.get(k.container).appendChild(j.element)}}if(!j.element.id){j.element.id=((d.isString(i))?i:c.generateId())}var f=document.createElement("fieldset");var g=document.createElement("legend");g.innerHTML="Toolbar";f.appendChild(g);var e=document.createElement("DIV");j.attributes.cont=e;c.addClass(e,"yui-toolbar-subcont");f.appendChild(e);j.element.appendChild(f);j.element.tabIndex=-1;j.attributes.element=j.element;j.attributes.id=j.element.id;YAHOO.widget.Toolbar.superclass.constructor.call(this,j.element,j.attributes)};YAHOO.extend(YAHOO.widget.Toolbar,YAHOO.util.Element,{_addMenuClasses:function(h,e,j){c.addClass(this.element,"yui-toolbar-"+j.get("value")+"-menu");if(c.hasClass(j._button.parentNode.parentNode,"yui-toolbar-select")){c.addClass(this.element,"yui-toolbar-select-menu")}var f=this.getItems();for(var g=0;g<f.length;g++){c.addClass(f[g].element,"yui-toolbar-"+j.get("value")+"-"+((f[g].value)?f[g].value.replace(/ /g,"-").toLowerCase():f[g]._oText.nodeValue.replace(/ /g,"-").toLowerCase()));c.addClass(f[g].element,"yui-toolbar-"+j.get("value")+"-"+((f[g].value)?f[g].value.replace(/ /g,"-"):f[g]._oText.nodeValue.replace(/ /g,"-")))}},buttonType:YAHOO.widget.ToolbarButton,dd:null,_colorData:{"#111111":"Obsidian","#2D2D2D":"Dark Gray","#434343":"Shale","#5B5B5B":"Flint","#737373":"Gray","#8B8B8B":"Concrete","#A2A2A2":"Gray","#B9B9B9":"Titanium","#000000":"Black","#D0D0D0":"Light Gray","#E6E6E6":"Silver","#FFFFFF":"White","#BFBF00":"Pumpkin","#FFFF00":"Yellow","#FFFF40":"Banana","#FFFF80":"Pale Yellow","#FFFFBF":"Butter","#525330":"Raw Siena","#898A49":"Mildew","#AEA945":"Olive","#7F7F00":"Paprika","#C3BE71":"Earth","#E0DCAA":"Khaki","#FCFAE1":"Cream","#60BF00":"Cactus","#80FF00":"Chartreuse","#A0FF40":"Green","#C0FF80":"Pale Lime","#DFFFBF":"Light Mint","#3B5738":"Green","#668F5A":"Lime Gray","#7F9757":"Yellow","#407F00":"Clover","#8A9B55":"Pistachio","#B7C296":"Light Jade","#E6EBD5":"Breakwater","#00BF00":"Spring Frost","#00FF80":"Pastel Green","#40FFA0":"Light Emerald","#80FFC0":"Sea Foam","#BFFFDF":"Sea Mist","#033D21":"Dark Forrest","#438059":"Moss","#7FA37C":"Medium Green","#007F40":"Pine","#8DAE94":"Yellow Gray Green","#ACC6B5":"Aqua Lung","#DDEBE2":"Sea Vapor","#00BFBF":"Fog","#00FFFF":"Cyan","#40FFFF":"Turquoise Blue","#80FFFF":"Light Aqua","#BFFFFF":"Pale Cyan","#033D3D":"Dark Teal","#347D7E":"Gray Turquoise","#609A9F":"Green Blue","#007F7F":"Seaweed","#96BDC4":"Green Gray","#B5D1D7":"Soapstone","#E2F1F4":"Light Turquoise","#0060BF":"Summer Sky","#0080FF":"Sky Blue","#40A0FF":"Electric Blue","#80C0FF":"Light Azure","#BFDFFF":"Ice Blue","#1B2C48":"Navy","#385376":"Biscay","#57708F":"Dusty Blue","#00407F":"Sea Blue","#7792AC":"Sky Blue Gray","#A8BED1":"Morning Sky","#DEEBF6":"Vapor","#0000BF":"Deep Blue","#0000FF":"Blue","#4040FF":"Cerulean Blue","#8080FF":"Evening Blue","#BFBFFF":"Light Blue","#212143":"Deep Indigo","#373E68":"Sea Blue","#444F75":"Night Blue","#00007F":"Indigo Blue","#585E82":"Dockside","#8687A4":"Blue Gray","#D2D1E1":"Light Blue Gray","#6000BF":"Neon Violet","#8000FF":"Blue Violet","#A040FF":"Violet Purple","#C080FF":"Violet Dusk","#DFBFFF":"Pale Lavender","#302449":"Cool Shale","#54466F":"Dark Indigo","#655A7F":"Dark Violet","#40007F":"Violet","#726284":"Smoky Violet","#9E8FA9":"Slate Gray","#DCD1DF":"Violet White","#BF00BF":"Royal Violet","#FF00FF":"Fuchsia","#FF40FF":"Magenta","#FF80FF":"Orchid","#FFBFFF":"Pale Magenta","#4A234A":"Dark Purple","#794A72":"Medium Purple","#936386":"Cool Granite","#7F007F":"Purple","#9D7292":"Purple Moon","#C0A0B6":"Pale Purple","#ECDAE5":"Pink Cloud","#BF005F":"Hot Pink","#FF007F":"Deep Pink","#FF409F":"Grape","#FF80BF":"Electric Pink","#FFBFDF":"Pink","#451528":"Purple Red","#823857":"Purple Dino","#A94A76":"Purple Gray","#7F003F":"Rose","#BC6F95":"Antique Mauve","#D8A5BB":"Cool Marble","#F7DDE9":"Pink Granite","#C00000":"Apple","#FF0000":"Fire Truck","#FF4040":"Pale Red","#FF8080":"Salmon","#FFC0C0":"Warm Pink","#441415":"Sepia","#82393C":"Rust","#AA4D4E":"Brick","#800000":"Brick Red","#BC6E6E":"Mauve","#D8A3A4":"Shrimp Pink","#F8DDDD":"Shell Pink","#BF5F00":"Dark Orange","#FF7F00":"Orange","#FF9F40":"Grapefruit","#FFBF80":"Canteloupe","#FFDFBF":"Wax","#482C1B":"Dark Brick","#855A40":"Dirt","#B27C51":"Tan","#7F3F00":"Nutmeg","#C49B71":"Mustard","#E1C4A8":"Pale Tan","#FDEEE0":"Marble"},_colorPicker:null,STR_COLLAPSE:"Collapse Toolbar",STR_SPIN_LABEL:"Spin Button with value {VALUE}. Use Control Shift Up Arrow and Control Shift Down arrow keys to increase or decrease the value.",STR_SPIN_UP:"Click to increase the value of this input",STR_SPIN_DOWN:"Click to decrease the value of this input",_titlebar:null,browser:YAHOO.env.ua,_buttonList:null,_buttonGroupList:null,_sep:null,_sepCount:null,_dragHandle:null,_toolbarConfigs:{renderer:true},CLASS_CONTAINER:"yui-toolbar-container",CLASS_DRAGHANDLE:"yui-toolbar-draghandle",CLASS_SEPARATOR:"yui-toolbar-separator",CLASS_DISABLED:"yui-toolbar-disabled",CLASS_PREFIX:"yui-toolbar",init:function(f,e){YAHOO.widget.Toolbar.superclass.init.call(this,f,e)},initAttributes:function(e){YAHOO.widget.Toolbar.superclass.initAttributes.call(this,e);this.addClass(this.CLASS_CONTAINER);this.setAttributeConfig("buttonType",{value:e.buttonType||"basic",writeOnce:true,validator:function(f){switch(f){case"advanced":case"basic":return true}return false},method:function(f){if(f=="advanced"){if(YAHOO.widget.Button){this.buttonType=YAHOO.widget.ToolbarButtonAdvanced}else{this.buttonType=YAHOO.widget.ToolbarButton}}else{this.buttonType=YAHOO.widget.ToolbarButton}}});this.setAttributeConfig("buttons",{value:[],writeOnce:true,method:function(g){for(var f in g){if(d.hasOwnProperty(g,f)){if(g[f].type=="separator"){this.addSeparator()}else{if(g[f].group!==undefined){this.addButtonGroup(g[f])}else{this.addButton(g[f])}}}}}});this.setAttributeConfig("disabled",{value:false,method:function(f){if(this.get("disabled")===f){return false}if(f){this.addClass(this.CLASS_DISABLED);this.set("draggable",false);this.disableAllButtons()}else{this.removeClass(this.CLASS_DISABLED);if(this._configs.draggable._initialConfig.value){this.set("draggable",true)}this.resetAllButtons()}}});this.setAttributeConfig("cont",{value:e.cont,readOnly:true});this.setAttributeConfig("grouplabels",{value:((e.grouplabels===false)?false:true),method:function(f){if(f){c.removeClass(this.get("cont"),(this.CLASS_PREFIX+"-nogrouplabels"))}else{c.addClass(this.get("cont"),(this.CLASS_PREFIX+"-nogrouplabels"))}}});this.setAttributeConfig("titlebar",{value:false,method:function(g){if(g){if(this._titlebar&&this._titlebar.parentNode){this._titlebar.parentNode.removeChild(this._titlebar)}this._titlebar=document.createElement("DIV");this._titlebar.tabIndex="-1";a.on(this._titlebar,"focus",function(){this._handleFocus()},this,true);c.addClass(this._titlebar,this.CLASS_PREFIX+"-titlebar");if(d.isString(g)){var f=document.createElement("h2");f.tabIndex="-1";f.innerHTML='<a href="#" tabIndex="0">'+g+"</a>";this._titlebar.appendChild(f);a.on(f.firstChild,"click",function(h){a.stopEvent(h)});a.on([f,f.firstChild],"focus",function(){this._handleFocus()},this,true)}if(this.get("firstChild")){this.insertBefore(this._titlebar,this.get("firstChild"))}else{this.appendChild(this._titlebar)}if(this.get("collapse")){this.set("collapse",true)}}else{if(this._titlebar){if(this._titlebar&&this._titlebar.parentNode){this._titlebar.parentNode.removeChild(this._titlebar)}}}}});this.setAttributeConfig("collapse",{value:false,method:function(h){if(this._titlebar){var g=null;var f=c.getElementsByClassName("collapse","span",this._titlebar);if(h){if(f.length>0){return true}g=document.createElement("SPAN");g.innerHTML="X";g.title=this.STR_COLLAPSE;c.addClass(g,"collapse");this._titlebar.appendChild(g);a.addListener(g,"click",function(){if(c.hasClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed")){this.collapse(false)}else{this.collapse()}},this,true)}else{g=c.getElementsByClassName("collapse","span",this._titlebar);if(g[0]){if(c.hasClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed")){this.collapse(false)}g[0].parentNode.removeChild(g[0])}}}}});this.setAttributeConfig("draggable",{value:(e.draggable||false),method:function(f){if(f&&!this.get("titlebar")){if(!this._dragHandle){this._dragHandle=document.createElement("SPAN");this._dragHandle.innerHTML="|";this._dragHandle.setAttribute("title","Click to drag the toolbar");this._dragHandle.id=this.get("id")+"_draghandle";c.addClass(this._dragHandle,this.CLASS_DRAGHANDLE);if(this.get("cont").hasChildNodes()){this.get("cont").insertBefore(this._dragHandle,this.get("cont").firstChild)}else{this.get("cont").appendChild(this._dragHandle)}this.dd=new YAHOO.util.DD(this.get("id"));this.dd.setHandleElId(this._dragHandle.id)}}else{if(this._dragHandle){this._dragHandle.parentNode.removeChild(this._dragHandle);this._dragHandle=null;this.dd=null}}if(this._titlebar){if(f){this.dd=new YAHOO.util.DD(this.get("id"));this.dd.setHandleElId(this._titlebar);c.addClass(this._titlebar,"draggable")}else{c.removeClass(this._titlebar,"draggable");if(this.dd){this.dd.unreg();this.dd=null}}}},validator:function(g){var f=true;if(!YAHOO.util.DD){f=false}return f}})},addButtonGroup:function(j){if(!this.get("element")){this._queue[this._queue.length]=["addButtonGroup",arguments];return false}if(!this.hasClass(this.CLASS_PREFIX+"-grouped")){this.addClass(this.CLASS_PREFIX+"-grouped")}var k=document.createElement("DIV");c.addClass(k,this.CLASS_PREFIX+"-group");c.addClass(k,this.CLASS_PREFIX+"-group-"+j.group);if(j.label){var f=document.createElement("h3");f.innerHTML=j.label;k.appendChild(f)}if(!this.get("grouplabels")){c.addClass(this.get("cont"),this.CLASS_PREFIX,"-nogrouplabels")}this.get("cont").appendChild(k);var h=document.createElement("ul");k.appendChild(h);if(!this._buttonGroupList){this._buttonGroupList={}}this._buttonGroupList[j.group]=h;for(var g=0;g<j.buttons.length;g++){var e=document.createElement("li");e.className=this.CLASS_PREFIX+"-groupitem";h.appendChild(e);if((j.buttons[g].type!==undefined)&&j.buttons[g].type=="separator"){this.addSeparator(e)}else{j.buttons[g].container=e;this.addButton(j.buttons[g])}}},addButtonToGroup:function(g,h,i){var f=this._buttonGroupList[h];var e=document.createElement("li");e.className=this.CLASS_PREFIX+"-groupitem";g.container=e;this.addButton(g,i);f.appendChild(e)},addButton:function(k,j){if(!this.get("element")){this._queue[this._queue.length]=["addButton",arguments];return false}if(!this._buttonList){this._buttonList=[]}if(!k.container){k.container=this.get("cont")}if((k.type=="menu")||(k.type=="split")||(k.type=="select")){if(d.isArray(k.menu)){for(var s in k.menu){if(d.hasOwnProperty(k.menu,s)){var y={fn:function(o,i,m){if(!k.menucmd){k.menucmd=k.value}k.value=((m.value)?m.value:m._oText.nodeValue)},scope:this};k.menu[s].onclick=y}}}}var t={},q=false;for(var n in k){if(d.hasOwnProperty(k,n)){if(!this._toolbarConfigs[n]){t[n]=k[n]}}}if(k.type=="select"){t.type="menu"}if(k.type=="spin"){t.type="push"}if(t.type=="color"){if(YAHOO.widget.Overlay){t=this._makeColorButton(t)}else{q=true}}if(t.menu){if((YAHOO.widget.Overlay)&&(k.menu instanceof YAHOO.widget.Overlay)){k.menu.showEvent.subscribe(function(){this._button=t})}else{for(var r=0;r<t.menu.length;r++){if(!t.menu[r].value){t.menu[r].value=t.menu[r].text}}if(this.browser.webkit){t.focusmenu=false}}}if(q){k=false}else{this._configs.buttons.value[this._configs.buttons.value.length]=k;var w=new this.buttonType(t);w.get("element").tabIndex="-1";w.get("element").setAttribute("role","button");w._selected=true;if(this.get("disabled")){w.set("disabled",true)}if(!k.id){k.id=w.get("id")}if(j){var f=w.get("element");var p=null;if(j.get){p=j.get("element").nextSibling}else{if(j.nextSibling){p=j.nextSibling}}if(p){p.parentNode.insertBefore(f,p)}}w.addClass(this.CLASS_PREFIX+"-"+w.get("value"));var v=document.createElement("span");v.className=this.CLASS_PREFIX+"-icon";w.get("element").insertBefore(v,w.get("firstChild"));if(w._button.tagName.toLowerCase()=="button"){w.get("element").setAttribute("unselectable","on");var x=document.createElement("a");x.innerHTML=w._button.innerHTML;x.href="#";x.tabIndex="-1";a.on(x,"click",function(i){a.stopEvent(i)});w._button.parentNode.replaceChild(x,w._button);w._button=x}if(k.type=="select"){if(w._button.tagName.toLowerCase()=="select"){v.parentNode.removeChild(v);var g=w._button;var u=w.get("element");u.parentNode.replaceChild(g,u)}else{w.addClass(this.CLASS_PREFIX+"-select")}}if(k.type=="spin"){if(!d.isArray(k.range)){k.range=[10,100]}this._makeSpinButton(w,k)}w.get("element").setAttribute("title",w.get("label"));if(k.type!="spin"){if((YAHOO.widget.Overlay)&&(t.menu instanceof YAHOO.widget.Overlay)){var h=function(o){var i=true;if(o.keyCode&&(o.keyCode==9)){i=false}if(i){if(this._colorPicker){this._colorPicker._button=k.value}var m=w.getMenu().element;if(c.getStyle(m,"visibility")=="hidden"){w.getMenu().show()}else{w.getMenu().hide()}}YAHOO.util.Event.stopEvent(o)};w.on("mousedown",h,k,this);w.on("keydown",h,k,this)}else{if((k.type!="menu")&&(k.type!="select")){w.on("keypress",this._buttonClick,k,this);w.on("mousedown",function(i){YAHOO.util.Event.stopEvent(i);this._buttonClick(i,k)},k,this);w.on("click",function(i){YAHOO.util.Event.stopEvent(i)})}else{w.on("mousedown",function(i){YAHOO.util.Event.stopEvent(i)});w.on("click",function(i){YAHOO.util.Event.stopEvent(i)});w.on("change",function(i){if(!k.menucmd){k.menucmd=k.value}k.value=i.value;this._buttonClick(i,k)},this,true);var l=this;w.on("appendTo",function(){var i=this;if(i.getMenu()&&i.getMenu().mouseDownEvent){i.getMenu().mouseDownEvent.subscribe(function(z,o){var m=o[1];YAHOO.util.Event.stopEvent(o[0]);i._onMenuClick(o[0],i);if(!k.menucmd){k.menucmd=k.value}k.value=((m.value)?m.value:m._oText.nodeValue);l._buttonClick.call(l,o[1],k);i._hideMenu();return false});i.getMenu().clickEvent.subscribe(function(o,m){YAHOO.util.Event.stopEvent(m[0])});i.getMenu().mouseUpEvent.subscribe(function(o,m){YAHOO.util.Event.stopEvent(m[0])})}})}}}else{w.on("mousedown",function(i){YAHOO.util.Event.stopEvent(i)});w.on("click",function(i){YAHOO.util.Event.stopEvent(i)})}if(this.browser.ie){}if(this.browser.webkit){w.hasFocus=function(){return true}}this._buttonList[this._buttonList.length]=w;if((k.type=="menu")||(k.type=="split")||(k.type=="select")){if(d.isArray(k.menu)){var e=w.getMenu();if(e&&e.renderEvent){e.renderEvent.subscribe(this._addMenuClasses,w);if(k.renderer){e.renderEvent.subscribe(k.renderer,w)}}}}}return k},addSeparator:function(e,h){if(!this.get("element")){this._queue[this._queue.length]=["addSeparator",arguments];return false}var f=((e)?e:this.get("cont"));if(!this.get("element")){this._queue[this._queue.length]=["addSeparator",arguments];return false}if(this._sepCount===null){this._sepCount=0}if(!this._sep){this._sep=document.createElement("SPAN");c.addClass(this._sep,this.CLASS_SEPARATOR);this._sep.innerHTML="|"}var g=this._sep.cloneNode(true);this._sepCount++;c.addClass(g,this.CLASS_SEPARATOR+"-"+this._sepCount);if(h){var i=null;if(h.get){i=h.get("element").nextSibling}else{if(h.nextSibling){i=h.nextSibling}else{i=h}}if(i){if(i==h){i.parentNode.appendChild(g)}else{i.parentNode.insertBefore(g,i)}}}else{f.appendChild(g)}return g},_createColorPicker:function(h){if(c.get(h+"_colors")){c.get(h+"_colors").parentNode.removeChild(c.get(h+"_colors"))}var e=document.createElement("div");e.className="yui-toolbar-colors";e.id=h+"_colors";e.style.display="none";a.on(window,"load",function(){document.body.appendChild(e)},this,true);this._colorPicker=e;var g="";for(var f in this._colorData){if(d.hasOwnProperty(this._colorData,f)){g+='<a style="background-color: '+f+'" href="#">'+f.replace("#","")+"</a>"}}g+="<span><em>X</em><strong></strong></span>";window.setTimeout(function(){e.innerHTML=g},0);a.on(e,"mouseover",function(m){var k=this._colorPicker;var l=k.getElementsByTagName("em")[0];var j=k.getElementsByTagName("strong")[0];var i=a.getTarget(m);if(i.tagName.toLowerCase()=="a"){l.style.backgroundColor=i.style.backgroundColor;j.innerHTML=this._colorData["#"+i.innerHTML]+"<br>"+i.innerHTML}},this,true);a.on(e,"focus",function(i){a.stopEvent(i)});a.on(e,"click",function(i){a.stopEvent(i)});a.on(e,"mousedown",function(j){a.stopEvent(j);var i=a.getTarget(j);if(i.tagName.toLowerCase()=="a"){var l=this.fireEvent("colorPickerClicked",{type:"colorPickerClicked",target:this,button:this._colorPicker._button,color:i.innerHTML,colorName:this._colorData["#"+i.innerHTML]});if(l!==false){var k={color:i.innerHTML,colorName:this._colorData["#"+i.innerHTML],value:this._colorPicker._button};this.fireEvent("buttonClick",{type:"buttonClick",target:this.get("element"),button:k})}this.getButtonByValue(this._colorPicker._button).getMenu().hide()}},this,true)},_resetColorPicker:function(){var f=this._colorPicker.getElementsByTagName("em")[0];var e=this._colorPicker.getElementsByTagName("strong")[0];f.style.backgroundColor="transparent";e.innerHTML=""},_makeColorButton:function(e){if(!this._colorPicker){this._createColorPicker(this.get("id"))}e.type="color";e.menu=new YAHOO.widget.Overlay(this.get("id")+"_"+e.value+"_menu",{visible:false,position:"absolute",iframe:true});e.menu.setBody("");e.menu.render(this.get("cont"));c.addClass(e.menu.element,"yui-button-menu");c.addClass(e.menu.element,"yui-color-button-menu");e.menu.beforeShowEvent.subscribe(function(){e.menu.cfg.setProperty("zindex",5);e.menu.cfg.setProperty("context",[this.getButtonById(e.id).get("element"),"tl","bl"]);this._resetColorPicker();var f=this._colorPicker;if(f.parentNode){f.parentNode.removeChild(f)}e.menu.setBody("");e.menu.appendToBody(f);this._colorPicker.style.display="block"},this,true);return e},_makeSpinButton:function(r,l){r.addClass(this.CLASS_PREFIX+"-spinbutton");var s=this,n=r._button.parentNode.parentNode,i=l.range,h=document.createElement("a"),g=document.createElement("a");h.href="#";g.href="#";h.tabIndex="-1";g.tabIndex="-1";h.className="up";h.title=this.STR_SPIN_UP;h.innerHTML=this.STR_SPIN_UP;g.className="down";g.title=this.STR_SPIN_DOWN;g.innerHTML=this.STR_SPIN_DOWN;n.appendChild(h);n.appendChild(g);var m=YAHOO.lang.substitute(this.STR_SPIN_LABEL,{VALUE:r.get("label")});r.set("title",m);var q=function(t){t=((t<i[0])?i[0]:t);t=((t>i[1])?i[1]:t);return t};var p=this.browser;var f=false;var k=this.STR_SPIN_LABEL;if(this._titlebar&&this._titlebar.firstChild){f=this._titlebar.firstChild}var e=function(u){YAHOO.util.Event.stopEvent(u);if(!r.get("disabled")&&(u.keyCode!=9)){var v=parseInt(r.get("label"),10);v++;v=q(v);r.set("label",""+v);var t=YAHOO.lang.substitute(k,{VALUE:r.get("label")});r.set("title",t);if(!p.webkit&&f){}s._buttonClick(u,l)}};var o=function(u){YAHOO.util.Event.stopEvent(u);if(!r.get("disabled")&&(u.keyCode!=9)){var v=parseInt(r.get("label"),10);v--;v=q(v);r.set("label",""+v);var t=YAHOO.lang.substitute(k,{VALUE:r.get("label")});r.set("title",t);if(!p.webkit&&f){}s._buttonClick(u,l)}};var j=function(t){if(t.keyCode==38){e(t)}else{if(t.keyCode==40){o(t)}else{if(t.keyCode==107&&t.shiftKey){e(t)}else{if(t.keyCode==109&&t.shiftKey){o(t)}}}}};r.on("keydown",j,this,true);a.on(h,"mousedown",function(t){a.stopEvent(t)},this,true);a.on(g,"mousedown",function(t){a.stopEvent(t)},this,true);a.on(h,"click",e,this,true);a.on(g,"click",o,this,true)},_buttonClick:function(n,f){var e=true;if(n&&n.type=="keypress"){if(n.keyCode==9){e=false}else{if((n.keyCode===13)||(n.keyCode===0)||(n.keyCode===32)){}else{e=false}}}if(e){var p=true,h=false;f.isSelected=this.isSelected(f.id);if(f.value){h=this.fireEvent(f.value+"Click",{type:f.value+"Click",target:this.get("element"),button:f});if(h===false){p=false}}if(f.menucmd&&p){h=this.fireEvent(f.menucmd+"Click",{type:f.menucmd+"Click",target:this.get("element"),button:f});if(h===false){p=false}}if(p){this.fireEvent("buttonClick",{type:"buttonClick",target:this.get("element"),button:f})}if(f.type=="select"){var l=this.getButtonById(f.id);if(l.buttonType=="rich"){var k=f.value;for(var j=0;j<f.menu.length;j++){if(f.menu[j].value==f.value){k=f.menu[j].text;break}}l.set("label",'<span class="yui-toolbar-'+f.menucmd+"-"+(f.value).replace(/ /g,"-").toLowerCase()+'">'+k+"</span>");var o=l.getMenu().getItems();for(var g=0;g<o.length;g++){if(o[g].value.toLowerCase()==f.value.toLowerCase()){o[g].cfg.setProperty("checked",true)}else{o[g].cfg.setProperty("checked",false)}}}}if(n){a.stopEvent(n)}}},_keyNav:null,_navCounter:null,_navigateButtons:function(f){switch(f.keyCode){case 37:case 39:if(f.keyCode==37){this._navCounter--}else{this._navCounter++}if(this._navCounter>(this._buttonList.length-1)){this._navCounter=0}if(this._navCounter<0){this._navCounter=(this._buttonList.length-1)}if(this._buttonList[this._navCounter]){var e=this._buttonList[this._navCounter].get("element");if(this.browser.ie){e=this._buttonList[this._navCounter].get("element").getElementsByTagName("a")[0]}if(this._buttonList[this._navCounter].get("disabled")){this._navigateButtons(f)}else{e.focus()}}break}},_handleFocus:function(){if(!this._keyNav){var e="keypress";if(this.browser.ie){e="keydown"}a.on(this.get("element"),e,this._navigateButtons,this,true);this._keyNav=true;this._navCounter=-1}},getButtonById:function(g){var e=this._buttonList.length;for(var f=0;f<e;f++){if(this._buttonList[f]&&this._buttonList[f].get("id")==g){return this._buttonList[f]}}return false},getButtonByValue:function(n){var h=this.get("buttons");var f=h.length;for(var k=0;k<f;k++){if(h[k].group!==undefined){for(var e=0;e<h[k].buttons.length;e++){if((h[k].buttons[e].value==n)||(h[k].buttons[e].menucmd==n)){return this.getButtonById(h[k].buttons[e].id)}if(h[k].buttons[e].menu){for(var l=0;l<h[k].buttons[e].menu.length;l++){if(h[k].buttons[e].menu[l].value==n){return this.getButtonById(h[k].buttons[e].id)}}}}}else{if((h[k].value==n)||(h[k].menucmd==n)){return this.getButtonById(h[k].id)}if(h[k].menu){for(var g=0;g<h[k].menu.length;g++){if(h[k].menu[g].value==n){return this.getButtonById(h[k].id)}}}}}return false},getButtonByIndex:function(e){if(this._buttonList[e]){return this._buttonList[e]}else{return false}},getButtons:function(){return this._buttonList},disableButton:function(f){var e=b.call(this,f);if(e){e.set("disabled",true)}else{return false}},enableButton:function(f){if(this.get("disabled")){return false}var e=b.call(this,f);if(e){if(e.get("disabled")){e.set("disabled",false)}}else{return false}},isSelected:function(f){var e=b.call(this,f);if(e){return e._selected}return false},selectButton:function(i,g){var f=b.call(this,i);if(f){f.addClass("yui-button-selected");f.addClass("yui-button-"+f.get("value")+"-selected");f._selected=true;if(g){if(f.buttonType=="rich"){var h=f.getMenu().getItems();for(var e=0;e<h.length;e++){if(h[e].value==g){h[e].cfg.setProperty("checked",true);f.set("label",'<span class="yui-toolbar-'+f.get("value")+"-"+(g).replace(/ /g,"-").toLowerCase()+'">'+h[e]._oText.nodeValue+"</span>")}else{h[e].cfg.setProperty("checked",false)}}}}}else{return false}},deselectButton:function(f){var e=b.call(this,f);if(e){e.removeClass("yui-button-selected");e.removeClass("yui-button-"+e.get("value")+"-selected");e.removeClass("yui-button-hover");e._selected=false}else{return false}},deselectAllButtons:function(){var e=this._buttonList.length;for(var f=0;f<e;f++){this.deselectButton(this._buttonList[f])}},disableAllButtons:function(){if(this.get("disabled")){return false}var e=this._buttonList.length;for(var f=0;f<e;f++){this.disableButton(this._buttonList[f])}},enableAllButtons:function(){if(this.get("disabled")){return false}var e=this._buttonList.length;for(var f=0;f<e;f++){this.enableButton(this._buttonList[f])}},resetAllButtons:function(j){if(!d.isObject(j)){j={}}if(this.get("disabled")){return false}var e=this._buttonList.length;for(var f=0;f<e;f++){var h=this._buttonList[f];if(h){var g=h._configs.disabled._initialConfig.value;if(j[h.get("id")]){this.enableButton(h);this.selectButton(h)}else{if(g){this.disableButton(h)}else{this.enableButton(h)}this.deselectButton(h)}}}},destroyButton:function(j){var g=b.call(this,j);if(g){var h=g.get("id");g.destroy();var e=this._buttonList.length;for(var f=0;f<e;f++){if(this._buttonList[f]&&this._buttonList[f].get("id")==h){this._buttonList[f]=null}}}else{return false}},destroy:function(){this.get("element").innerHTML="";this.get("element").className="";for(var e in this){if(d.hasOwnProperty(this,e)){this[e]=null}}return true},collapse:function(f){var e=c.getElementsByClassName("collapse","span",this._titlebar);if(f===false){c.removeClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed");if(e[0]){c.removeClass(e[0],"collapsed")}this.fireEvent("toolbarExpanded",{type:"toolbarExpanded",target:this})}else{if(e[0]){c.addClass(e[0],"collapsed")}c.addClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed");this.fireEvent("toolbarCollapsed",{type:"toolbarCollapsed",target:this})}},toString:function(){return"Toolbar (#"+this.get("element").id+") with "+this._buttonList.length+" buttons."}})})();(function(){var c=YAHOO.util.Dom,a=YAHOO.util.Event,d=YAHOO.lang,b=YAHOO.widget.Toolbar;YAHOO.widget.SimpleEditor=function(h,m){var g={};if(d.isObject(h)&&(!h.tagName)&&!m){d.augmentObject(g,h);h=document.createElement("textarea");this.DOMReady=true;if(g.container){var k=c.get(g.container);k.appendChild(h)}else{document.body.appendChild(h)}}else{if(m){d.augmentObject(g,m)}}var i={element:null,attributes:g},f=null;if(d.isString(h)){f=h}else{if(i.attributes.id){f=i.attributes.id}else{this.DOMReady=true;f=c.generateId(h)}}i.element=h;var j=document.createElement("DIV");i.attributes.element_cont=new YAHOO.util.Element(j,{id:f+"_container"});var e=document.createElement("div");c.addClass(e,"first-child");i.attributes.element_cont.appendChild(e);if(!i.attributes.toolbar_cont){i.attributes.toolbar_cont=document.createElement("DIV");i.attributes.toolbar_cont.id=f+"_toolbar";e.appendChild(i.attributes.toolbar_cont)}var l=document.createElement("DIV");e.appendChild(l);i.attributes.editor_wrapper=l;YAHOO.widget.SimpleEditor.superclass.constructor.call(this,i.element,i.attributes)};YAHOO.extend(YAHOO.widget.SimpleEditor,YAHOO.util.Element,{_resizeConfig:{handles:["br"],autoRatio:true,status:true,proxy:true,useShim:true,setSize:false},_setupResize:function(){if(!YAHOO.util.DD||!YAHOO.util.Resize){return false}if(this.get("resize")){var e={};d.augmentObject(e,this._resizeConfig);this.resize=new YAHOO.util.Resize(this.get("element_cont").get("element"),e);this.resize.on("resize",function(g){var l=this.get("animate");this.set("animate",false);this.set("width",g.width+"px");var i=g.height,j=(this.toolbar.get("element").clientHeight+2),k=0;if(this.dompath){k=(this.dompath.clientHeight+1)}var f=(i-j-k);this.set("height",f+"px");this.get("element_cont").setStyle("height","");this.set("animate",l)},this,true)}},resize:null,_setupDD:function(){if(!YAHOO.util.DD){return false}if(this.get("drag")){var f=this.get("drag"),e=YAHOO.util.DD;if(f==="proxy"){e=YAHOO.util.DDProxy}this.dd=new e(this.get("element_cont").get("element"));this.toolbar.addClass("draggable");this.dd.setHandleElId(this.toolbar._titlebar)}},dd:null,_lastCommand:null,_undoNodeChange:function(){},_storeUndo:function(){},_checkKey:function(f,j){var g=false;if((j.keyCode===f.key)){if(f.mods&&(f.mods.length>0)){var l=0;for(var h=0;h<f.mods.length;h++){if(this.browser.mac){if(f.mods[h]=="ctrl"){f.mods[h]="meta"}}if(j[f.mods[h]+"Key"]===true){l++}}if(l===f.mods.length){g=true}}else{g=true}}return g},_keyMap:{SELECT_ALL:{key:65,mods:["ctrl"]},CLOSE_WINDOW:{key:87,mods:["shift","ctrl"]},FOCUS_TOOLBAR:{key:27,mods:["shift"]},FOCUS_AFTER:{key:27},CREATE_LINK:{key:76,mods:["shift","ctrl"]},BOLD:{key:66,mods:["shift","ctrl"]},ITALIC:{key:73,mods:["shift","ctrl"]},UNDERLINE:{key:85,mods:["shift","ctrl"]},UNDO:{key:90,mods:["ctrl"]},REDO:{key:90,mods:["shift","ctrl"]},JUSTIFY_LEFT:{key:219,mods:["shift","ctrl"]},JUSTIFY_CENTER:{key:220,mods:["shift","ctrl"]},JUSTIFY_RIGHT:{key:221,mods:["shift","ctrl"]}},_cleanClassName:function(e){return e.replace(/ /g,"-").toLowerCase()},_textarea:null,_docType:'<!DOCTYPE HTML PUBLIC "-
|
X<S.length;X++){c=S[X].tagName.toLowerCase();if(S[X].getAttribute("tag")){c=S[X].getAttribute("tag").toLowerCase();}W=this._tag2cmd[c];if(W===undefined){W=[];}if(!D.isArray(W)){W=[W];}if(S[X].style.fontWeight.toLowerCase()=="bold"){W[W.length]="bold";}if(S[X].style.fontStyle.toLowerCase()=="italic"){W[W.length]="italic";}if(S[X].style.textDecoration.toLowerCase()=="underline"){W[W.length]="underline";}if(S[X].style.textDecoration.toLowerCase()=="line-through"){W[W.length]="strikethrough";}if(W.length>0){for(var V=0;V<W.length;V++){this.toolbar.selectButton(W[V]);this.toolbar.enableButton(W[V]);}}switch(S[X].style.textAlign.toLowerCase()){case"left":case"right":case"center":case"justify":var U=S[X].style.textAlign.toLowerCase();if(S[X].style.textAlign.toLowerCase()=="justify"){U="full";}this.toolbar.selectButton("justify"+U);this.toolbar.enableButton("justify"+U);break;}}if(M){var Y=M._configs.label._initialConfig.value;M.set("label",'<span class="yui-toolbar-fontname-'+this._cleanClassName(Y)+'">'+Y+"</span>");this._updateMenuChecked("fontname",Y);}if(L){L.set("label",L._configs.label._initialConfig.value);}var K=this.toolbar.getButtonByValue("heading");if(K){K.set("label",K._configs.label._initialConfig.value);this._updateMenuChecked("heading","none");}var I=this.toolbar.getButtonByValue("insertimage");if(I&&this.currentWindow&&(this.currentWindow.name=="insertimage")){this.toolbar.disableButton(I);}if(this._lastButton&&this._lastButton.isSelected){this.toolbar.deselectButton(this._lastButton.id);}this._undoNodeChange();}}this.fireEvent("afterNodeChange",{type:"afterNodeChange",target:this});},_updateMenuChecked:function(E,F,H){if(!H){H=this.toolbar;}var G=H.getButtonByValue(E);G.checkValue(F);},_handleToolbarClick:function(F){var H="";var I="";var G=F.button.value;if(F.button.menucmd){H=G;G=F.button.menucmd;}this._lastButton=F.button;if(this.STOP_EXEC_COMMAND){this.STOP_EXEC_COMMAND=false;return false;}else{this.execCommand(G,H);if(!this.browser.webkit){var E=this;setTimeout(function(){E._focusWindow.call(E);},5);}}A.stopEvent(F);},_setupAfterElement:function(){if(!this.beforeElement){this.beforeElement=document.createElement("h2");this.beforeElement.className="yui-editor-skipheader";this.beforeElement.tabIndex="-1";this.beforeElement.innerHTML=this.STR_BEFORE_EDITOR;this.get("element_cont").get("firstChild").insertBefore(this.beforeElement,this.toolbar.get("nextSibling"));}if(!this.afterElement){this.afterElement=document.createElement("h2");this.afterElement.className="yui-editor-skipheader";this.afterElement.tabIndex="-1";this.afterElement.innerHTML=this.STR_LEAVE_EDITOR;this.get("element_cont").get("firstChild").appendChild(this.afterElement);}},_disableEditor:function(F){if(F){this._removeEditorEvents();if(!this._mask){if(!!this.browser.ie){this._setDesignMode("off");}if(this.toolbar){this.toolbar.set("disabled",true);}this._mask=document.createElement("DIV");C.setStyle(this._mask,"height","100%");C.setStyle(this._mask,"width","100%");C.setStyle(this._mask,"position","absolute");C.setStyle(this._mask,"top","0");C.setStyle(this._mask,"left","0");C.setStyle(this._mask,"opacity",".5");C.addClass(this._mask,"yui-editor-masked");this.get("iframe").get("parentNode").appendChild(this._mask);}}else{this._initEditorEvents();if(this._mask){this._mask.parentNode.removeChild(this._mask);this._mask=null;if(this.toolbar){this.toolbar.set("disabled",false);}this._setDesignMode("on");this._focusWindow();var E=this;window.setTimeout(function(){E.nodeChange.call(E);},100);}}},SEP_DOMPATH:"<",STR_LEAVE_EDITOR:"You have left the Rich Text Editor.",STR_BEFORE_EDITOR:"This text field can contain stylized text and graphics. To cycle through all formatting options, use the keyboard shortcut Shift + Escape to place focus on the toolbar and navigate between options with your arrow keys. To exit this text editor use the Escape key and continue tabbing. <h4>Common formatting keyboard shortcuts:</h4><ul><li>Control Shift B sets text to bold</li> <li>Control Shift I sets text to italic</li> <li>Control Shift U underlines text</li> <li>Control Shift L adds an HTML link</li></ul>",STR_TITLE:"Rich Text Area.",STR_IMAGE_HERE:"Image URL Here",STR_LINK_URL:"Link URL",STOP_EXEC_COMMAND:false,STOP_NODE_CHANGE:false,CLASS_NOEDIT:"yui-noedit",CLASS_CONTAINER:"yui-editor-container",CLASS_EDITABLE:"yui-editor-editable",CLASS_EDITABLE_CONT:"yui-editor-editable-container",CLASS_PREFIX:"yui-editor",browser:function(){var E=YAHOO.env.ua;if(E.webkit>=420){E.webkit3=E.webkit;}else{E.webkit3=0;}E.mac=false;if(navigator.userAgent.indexOf("Macintosh")!==-1){E.mac=true;}return E;}(),init:function(F,E){if(!this._defaultToolbar){this._defaultToolbar={collapse:true,titlebar:"Text Editing Tools",draggable:false,buttons:[{group:"fontstyle",label:"Font Name and Size",buttons:[{type:"select",label:"Arial",value:"fontname",disabled:true,menu:[{text:"Arial",checked:true},{text:"Arial Black"},{text:"Comic Sans MS"},{text:"Courier New"},{text:"Lucida Console"},{text:"Tahoma"},{text:"Times New Roman"},{text:"Trebuchet MS"},{text:"Verdana"}]},{type:"spin",label:"13",value:"fontsize",range:[9,75],disabled:true}]},{type:"separator"},{group:"textstyle",label:"Font Style",buttons:[{type:"push",label:"Bold CTRL + SHIFT + B",value:"bold"},{type:"push",label:"Italic CTRL + SHIFT + I",value:"italic"},{type:"push",label:"Underline CTRL + SHIFT + U",value:"underline"},{type:"push",label:"Strike Through",value:"strikethrough"},{type:"separator"},{type:"color",label:"Font Color",value:"forecolor",disabled:true},{type:"color",label:"Background Color",value:"backcolor",disabled:true}]},{type:"separator"},{group:"indentlist",label:"Lists",buttons:[{type:"push",label:"Create an Unordered List",value:"insertunorderedlist"},{type:"push",label:"Create an Ordered List",value:"insertorderedlist"}]},{type:"separator"},{group:"insertitem",label:"Insert Item",buttons:[{type:"push",label:"HTML Link CTRL + SHIFT + L",value:"createlink",disabled:true},{type:"push",label:"Insert Image",value:"insertimage"}]}]};
|
function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",l,m=0;g[m];m++){l=g[m];if(l.nodeType===3||l.nodeType===4)h+=l.nodeValue;else if(l.nodeType!==8)h+=a(l.childNodes)}return h}function b(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];
|
xa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(e){return e.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},Z=function(a,b){var d=a.target,e,f;if(!(!ia.test(d.nodeName)||d.readOnly)){e=c.data(d,"_change_data");f=xa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",f);if(!(e===B||f===e))if(e!=null||f){a.type="change";a.liveFired=
|
function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",l,m=0;g[m];m++){l=g[m];if(l.nodeType===3||l.nodeType===4)h+=l.nodeValue;else if(l.nodeType!==8)h+=a(l.childNodes)}return h}function b(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];
|
if (!match) { return callback('no matching urls for ' + url_name_val); }
|
if (!match) { return callback('no matching urls for ' + url_name); }
|
return function (context, callback) { var match = process.djangode_urls[context.get(url_name)] if (!match) { return callback('no matching urls for ' + url_name_val); } var url = string_utils.regex_to_string(match, replacements.map(function (x) { return context.get(x); })); url = '/' + url; if (item_name) { context.set( item_name, url); callback(false, ''); } else { callback(false, url); } }
|
url = '/' + url;
|
if (url[0] !== '/') { url = '/' + url; }
|
return function (context, callback) { var match = process.djangode_urls[context.get(url_name)] if (!match) { return callback('no matching urls for ' + url_name_val); } var url = string_utils.regex_to_string(match, replacements.map(function (x) { return context.get(x); })); url = '/' + url; if (item_name) { context.set( item_name, url); callback(false, ''); } else { callback(false, url); } }
|
$('#image_url').change(function(){ setImageURL(this.value); });
|
callback:C.cbHandler(function(result){ if (result.success){ C.body.unmask(); C.infoMsg("removed '" + name + "'"); Ext.getCmp("manage_user_group_members_grid") .getBottomToolbar().onClick("refresh") } else return false })
|
$('#image_url').change(function(){ setImageURL(this.value); });
|
var table = YAHOO.util.Dom.get('my-accordion$table-widths-resizeable$table-widths-resizeable-table'); var th1 = table.tHead.rows[0].cells[0]; var th2 = table.tHead.rows[0].cells[1]; var width1 = th1.clientWidth; var width2 = th2.clientWidth; thiss.resizeColumn(th2, -10); thiss.checkTableAndContainerWidths(table); thiss.checkRowWidth(table.tHead.rows[0]); YAHOO.util.Assert.areEqual(width1, th1.clientWidth, "The wdith of the first column shouldn't change (before: " + width1 + ", after: " + width2 + ")."); YAHOO.util.Assert.areEqual(width2 - 10, th2.clientWidth, "The width of the second column should be " + (width2 - 10) + ", not " + th2.clientWidth); thiss.closeAccordionCase(thiss, 'widths-resizeable'); });
|
var table = YAHOO.util.Dom.get('my-accordion$table-widths-resizeable$table-widths-resizeable-table'); var th1 = table.tHead.rows[0].cells[0]; var th2 = table.tHead.rows[0].cells[1]; var width1 = th1.clientWidth; var width2 = th2.clientWidth; thiss.resizeColumn(th2, -50, 10); thiss.checkTableAndContainerWidths(table); YAHOO.util.Assert.areEqual(width1, th1.clientWidth, "The width of the first column shouldn't change (before: " + width1 + ", after: " + width2 + ")."); YAHOO.util.Assert.areEqual(width2 - 50, th2.clientWidth, "The width of the second column should be " + (width2 - 50) + ", not " + th2.clientWidth); thiss.checkRowWidth(table.tHead.rows[0]); thiss.closeAccordionCase(thiss, 'widths-resizeable'); });
|
thiss.openAccordionCase(thiss, 'widths-resizeable', function() { var table = YAHOO.util.Dom.get('my-accordion$table-widths-resizeable$table-widths-resizeable-table'); var th1 = table.tHead.rows[0].cells[0]; var th2 = table.tHead.rows[0].cells[1]; var width1 = th1.clientWidth; var width2 = th2.clientWidth; thiss.resizeColumn(th2, -10); thiss.checkTableAndContainerWidths(table); thiss.checkRowWidth(table.tHead.rows[0]); YAHOO.util.Assert.areEqual(width1, th1.clientWidth, "The wdith of the first column shouldn't change (before: " + width1 + ", after: " + width2 + ")."); YAHOO.util.Assert.areEqual(width2 - 10, th2.clientWidth, "The width of the second column should be " + (width2 - 10) + ", not " + th2.clientWidth); thiss.closeAccordionCase(thiss, 'widths-resizeable'); });
|
}).mouseup(function(evt) { setRadiusSlider(evt, $(this)); bSlidingRadius = false; evt.preventDefault();
|
$('#'+id+'_rg_jgraduate_svg').mouseup(function(evt) { draggingStop = null;
|
}).mouseup(function(evt) { setRadiusSlider(evt, $(this)); bSlidingRadius = false; evt.preventDefault(); });
|
window.setTimeout(function() { ORBEON.xforms.Events.orbeonLoadedEvent.fire(); }, ORBEON.util.Properties.internalShortDelay.get());
|
yuiTree.subscribe("clickEvent", function(object) { if (object.node.expanded) return false; });
|
window.setTimeout(function() { ORBEON.xforms.Events.orbeonLoadedEvent.fire(); }, ORBEON.util.Properties.internalShortDelay.get());
|
setSpreadSlider(evt, $(this)); bSlidingSpread = false;
|
setRadiusSlider(evt, $(this)); bSlidingRadius = false;
|
}).mouseup(function(evt) { setSpreadSlider(evt, $(this)); bSlidingSpread = false; evt.preventDefault(); });
|
FunctionCallExpr.prototype.xpathfunctions["matches"] = function(ctx) { var input = this.args[0].evaluate(ctx).stringValue(); var pattern = this.args[1].evaluate(ctx).stringValue(); return new BooleanValue(new RegExp(pattern).test(input)); };
|
YAHOO.util.Dom.getElementsByClassName("xforms-control", null, lastElementToDelete, function(control) { ORBEON.xforms.Globals.serverValue[control.id] = null; });
|
FunctionCallExpr.prototype.xpathfunctions["matches"] = function(ctx) { var input = this.args[0].evaluate(ctx).stringValue(); var pattern = this.args[1].evaluate(ctx).stringValue(); return new BooleanValue(new RegExp(pattern).test(input)); };
|
function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",l,m=0;g[m];m++){l=g[m];if(l.nodeType===3||l.nodeType===4)h+=l.nodeValue;else if(l.nodeType!==8)h+=a(l.childNodes)}return h}function b(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];
|
"file")return false;for(var a in V)c.event.add(this,a+".specialChange",V[a]);return ia.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return ia.test(this.nodeName)}};V=c.event.special.change.filters;V.focus=V.beforeactivate}t.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(e){e=c.event.fix(e);e.type=b;return c.event.trigger(e,null,e.target)}c.event.special[b]={setup:function(){ua[b]++===0&&t.addEventListener(a,d,true)},teardown:function(){--ua[b]=== 0&&t.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,e,f){if(typeof d==="object"){for(var h in d)this[b](h,e,d[h],f);return this}if(c.isFunction(e)||e===false){f=e;e=B}var l=b==="one"?c.proxy(f,function(o){c(this).unbind(o,l);return f.apply(this,arguments)}):f;if(d==="unload"&&b!=="one")this.one(d,e,f);else{h=0;for(var k=this.length;h<k;h++)c.event.add(this[h],d,l,e)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault)for(var d in a)this.unbind(d,
|
function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",l,m=0;g[m];m++){l=g[m];if(l.nodeType===3||l.nodeType===4)h+=l.nodeValue;else if(l.nodeType!==8)h+=a(l.childNodes)}return h}function b(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];
|
}, function() { var trigger = YAHOO.util.Dom.get(this.triggerId); var link = ORBEON.util.Utils.isNewXHTMLLayout() ? YAHOO.util.Dom.getFirstChild(trigger) : trigger; YAHOO.util.Assert.areEqual("a", link.tagName.toLowerCase()); YAHOO.util.Assert.areEqual("Label", link.innerHTML); });
|
this.wait(function() { monthYear = YAHOO.util.Dom.getElementsByClassName("calnav", null, "orbeon-calendar-div")[0]; YAHOO.util.Assert.areEqual("October 2029", monthYear.innerHTML); YAHOO.util.UserAction.click(document.body); }, XFORMS_INTERNAL_SHORT_DELAY_IN_MS);
|
}, function() { var trigger = YAHOO.util.Dom.get(this.triggerId); var link = ORBEON.util.Utils.isNewXHTMLLayout() ? YAHOO.util.Dom.getFirstChild(trigger) : trigger; YAHOO.util.Assert.areEqual("a", link.tagName.toLowerCase()); YAHOO.util.Assert.areEqual("Label", link.innerHTML); });
|
$('.attr_changer').change(function() { var attr = this.getAttribute("data-attr"); var val = this.value; var valid = svgCanvas.isValidUnit(attr, val); if(!valid) { $.alert(uiStrings.invalidAttrValGiven); this.value = selectedElement.getAttribute(attr); return false; } if (attr == "id") { var elem = selectedElement; svgCanvas.clearSelection(); elem.id = val; svgCanvas.addToSelection([elem],true); } else { svgCanvas.changeSelectedAttribute(attr, val); } });
|
callback:C.cbHandler(function(result){ if (result.success){ var grid = Ext.getCmp("manage_assigned_rights_grid") grid.getStore().reload(); C.infoMsg("Right Added.") } })
|
$('.attr_changer').change(function() { var attr = this.getAttribute("data-attr"); var val = this.value; var valid = svgCanvas.isValidUnit(attr, val); if(!valid) { $.alert(uiStrings.invalidAttrValGiven); this.value = selectedElement.getAttribute(attr); return false; } // if the user is changing the id, then de-select the element first // change the ID, then re-select it with the new ID if (attr == "id") { var elem = selectedElement; svgCanvas.clearSelection(); elem.id = val; svgCanvas.addToSelection([elem],true); } else { svgCanvas.changeSelectedAttribute(attr, val); } });
|
thiss.openAccordionCase(thiss, '_314216', function() { var th = YAHOO.util.Dom.get('my-accordion$table-314216$th-314216-2'); var resizerliner = YAHOO.xbl.fr.Datatable.utils.getFirstChildByTagAndClassName(th, 'div', 'yui-dt-resizerliner'); var liner = YAHOO.xbl.fr.Datatable.utils.getFirstChildByTagAndClassName(resizerliner, 'div', 'yui-dt-liner'); var resizer = YAHOO.xbl.fr.Datatable.utils.getFirstChildByTagAndClassName(resizerliner, 'div', 'yui-dt-resizer'); thiss.resizeColumn(th, -100, 5); YAHOO.util.Assert.isTrue(th.clientWidth > 0, 'The column width should be greater than 0, not ' + th.clientWidth); thiss.checkTableAndContainerWidths(YAHOO.util.Dom.get('my-accordion$table-314216$table-314216-table')); thiss.checkCellWidth(th); thiss.closeAccordionCase(thiss, '_314216'); });
|
thiss.openAccordionCase(thiss, 'widths-resizeable', function() { var table = YAHOO.util.Dom.get('my-accordion$table-widths-resizeable$table-widths-resizeable-table'); var th1 = table.tHead.rows[0].cells[0]; var th2 = table.tHead.rows[0].cells[1]; var width1 = th1.clientWidth; var width2 = th2.clientWidth; thiss.resizeColumn(th2, -10); thiss.checkTableAndContainerWidths(table); thiss.checkRowWidth(table.tHead.rows[0]); YAHOO.util.Assert.areEqual(width1, th1.clientWidth, "The wdith of the first column shouldn't change (before: " + width1 + ", after: " + width2 + ")."); YAHOO.util.Assert.areEqual(width2 - 10, th2.clientWidth, "The width of the second column should be " + (width2 - 10) + ", not " + th2.clientWidth); thiss.closeAccordionCase(thiss, 'widths-resizeable'); });
|
thiss.openAccordionCase(thiss, '_314216', function() { var th = YAHOO.util.Dom.get('my-accordion$table-314216$th-314216-2'); var resizerliner = YAHOO.xbl.fr.Datatable.utils.getFirstChildByTagAndClassName(th, 'div', 'yui-dt-resizerliner'); var liner = YAHOO.xbl.fr.Datatable.utils.getFirstChildByTagAndClassName(resizerliner, 'div', 'yui-dt-liner'); var resizer = YAHOO.xbl.fr.Datatable.utils.getFirstChildByTagAndClassName(resizerliner, 'div', 'yui-dt-resizer'); thiss.resizeColumn(th, -100, 5); YAHOO.util.Assert.isTrue(th.clientWidth > 0, 'The column width should be greater than 0, not ' + th.clientWidth); thiss.checkTableAndContainerWidths(YAHOO.util.Dom.get('my-accordion$table-314216$table-314216-table')); thiss.checkCellWidth(th); thiss.closeAccordionCase(thiss, '_314216'); });
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.