rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 15
136k
|
---|---|---|
if ( prop == "opacity" ) { if (jQuery.browser.mozilla && z.now == 1) z.now = 0.9999; if (window.ActiveXObject) y.filter = "alpha(opacity=" + z.now*100 + ")"; else y.opacity = z.now; } else if ( parseInt(z.now) ) | if ( prop == "opacity" ) jQuery.attr(y, "opacity", z.now); else if ( parseInt(z.now) ) | fx: function( elem, options, prop ){ var z = this; // The users options z.o = { duration: options.duration || 400, complete: options.complete, step: options.step }; // The element z.el = elem; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ if ( options.step ) options.step.apply( elem, [ z.now ] ); if ( prop == "opacity" ) { if (jQuery.browser.mozilla && z.now == 1) z.now = 0.9999; if (window.ActiveXObject) y.filter = "alpha(opacity=" + z.now*100 + ")"; else y.opacity = z.now; // My hate for IE will never die } else if ( parseInt(z.now) ) y[prop] = parseInt(z.now) + "px"; y.display = "block"; }; // Figure out the maximum number to run to z.max = function(){ return parseFloat( jQuery.css(z.el,prop) ); }; // Get the current size z.cur = function(){ var r = parseFloat( jQuery.curCSS(z.el, prop) ); return r && r > -10000 ? r : z.max(); }; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function( p ){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.custom( 0, z.el.orig[prop] ); // Stupid IE, look what you made me do if ( prop != "opacity" ) y[prop] = "1px"; }; // Simple 'hide' function z.hide = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.o.hide = true; // Begin the animation z.custom(z.el.orig[prop], 0); }; // IE has trouble with opacity if it does not have layout if ( jQuery.browser.msie && !z.el.currentStyle.hasLayout ) y.zoom = "1"; // Remember the overflow of the element if ( !z.el.oldOverlay ) z.el.oldOverflow = jQuery.css( z.el, "overflow" ); // Make sure that nothing sneaks out y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); z.el.curAnim[ prop ] = true; var done = true; for ( var i in z.el.curAnim ) if ( z.el.curAnim[i] !== true ) done = false; if ( done ) { // Reset the overflow y.overflow = z.el.oldOverflow; // Hide the element if the "hide" operation was done if ( z.o.hide ) y.display = 'none'; // Reset the property, if the item has been hidden if ( z.o.hide ) { for ( var p in z.el.curAnim ) { y[ p ] = z.el.orig[p] + ( p == "opacity" ? "" : "px" ); // set its height and/or width to auto if ( p == 'height' || p == 'width' ) jQuery.setAuto( z.el, p ); } } } // If a callback was provided, execute it if( done && z.o.complete && z.o.complete.constructor == Function ) // Execute the complete function z.o.complete.apply( z.el ); } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } }; } |
z.custom( 0, z.el.orig[prop] ); | if (prop == "opacity") z.custom(z.el.orig[prop], 1); else z.custom(0, z.el.orig[prop]); | fx: function( elem, options, prop ){ var z = this; // The users options z.o = { duration: options.duration || 400, complete: options.complete, step: options.step }; // The element z.el = elem; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ if ( options.step ) options.step.apply( elem, [ z.now ] ); if ( prop == "opacity" ) { if (jQuery.browser.mozilla && z.now == 1) z.now = 0.9999; if (window.ActiveXObject) y.filter = "alpha(opacity=" + z.now*100 + ")"; else y.opacity = z.now; // My hate for IE will never die } else if ( parseInt(z.now) ) y[prop] = parseInt(z.now) + "px"; y.display = "block"; }; // Figure out the maximum number to run to z.max = function(){ return parseFloat( jQuery.css(z.el,prop) ); }; // Get the current size z.cur = function(){ var r = parseFloat( jQuery.curCSS(z.el, prop) ); return r && r > -10000 ? r : z.max(); }; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function( p ){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.custom( 0, z.el.orig[prop] ); // Stupid IE, look what you made me do if ( prop != "opacity" ) y[prop] = "1px"; }; // Simple 'hide' function z.hide = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.o.hide = true; // Begin the animation z.custom(z.el.orig[prop], 0); }; // IE has trouble with opacity if it does not have layout if ( jQuery.browser.msie && !z.el.currentStyle.hasLayout ) y.zoom = "1"; // Remember the overflow of the element if ( !z.el.oldOverlay ) z.el.oldOverflow = jQuery.css( z.el, "overflow" ); // Make sure that nothing sneaks out y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); z.el.curAnim[ prop ] = true; var done = true; for ( var i in z.el.curAnim ) if ( z.el.curAnim[i] !== true ) done = false; if ( done ) { // Reset the overflow y.overflow = z.el.oldOverflow; // Hide the element if the "hide" operation was done if ( z.o.hide ) y.display = 'none'; // Reset the property, if the item has been hidden if ( z.o.hide ) { for ( var p in z.el.curAnim ) { y[ p ] = z.el.orig[p] + ( p == "opacity" ? "" : "px" ); // set its height and/or width to auto if ( p == 'height' || p == 'width' ) jQuery.setAuto( z.el, p ); } } } // If a callback was provided, execute it if( done && z.o.complete && z.o.complete.constructor == Function ) // Execute the complete function z.o.complete.apply( z.el ); } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } }; } |
if ( jQuery.browser.msie && !z.el.currentStyle.hasLayout ) y.zoom = "1"; | fx: function( elem, options, prop ){ var z = this; // The users options z.o = { duration: options.duration || 400, complete: options.complete, step: options.step }; // The element z.el = elem; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ if ( options.step ) options.step.apply( elem, [ z.now ] ); if ( prop == "opacity" ) { if (jQuery.browser.mozilla && z.now == 1) z.now = 0.9999; if (window.ActiveXObject) y.filter = "alpha(opacity=" + z.now*100 + ")"; else y.opacity = z.now; // My hate for IE will never die } else if ( parseInt(z.now) ) y[prop] = parseInt(z.now) + "px"; y.display = "block"; }; // Figure out the maximum number to run to z.max = function(){ return parseFloat( jQuery.css(z.el,prop) ); }; // Get the current size z.cur = function(){ var r = parseFloat( jQuery.curCSS(z.el, prop) ); return r && r > -10000 ? r : z.max(); }; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function( p ){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.custom( 0, z.el.orig[prop] ); // Stupid IE, look what you made me do if ( prop != "opacity" ) y[prop] = "1px"; }; // Simple 'hide' function z.hide = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.o.hide = true; // Begin the animation z.custom(z.el.orig[prop], 0); }; // IE has trouble with opacity if it does not have layout if ( jQuery.browser.msie && !z.el.currentStyle.hasLayout ) y.zoom = "1"; // Remember the overflow of the element if ( !z.el.oldOverlay ) z.el.oldOverflow = jQuery.css( z.el, "overflow" ); // Make sure that nothing sneaks out y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); z.el.curAnim[ prop ] = true; var done = true; for ( var i in z.el.curAnim ) if ( z.el.curAnim[i] !== true ) done = false; if ( done ) { // Reset the overflow y.overflow = z.el.oldOverflow; // Hide the element if the "hide" operation was done if ( z.o.hide ) y.display = 'none'; // Reset the property, if the item has been hidden if ( z.o.hide ) { for ( var p in z.el.curAnim ) { y[ p ] = z.el.orig[p] + ( p == "opacity" ? "" : "px" ); // set its height and/or width to auto if ( p == 'height' || p == 'width' ) jQuery.setAuto( z.el, p ); } } } // If a callback was provided, execute it if( done && z.o.complete && z.o.complete.constructor == Function ) // Execute the complete function z.o.complete.apply( z.el ); } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } }; } |
|
y[ p ] = z.el.orig[p] + ( p == "opacity" ? "" : "px" ); | if (p == "opacity" && jQuery.browser.msie) jQuery.attr(y, p, z.el.orig[p]); else y[ p ] = z.el.orig[p] + "px"; | fx: function( elem, options, prop ){ var z = this; // The users options z.o = { duration: options.duration || 400, complete: options.complete, step: options.step }; // The element z.el = elem; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ if ( options.step ) options.step.apply( elem, [ z.now ] ); if ( prop == "opacity" ) { if (jQuery.browser.mozilla && z.now == 1) z.now = 0.9999; if (window.ActiveXObject) y.filter = "alpha(opacity=" + z.now*100 + ")"; else y.opacity = z.now; // My hate for IE will never die } else if ( parseInt(z.now) ) y[prop] = parseInt(z.now) + "px"; y.display = "block"; }; // Figure out the maximum number to run to z.max = function(){ return parseFloat( jQuery.css(z.el,prop) ); }; // Get the current size z.cur = function(){ var r = parseFloat( jQuery.curCSS(z.el, prop) ); return r && r > -10000 ? r : z.max(); }; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function( p ){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.custom( 0, z.el.orig[prop] ); // Stupid IE, look what you made me do if ( prop != "opacity" ) y[prop] = "1px"; }; // Simple 'hide' function z.hide = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.o.hide = true; // Begin the animation z.custom(z.el.orig[prop], 0); }; // IE has trouble with opacity if it does not have layout if ( jQuery.browser.msie && !z.el.currentStyle.hasLayout ) y.zoom = "1"; // Remember the overflow of the element if ( !z.el.oldOverlay ) z.el.oldOverflow = jQuery.css( z.el, "overflow" ); // Make sure that nothing sneaks out y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); z.el.curAnim[ prop ] = true; var done = true; for ( var i in z.el.curAnim ) if ( z.el.curAnim[i] !== true ) done = false; if ( done ) { // Reset the overflow y.overflow = z.el.oldOverflow; // Hide the element if the "hide" operation was done if ( z.o.hide ) y.display = 'none'; // Reset the property, if the item has been hidden if ( z.o.hide ) { for ( var p in z.el.curAnim ) { y[ p ] = z.el.orig[p] + ( p == "opacity" ? "" : "px" ); // set its height and/or width to auto if ( p == 'height' || p == 'width' ) jQuery.setAuto( z.el, p ); } } } // If a callback was provided, execute it if( done && z.o.complete && z.o.complete.constructor == Function ) // Execute the complete function z.o.complete.apply( z.el ); } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } }; } |
return z.el["orig"+prop] || z.cur(); | return parseFloat( jQuery.css(z.el,prop) ); | fx: function( elem, options, prop ){ var z = this; // The users options z.o = { duration: options.duration || 400, complete: options.complete }; // The element z.el = elem; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ if ( prop == "opacity" ) { if (z.now == 1) z.now = 0.9999; if (window.ActiveXObject) y.filter = "alpha(opacity=" + z.now*100 + ")"; y.opacity = z.now; } else y[prop] = z.now+"px"; }; // Figure out the maximum number to run to z.max = function(){ return z.el["orig"+prop] || z.cur(); }; // Get the current size z.cur = function(){ return parseFloat( jQuery.css(z.el,prop) ); }; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function(){ y.display = "block"; z.o.auto = true; z.custom(0,z.max()); }; // Simple 'hide' function z.hide = function(){ // Remember where we started, so that we can go back to it later z.el["orig"+prop] = this.cur(); // Begin the animation z.custom(z.cur(),0); }; // IE has trouble with opacity if it doesn't have layout if ( jQuery.browser.msie && !z.el.currentStyle.hasLayout ) y.zoom = 1; // Remember the overflow of the element z.oldOverflow = y.overflow; // Make sure that nothing sneaks out y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); // Reset the overflow y.overflow = z.oldOverflow; // If the element was shown, and not using a custom number, // set its height and/or width to auto if ( (prop == "height" || prop == "width") && z.o.auto ) jQuery.setAuto( z.el, prop ); // If a callback was provided, execute it if( z.o.complete && z.o.complete.constructor == Function ) { // Yes, this is a weird place for this, but it needs to be executed // only once per cluster of effects. // If the element is, effectively, hidden - hide it if ( y.height == "0px" || y.width == "0px" ) y.display = "none"; // Execute the complete function z.o.complete.apply( z.el ); } } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } }; } |
return parseFloat( jQuery.css(z.el,prop) ); | return parseFloat( jQuery.curCSS(z.el,prop) ) || z.max(); | fx: function( elem, options, prop ){ var z = this; // The users options z.o = { duration: options.duration || 400, complete: options.complete }; // The element z.el = elem; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ if ( prop == "opacity" ) { if (z.now == 1) z.now = 0.9999; if (window.ActiveXObject) y.filter = "alpha(opacity=" + z.now*100 + ")"; y.opacity = z.now; } else y[prop] = z.now+"px"; }; // Figure out the maximum number to run to z.max = function(){ return z.el["orig"+prop] || z.cur(); }; // Get the current size z.cur = function(){ return parseFloat( jQuery.css(z.el,prop) ); }; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function(){ y.display = "block"; z.o.auto = true; z.custom(0,z.max()); }; // Simple 'hide' function z.hide = function(){ // Remember where we started, so that we can go back to it later z.el["orig"+prop] = this.cur(); // Begin the animation z.custom(z.cur(),0); }; // IE has trouble with opacity if it doesn't have layout if ( jQuery.browser.msie && !z.el.currentStyle.hasLayout ) y.zoom = 1; // Remember the overflow of the element z.oldOverflow = y.overflow; // Make sure that nothing sneaks out y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); // Reset the overflow y.overflow = z.oldOverflow; // If the element was shown, and not using a custom number, // set its height and/or width to auto if ( (prop == "height" || prop == "width") && z.o.auto ) jQuery.setAuto( z.el, prop ); // If a callback was provided, execute it if( z.o.complete && z.o.complete.constructor == Function ) { // Yes, this is a weird place for this, but it needs to be executed // only once per cluster of effects. // If the element is, effectively, hidden - hide it if ( y.height == "0px" || y.width == "0px" ) y.display = "none"; // Execute the complete function z.o.complete.apply( z.el ); } } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } }; } |
y.display = "block"; | z.el["orig"+prop] = this.cur(); | fx: function( elem, options, prop ){ var z = this; // The users options z.o = { duration: options.duration || 400, complete: options.complete }; // The element z.el = elem; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ if ( prop == "opacity" ) { if (z.now == 1) z.now = 0.9999; if (window.ActiveXObject) y.filter = "alpha(opacity=" + z.now*100 + ")"; y.opacity = z.now; } else y[prop] = z.now+"px"; }; // Figure out the maximum number to run to z.max = function(){ return z.el["orig"+prop] || z.cur(); }; // Get the current size z.cur = function(){ return parseFloat( jQuery.css(z.el,prop) ); }; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function(){ y.display = "block"; z.o.auto = true; z.custom(0,z.max()); }; // Simple 'hide' function z.hide = function(){ // Remember where we started, so that we can go back to it later z.el["orig"+prop] = this.cur(); // Begin the animation z.custom(z.cur(),0); }; // IE has trouble with opacity if it doesn't have layout if ( jQuery.browser.msie && !z.el.currentStyle.hasLayout ) y.zoom = 1; // Remember the overflow of the element z.oldOverflow = y.overflow; // Make sure that nothing sneaks out y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); // Reset the overflow y.overflow = z.oldOverflow; // If the element was shown, and not using a custom number, // set its height and/or width to auto if ( (prop == "height" || prop == "width") && z.o.auto ) jQuery.setAuto( z.el, prop ); // If a callback was provided, execute it if( z.o.complete && z.o.complete.constructor == Function ) { // Yes, this is a weird place for this, but it needs to be executed // only once per cluster of effects. // If the element is, effectively, hidden - hide it if ( y.height == "0px" || y.width == "0px" ) y.display = "none"; // Execute the complete function z.o.complete.apply( z.el ); } } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } }; } |
if ( y.height == "0px" || y.width == "0px" ) | if ( y.height == "0px" || y.width == "0px" ) { | fx: function( elem, options, prop ){ var z = this; // The users options z.o = { duration: options.duration || 400, complete: options.complete }; // The element z.el = elem; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ if ( prop == "opacity" ) { if (z.now == 1) z.now = 0.9999; if (window.ActiveXObject) y.filter = "alpha(opacity=" + z.now*100 + ")"; y.opacity = z.now; } else y[prop] = z.now+"px"; }; // Figure out the maximum number to run to z.max = function(){ return z.el["orig"+prop] || z.cur(); }; // Get the current size z.cur = function(){ return parseFloat( jQuery.css(z.el,prop) ); }; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function(){ y.display = "block"; z.o.auto = true; z.custom(0,z.max()); }; // Simple 'hide' function z.hide = function(){ // Remember where we started, so that we can go back to it later z.el["orig"+prop] = this.cur(); // Begin the animation z.custom(z.cur(),0); }; // IE has trouble with opacity if it doesn't have layout if ( jQuery.browser.msie && !z.el.currentStyle.hasLayout ) y.zoom = 1; // Remember the overflow of the element z.oldOverflow = y.overflow; // Make sure that nothing sneaks out y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); // Reset the overflow y.overflow = z.oldOverflow; // If the element was shown, and not using a custom number, // set its height and/or width to auto if ( (prop == "height" || prop == "width") && z.o.auto ) jQuery.setAuto( z.el, prop ); // If a callback was provided, execute it if( z.o.complete && z.o.complete.constructor == Function ) { // Yes, this is a weird place for this, but it needs to be executed // only once per cluster of effects. // If the element is, effectively, hidden - hide it if ( y.height == "0px" || y.width == "0px" ) y.display = "none"; // Execute the complete function z.o.complete.apply( z.el ); } } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } }; } |
if ( z.el.origheight ) y.height = z.el.origheight; if ( z.el.origwidth ) y.width = z.el.origwidth; } | fx: function( elem, options, prop ){ var z = this; // The users options z.o = { duration: options.duration || 400, complete: options.complete }; // The element z.el = elem; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ if ( prop == "opacity" ) { if (z.now == 1) z.now = 0.9999; if (window.ActiveXObject) y.filter = "alpha(opacity=" + z.now*100 + ")"; y.opacity = z.now; } else y[prop] = z.now+"px"; }; // Figure out the maximum number to run to z.max = function(){ return z.el["orig"+prop] || z.cur(); }; // Get the current size z.cur = function(){ return parseFloat( jQuery.css(z.el,prop) ); }; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function(){ y.display = "block"; z.o.auto = true; z.custom(0,z.max()); }; // Simple 'hide' function z.hide = function(){ // Remember where we started, so that we can go back to it later z.el["orig"+prop] = this.cur(); // Begin the animation z.custom(z.cur(),0); }; // IE has trouble with opacity if it doesn't have layout if ( jQuery.browser.msie && !z.el.currentStyle.hasLayout ) y.zoom = 1; // Remember the overflow of the element z.oldOverflow = y.overflow; // Make sure that nothing sneaks out y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); // Reset the overflow y.overflow = z.oldOverflow; // If the element was shown, and not using a custom number, // set its height and/or width to auto if ( (prop == "height" || prop == "width") && z.o.auto ) jQuery.setAuto( z.el, prop ); // If a callback was provided, execute it if( z.o.complete && z.o.complete.constructor == Function ) { // Yes, this is a weird place for this, but it needs to be executed // only once per cluster of effects. // If the element is, effectively, hidden - hide it if ( y.height == "0px" || y.width == "0px" ) y.display = "none"; // Execute the complete function z.o.complete.apply( z.el ); } } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } }; } |
|
z.show = function( p ){ | z.show = function(){ | fx: function( elem, options, prop ){ var z = this; // The users options z.o = { duration: options.duration || 400, complete: options.complete, step: options.step }; // The element z.el = elem; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ if ( options.step ) options.step.apply( elem, [ z.now ] ); if ( prop == "opacity" ) jQuery.attr(y, "opacity", z.now); // Let attr handle opacity else if ( parseInt(z.now) ) // My hate for IE will never die y[prop] = parseInt(z.now) + "px"; y.display = "block"; }; // Figure out the maximum number to run to z.max = function(){ return parseFloat( jQuery.css(z.el,prop) ); }; // Get the current size z.cur = function(){ var r = parseFloat( jQuery.curCSS(z.el, prop) ); return r && r > -10000 ? r : z.max(); }; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function( p ){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); // Begin the animation if (prop == "opacity") z.custom(z.el.orig[prop], 1); else z.custom(0, z.el.orig[prop]); // Stupid IE, look what you made me do if ( prop != "opacity" ) y[prop] = "1px"; }; // Simple 'hide' function z.hide = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.o.hide = true; // Begin the animation z.custom(z.el.orig[prop], 0); }; // Remember the overflow of the element if ( !z.el.oldOverlay ) z.el.oldOverflow = jQuery.css( z.el, "overflow" ); // Make sure that nothing sneaks out y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); z.el.curAnim[ prop ] = true; var done = true; for ( var i in z.el.curAnim ) if ( z.el.curAnim[i] !== true ) done = false; if ( done ) { // Reset the overflow y.overflow = z.el.oldOverflow; // Hide the element if the "hide" operation was done if ( z.o.hide ) y.display = 'none'; // Reset the property, if the item has been hidden if ( z.o.hide ) { for ( var p in z.el.curAnim ) { if (p == "opacity" && jQuery.browser.msie) jQuery.attr(y, p, z.el.orig[p]); else y[ p ] = z.el.orig[p] + "px"; // set its height and/or width to auto if ( p == 'height' || p == 'width' ) jQuery.setAuto( z.el, p ); } } } // If a callback was provided, execute it if( done && z.o.complete && z.o.complete.constructor == Function ) // Execute the complete function z.o.complete.apply( z.el ); } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } }; } |
if (p == "opacity" && jQuery.browser.msie) | if (p == "opacity") | fx: function( elem, options, prop ){ var z = this; // The users options z.o = { duration: options.duration || 400, complete: options.complete, step: options.step }; // The element z.el = elem; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ if ( options.step ) options.step.apply( elem, [ z.now ] ); if ( prop == "opacity" ) jQuery.attr(y, "opacity", z.now); // Let attr handle opacity else if ( parseInt(z.now) ) // My hate for IE will never die y[prop] = parseInt(z.now) + "px"; y.display = "block"; }; // Figure out the maximum number to run to z.max = function(){ return parseFloat( jQuery.css(z.el,prop) ); }; // Get the current size z.cur = function(){ var r = parseFloat( jQuery.curCSS(z.el, prop) ); return r && r > -10000 ? r : z.max(); }; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function( p ){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); // Begin the animation if (prop == "opacity") z.custom(z.el.orig[prop], 1); else z.custom(0, z.el.orig[prop]); // Stupid IE, look what you made me do if ( prop != "opacity" ) y[prop] = "1px"; }; // Simple 'hide' function z.hide = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.o.hide = true; // Begin the animation z.custom(z.el.orig[prop], 0); }; // Remember the overflow of the element if ( !z.el.oldOverlay ) z.el.oldOverflow = jQuery.css( z.el, "overflow" ); // Make sure that nothing sneaks out y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); z.el.curAnim[ prop ] = true; var done = true; for ( var i in z.el.curAnim ) if ( z.el.curAnim[i] !== true ) done = false; if ( done ) { // Reset the overflow y.overflow = z.el.oldOverflow; // Hide the element if the "hide" operation was done if ( z.o.hide ) y.display = 'none'; // Reset the property, if the item has been hidden if ( z.o.hide ) { for ( var p in z.el.curAnim ) { if (p == "opacity" && jQuery.browser.msie) jQuery.attr(y, p, z.el.orig[p]); else y[ p ] = z.el.orig[p] + "px"; // set its height and/or width to auto if ( p == 'height' || p == 'width' ) jQuery.setAuto( z.el, p ); } } } // If a callback was provided, execute it if( done && z.o.complete && z.o.complete.constructor == Function ) // Execute the complete function z.o.complete.apply( z.el ); } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } }; } |
if( z.o.complete && z.o.complete.constructor == Function ) z.o.complete.apply( z.el ); | fx: function( elem, options, prop ){ var z = this; // The users options z.o = { duration: options.duration || 400, complete: options.complete }; // The element z.el = elem; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ if ( prop == "opacity" ) { if (z.now == 1) z.now = 0.9999; if (window.ActiveXObject) y.filter = "alpha(opacity=" + z.now*100 + ")"; else y.opacity = z.now; // My hate for IE will never die } else if ( parseInt(z.now) ) y[prop] = parseInt(z.now) + "px"; y.display = "block"; }; // Figure out the maximum number to run to z.max = function(){ return parseFloat( jQuery.css(z.el,prop) ); }; // Get the current size z.cur = function(){ return parseFloat( jQuery.curCSS(z.el, prop) ) || z.max(); }; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function( p ){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.custom( 0, z.el.orig[prop] ); // Stupid IE, look what you made me do if ( prop != "opacity" ) y[prop] = "1px"; }; // Simple 'hide' function z.hide = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.o.hide = true; // Begin the animation z.custom(z.cur(),0); }; // IE has trouble with opacity if it does not have layout if ( jQuery.browser.msie && !z.el.currentStyle.hasLayout ) y.zoom = "1"; // Remember the overflow of the element if ( !z.el.oldOverlay ) z.el.oldOverflow = jQuery.css( z.el, "overflow" ); // Make sure that nothing sneaks out //if ( z.el.oldOverlay == "visible" ) y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); // Hide the element if the "hide" operation was done if ( z.o.hide ) y.display = 'none'; // Reset the overflow y.overflow = z.el.oldOverflow; // If a callback was provided, execute it if( z.o.complete && z.o.complete.constructor == Function ) // Execute the complete function z.o.complete.apply( z.el ); // Reset the property, if the item has been hidden if ( z.o.hide ) y[ prop ] = z.el.orig[ prop ].constructor == Number && prop != "opacity" ? z.el.orig[prop] + "px" : z.el.orig[prop]; // set its height and/or width to auto jQuery.setAuto( z.el, prop ); } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } }; } |
|
if( z.o.complete && z.o.complete.constructor == Function ) z.o.complete.apply( z.el ); | fx: function( elem, options, prop ){ var z = this; // The users options z.o = { duration: options.duration || 400, complete: options.complete }; // The element z.el = elem; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ if ( prop == "opacity" ) { if (z.now == 1) z.now = 0.9999; if (window.ActiveXObject) y.filter = "alpha(opacity=" + z.now*100 + ")"; else y.opacity = z.now; // My hate for IE will never die } else if ( parseInt(z.now) ) y[prop] = parseInt(z.now) + "px"; y.display = "block"; }; // Figure out the maximum number to run to z.max = function(){ return parseFloat( jQuery.css(z.el,prop) ); }; // Get the current size z.cur = function(){ return parseFloat( jQuery.curCSS(z.el, prop) ) || z.max(); }; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function( p ){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.custom( 0, z.el.orig[prop] ); // Stupid IE, look what you made me do if ( prop != "opacity" ) y[prop] = "1px"; }; // Simple 'hide' function z.hide = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.o.hide = true; // Begin the animation z.custom(z.cur(),0); }; // IE has trouble with opacity if it does not have layout if ( jQuery.browser.msie && !z.el.currentStyle.hasLayout ) y.zoom = "1"; // Remember the overflow of the element if ( !z.el.oldOverlay ) z.el.oldOverflow = jQuery.css( z.el, "overflow" ); // Make sure that nothing sneaks out //if ( z.el.oldOverlay == "visible" ) y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); // Hide the element if the "hide" operation was done if ( z.o.hide ) y.display = 'none'; // Reset the overflow y.overflow = z.el.oldOverflow; // If a callback was provided, execute it if( z.o.complete && z.o.complete.constructor == Function ) // Execute the complete function z.o.complete.apply( z.el ); // Reset the property, if the item has been hidden if ( z.o.hide ) y[ prop ] = z.el.orig[ prop ].constructor == Number && prop != "opacity" ? z.el.orig[prop] + "px" : z.el.orig[prop]; // set its height and/or width to auto jQuery.setAuto( z.el, prop ); } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } }; } |
|
z.o.show = true; | fx: function( elem, options, prop ){ var z = this; // The users options z.o = { duration: options.duration || 400, complete: options.complete, step: options.step }; // The element z.el = elem; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ if ( options.step ) options.step.apply( elem, [ z.now ] ); if ( prop == "opacity" ) jQuery.attr(y, "opacity", z.now); // Let attr handle opacity else if ( parseInt(z.now) ) // My hate for IE will never die y[prop] = parseInt(z.now) + "px"; y.display = "block"; }; // Figure out the maximum number to run to z.max = function(){ return parseFloat( jQuery.css(z.el,prop) ); }; // Get the current size z.cur = function(){ var r = parseFloat( jQuery.curCSS(z.el, prop) ); return r && r > -10000 ? r : z.max(); }; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); // Begin the animation z.custom(0, z.el.orig[prop]); // Stupid IE, look what you made me do if ( prop != "opacity" ) y[prop] = "1px"; }; // Simple 'hide' function z.hide = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.o.hide = true; // Begin the animation z.custom(z.el.orig[prop], 0); }; // Remember the overflow of the element if ( !z.el.oldOverflow ) z.el.oldOverflow = jQuery.css( z.el, "overflow" ); // Make sure that nothing sneaks out y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); z.el.curAnim[ prop ] = true; var done = true; for ( var i in z.el.curAnim ) if ( z.el.curAnim[i] !== true ) done = false; if ( done ) { // Reset the overflow y.overflow = z.el.oldOverflow; // Hide the element if the "hide" operation was done if ( z.o.hide ) y.display = 'none'; // Reset the property, if the item has been hidden if ( z.o.hide ) { for ( var p in z.el.curAnim ) { if (p == "opacity") jQuery.attr(y, p, z.el.orig[p]); else y[ p ] = z.el.orig[p] + "px"; // set its height and/or width to auto if ( p == 'height' || p == 'width' ) jQuery.setAuto( z.el, p ); } } } // If a callback was provided, execute it if( done && z.o.complete && z.o.complete.constructor == Function ) // Execute the complete function z.o.complete.apply( z.el ); } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } }; } |
|
if ( !z.el.oldOverflow ) z.el.oldOverflow = jQuery.css( z.el, "overflow" ); | fx: function( elem, options, prop ){ var z = this; // The users options z.o = { duration: options.duration || 400, complete: options.complete, step: options.step }; // The element z.el = elem; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ if ( options.step ) options.step.apply( elem, [ z.now ] ); if ( prop == "opacity" ) jQuery.attr(y, "opacity", z.now); // Let attr handle opacity else if ( parseInt(z.now) ) // My hate for IE will never die y[prop] = parseInt(z.now) + "px"; y.display = "block"; }; // Figure out the maximum number to run to z.max = function(){ return parseFloat( jQuery.css(z.el,prop) ); }; // Get the current size z.cur = function(){ var r = parseFloat( jQuery.curCSS(z.el, prop) ); return r && r > -10000 ? r : z.max(); }; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); // Begin the animation z.custom(0, z.el.orig[prop]); // Stupid IE, look what you made me do if ( prop != "opacity" ) y[prop] = "1px"; }; // Simple 'hide' function z.hide = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.o.hide = true; // Begin the animation z.custom(z.el.orig[prop], 0); }; // Remember the overflow of the element if ( !z.el.oldOverflow ) z.el.oldOverflow = jQuery.css( z.el, "overflow" ); // Make sure that nothing sneaks out y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); z.el.curAnim[ prop ] = true; var done = true; for ( var i in z.el.curAnim ) if ( z.el.curAnim[i] !== true ) done = false; if ( done ) { // Reset the overflow y.overflow = z.el.oldOverflow; // Hide the element if the "hide" operation was done if ( z.o.hide ) y.display = 'none'; // Reset the property, if the item has been hidden if ( z.o.hide ) { for ( var p in z.el.curAnim ) { if (p == "opacity") jQuery.attr(y, p, z.el.orig[p]); else y[ p ] = z.el.orig[p] + "px"; // set its height and/or width to auto if ( p == 'height' || p == 'width' ) jQuery.setAuto( z.el, p ); } } } // If a callback was provided, execute it if( done && z.o.complete && z.o.complete.constructor == Function ) // Execute the complete function z.o.complete.apply( z.el ); } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } }; } |
|
y.overflow = z.el.oldOverflow; | y.overflow = ''; | fx: function( elem, options, prop ){ var z = this; // The users options z.o = { duration: options.duration || 400, complete: options.complete, step: options.step }; // The element z.el = elem; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ if ( options.step ) options.step.apply( elem, [ z.now ] ); if ( prop == "opacity" ) jQuery.attr(y, "opacity", z.now); // Let attr handle opacity else if ( parseInt(z.now) ) // My hate for IE will never die y[prop] = parseInt(z.now) + "px"; y.display = "block"; }; // Figure out the maximum number to run to z.max = function(){ return parseFloat( jQuery.css(z.el,prop) ); }; // Get the current size z.cur = function(){ var r = parseFloat( jQuery.curCSS(z.el, prop) ); return r && r > -10000 ? r : z.max(); }; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); // Begin the animation z.custom(0, z.el.orig[prop]); // Stupid IE, look what you made me do if ( prop != "opacity" ) y[prop] = "1px"; }; // Simple 'hide' function z.hide = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.o.hide = true; // Begin the animation z.custom(z.el.orig[prop], 0); }; // Remember the overflow of the element if ( !z.el.oldOverflow ) z.el.oldOverflow = jQuery.css( z.el, "overflow" ); // Make sure that nothing sneaks out y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); z.el.curAnim[ prop ] = true; var done = true; for ( var i in z.el.curAnim ) if ( z.el.curAnim[i] !== true ) done = false; if ( done ) { // Reset the overflow y.overflow = z.el.oldOverflow; // Hide the element if the "hide" operation was done if ( z.o.hide ) y.display = 'none'; // Reset the property, if the item has been hidden if ( z.o.hide ) { for ( var p in z.el.curAnim ) { if (p == "opacity") jQuery.attr(y, p, z.el.orig[p]); else y[ p ] = z.el.orig[p] + "px"; // set its height and/or width to auto if ( p == 'height' || p == 'width' ) jQuery.setAuto( z.el, p ); } } } // If a callback was provided, execute it if( done && z.o.complete && z.o.complete.constructor == Function ) // Execute the complete function z.o.complete.apply( z.el ); } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } }; } |
if ( z.o.hide ) { for ( var p in z.el.curAnim ) { | else if ( z.o.show ) y.display = ''; if ( z.o.hide || z.o.show ) for ( var p in z.el.curAnim ) | fx: function( elem, options, prop ){ var z = this; // The users options z.o = { duration: options.duration || 400, complete: options.complete, step: options.step }; // The element z.el = elem; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ if ( options.step ) options.step.apply( elem, [ z.now ] ); if ( prop == "opacity" ) jQuery.attr(y, "opacity", z.now); // Let attr handle opacity else if ( parseInt(z.now) ) // My hate for IE will never die y[prop] = parseInt(z.now) + "px"; y.display = "block"; }; // Figure out the maximum number to run to z.max = function(){ return parseFloat( jQuery.css(z.el,prop) ); }; // Get the current size z.cur = function(){ var r = parseFloat( jQuery.curCSS(z.el, prop) ); return r && r > -10000 ? r : z.max(); }; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); // Begin the animation z.custom(0, z.el.orig[prop]); // Stupid IE, look what you made me do if ( prop != "opacity" ) y[prop] = "1px"; }; // Simple 'hide' function z.hide = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.o.hide = true; // Begin the animation z.custom(z.el.orig[prop], 0); }; // Remember the overflow of the element if ( !z.el.oldOverflow ) z.el.oldOverflow = jQuery.css( z.el, "overflow" ); // Make sure that nothing sneaks out y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); z.el.curAnim[ prop ] = true; var done = true; for ( var i in z.el.curAnim ) if ( z.el.curAnim[i] !== true ) done = false; if ( done ) { // Reset the overflow y.overflow = z.el.oldOverflow; // Hide the element if the "hide" operation was done if ( z.o.hide ) y.display = 'none'; // Reset the property, if the item has been hidden if ( z.o.hide ) { for ( var p in z.el.curAnim ) { if (p == "opacity") jQuery.attr(y, p, z.el.orig[p]); else y[ p ] = z.el.orig[p] + "px"; // set its height and/or width to auto if ( p == 'height' || p == 'width' ) jQuery.setAuto( z.el, p ); } } } // If a callback was provided, execute it if( done && z.o.complete && z.o.complete.constructor == Function ) // Execute the complete function z.o.complete.apply( z.el ); } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } }; } |
y[ p ] = z.el.orig[p] + "px"; if ( p == 'height' || p == 'width' ) jQuery.setAuto( z.el, p ); } } | y[p] = ''; | fx: function( elem, options, prop ){ var z = this; // The users options z.o = { duration: options.duration || 400, complete: options.complete, step: options.step }; // The element z.el = elem; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ if ( options.step ) options.step.apply( elem, [ z.now ] ); if ( prop == "opacity" ) jQuery.attr(y, "opacity", z.now); // Let attr handle opacity else if ( parseInt(z.now) ) // My hate for IE will never die y[prop] = parseInt(z.now) + "px"; y.display = "block"; }; // Figure out the maximum number to run to z.max = function(){ return parseFloat( jQuery.css(z.el,prop) ); }; // Get the current size z.cur = function(){ var r = parseFloat( jQuery.curCSS(z.el, prop) ); return r && r > -10000 ? r : z.max(); }; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); // Begin the animation z.custom(0, z.el.orig[prop]); // Stupid IE, look what you made me do if ( prop != "opacity" ) y[prop] = "1px"; }; // Simple 'hide' function z.hide = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.o.hide = true; // Begin the animation z.custom(z.el.orig[prop], 0); }; // Remember the overflow of the element if ( !z.el.oldOverflow ) z.el.oldOverflow = jQuery.css( z.el, "overflow" ); // Make sure that nothing sneaks out y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); z.el.curAnim[ prop ] = true; var done = true; for ( var i in z.el.curAnim ) if ( z.el.curAnim[i] !== true ) done = false; if ( done ) { // Reset the overflow y.overflow = z.el.oldOverflow; // Hide the element if the "hide" operation was done if ( z.o.hide ) y.display = 'none'; // Reset the property, if the item has been hidden if ( z.o.hide ) { for ( var p in z.el.curAnim ) { if (p == "opacity") jQuery.attr(y, p, z.el.orig[p]); else y[ p ] = z.el.orig[p] + "px"; // set its height and/or width to auto if ( p == 'height' || p == 'width' ) jQuery.setAuto( z.el, p ); } } } // If a callback was provided, execute it if( done && z.o.complete && z.o.complete.constructor == Function ) // Execute the complete function z.o.complete.apply( z.el ); } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } }; } |
if ( z.el.oldOverlay == "visible" ) y.overflow = "hidden"; | y.overflow = "hidden"; | fx: function( elem, options, prop ){ var z = this; // The users options z.o = { duration: options.duration || 400, complete: options.complete }; // The element z.el = elem; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ if ( prop == "opacity" ) { if (z.now == 1) z.now = 0.9999; if (window.ActiveXObject) y.filter = "alpha(opacity=" + z.now*100 + ")"; else y.opacity = z.now; // My hate for IE will never die } else if ( parseInt(z.now) ) y[prop] = parseInt(z.now) + "px"; y.display = "block"; }; // Figure out the maximum number to run to z.max = function(){ return parseFloat( jQuery.css(z.el,prop) ); }; // Get the current size z.cur = function(){ return parseFloat( jQuery.curCSS(z.el, prop) ) || z.max(); }; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function( p ){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.custom( 0, z.el.orig[prop] ); // Stupid IE, look what you made me do if ( prop != "opacity" ) y[prop] = "1px"; }; // Simple 'hide' function z.hide = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.o.hide = true; // Begin the animation z.custom(z.cur(),0); }; // IE has trouble with opacity if it does not have layout if ( jQuery.browser.msie && !z.el.currentStyle.hasLayout ) y.zoom = "1"; // Remember the overflow of the element if ( !z.el.oldOverlay ) z.el.oldOverflow = jQuery.css( z.el, "overflow" ); // Make sure that nothing sneaks out if ( z.el.oldOverlay == "visible" ) y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); // Hide the element if the "hide" operation was done if ( z.o.hide ) y.display = 'none'; // Reset the overflow y.overflow = z.el.oldOverflow; // If a callback was provided, execute it if( z.o.complete && z.o.complete.constructor == Function ) // Execute the complete function z.o.complete.apply( z.el ); // Reset the property, if the item has been hidden if ( z.o.hide ) y[ prop ] = z.el.orig[ prop ].constructor == Number && prop != "opacity" ? z.el.orig[prop] + "px" : z.el.orig[prop]; // set its height and/or width to auto jQuery.setAuto( z.el, prop ); } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } }; } |
$.setAuto( z.el, "height" ); $.setAuto( z.el, "width" ); | if ( ty != "opacity" ) { $.setAuto( z.el, "height" ); $.setAuto( z.el, "width" ); } | function fx(el,op,ty,tz){ var z = this; z.a = function(){z.el.style[ty]=z.now+z.o.unit}; z.max = function(){return z.el["io"+ty]||z.el["natural"+tz]||z.el["scroll"+tz]||z.cur()}; z.cur = function(){return parseInt($.getCSS(z.el,ty))}; z.show = function(){z.ss("block");z.custom(0,z.max())}; z.hide = function(){z.el.$o=$.getCSS(z.el,"overflow");z.el["io"+ty]=this.cur();z.custom(z.cur(),0)}; z.ss = function(a){if(y.display!=a)y.display=a}; z.toggle = function(){if(z.cur()>0)z.hide();else z.show()}; z.modify = function(a){z.custom(z.cur(),z.cur()+a)}; z.clear = function(){clearInterval(z.timer);z.timer=null}; z.el = el.constructor==String?document.getElementById(el):el; var y = z.el.style; z.oo = y.overflow; y.overflow = "hidden"; z.o = { unit: "px", duration: (op && op.duration) || 400, onComplete: (op && op.onComplete) || op }; z.step = function(f,tt){ var t = (new Date).getTime(); var p = (t - z.s) / z.o.duration; if (t >= z.o.duration+z.s) { z.now = tt; z.clear(); setTimeout(function(){ y.overflow = z.oo; if(y.height=="0px"||y.width=="0px")z.ss("none"); $.setAuto( z.el, "height" ); $.setAuto( z.el, "width" ); if(z.o.onComplete.constructor == Function){z.el.$_ = z.o.onComplete;z.el.$_();} },13); } else z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (tt-f) + f; z.a(); }; z.custom = function(f,t){ if(z.timer)return;this.now=f;z.a();z.io=z.cur();z.s=(new Date).getTime(); z.timer=setInterval(function(){z.step(f,t);}, 13); };} |
if ( not === false ) { | if ( not === false ) | var g = $.grep; if ( not === false ) { g = function(a,f) {return $.grep(a,f,true);}; |
new Object(); | tmp2 = tmp * 1.5; | function gc(){ try { // Thanks to dveditz netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); var jsdIDebuggerService = Components.interfaces.jsdIDebuggerService; var service = Components.classes['@mozilla.org/js/jsd/debugger-service;1']. getService(jsdIDebuggerService); service.GC(); } catch(ex) { // Thanks to [email protected] for (var i = 0; i != 1 << 15; ++i) { new Object(); } }} |
dump("****** GENERAL DRAG ********\n"); | if ( !gDragDropEnabled ) return; dump("****** DRAG MADE IT TO TOPLEVEL WINDOW ********\n"); | function GeneralDrag ( event ) { dump("****** GENERAL DRAG ********\n"); } |
text = cell.getAttribute("value"); | text = cell.getAttribute("attachment"); | function GenerateAttachmentsString(){ var attachments = ""; var body = document.getElementById('bucketBody'); var item, row, cell, text, colon; for (var index = 0; index < body.childNodes.length; index++) { item = body.childNodes[index]; if (item.childNodes && item.childNodes.length) { row = item.childNodes[0]; if (row.childNodes && row.childNodes.length) { cell = row.childNodes[0]; if (cell) { text = cell.getAttribute("value"); if (text.length) { if (attachments == "") attachments = text; else attachments = attachments + "," + text; } } } } } return attachments;} |
return self.wrapNode(node, type) + suffix; | return PlacesUtils.wrapNode(node, type) + suffix; | function generateChunk(type) { var suffix = i < (nodes.length - 1) ? NEWLINE : ""; return self.wrapNode(node, type) + suffix; } |
else if ( formName == "error2.htm" ) { showBack = true; showExit = true; showNext = false; showAgain = true; showDone = false; if ( editMode == true ) showBack = true; } | function generateControls(){ var editMode = false; var showAcctsetEdit = false; var showRegFileEdit = false; var showISPFileEdit = false; var showExit = true; var showHelp = true; var showBack = true; var showNext = true; var showConnectServer = false; var showConnectRegServer = false; var showConnectISP = false; var showConnectNow = false; var showDownload = false; var showConnectLater = false; var showAgain = false; var showDone = false; var showRestart = false; var showSetupShortcut = false; var showInternet = false; var showScreenToggle = false; var screenVisible = true; var showScreenOptions = false; netscape.security.PrivilegeManager.enablePrivilege( "AccountSetup" ); if ( parent && parent.parent && parent.parent.globals ) { editMode = ( parent.parent.globals.document.vars.editMode.value.toLowerCase() == "yes" ) ? true : false; }// var formName = parent.content.location.toString(); var formName = "" + parent.content.location; if ( formName != null && formName != "" && formName != "about:blank" ) { if ( ( x = formName.lastIndexOf( "/" ) ) > 0 ) formName = formName.substring( x + 1, formName.length ); if ( editMode == true ) { var section = null; var variable = null; var pageNum = findPageOffset( formName ); if ( pageNum >= 0 ) { section = pages[ pageNum ][ 0 ].section; variable = pages[ pageNum ][ 0 ].variable; if ( section!=null && section!="" && variable!=null && variable!="" ) { showScreenToggle = true; var theFile = parent.parent.globals.getAcctSetupFilename( self ); var theFlag = parent.parent.globals.GetNameValuePair( theFile, section, variable ); theFlag = theFlag.toLowerCase(); if ( theFlag == "no" ) screenVisible = false; } } } if ( formName == "main.htm" ) { showBack = false; showNext = false; if ( navigator.javaEnabled() == false ) { showNext = false; editMode = false; showAcctsetEdit = false; showISPFileEdit = false; showRegFileEdit = false; document.writeln( "<CENTER><STRONG>Java support is disabled!<P>\n" ); document.writeln( "Choose Options | Network Preferences and enable Java, then try again.</STRONG></CENTER>\n" ); } else if ( !navigator.mimeTypes[ "application/x-netscape-autoconfigure-dialer" ] ) { showNext = false; editMode = false; showAcctsetEdit = false; showISPFileEdit = false; showRegFileEdit = false; document.writeln( "<CENTER><STRONG>The 'Account Setup Plugin' is not installed!<P>\n" ); document.writeln( "Please install the plugin, then run 'Account Setup' again.</STRONG></CENTER>\n" ); } else if ( parent.parent.globals.document.setupPlugin == null ) { showNext = false; editMode = false; } if ( editMode == true ) { showAcctsetEdit = true; showScreenOptions = true; } } else if ( editMode == true && formName == "useAcct.htm" ) { showScreenOptions = true; } else if ( editMode == true && formName == "servers.htm" ) { showScreenOptions = false; } else if ( editMode == true && formName == "billing.htm" ) { showScreenOptions = true; } else if ( formName == "accounts.htm" ) { showNext = false; } else if ( formName == "compare.htm" ) { } else if ( formName == "connect1.htm" ) { showNext = false; showConnectRegServer = true; if ( editMode == true ) showScreenOptions = true; } else if ( formName == "download.htm" ) { showNext = false; showConnectServer = true; if ( editMode == true ) showScreenOptions = true; } else if ( formName == "connect2.htm" ) { showNext = false; showExit = false; showConnectNow = true; showConnectLater = true; } else if ( formName == "1step.htm" ) { showNext = false; showExit = false; showHelp = false; if ( editMode == true ) showBack = true; } //else if ( formName == "2stpwrap.htm" ) else if ( formName == "2step.htm" ) { showNext = false; showConnectISP = true; if ( editMode == true ) showScreenOptions = true; } else if ( formName == "register.htm" ) { showHelp = false; showBack = false; showNext = false; if ( editMode == true ) showBack = true; } else if ( formName == "ok.htm" ) { showScreenOptions = true; showBack = false; showExit = false; showNext = false; showInternet = true; showDone = true; if ( editMode == true ) showBack = true; } else if ( formName == "okreboot.htm" ) { showScreenOptions = true; showBack = false; showNext = false; showExit = false; showDone = false; showRestart = true; if ( editMode == true ) showBack = true; } else if ( formName == "error.htm" ) { showBack = true; showExit = true; showNext = false; showAgain = true; showDone = false; if ( editMode == true ) showBack = true; } else if ( formName == "later.htm" ) { showBack = false; showExit = false; showNext = false; showDone = true; if ( editMode == true ) showBack = true; } else if ( formName == "intro1.htm" ) { showSetupShortcut = false; } else if ( formName == "settings.htm" ) { showBack = true; showNext = false; editMode = false; } else if ( formName == "editregs.htm" ) { showBack = true; showNext = false; editMode = false; } else if ( formName == "editisps.htm" ) { showBack = true; showNext = false; editMode = false; } else if ( formName == "aboutbox.htm" ) { showHelp = false; showNext = false; showBack = true; } else if ( formName == "namepw.htm" ) { showScreenOptions = true; } else if ( formName == "asktty.htm" ) { showScreenOptions = false; showBack = true; showNext = false; editMode = false; } else if ( formName == "askserv.htm" ) { showScreenOptions = false; showBack = true; showNext = false; editMode = false; } else if ( formName == "asksvinf.htm" ) { showScreenOptions = false; showBack = true; showNext = false; editMode = false; } else if ( formName == "showphon.htm" ) { showScreenOptions = false; showBack = true; showNext = false; editMode = false; } else if ( formName == "editcc.htm" ) { showBack = true; showNext = false; editMode = false; } else if ( formName == "addnci.htm" ) { showBack = true; showNext = false; editMode = false; } else if ( formName == "addias.htm" ) { showBack = true; showNext = false; editMode = false; } else if ( formName == "editfour.htm" ) { showBack = true; showNext = false; editMode = false; } if ( document && document.layers && document.layers[ "controls" ] && document.layers[ "controls" ].document && document.layers[ "controls" ].document.layers && document.layers[ "controls" ].document.layers.length > 0 ) { document.layers[ "controls" ].layers[ "help" ].visibility = ( ( showHelp == true ) ? "show" : "hide" ); document.layers[ "controls" ].layers[ "exit" ].visibility = ( ( showExit == true ) ? "show" : "hide" ); document.layers[ "controls" ].layers[ "back" ].visibility = ( ( showBack == true ) ? "show" : "hide" ); document.layers[ "controls" ].layers[ "next" ].visibility = ( ( showNext == true ) ? "show" : "hide" ); document.layers[ "controls" ].layers[ "connectnow" ].visibility = ( ( showConnectNow == true ) ? "show" : "hide" ); document.layers[ "controls" ].layers[ "download" ].visibility = ( ( showDownload == true ) ? "show" : "hide" ); document.layers[ "controls" ].layers[ "connectserver" ].visibility = ( ( showConnectServer == true ) ? "show" : "hide" ); document.layers[ "controls" ].layers[ "connectregserver" ].visibility = ( ( showConnectRegServer == true ) ? "show" : "hide" ); document.layers[ "controls" ].layers[ "connectisp" ].visibility = ( ( showConnectISP == true ) ? "show" : "hide" ); document.layers[ "controls" ].layers[ "connectagain" ].visibility = ( ( showAgain == true ) ? "show" : "hide" ); document.layers[ "controls" ].layers[ "done" ].visibility = ( ( showDone == true) ? "show" : "hide" ); document.layers[ "controls" ].layers[ "restart" ].visibility = ( ( showRestart == true ) ? "show" : "hide" ); document.layers[ "controls" ].layers[ "connectlater" ].visibility = ( ( showConnectLater == true ) ? "show" : "hide" ); document.layers[ "controls" ].layers[ "setup" ].visibility = ( ( showSetupShortcut == true ) ? "show" : "hide" ); //NEW - Generate the controls for the toolbar, if it exists if ( ( !theToolBar ) || ( theToolBar == null ) || ( !theToolBar.location ) || ( theToolBar.closed ) ) { //alert("opening toolbar"); theToolBar = openToolBar(); } else { //alert("toolbar open, generating controls" + theToolBar); generateToolBarControls(); } } else { setTimeout( "generateControls()", 1000 ); } } else { setTimeout( "generateControls()", 1000 ); }} |
|
if (gEditCard.generateDisplayName) { var displayName; | if (!gEditCard.generateDisplayName) return; | function GenerateDisplayName(){ if (gEditCard.generateDisplayName) { var displayName; var firstNameField = document.getElementById('FirstName'); var lastNameField = document.getElementById('LastName'); var displayNameField = document.getElementById('DisplayName'); if (lastNameField.value && firstNameField.value) { displayName = (gEditCard.displayLastNameFirst) ? gAddressBookBundle.getFormattedString("lastFirstFormat", [lastNameField.value, firstNameField.value]) : gAddressBookBundle.getFormattedString("firstLastFormat", [firstNameField.value, lastNameField.value]); } else { // one (or both) of these is empty, so this works. displayName = firstNameField.value + lastNameField.value; } displayNameField.value = displayName; SetCardDialogTitle(displayName); }} |
var firstNameField = document.getElementById('FirstName'); var lastNameField = document.getElementById('LastName'); var displayNameField = document.getElementById('DisplayName'); | var displayName; | function GenerateDisplayName(){ if (gEditCard.generateDisplayName) { var displayName; var firstNameField = document.getElementById('FirstName'); var lastNameField = document.getElementById('LastName'); var displayNameField = document.getElementById('DisplayName'); if (lastNameField.value && firstNameField.value) { displayName = (gEditCard.displayLastNameFirst) ? gAddressBookBundle.getFormattedString("lastFirstFormat", [lastNameField.value, firstNameField.value]) : gAddressBookBundle.getFormattedString("firstLastFormat", [firstNameField.value, lastNameField.value]); } else { // one (or both) of these is empty, so this works. displayName = firstNameField.value + lastNameField.value; } displayNameField.value = displayName; SetCardDialogTitle(displayName); }} |
if (lastNameField.value && firstNameField.value) { displayName = (gEditCard.displayLastNameFirst) ? gAddressBookBundle.getFormattedString("lastFirstFormat", [lastNameField.value, firstNameField.value]) : gAddressBookBundle.getFormattedString("firstLastFormat", [firstNameField.value, lastNameField.value]); } else { displayName = firstNameField.value + lastNameField.value; } | var firstNameValue = document.getElementById("FirstName").value; var lastNameValue = document.getElementById("LastName").value; if (lastNameValue && firstNameValue) { displayName = (gEditCard.displayLastNameFirst) ? gAddressBookBundle.getFormattedString("lastFirstFormat", [lastNameValue, firstNameValue]) : gAddressBookBundle.getFormattedString("firstLastFormat", [firstNameValue, lastNameValue]); } else { displayName = firstNameValue + lastNameValue; } | function GenerateDisplayName(){ if (gEditCard.generateDisplayName) { var displayName; var firstNameField = document.getElementById('FirstName'); var lastNameField = document.getElementById('LastName'); var displayNameField = document.getElementById('DisplayName'); if (lastNameField.value && firstNameField.value) { displayName = (gEditCard.displayLastNameFirst) ? gAddressBookBundle.getFormattedString("lastFirstFormat", [lastNameField.value, firstNameField.value]) : gAddressBookBundle.getFormattedString("firstLastFormat", [firstNameField.value, lastNameField.value]); } else { // one (or both) of these is empty, so this works. displayName = firstNameField.value + lastNameField.value; } displayNameField.value = displayName; SetCardDialogTitle(displayName); }} |
displayNameField.value = displayName; | document.getElementById("DisplayName").value = displayName; | function GenerateDisplayName(){ if (gEditCard.generateDisplayName) { var displayName; var firstNameField = document.getElementById('FirstName'); var lastNameField = document.getElementById('LastName'); var displayNameField = document.getElementById('DisplayName'); if (lastNameField.value && firstNameField.value) { displayName = (gEditCard.displayLastNameFirst) ? gAddressBookBundle.getFormattedString("lastFirstFormat", [lastNameField.value, firstNameField.value]) : gAddressBookBundle.getFormattedString("firstLastFormat", [firstNameField.value, lastNameField.value]); } else { // one (or both) of these is empty, so this works. displayName = firstNameField.value + lastNameField.value; } displayNameField.value = displayName; SetCardDialogTitle(displayName); }} |
SetCardDialogTitle(displayName); } | SetCardDialogTitle(displayName); | function GenerateDisplayName(){ if (gEditCard.generateDisplayName) { var displayName; var firstNameField = document.getElementById('FirstName'); var lastNameField = document.getElementById('LastName'); var displayNameField = document.getElementById('DisplayName'); if (lastNameField.value && firstNameField.value) { displayName = (gEditCard.displayLastNameFirst) ? gAddressBookBundle.getFormattedString("lastFirstFormat", [lastNameField.value, firstNameField.value]) : gAddressBookBundle.getFormattedString("firstLastFormat", [firstNameField.value, lastNameField.value]); } else { // one (or both) of these is empty, so this works. displayName = firstNameField.value + lastNameField.value; } displayNameField.value = displayName; SetCardDialogTitle(displayName); }} |
if (aMessage.type != LDAP_RES_BIND) { | if (aMessage.type != aMessage.RES_BIND) { | function generateGetTargetsBoundCallback(callerObject, outer) { function getTargetsBoundCallback(callerObject, outer) { this.callerObject = callerObject; this.outer = outer; } getTargetsBoundCallback.prototype.callerObject = null; getTargetsBoundCallback.prototype.outer = {}; getTargetsBoundCallback.prototype.onLDAPMessage = function(aMessage) { if (DEBUG) { dump("boundCallback() called with scope: \n\t" + this.outer.Value + "\n\n"); } // XXX how do we deal with this in release builds? // XXX deal with already bound case // if (aMessage.type != LDAP_RES_BIND) { dump("bind failed\n"); } // kick off a search // var searchOp = Components.classes[ "@mozilla.org/network/ldap-operation;1"]. createInstance(Components.interfaces. nsILDAPOperation); // XXX err handling searchOp.init(connection, generateGetTargetsSearchCallback(this.callerObject, this.outer)); // XXX err handling (also for url. accessors) // XXX constipate this // XXX real timeout searchOp.searchExt(url.dn, url.scope, url.filter, 0, -1); } return new getTargetsBoundCallback(callerObject, outer); } |
dataObject.localname = aElement.localName; | generic_Get: function ( aElement ) { if( aElement ) { var dataObject = []; var wsmAttributes = aElement.getAttribute( "wsm_attributes" ); var attributes = wsm.attributes; // make a copy if( wsmAttributes != "" ) { attributes.push( wsmAttributes.split(" ") ); // modify the copy } for( var i = 0; i < attributes.length; i++ ) { dataObject[attributes[i]] = aElement.getAttribute( attributes[i] ); dataObject.localname = aElement.localName; } return dataObject; } return null; }, |
|
dataObject.localname = aElement.localName; | generic_Get: function ( aElement ) { if( aElement ) { var dataObject = []; var wsmAttributes = aElement.getAttribute( "wsm_attributes" ); var attributes = wsm.attributes; // make a copy if( wsmAttributes != "" ) { attributes.push( wsmAttributes.split(" ") ); // modify the copy } for( var i = 0; i < attributes.length; i++ ) { dataObject[attributes[i]] = aElement.getAttribute( attributes[i] ); dataObject.localname = aElement.localName; } return dataObject; } return null; }, |
|
if (commonDialogsService) | if (promptService) | function GenericSendMessage( msgType ){ dump("GenericSendMessage from XUL\n"); dump("Identity = " + getCurrentIdentity() + "\n"); if (msgCompose != null) { var msgCompFields = msgCompose.compFields; if (msgCompFields) { Recipients2CompFields(msgCompFields); var subject = document.getElementById("msgSubject").value; msgCompFields.subject = subject; dump("attachments = " + GenerateAttachmentsString() + "\n"); try { msgCompFields.attachments = GenerateAttachmentsString(); } catch (ex) { dump("failed to SetAttachments\n"); } if (msgType == msgCompDeliverMode.Now || msgType == msgCompDeliverMode.Later) { //Do we need to check the spelling? if (prefs.GetBoolPref("mail.SpellCheckBeforeSend")) goDoCommand('cmd_spelling'); //Check if we have a subject, else ask user for confirmation if (subject == "") { if (commonDialogsService) { var result = {value:0}; if (commonDialogsService.Prompt( window, gComposeMsgsBundle.getString("subjectDlogTitle"), gComposeMsgsBundle.getString("subjectDlogMessage"), gComposeMsgsBundle.getString("defaultSubject"), result )) { msgCompFields.subject = result.value; var subjectInputElem = document.getElementById("msgSubject"); subjectInputElem.value = result.value; } else return; } } // Before sending the message, check what to do with HTML message, eventually abort. var convert = DetermineConvertibility(); var action = DetermineHTMLAction(convert); if (action == msgCompSendFormat.AskUser) { var recommAction = convert == msgCompConvertible.No ? msgCompSendFormat.AskUser : msgCompSendFormat.PlainText; var result2 = {action:recommAction, convertible:convert, abort:false}; window.openDialog("chrome://messenger/content/messengercompose/askSendFormat.xul", "askSendFormatDialog", "chrome,modal,titlebar,centerscreen", result2); if (result2.abort) return; action = result2.action; } switch (action) { case msgCompSendFormat.PlainText: msgCompFields.forcePlainText = true; msgCompFields.useMultipartAlternative = false; break; case msgCompSendFormat.HTML: msgCompFields.forcePlainText = false; msgCompFields.useMultipartAlternative = false; break; case msgCompSendFormat.Both: msgCompFields.forcePlainText = false; msgCompFields.useMultipartAlternative = true; break; default: dump("\###SendMessage Error: invalid action value\n"); return; } } try { windowLocked = true; CommandUpdate_MsgCompose(); msgCompose.SendMsg(msgType, getCurrentIdentity()); contentChanged = false; msgCompose.bodyModified = false; } catch (ex) { dump("failed to SendMsg: " + ex + "\n"); windowLocked = false; CommandUpdate_MsgCompose(); } } } else dump("###SendMessage Error: composeAppCore is null!\n");} |
if (commonDialogsService.Prompt( | if (promptService.Prompt( | function GenericSendMessage( msgType ){ dump("GenericSendMessage from XUL\n"); dump("Identity = " + getCurrentIdentity() + "\n"); if (msgCompose != null) { var msgCompFields = msgCompose.compFields; if (msgCompFields) { Recipients2CompFields(msgCompFields); var subject = document.getElementById("msgSubject").value; msgCompFields.subject = subject; dump("attachments = " + GenerateAttachmentsString() + "\n"); try { msgCompFields.attachments = GenerateAttachmentsString(); } catch (ex) { dump("failed to SetAttachments\n"); } if (msgType == msgCompDeliverMode.Now || msgType == msgCompDeliverMode.Later) { //Do we need to check the spelling? if (prefs.GetBoolPref("mail.SpellCheckBeforeSend")) goDoCommand('cmd_spelling'); //Check if we have a subject, else ask user for confirmation if (subject == "") { if (commonDialogsService) { var result = {value:0}; if (commonDialogsService.Prompt( window, gComposeMsgsBundle.getString("subjectDlogTitle"), gComposeMsgsBundle.getString("subjectDlogMessage"), gComposeMsgsBundle.getString("defaultSubject"), result )) { msgCompFields.subject = result.value; var subjectInputElem = document.getElementById("msgSubject"); subjectInputElem.value = result.value; } else return; } } // Before sending the message, check what to do with HTML message, eventually abort. var convert = DetermineConvertibility(); var action = DetermineHTMLAction(convert); if (action == msgCompSendFormat.AskUser) { var recommAction = convert == msgCompConvertible.No ? msgCompSendFormat.AskUser : msgCompSendFormat.PlainText; var result2 = {action:recommAction, convertible:convert, abort:false}; window.openDialog("chrome://messenger/content/messengercompose/askSendFormat.xul", "askSendFormatDialog", "chrome,modal,titlebar,centerscreen", result2); if (result2.abort) return; action = result2.action; } switch (action) { case msgCompSendFormat.PlainText: msgCompFields.forcePlainText = true; msgCompFields.useMultipartAlternative = false; break; case msgCompSendFormat.HTML: msgCompFields.forcePlainText = false; msgCompFields.useMultipartAlternative = false; break; case msgCompSendFormat.Both: msgCompFields.forcePlainText = false; msgCompFields.useMultipartAlternative = true; break; default: dump("\###SendMessage Error: invalid action value\n"); return; } } try { windowLocked = true; CommandUpdate_MsgCompose(); msgCompose.SendMsg(msgType, getCurrentIdentity()); contentChanged = false; msgCompose.bodyModified = false; } catch (ex) { dump("failed to SendMsg: " + ex + "\n"); windowLocked = false; CommandUpdate_MsgCompose(); } } } else dump("###SendMessage Error: composeAppCore is null!\n");} |
"", 0, | function GenericSendMessage( msgType ){ dump("GenericSendMessage from XUL\n"); dump("Identity = " + getCurrentIdentity() + "\n"); if (msgCompose != null) { var msgCompFields = msgCompose.compFields; if (msgCompFields) { Recipients2CompFields(msgCompFields); var subject = document.getElementById("msgSubject").value; msgCompFields.subject = subject; dump("attachments = " + GenerateAttachmentsString() + "\n"); try { msgCompFields.attachments = GenerateAttachmentsString(); } catch (ex) { dump("failed to SetAttachments\n"); } if (msgType == msgCompDeliverMode.Now || msgType == msgCompDeliverMode.Later) { //Do we need to check the spelling? if (prefs.GetBoolPref("mail.SpellCheckBeforeSend")) goDoCommand('cmd_spelling'); //Check if we have a subject, else ask user for confirmation if (subject == "") { if (commonDialogsService) { var result = {value:0}; if (commonDialogsService.Prompt( window, gComposeMsgsBundle.getString("subjectDlogTitle"), gComposeMsgsBundle.getString("subjectDlogMessage"), gComposeMsgsBundle.getString("defaultSubject"), result )) { msgCompFields.subject = result.value; var subjectInputElem = document.getElementById("msgSubject"); subjectInputElem.value = result.value; } else return; } } // Before sending the message, check what to do with HTML message, eventually abort. var convert = DetermineConvertibility(); var action = DetermineHTMLAction(convert); if (action == msgCompSendFormat.AskUser) { var recommAction = convert == msgCompConvertible.No ? msgCompSendFormat.AskUser : msgCompSendFormat.PlainText; var result2 = {action:recommAction, convertible:convert, abort:false}; window.openDialog("chrome://messenger/content/messengercompose/askSendFormat.xul", "askSendFormatDialog", "chrome,modal,titlebar,centerscreen", result2); if (result2.abort) return; action = result2.action; } switch (action) { case msgCompSendFormat.PlainText: msgCompFields.forcePlainText = true; msgCompFields.useMultipartAlternative = false; break; case msgCompSendFormat.HTML: msgCompFields.forcePlainText = false; msgCompFields.useMultipartAlternative = false; break; case msgCompSendFormat.Both: msgCompFields.forcePlainText = false; msgCompFields.useMultipartAlternative = true; break; default: dump("\###SendMessage Error: invalid action value\n"); return; } } try { windowLocked = true; CommandUpdate_MsgCompose(); msgCompose.SendMsg(msgType, getCurrentIdentity()); contentChanged = false; msgCompose.bodyModified = false; } catch (ex) { dump("failed to SendMsg: " + ex + "\n"); windowLocked = false; CommandUpdate_MsgCompose(); } } } else dump("###SendMessage Error: composeAppCore is null!\n");} |
|
"askSendFormatDialog", "chrome,modal,centerscreen", | "askSendFormatDialog", "chrome,modal,titlebar,centerscreen", | function GenericSendMessage( msgType ){ dump("GenericSendMessage from XUL\n"); dump("Identity = " + getCurrentIdentity() + "\n"); if (msgCompose != null) { var msgCompFields = msgCompose.compFields; if (msgCompFields) { Recipients2CompFields(msgCompFields); var subject = document.getElementById("msgSubject").value; msgCompFields.SetSubject(subject); dump("attachments = " + GenerateAttachmentsString() + "\n"); try { msgCompFields.SetAttachments(GenerateAttachmentsString()); } catch (ex) { dump("failed to SetAttachments\n"); } if (msgType == msgCompDeliverMode.Now || msgType == msgCompDeliverMode.Later) { //Do we need to check the spelling? if (prefs.GetBoolPref("mail.SpellCheckBeforeSend")) goDoCommand('cmd_spelling'); //Check if we have a subject, else ask user for confirmation if (subject == "") { if (commonDialogsService) { var result = {value:0}; if (commonDialogsService.Prompt( window, Bundle.GetStringFromName("subjectDlogTitle"), Bundle.GetStringFromName("subjectDlogMessage"), Bundle.GetStringFromName("defaultSubject"), result )) { msgCompFields.SetSubject(result.value); var subjectInputElem = document.getElementById("msgSubject"); subjectInputElem.value = result.value; } else return; } } // Before sending the message, check what to do with HTML message, eventually abort. var convert = DetermineConvertibility(); action = DetermineHTMLAction(convert); if (action == msgCompSendFormat.AskUser) { recommAction = convert == msgCompConvertible.No ? msgCompSendFormat.AskUser : msgCompSendFormat.PlainText; var result = {action:recommAction, convertible:convert, abort:false}; window.openDialog("chrome://messenger/content/messengercompose/askSendFormat.xul", "askSendFormatDialog", "chrome,modal,centerscreen", result); if (result.abort) return; action = result.action; } switch (action) { case msgCompSendFormat.PlainText: msgCompFields.SetTheForcePlainText(true); msgCompFields.SetUseMultipartAlternativeFlag(false); break; case msgCompSendFormat.HTML: msgCompFields.SetTheForcePlainText(false); msgCompFields.SetUseMultipartAlternativeFlag(false); break; case msgCompSendFormat.Both: msgCompFields.SetTheForcePlainText(false); msgCompFields.SetUseMultipartAlternativeFlag(true); break; default: dump("\###SendMessage Error: invalid action value\n"); return; } } try { windowLocked = true; CommandUpdate_MsgCompose(); msgCompose.SendMsg(msgType, getCurrentIdentity(), null); contentChanged = false; msgCompose.bodyModified = false; } catch (ex) { dump("failed to SendMsg\n"); windowLocked = false; CommandUpdate_MsgCompose(); } } } else dump("###SendMessage Error: composeAppCore is null!\n");} |
jQuery.get = function( url, callback, type ) { jQuery.ajax( "GET", url, null, function(r) { if ( callback ) callback( jQuery.httpData(r,type) ); }); }; | get: function( url, data, callback, type ) { if ( data.constructor == Function ) { callback = data; data = null; } if ( data ) url += "?" + jQuery.param(data); jQuery.ajax( "GET", url, null, function(r) { if ( callback ) callback( jQuery.httpData(r,type) ); }); }, | jQuery.get = function( url, callback, type ) { // Build and start the HTTP Request jQuery.ajax( "GET", url, null, function(r) { if ( callback ) callback( jQuery.httpData(r,type) ); });}; |
jQuery.ajax({ | return jQuery.ajax({ | get: function( url, data, callback, type, ifModified ) { // shift arguments if data argument was ommited if ( data && data.constructor == Function ) { callback = data; data = null; } // Delegate jQuery.ajax({ url: url, data: data, success: callback, dataType: type, ifModified: ifModified }); }, |
if ( data.constructor == Function ) { | if ( data && data.constructor == Function ) { | get: function( url, data, callback, type, ifModified ) { if ( data.constructor == Function ) { type = callback; callback = data; data = null; } // append ? + data or & + data, in case there are already params if ( data ) url += ((url.indexOf("?") > -1) ? "&" : "?") + jQuery.param(data); // Build and start the HTTP Request jQuery.ajax( "GET", url, null, function(r, status) { if ( callback ) callback( jQuery.httpData(r,type), status ); }, ifModified); }, |
$.get = function( url, ret, type ) { $.xml( "GET", url, null, function(r) { if ( ret ) { ret( $.httpData(r,type) ); } | $.get = function( url, callback, type ) { $.ajax( "GET", url, null, function(r) { if ( callback ) callback( $.httpData(r,type) ); | $.get = function( url, ret, type ) { $.xml( "GET", url, null, function(r) { if ( ret ) { ret( $.httpData(r,type) ); } });}; |
type = callback; | get: function( url, data, callback, type, ifModified ) { // shift arguments if data argument was ommited if ( data && data.constructor == Function ) { type = callback; callback = data; data = null; } // Delegate jQuery.ajax({ url: url, data: data, success: callback, dataType: type, ifModified: ifModified }); }, |
|
return i === null ? this.cur : this.cur[i]; | return typeof i == 'undefined' ? this.cur : this.cur[i]; | get: function(i) { return i === null ? this.cur : this.cur[i]; }, |
if ( num && num.constructor == Array ) { | return num == undefined ? | get: function( num ) { // Watch for when an array (of elements) is passed in if ( num && num.constructor == Array ) { // Use a tricky hack to make the jQuery object // look and feel like an array this.length = 0; [].push.apply( this, num ); return this; } else return num == undefined ? // Return a 'clean' array jQuery.merge( this, [] ) : // Return just the object this[num]; }, |
this.length = 0; [].push.apply( this, num ); | jQuery.merge( this, [] ) : | get: function( num ) { // Watch for when an array (of elements) is passed in if ( num && num.constructor == Array ) { // Use a tricky hack to make the jQuery object // look and feel like an array this.length = 0; [].push.apply( this, num ); return this; } else return num == undefined ? // Return a 'clean' array jQuery.merge( this, [] ) : // Return just the object this[num]; }, |
return this; } else return num == undefined ? jQuery.merge( this, [] ) : this[num]; | this[num]; | get: function( num ) { // Watch for when an array (of elements) is passed in if ( num && num.constructor == Array ) { // Use a tricky hack to make the jQuery object // look and feel like an array this.length = 0; [].push.apply( this, num ); return this; } else return num == undefined ? // Return a 'clean' array jQuery.merge( this, [] ) : // Return just the object this[num]; }, |
get: function( url, data, callback, type ) { | get: function( url, data, callback, type, ifModified ) { | get: function( url, data, callback, type ) { if ( data.constructor == Function ) { callback = data; data = null; } if ( data ) url += "?" + jQuery.param(data); // Build and start the HTTP Request jQuery.ajax( "GET", url, null, function(r) { if ( callback ) callback( jQuery.httpData(r,type) ); }); }, |
jQuery.ajax( "GET", url, null, function(r) { if ( callback ) callback( jQuery.httpData(r,type) ); }); | jQuery.ajax( "GET", url, null, function(r, status) { if ( callback ) callback( jQuery.httpData(r,type), status ); }, ifModified); | get: function( url, data, callback, type ) { if ( data.constructor == Function ) { callback = data; data = null; } if ( data ) url += "?" + jQuery.param(data); // Build and start the HTTP Request jQuery.ajax( "GET", url, null, function(r) { if ( callback ) callback( jQuery.httpData(r,type) ); }); }, |
jQuery.map( this, function(a){ return a } ) : | jQuery.merge( this, [] ) : | get: function( num ) { // Watch for when an array (of elements) is passed in if ( num && num.constructor == Array ) { // Use a tricky hack to make the jQuery object // look and feel like an array this.length = 0; [].push.apply( this, num ); return this; } else return num == undefined ? // Return a 'clean' array jQuery.map( this, function(a){ return a } ) : // Return just the object this[num]; }, |
if ( data ) url += "?" + jQuery.param(data); | if ( data ) url += ((url.indexOf("?") > -1) ? "&" : "?") + jQuery.param(data); | get: function( url, data, callback, type, ifModified ) { if ( data.constructor == Function ) { type = callback; callback = data; data = null; } if ( data ) url += "?" + jQuery.param(data); // Build and start the HTTP Request jQuery.ajax( "GET", url, null, function(r, status) { if ( callback ) callback( jQuery.httpData(r,type), status ); }, ifModified); }, |
return typeof i == 'undefined' ? this.cur : this.cur[i]; }, | return i == undefined ? this.cur : this.cur[i]; }, | get: function(i) { return typeof i == 'undefined' ? this.cur : this.cur[i]; }, |
return nsJSComponentManager.getService("component: | return nsJSComponentManager.getService("@mozilla.org/widget/dragservice;1", | get mDragService() { return nsJSComponentManager.getService("component://netscape/widget/dragservice", "nsIDragService"); }, |
get _ios() { if (!this.__ios) { this.__ios = Cc["@mozilla.org/network/io-service;1"]. getService(Ci.nsIIOService); | get _livemarks() { if (!this.__livemarks) { this.__livemarks = Cc["@mozilla.org/browser/livemark-service;1"]. getService(Ci.nsILivemarkService); | get _ios() { if (!this.__ios) { this.__ios = Cc["@mozilla.org/network/io-service;1"]. getService(Ci.nsIIOService); } return this.__ios; }, |
return this.__ios; | return this.__livemarks; | get _ios() { if (!this.__ios) { this.__ios = Cc["@mozilla.org/network/io-service;1"]. getService(Ci.nsIIOService); } return this.__ios; }, |
var filename = ""; var name = this.mContentDisposition; if (name) { const filenamePrefix = "filename="; var ix = name.indexOf(filenamePrefix); if (ix >= 0) { ix += filenamePrefix.length; filename = name.substr(ix, name.length); if (filename != "") { ix = filename.lastIndexOf(";"); if (ix > 0) filename = filename.substr(0, ix); filename = filename.replace(/^"|"$/g, ""); | var fileName = ""; if (this.mContentDisposition) { const mhpContractID = "@mozilla.org/network/mime-hdrparam;1" const mhpIID = Components.interfaces.nsIMIMEHeaderParam; const mhp = Components.classes[mhpContractID].getService(mhpIID); var dummy = { value: null }; var charset = getCharsetforSave(null); try { fileName = mhp.getParameter(this.mContentDisposition, "filename", charset, true, dummy); } catch (e) { try { fileName = mhp.getParameter(this.mContentDisposition, "name", charset, true, dummy); } catch (e) { | get suggestedFileName() { var filename = ""; var name = this.mContentDisposition; if (name) { const filenamePrefix = "filename="; var ix = name.indexOf(filenamePrefix); if (ix >= 0) { // Adjust ix to point to start of actual name ix += filenamePrefix.length; filename = name.substr(ix, name.length); if (filename != "") { ix = filename.lastIndexOf(";"); if (ix > 0) filename = filename.substr(0, ix); filename = filename.replace(/^"|"$/g, ""); } } } return filename; } |
return filename; | fileName = fileName.replace(/^"|"$/g, ""); return fileName; | get suggestedFileName() { var filename = ""; var name = this.mContentDisposition; if (name) { const filenamePrefix = "filename="; var ix = name.indexOf(filenamePrefix); if (ix >= 0) { // Adjust ix to point to start of actual name ix += filenamePrefix.length; filename = name.substr(ix, name.length); if (filename != "") { ix = filename.lastIndexOf(";"); if (ix > 0) filename = filename.substr(0, ix); filename = filename.replace(/^"|"$/g, ""); } } } return filename; } |
get value() { return document.getElementById("searchFilter").value; | get value() { if (!this._value) { if (this._pb.prefHasUserValue(this._pref)) { var valueString = this._pb.getCharPref(this._pref); this._value = this._serializable.deserialize(valueString); } else this._value = this._defaultValue; } return this._value; | get value() { return document.getElementById("searchFilter").value; }, |
throw Components.results.NS_NOT_IMPLEMENTED; | throw Components.results.NS_ERROR_NOT_IMPLEMENTED; | get icalComponent() { throw Components.results.NS_NOT_IMPLEMENTED; }, |
mIsAllDay: false, get isAllDay() { return this.mIsAllDay; }, set isAllDay(v) { if (this.mImmutable) throw Components.results.NS_ERROR_FAILURE; else this.mIsAllDay = v; }, | get icalComponent() { const icssvc = Components. classes["@mozilla.org/calendar/ics-service;1"]. getService(Components.interfaces.calIICSService); var icalcomp = icssvc.createIcalComponent(ICAL.VEVENT_COMPONENT); this.fillIcalComponentFromBase(icalcomp); this.mapPropsToICS(icalcomp, this.icsEventPropMap); return icalcomp; }, | mIsAllDay: false, get isAllDay() { return this.mIsAllDay; }, set isAllDay(v) { if (this.mImmutable) throw Components.results.NS_ERROR_FAILURE; else this.mIsAllDay = v; }, |
get icalComponent() { const icssvc = Components. classes["@mozilla.org/calendar/ics-service;1"]. getService(Components.interfaces.calIICSService); var icalcomp = icssvc.createIcalComponent("VTODO"); this.fillIcalComponentFromBase(icalcomp); this.mapPropsToICS(icalcomp, this.icsEventPropMap); var bagenum = this.mProperties.enumerator; while (bagenum.hasMoreElements()) { var iprop = bagenum.getNext(). QueryInterface(Components.interfaces.nsIProperty); try { if (!this.todoPromotedProps[iprop.name]) { var icalprop = icssvc.createIcalProperty(iprop.name); icalprop.value = iprop.value; icalcomp.addProperty(icalprop); } } catch (e) { } } return icalcomp; }, | get entryDate() { return this.getProperty("DTSTART"); } | get icalComponent() { const icssvc = Components. classes["@mozilla.org/calendar/ics-service;1"]. getService(Components.interfaces.calIICSService); var icalcomp = icssvc.createIcalComponent("VTODO"); this.fillIcalComponentFromBase(icalcomp); this.mapPropsToICS(icalcomp, this.icsEventPropMap); var bagenum = this.mProperties.enumerator; while (bagenum.hasMoreElements()) { var iprop = bagenum.getNext(). QueryInterface(Components.interfaces.nsIProperty); try { if (!this.todoPromotedProps[iprop.name]) { var icalprop = icssvc.createIcalProperty(iprop.name); icalprop.value = iprop.value; icalcomp.addProperty(icalprop); } } catch (e) { // dump("failed to set " + iprop.name + " to " + iprop.value + // ": " + e + "\n"); } } return icalcomp; }, |
var percentprop = icssvc.createIcalProperty("PERCENT-COMPLETE"); percentprop.stringValue = this.mPercentComplete; icalcomp.addProperty(percentprop); | if (this.mPercentComplete != undefined) { var percentprop = icssvc.createIcalProperty("PERCENT-COMPLETE"); percentprop.stringValue = this.mPercentComplete; icalcomp.addProperty(percentprop); } | get icalComponent() { const icssvc = Components. classes["@mozilla.org/calendar/ics-service;1"]. getService(Components.interfaces.calIICSService); var icalcomp = icssvc.createIcalComponent("VTODO"); this.fillIcalComponentFromBase(icalcomp); this.mapPropsToICS(icalcomp, this.icsEventPropMap); var percentprop = icssvc.createIcalProperty("PERCENT-COMPLETE"); percentprop.stringValue = this.mPercentComplete; icalcomp.addProperty(percentprop); var bagenum = this.mProperties.enumerator; while (bagenum.hasMoreElements()) { var iprop = bagenum.getNext(). QueryInterface(Components.interfaces.nsIProperty); try { if (!this.eventPromotedProps[iprop.name]) { var icalprop = icssvc.createIcalProperty(iprop.name); icalprop.stringValue = iprop.value; icalcomp.addProperty(icalprop); } } catch (e) { // dump("failed to set " + iprop.name + " to " + iprop.value + // ": " + e + "\n"); } } return icalcomp; }, |
get filterInrex() { return this.mFilterIndex; }, | get filterIndex() { return this.mFilterIndex; }, | get filterInrex() { return this.mFilterIndex; }, |
return nsJSComponentManager.getService("component: | return nsJSComponentManager.getService("@mozilla.org/widget/clipboard;1", | get mClipboard() { return nsJSComponentManager.getService("component://netscape/widget/clipboard", "nsIClipboard"); }, |
if (ix > 0) { | if (ix >= 0) { | get suggestedFileName() { var filename = ""; var name = this.mContentDisposition; if (name) { const filenamePrefix = "filename="; var ix = name.indexOf(filenamePrefix); if (ix > 0) { // Adjust ix to point to start of actual name ix += filenamePrefix.length; filename = name.substr(ix, name.length); if (filename != "") { ix = filename.lastIndexOf(";"); if (ix > 0) filename = filename.substr(0, ix); // XXX strip out quotes; } } } return filename; } |
filename = filename.replace(/^"|"$/g, ""); | get suggestedFileName() { var filename = ""; var name = this.mContentDisposition; if (name) { const filenamePrefix = "filename="; var ix = name.indexOf(filenamePrefix); if (ix > 0) { // Adjust ix to point to start of actual name ix += filenamePrefix.length; filename = name.substr(ix, name.length); if (filename != "") { ix = filename.lastIndexOf(";"); if (ix > 0) filename = filename.substr(0, ix); // XXX strip out quotes; } } } return filename; } |
|
var currentZoom = Math.round(getMarkupDocumentViewer().textZoom * 100); if (this.indexOf(currentZoom) == -1) { if (currentZoom != this.factorOther) { this.factorOther = currentZoom; this.factorAnchor = this.factorOther; | var currentZoom; try { currentZoom = Math.round(getMarkupDocumentViewer().textZoom * 100); if (this.indexOf(currentZoom) == -1) { if (currentZoom != this.factorOther) { this.factorOther = currentZoom; this.factorAnchor = this.factorOther; } | get textZoom() { var currentZoom = Math.round(getMarkupDocumentViewer().textZoom * 100); if (this.indexOf(currentZoom) == -1) { if (currentZoom != this.factorOther) { this.factorOther = currentZoom; this.factorAnchor = this.factorOther; } } return currentZoom; }, |
} catch (e) { currentZoom = 100; | get textZoom() { var currentZoom = Math.round(getMarkupDocumentViewer().textZoom * 100); if (this.indexOf(currentZoom) == -1) { if (currentZoom != this.factorOther) { this.factorOther = currentZoom; this.factorAnchor = this.factorOther; } } return currentZoom; }, |
|
get icalComponent() { const icssvc = Components. classes["@mozilla.org/calendar/ics-service;1"]. getService(Components.interfaces.calIICSService); var icalcomp = icssvc.createIcalComponent("VEVENT"); this.fillIcalComponentFromBase(icalcomp); this.mapPropsToICS(icalcomp, this.icsEventPropMap); var bagenum = this.mProperties.enumerator; while (bagenum.hasMoreElements()) { var iprop = bagenum.getNext(). QueryInterface(Components.interfaces.nsIProperty); try { if (!this.eventPromotedProps[iprop.name]) { var icalprop = icssvc.createIcalProperty(iprop.name); icalprop.value = iprop.value; icalcomp.addProperty(icalprop); } } catch (e) { dump("XXX failed to set " + iprop.name + " to " + iprop.value + ": " + e + "\n"); } } return icalcomp; }, | get startDate() { return this.getProperty("DTSTART"); } | get icalComponent() { const icssvc = Components. classes["@mozilla.org/calendar/ics-service;1"]. getService(Components.interfaces.calIICSService); var icalcomp = icssvc.createIcalComponent("VEVENT"); this.fillIcalComponentFromBase(icalcomp); this.mapPropsToICS(icalcomp, this.icsEventPropMap); var bagenum = this.mProperties.enumerator; while (bagenum.hasMoreElements()) { var iprop = bagenum.getNext(). QueryInterface(Components.interfaces.nsIProperty); try { if (!this.eventPromotedProps[iprop.name]) { var icalprop = icssvc.createIcalProperty(iprop.name); icalprop.value = iprop.value; icalcomp.addProperty(icalprop); } } catch (e) { dump("XXX failed to set " + iprop.name + " to " + iprop.value + ": " + e + "\n"); } } return icalcomp; }, |
return nsJSComponentManager.getService("component: | return nsJSComponentManager.getService("@mozilla.org/preferences;1", "nsIPref"); | get mPrefService() { return nsJSComponentManager.getService("component://netscape/preferences", "nsIPref"); }, |
document.getElementById("bookmarks-ptf"), document.getElementById("bookmarks-menu").parentNode | document.getAnonymousElementByAttribute(bt , "anonid", "bookmarks-ptf"), document.getElementById("bookmarks-menu").parentNode, document.getAnonymousElementByAttribute(bt , "class", "chevron").parentNode | get mObservers () { if (!this._observers) { this._observers = [ document.getElementById("bookmarks-ptf"), document.getElementById("bookmarks-menu").parentNode ] } return this._observers; }, |
var checked = wsm.contentArea.document.getElementById( aElementID ).checked; | var checked = element.checked; | get_Checkbox: function ( aElementID ) { var element = wsm.contentArea.document.getElementById( aElementID ); var dataObject = wsm.generic_Get( element ); if( dataObject ) { var checked = wsm.contentArea.document.getElementById( aElementID ).checked; dataObject.checked = element.getAttribute("reversed") == "true" ? !checked : checked; return dataObject; } return null; }, |
return; | return null; | function get_destination_channel(destinationDirectoryLocation, fileName, login, password){ try { var ioService = GetIOService(); if (!ioService) { return; } // create a channel for the destination location var fullurl = destinationDirectoryLocation + fileName; destChannel = create_channel_from_url(ioService, fullurl, login, password); if (!destChannel) { dump("can't create dest channel\n"); return; } try { dump("about to set callbacks\n"); destChannel.notificationCallbacks = window.docshell; // docshell dump("notification callbacks set\n"); } catch(e) {dump(e+"\n");} try { var httpChannel = destChannel.QueryInterface(Components.interfaces.nsIHttpChannel); } catch( e ) { //alert( e ); } if (httpChannel) { dump("http channel found\n"); return httpChannel; } var ftpChannel = destChannel.QueryInterface(Components.interfaces.nsIFTPChannel); if (ftpChannel) dump("ftp channel found\n"); if (ftpChannel) return ftpChannel; var httpsChannel = destChannel.QueryInterface(Components.interfaces.nsIHttpsChannel); if (httpsChannel) dump("https channel found\n"); if (httpsChannel) return httpsChannel; else return null; } catch (e) { return null; }} |
dump_tree(content); | function get_iframe(content) { debug("---------- get_iframe"); dump_tree(content); var unsandboxed_iframe = content.childNodes.item(1); var sandboxed_iframe = content.childNodes.item(2); if (unsandboxed_iframe.getAttribute('src').match(/^chrome:/)) { return unsandboxed_iframe; } else { return sandboxed_iframe; }} |
|
url = url.replace(/%VERSION%/g, SIDEBAR_VERSION); | url = url.replace(/%SIDEBAR_VERSION%/g, SIDEBAR_VERSION); | function get_remote_datasource_url() { var url = ''; var prefs = Components.classes['component://netscape/preferences']; if (prefs) { prefs = prefs.getService(); } if (prefs) { prefs = prefs.QueryInterface(Components.interfaces.nsIPref); } if (prefs) { try { url = prefs.CopyCharPref("sidebar.customize.all_panels.url"); url = url.replace(/%VERSION%/g, SIDEBAR_VERSION); var locale_progid = 'component://netscape/intl/nslocaleservice'; var locale = Components.classes[locale_progid].getService(); locale = locale.QueryInterface(Components.interfaces.nsILocaleService); locale = locale.GetLocaleComponentForUserAgent(); locale = locale.toLowerCase(); url = url.replace(/%LOCALE%/g, locale); debug("Remote url is " + url); } catch(ex) { debug("Unable to get remote url pref. What now? "+ex); } } return url;} |
var prefs = Components.classes['component: | var prefs = Components.classes['@mozilla.org/preferences;1']; | function get_remote_datasource_url() { var url = ''; var prefs = Components.classes['component://netscape/preferences']; if (prefs) { prefs = prefs.getService(); } if (prefs) { prefs = prefs.QueryInterface(Components.interfaces.nsIPref); } if (prefs) { var locale; try { url = prefs.CopyCharPref("sidebar.customize.all_panels.url"); url = url.replace(/%SIDEBAR_VERSION%/g, SIDEBAR_VERSION); } catch(ex) { debug("Unable to get remote url pref. What now? "+ex); } try { locale = prefs.CopyCharPref("intl.content.langcode"); } catch(ex) { try { debug("No lang code pref, intl.content.langcode."); debug("Use locale from user agent string instead"); var locale_progid = 'component://netscape/intl/nslocaleservice'; var syslocale = Components.classes[locale_progid].getService(); syslocale = syslocale.QueryInterface(Components.interfaces.nsILocaleService); locale = syslocale.GetLocaleComponentForUserAgent(); } catch(ex) { debug("Unable to get system locale. What now? "+ex); } } locale = locale.toLowerCase(); url = url.replace(/%LOCALE%/g, locale); debug("Remote url is " + url); } return url;} |
var locale_progid = 'component: var syslocale = Components.classes[locale_progid].getService(); | var locale_contractid = '@mozilla.org/intl/nslocaleservice;1'; var syslocale = Components.classes[locale_contractid].getService(); | function get_remote_datasource_url() { var url = ''; var prefs = Components.classes['component://netscape/preferences']; if (prefs) { prefs = prefs.getService(); } if (prefs) { prefs = prefs.QueryInterface(Components.interfaces.nsIPref); } if (prefs) { var locale; try { url = prefs.CopyCharPref("sidebar.customize.all_panels.url"); url = url.replace(/%SIDEBAR_VERSION%/g, SIDEBAR_VERSION); } catch(ex) { debug("Unable to get remote url pref. What now? "+ex); } try { locale = prefs.CopyCharPref("intl.content.langcode"); } catch(ex) { try { debug("No lang code pref, intl.content.langcode."); debug("Use locale from user agent string instead"); var locale_progid = 'component://netscape/intl/nslocaleservice'; var syslocale = Components.classes[locale_progid].getService(); syslocale = syslocale.QueryInterface(Components.interfaces.nsILocaleService); locale = syslocale.GetLocaleComponentForUserAgent(); } catch(ex) { debug("Unable to get system locale. What now? "+ex); } } locale = locale.toLowerCase(); url = url.replace(/%LOCALE%/g, locale); debug("Remote url is " + url); } return url;} |
var file_url = Components.classes["@mozilla.org/network/standard-url;1"].createInstance(Components.interfaces.nsIFileURL); file_url.file = sidebar_file; return file_url.spec; | return sidebar_file.URL; | function get_sidebar_datasource_uri() { try { var sidebar_file = sidebar_get_panels_file(); var file_url = Components.classes["@mozilla.org/network/standard-url;1"].createInstance(Components.interfaces.nsIFileURL); file_url.file = sidebar_file; return file_url.spec; } catch (ex) { // This should not happen debug("Error: Unable to load panels file.\n"); } return null;} |
function get_sidebar_datasource_uri(panels_file_id) { | function get_sidebar_datasource_uri() { | function get_sidebar_datasource_uri(panels_file_id) { try { var locator_interface = Components.interfaces.nsIFileLocator; var locator_prog_id = 'component://netscape/filelocator'; var locator_service = Components.classes[locator_prog_id].getService(); // use the fileLocator to look in the profile directory // to find 'panels.rdf', which is the // database of the user's currently selected panels. locator_service = locator_service.QueryInterface(locator_interface); // if <profile>/panels.rdf doesn't exist, GetFileLocation() will copy // bin/defaults/profile/panels.rdf to <profile>/panels.rdf var sidebar_file = locator_service.GetFileLocation(panels_file_id); if (!sidebar_file.exists()) { // this should not happen, as GetFileLocation() should copy // defaults/panels.rdf to the users profile directory return null; } debug("sidebar uri is " + sidebar_file.URLString); return sidebar_file.URLString; } catch (ex) { // this should not happen debug("Error: Unable to load panels file.\n"); return null; }} |
var locator_interface = Components.interfaces.nsIFileLocator; var locator_prog_id = 'component: var locator_service = Components.classes[locator_prog_id].getService(); locator_service = locator_service.QueryInterface(locator_interface); var sidebar_file = locator_service.GetFileLocation(panels_file_id); if (!sidebar_file.exists()) { return null; } debug("sidebar uri is " + sidebar_file.URLString); | var sidebar_file = sidebar_get_panels_file(); | function get_sidebar_datasource_uri(panels_file_id) { try { var locator_interface = Components.interfaces.nsIFileLocator; var locator_prog_id = 'component://netscape/filelocator'; var locator_service = Components.classes[locator_prog_id].getService(); // use the fileLocator to look in the profile directory // to find 'panels.rdf', which is the // database of the user's currently selected panels. locator_service = locator_service.QueryInterface(locator_interface); // if <profile>/panels.rdf doesn't exist, GetFileLocation() will copy // bin/defaults/profile/panels.rdf to <profile>/panels.rdf var sidebar_file = locator_service.GetFileLocation(panels_file_id); if (!sidebar_file.exists()) { // this should not happen, as GetFileLocation() should copy // defaults/panels.rdf to the users profile directory return null; } debug("sidebar uri is " + sidebar_file.URLString); return sidebar_file.URLString; } catch (ex) { // this should not happen debug("Error: Unable to load panels file.\n"); return null; }} |
var file_url = Components.classes["component: | var file_url = Components.classes["@mozilla.org/network/standard-url;1"].createInstance(Components.interfaces.nsIFileURL); | function get_sidebar_datasource_uri() { try { var sidebar_file = sidebar_get_panels_file(); var file_url = Components.classes["component://netscape/network/standard-url"].createInstance(Components.interfaces.nsIFileURL); file_url.file = sidebar_file; return file_url.spec; } catch (ex) { // This should not happen debug("Error: Unable to load panels file.\n"); } return null;} |
dataObject.value = wsm.contentArea.document.getElementById( aElementID ).value; | dataObject.value = element.value; | get_Textbox: function ( aElementID ) { var element = wsm.contentArea.document.getElementById( aElementID ); var dataObject = wsm.generic_Get( element ); if( dataObject ) { dataObject.value = wsm.contentArea.document.getElementById( aElementID ).value; return dataObject; } return null; }, |
var rdf_uri = "component: | var rdf_uri = "@mozilla.org/rdf/rdf-service;1"; | function getAbsoluteID(root, node){ var url = node.getAttribute("ref"); if ((url == null) || (url == "")) { url = node.getAttribute("id"); } try { var rootNode = document.getElementById(root); var ds = null; if (rootNode) { ds = rootNode.database; } // add support for anonymous resources such as Internet Search results, // IE favorites under Win32, and NetPositive URLs under BeOS var rdf_uri = "component://netscape/rdf/rdf-service"; var rdf = Components.classes[rdf_uri].getService(); if (rdf) rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService); if (rdf && ds) { var src = rdf.GetResource(url, true); var prop = rdf.GetResource(NC_NS + "URL", true); var target = ds.GetTarget(src, prop, true); if (target) target = target.QueryInterface(Components.interfaces.nsIRDFLiteral); if (target) target = target.Value; if (target) url = target; } } catch(ex) { } return url;} |
var rdf = Components.classes["component: | var rdf = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(); | function getAbsoluteID(root, node){ var url = node.getAttribute("ref"); if ((url == null) || (url == "")) { url = node.getAttribute("id"); } try { var rootNode = document.getElementById(root); var ds = null; if (rootNode) { ds = rootNode.database; } // add support for anonymous resources such as Internet Search results, // IE favorites under Win32, and NetPositive URLs under BeOS var rdf = Components.classes["component://netscape/rdf/rdf-service"].getService(); if (rdf) rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService); if (rdf && ds) { var src = rdf.GetResource(url, true); var prop = rdf.GetResource("http://home.netscape.com/NC-rdf#URL", true); var target = ds.GetTarget(src, prop, true); if (target) target = target.QueryInterface(Components.interfaces.nsIRDFLiteral); if (target) target = target.Value; if (target) url = target; } } catch(ex) { } return(url);} |
var prop = rdf.GetResource(NC + "URL", | var prop = rdf.GetResource(NC_NS + "URL", | function getAbsoluteID(root, node){ var url = node.getAttribute("ref"); if ((url == null) || (url == "")) { url = node.getAttribute("id"); } try { var rootNode = document.getElementById(root); var ds = null; if (rootNode) { ds = rootNode.database; } // add support for anonymous resources such as Internet Search results, // IE favorites under Win32, and NetPositive URLs under BeOS var rdf_uri = "component://netscape/rdf/rdf-service"; var rdf = Components.classes[rdf_uri].getService(); if (rdf) rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService); if (rdf && ds) { var src = rdf.GetResource(url, true); var prop = rdf.GetResource(NC + "URL", true); var target = ds.GetTarget(src, prop, true); if (target) target = target.QueryInterface(Components.interfaces.nsIRDFLiteral); if (target) target = target.Value; if (target) url = target; } } catch(ex) { } return url;} |
var body = document.getElementById('dirTreeBody') | var tree = document.getElementById('dirTree'); if ( tree ) { var body = tree.getElementById('dirTreeBody') | function GetAddressBooksAndURIs(abArray, uriArray){ var numAddressBooks = 0; var selected = 0; var body = document.getElementById('dirTreeBody') if ( body ) { var treeitems = body.getElementsByTagName('treeitem'); if ( treeitems ) { var name, uri, item; for ( var index = 0; index < treeitems.length; index++ ) { item = treeitems[index]; uri = item.getAttribute('id'); if ( item.getAttribute('selected') ) selected = numAddressBooks; var buttons = item.getElementsByTagName('titledbutton'); if ( uri && buttons && buttons.length == 1 ) { name = buttons[0].getAttribute('value'); if ( name ) { abArray[numAddressBooks] = name; uriArray[numAddressBooks] = uri; numAddressBooks++; } } } } } return selected;} |
if ( body ) { var treeitems = body.getElementsByTagName('treeitem'); if ( treeitems ) | if ( body ) | function GetAddressBooksAndURIs(abArray, uriArray){ var numAddressBooks = 0; var selected = 0; var body = document.getElementById('dirTreeBody') if ( body ) { var treeitems = body.getElementsByTagName('treeitem'); if ( treeitems ) { var name, uri, item; for ( var index = 0; index < treeitems.length; index++ ) { item = treeitems[index]; uri = item.getAttribute('id'); if ( item.getAttribute('selected') ) selected = numAddressBooks; var buttons = item.getElementsByTagName('titledbutton'); if ( uri && buttons && buttons.length == 1 ) { name = buttons[0].getAttribute('value'); if ( name ) { abArray[numAddressBooks] = name; uriArray[numAddressBooks] = uri; numAddressBooks++; } } } } } return selected;} |
var name, uri, item; for ( var index = 0; index < treeitems.length; index++ ) { item = treeitems[index]; uri = item.getAttribute('id'); if ( item.getAttribute('selected') ) selected = numAddressBooks; var buttons = item.getElementsByTagName('titledbutton'); if ( uri && buttons && buttons.length == 1 ) { name = buttons[0].getAttribute('value'); if ( name ) | var treeitems = body.getElementsByTagName('treeitem'); if ( treeitems ) { var name, uri, item, selectedItem = 0; if ( tree.selectedItems && (tree.selectedItems.length == 1) ) selectedItem = tree.selectedItems[0]; for ( var index = 0; index < treeitems.length; index++ ) { item = treeitems[index]; uri = item.getAttribute('id'); if ( item == selectedItem ) selected = numAddressBooks; var buttons = item.getElementsByTagName('titledbutton'); if ( uri && buttons && buttons.length == 1 ) | function GetAddressBooksAndURIs(abArray, uriArray){ var numAddressBooks = 0; var selected = 0; var body = document.getElementById('dirTreeBody') if ( body ) { var treeitems = body.getElementsByTagName('treeitem'); if ( treeitems ) { var name, uri, item; for ( var index = 0; index < treeitems.length; index++ ) { item = treeitems[index]; uri = item.getAttribute('id'); if ( item.getAttribute('selected') ) selected = numAddressBooks; var buttons = item.getElementsByTagName('titledbutton'); if ( uri && buttons && buttons.length == 1 ) { name = buttons[0].getAttribute('value'); if ( name ) { abArray[numAddressBooks] = name; uriArray[numAddressBooks] = uri; numAddressBooks++; } } } } } return selected;} |
abArray[numAddressBooks] = name; uriArray[numAddressBooks] = uri; numAddressBooks++; | name = buttons[0].getAttribute('value'); if ( name ) { abArray[numAddressBooks] = name; uriArray[numAddressBooks] = uri; numAddressBooks++; } | function GetAddressBooksAndURIs(abArray, uriArray){ var numAddressBooks = 0; var selected = 0; var body = document.getElementById('dirTreeBody') if ( body ) { var treeitems = body.getElementsByTagName('treeitem'); if ( treeitems ) { var name, uri, item; for ( var index = 0; index < treeitems.length; index++ ) { item = treeitems[index]; uri = item.getAttribute('id'); if ( item.getAttribute('selected') ) selected = numAddressBooks; var buttons = item.getElementsByTagName('titledbutton'); if ( uri && buttons && buttons.length == 1 ) { name = buttons[0].getAttribute('value'); if ( name ) { abArray[numAddressBooks] = name; uriArray[numAddressBooks] = uri; numAddressBooks++; } } } } } return selected;} |
var ary = aliasDefs[i].split(/\s*=\s*/); if (ary[0] == commandName) return [i, ary[1]]; | var ary = aliasDefs[i].match(/^(.*?)\s*=\s*(.*)$/); if (ary[1] == commandName) return [i, ary[2]]; | function getAlias(commandName) { for (var i = 0; i < aliasDefs.length; ++i) { var ary = aliasDefs[i].split(/\s*=\s*/); if (ary[0] == commandName) return [i, ary[1]]; } return null; }; |
for ( var i = 0; i < s.length; i++ ) { | for ( var i = 0; i < s.length; i++ ) | $.getAll = function(o,r) { r = r || []; var s = o.childNodes; for ( var i = 0; i < s.length; i++ ) { if ( s[i].nodeType == 1 ) { r[r.length] = s[i]; $.getAll( s[i], r ); } } return r;}; |
} | $.getAll = function(o,r) { r = r || []; var s = o.childNodes; for ( var i = 0; i < s.length; i++ ) { if ( s[i].nodeType == 1 ) { r[r.length] = s[i]; $.getAll( s[i], r ); } } return r;}; |
|
commands = ["find", "separator", "cut", "copy", "paste", "delete"]; | commands = ["find", "separator", "bm_cut", "bm_copy", "bm_paste", "bm_delete", "separator", "newfolder"]; | getAllCmds: function (aNodeID) { var type = this.resolveType(aNodeID); var commands = []; switch (type) { case "http://home.netscape.com/NC-rdf#BookmarkSeparator": commands = ["find", "separator", "cut", "copy", "paste", "delete"]; break; case "http://home.netscape.com/NC-rdf#Bookmark": commands = ["open", "find", "separator", "cut", "copy", "paste", "delete", "separator", "rename", "separator", "properties"]; break; case "http://home.netscape.com/NC-rdf#Folder": commands = ["openfolder", "openfolderinnewwindow", "find", "separator", "cut", "copy", "paste", "delete", "separator", "rename", "separator", "newfolder", "separator", "properties"]; break; case "http://home.netscape.com/NC-rdf#IEFavoriteFolder": commands = ["open", "find", "separator", "copy", "separator", "rename", "separator", "properties"]; break; case "http://home.netscape.com/NC-rdf#IEFavorite": commands = ["open", "find", "separator", "copy"]; break; case "http://home.netscape.com/NC-rdf#FileSystemObject": commands = ["open", "find", "separator", "copy"]; break; default: var source = this.RDF.GetResource(aNodeID); return this.db.GetAllCmds(source); } return new CommandArrayEnumerator(commands); }, |
commands = ["open", "find", "separator", "cut", "copy", "paste", "delete", "separator", "rename", "separator", "properties"]; | commands = ["open", "find", "separator", "bm_cut", "bm_copy", "bm_paste", "bm_delete", "separator", "rename", "separator", "newfolder", "separator", "properties"]; | getAllCmds: function (aNodeID) { var type = this.resolveType(aNodeID); var commands = []; switch (type) { case "http://home.netscape.com/NC-rdf#BookmarkSeparator": commands = ["find", "separator", "cut", "copy", "paste", "delete"]; break; case "http://home.netscape.com/NC-rdf#Bookmark": commands = ["open", "find", "separator", "cut", "copy", "paste", "delete", "separator", "rename", "separator", "properties"]; break; case "http://home.netscape.com/NC-rdf#Folder": commands = ["openfolder", "openfolderinnewwindow", "find", "separator", "cut", "copy", "paste", "delete", "separator", "rename", "separator", "newfolder", "separator", "properties"]; break; case "http://home.netscape.com/NC-rdf#IEFavoriteFolder": commands = ["open", "find", "separator", "copy", "separator", "rename", "separator", "properties"]; break; case "http://home.netscape.com/NC-rdf#IEFavorite": commands = ["open", "find", "separator", "copy"]; break; case "http://home.netscape.com/NC-rdf#FileSystemObject": commands = ["open", "find", "separator", "copy"]; break; default: var source = this.RDF.GetResource(aNodeID); return this.db.GetAllCmds(source); } return new CommandArrayEnumerator(commands); }, |
"cut", "copy", "paste", "delete", "separator", "rename", | "bm_cut", "bm_copy", "bm_paste", "bm_delete", "separator", "rename", | getAllCmds: function (aNodeID) { var type = this.resolveType(aNodeID); var commands = []; switch (type) { case "http://home.netscape.com/NC-rdf#BookmarkSeparator": commands = ["find", "separator", "cut", "copy", "paste", "delete"]; break; case "http://home.netscape.com/NC-rdf#Bookmark": commands = ["open", "find", "separator", "cut", "copy", "paste", "delete", "separator", "rename", "separator", "properties"]; break; case "http://home.netscape.com/NC-rdf#Folder": commands = ["openfolder", "openfolderinnewwindow", "find", "separator", "cut", "copy", "paste", "delete", "separator", "rename", "separator", "newfolder", "separator", "properties"]; break; case "http://home.netscape.com/NC-rdf#IEFavoriteFolder": commands = ["open", "find", "separator", "copy", "separator", "rename", "separator", "properties"]; break; case "http://home.netscape.com/NC-rdf#IEFavorite": commands = ["open", "find", "separator", "copy"]; break; case "http://home.netscape.com/NC-rdf#FileSystemObject": commands = ["open", "find", "separator", "copy"]; break; default: var source = this.RDF.GetResource(aNodeID); return this.db.GetAllCmds(source); } return new CommandArrayEnumerator(commands); }, |
commands = ["open", "find", "separator", "copy", "separator", "rename", | commands = ["open", "find", "separator", "bm_copy", "separator", "rename", | getAllCmds: function (aNodeID) { var type = this.resolveType(aNodeID); var commands = []; switch (type) { case "http://home.netscape.com/NC-rdf#BookmarkSeparator": commands = ["find", "separator", "cut", "copy", "paste", "delete"]; break; case "http://home.netscape.com/NC-rdf#Bookmark": commands = ["open", "find", "separator", "cut", "copy", "paste", "delete", "separator", "rename", "separator", "properties"]; break; case "http://home.netscape.com/NC-rdf#Folder": commands = ["openfolder", "openfolderinnewwindow", "find", "separator", "cut", "copy", "paste", "delete", "separator", "rename", "separator", "newfolder", "separator", "properties"]; break; case "http://home.netscape.com/NC-rdf#IEFavoriteFolder": commands = ["open", "find", "separator", "copy", "separator", "rename", "separator", "properties"]; break; case "http://home.netscape.com/NC-rdf#IEFavorite": commands = ["open", "find", "separator", "copy"]; break; case "http://home.netscape.com/NC-rdf#FileSystemObject": commands = ["open", "find", "separator", "copy"]; break; default: var source = this.RDF.GetResource(aNodeID); return this.db.GetAllCmds(source); } return new CommandArrayEnumerator(commands); }, |
commands = ["open", "find", "separator", "copy"]; | commands = ["open", "find", "separator", "bm_copy"]; | getAllCmds: function (aNodeID) { var type = this.resolveType(aNodeID); var commands = []; switch (type) { case "http://home.netscape.com/NC-rdf#BookmarkSeparator": commands = ["find", "separator", "cut", "copy", "paste", "delete"]; break; case "http://home.netscape.com/NC-rdf#Bookmark": commands = ["open", "find", "separator", "cut", "copy", "paste", "delete", "separator", "rename", "separator", "properties"]; break; case "http://home.netscape.com/NC-rdf#Folder": commands = ["openfolder", "openfolderinnewwindow", "find", "separator", "cut", "copy", "paste", "delete", "separator", "rename", "separator", "newfolder", "separator", "properties"]; break; case "http://home.netscape.com/NC-rdf#IEFavoriteFolder": commands = ["open", "find", "separator", "copy", "separator", "rename", "separator", "properties"]; break; case "http://home.netscape.com/NC-rdf#IEFavorite": commands = ["open", "find", "separator", "copy"]; break; case "http://home.netscape.com/NC-rdf#FileSystemObject": commands = ["open", "find", "separator", "copy"]; break; default: var source = this.RDF.GetResource(aNodeID); return this.db.GetAllCmds(source); } return new CommandArrayEnumerator(commands); }, |
var doc = this.mDOMView.rootNode; | var doc = this.mDOMView.rootNode.ownerDocument; | getAllDocuments: function() { var doc = this.mDOMView.rootNode; // The node is the top-level document node. var results = [doc]; this.findDocuments(doc, results); return results; }, |
if (linkNode.href) return linkNode.href; else if (linkNode.name) return linkNode.name return null; | return linkNode.href || linkNode.name || null; | getAnchorUrl: function(linkNode) { if (linkNode.href) return linkNode.href; else if (linkNode.name) return linkNode.name return null; }, |
dump( "there's no case for "+document.getElementById( "event-filter-menulist" ).selectedItem.value ); | dump( "there's no case for "+document.getElementById( "event-filter-menulist" ).selectedItem.value+"\n" ); | function getAndSetEventTable( ){ var Today = new Date(); //do this to allow all day events to show up all day long var StartDate = new Date( Today.getFullYear(), Today.getMonth(), Today.getDate(), 0, 0, 0 ); var EndDate; switch( document.getElementById( "event-filter-menulist" ).selectedItem.value ) { case "all": return( gEventSource.getAllEvents() ); case "today": EndDate = new Date( StartDate.getTime() + ( 1000 * 60 * 60 * 24 ) - 1 ); return( gEventSource.getEventsForRange( StartDate, EndDate ) ); case "next7Days": EndDate = new Date( StartDate.getTime() + ( 1000 * 60 * 60 * 24 * 8 ) ); return( gEventSource.getEventsForRange( StartDate, EndDate ) ); case "next14Days": EndDate = new Date( StartDate.getTime() + ( 1000 * 60 * 60 * 24 * 15 ) ); return( gEventSource.getEventsForRange( StartDate, EndDate ) ); case "next31Days": EndDate = new Date( StartDate.getTime() + ( 1000 * 60 * 60 * 24 * 32 ) ); return( gEventSource.getEventsForRange( StartDate, EndDate ) ); case "thisCalendarMonth": // midnight on first day of this month var startOfMonth = new Date( Today.getFullYear(), Today.getMonth(), 1, 0, 0, 0 ); // midnight on first day of next month var startOfNextMonth = new Date( Today.getFullYear(), (Today.getMonth() + 1), 1, 0, 0, 0 ); // 23:59:59 on last day of this month var endOfMonth = new Date( startOfNextMonth.getTime() - 1000 ); return( gEventSource.getEventsForRange( startOfMonth, endOfMonth ) ); case "future": return( gEventSource.getAllFutureEvents() ); case "current": var SelectedDate = gCalendarWindow.getSelectedDate(); var MidnightSelectedDate = new Date( SelectedDate.getFullYear(), SelectedDate.getMonth(), SelectedDate.getDate(), 0, 0, 0 ); EndDate = new Date( MidnightSelectedDate.getTime() + ( 1000 * 60 * 60 * 24 ) - 1000 ); return( gEventSource.getEventsForRange( MidnightSelectedDate, EndDate ) ); default: dump( "there's no case for "+document.getElementById( "event-filter-menulist" ).selectedItem.value ); return( eventTable = new Array() ); }} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.