rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
dump("Inside the SwitchPaneFocus \n");
function SwitchPaneFocus(event){ var focusedElement; var focusedElementId; if (event && (event.shiftKey)) { dump("Inside the SwitchPaneFocus \n"); focusedElement = document.commandDispatcher.focusedElement; focusedElementId=""; if ( MessagePaneHasFocus() ) SetFocusThreadPane(); else { try { focusedEle...
SetFocusFolderPane();
{ if (gray_vertical_splitter_exists) { if (!(is_folderpane_collapsed())) SetFocusFolderPane(); else if(!(IsThreadAndMessagePaneSplitterCollapsed())) SetFocusMessagePane(); } else { if (!(sidebar_is_collapsed())) SetFocusFolderPane(); else if(!(IsThreadAndMessagePaneSplitterCollapsed())) SetFocusMessagePane(); } }
function SwitchPaneFocus(event){ var focusedElement; var focusedElementId; if (event && (event.shiftKey)) { dump("Inside the SwitchPaneFocus \n"); focusedElement = document.commandDispatcher.focusedElement; focusedElementId=""; if ( MessagePaneHasFocus() ) SetFocusThreadPane(); else { try { focusedEle...
SetFocusMessagePane();
{ if (!(IsThreadAndMessagePaneSplitterCollapsed())) SetFocusMessagePane(); else SetFocusThreadPane(); }
function SwitchPaneFocus(event){ var focusedElement; var focusedElementId; if (event && (event.shiftKey)) { dump("Inside the SwitchPaneFocus \n"); focusedElement = document.commandDispatcher.focusedElement; focusedElementId=""; if ( MessagePaneHasFocus() ) SetFocusThreadPane(); else { try { focusedEle...
SetFocusFolderPane();
{ if (gray_vertical_splitter_exists) { if (!(is_folderpane_collapsed())) SetFocusFolderPane(); else SetFocusThreadPane(); } else { if (!(sidebar_is_collapsed())) SetFocusFolderPane(); else SetFocusThreadPane(); } }
function SwitchPaneFocus(event){ var focusedElement; var focusedElementId; if (event && (event.shiftKey)) { dump("Inside the SwitchPaneFocus \n"); focusedElement = document.commandDispatcher.focusedElement; focusedElementId=""; if ( MessagePaneHasFocus() ) SetFocusThreadPane(); else { try { focusedEle...
SetFocusMessagePane();
{ if (!(IsThreadAndMessagePaneSplitterCollapsed())) SetFocusMessagePane(); else if (gray_vertical_splitter_exists) { if (!(is_folderpane_collapsed())) SetFocusFolderPane(); } else if (!(sidebar_is_collapsed())) SetFocusFolderPane(); }
function SwitchPaneFocus(event){ var focusedElement; var focusedElementId; if (event && (event.shiftKey)) { dump("Inside the SwitchPaneFocus \n"); focusedElement = document.commandDispatcher.focusedElement; focusedElementId=""; if ( MessagePaneHasFocus() ) SetFocusThreadPane(); else { try { focusedEle...
captionLine = "Manage Profiles Yah";
captionLine = "Manage Profiles *";
function SwitchProfileManagerMode(){ var prattleIndex = null; var captionLine = null; var buttonDisplay = null; var selItems = []; if( profileManagerMode == "selection" ) { prattleIndex = 1; // need to switch to manager's index try { captionLine = bun...
captionLine = "Select Profile Yah";
captionLine = "Select Profile *";
function SwitchProfileManagerMode(){ var prattleIndex = null; var captionLine = null; var buttonDisplay = null; var selItems = []; if( profileManagerMode == "selection" ) { prattleIndex = 1; // need to switch to manager's index try { captionLine = bun...
var rdf = nsJSComponentManager.getService(RDFSERVICE_PROGID, "nsIRDFService");
var rdf = nsJSComponentManager.getService(RDFSERVICE_CONTRACTID, "nsIRDFService");
function switchTab( aPageIndex ){ var deck = document.getElementById( "advancedDeck" ); deck.setAttribute( "index", aPageIndex ); // decide whether to show/hide/enable/disable save search query button if (aPageIndex != 0) return(true); var saveQueryButton = document.getElementById("saveQueryButton"); if (!saveQuery...
var treeView = gDBView.QueryInterface(Components.interfaces.nsITreeView); if (treeView) { var tree = GetThreadTree(); tree.boxObject.QueryInterface(Components.interfaces.nsITreeBoxObject).view = treeView; }
RerootThreadPane();
function SwitchView(command){ // when switching thread views, we might be coming out of quick search // or a message view. // first set view picker to all ViewMessagesBy("viewPickerAll"); // clear the QS text, if we need to ClearQSIfNecessary(); // now switch views var oldSortType = gDBView ? gDBView.sortType...
this_.log( "item delivered." );
var syncResponseFunc = function( wcapResponse ) { var icalRootComp = wcapResponse.data; // first statement, may throw var items = this_.parseItems( icalRootComp, Components.interfaces.calICalendar.ITEM_FILTER_ALL_ITEMS, 1, null, null ); ...
if (treeContent._listenersInstalled)
if ("_listenersInstalled" in treeContent && treeContent._listenersInstalled)
function syncTreeView (treeContent, treeView, cb){ function ondblclick(event) { treeView.onRouteDblClick(event); }; function onkeypress(event) { treeView.onRouteKeyPress(event); }; function onfocus(event) { treeView.onRouteFocus(event); }; function onblur(event) { treeView.onRouteBlur(event); }; ...
else if (!treeContent._listenersInstalled)
else if (!("_listenersInstalled" in treeContent) || !treeContent._listenersInstalled)
function syncTreeView (treeContent, treeView, cb){ function ondblclick(event) { treeView.onRouteDblClick(event); }; function onkeypress(event) { treeView.onRouteKeyPress(event); }; function onfocus(event) { treeView.onRouteFocus(event); }; function onblur(event) { treeView.onRouteBlur(event); }; ...
gSelectedTab=getBrowser().selectedTab; gURLBar.value=gSelectedTab.getAttribute("lastLocation"); document.styleSheets[1].cssRules[0].style.backgroundPosition="1000px 100%";
function tabbrowserAreaClick(e) { // When the click happens, // updates the location bar with the lastLocation for the given selectedTab. // Note that currently the lastLocation is stored in the DOM for the selectedTab. gSelectedTab=getBrowser().selectedTab; gURLBar.value=gSelectedTab.getAttribute("l...
var preference = document.getElementById("mail.preferences.advanced.selectedTabIndex"); preference.valueFromPreferences = document.getElementById("advancedPrefs").selectedIndex;
document.getElementById("mail.preferences.advanced.selectedTabIndex") .valueFromPreferences = document.getElementById("advancedPrefs").selectedIndex;
tabSelectionChanged: function () { if (this.mInitialized) { var preference = document.getElementById("mail.preferences.advanced.selectedTabIndex"); preference.valueFromPreferences = document.getElementById("advancedPrefs").selectedIndex; } },
{ var preference = document.getElementById("mail.preferences.display.selectedTabIndex"); preference.valueFromPreferences = document.getElementById("displayPrefs").selectedIndex; }
document.getElementById("mail.preferences.display.selectedTabIndex") .valueFromPreferences = document.getElementById("displayPrefs").selectedIndex;
tabSelectionChanged: function () { if (this.mInitialized) { var preference = document.getElementById("mail.preferences.display.selectedTabIndex"); preference.valueFromPreferences = document.getElementById("displayPrefs").selectedIndex; } },
{ var preference = document.getElementById("mail.preferences.privacy.selectedTabIndex"); preference.valueFromPreferences = document.getElementById("privacyPrefs").selectedIndex; }
document.getElementById("mail.preferences.privacy.selectedTabIndex") .valueFromPreferences = document.getElementById("privacyPrefs").selectedIndex;
tabSelectionChanged: function () { if (this.mInitialized) { var preference = document.getElementById("mail.preferences.privacy.selectedTabIndex"); preference.valueFromPreferences = document.getElementById("privacyPrefs").selectedIndex; } },
return a && typeof a.getElementsByTagName != "undefined" ?
return a && a.getElementsByTagName ?
$.tag = function(a,b){ return a && typeof a.getElementsByTagName != "undefined" ? a.getElementsByTagName( b ) : [];};
return a && typeof a.getElementsByTagName != 'undefined' ?
return a && a.getElementsByTagName != undefined ?
$.tag = function(a,b){ return a && typeof a.getElementsByTagName != 'undefined' ? a.getElementsByTagName( b ) : [];};
onTagsChange();
function TagCurMessage(key){ // ###need to do all selected messsages var msgHdr = gDBView.hdrForFirstSelectedMessage; var messages = Components.classes["@mozilla.org/supports-array;1"].createInstance(Components.interfaces.nsISupportsArray); messages.AppendElement(msgHdr); msgHdr.folder.addKeywordToMessages(message...
var expectedLine = 130; var expectedFileName = './js1_5/Exceptions/regress-50447-1.js';
var expectedLine = 139; var expectedFileName = 'js1_5/Exceptions/regress-50447-1.js'; if (typeof document == "undefined") { expectedFileName = './' + expectedFileName; } else { expectedFileName = document.location.href. replace(/[^\/]*(\?.*)$/, '') + expectedFileName; }
function test2(){ /* generate an error with only msg property */ enterFunc ("test2"); /* note this test incorporates the path to the test file and assumes the path to the test case is a subdirectory of the directory containing jsDriver.pl */ var expectedLine = 130; var expectedFileName = ...
var expectedFileName = './js1_5/Exceptions/regress-50447-1.js';
var expectedFileName = 'js1_5/Exceptions/regress-50447-1.js'; if (typeof document == "undefined") { expectedFileName = './' + expectedFileName; } else { expectedFileName = document.location.href. replace(/[^\/]*(\?.*)$/, '') + expectedFileName; }
function test3(){ /* generate an error with only msg and lineNo properties */ /* note this test incorporates the path to the test file and assumes the path to the test case is a subdirectory of the directory containing jsDriver.pl */ enterFunc ("test3"); var expectedFileName = './js1_5/Excep...
var expectedLine = 179;
var expectedLine = 198;
function test4(){ /* generate an error with only msg and filename properties */ enterFunc ("test4"); var expectedLine = 179; var e = new InternalError ("msg", "file"); reportCompare ("(new InternalError(\"msg\", \"file\", " + expectedLine + "))", e.toSource(), "toSourc...
'let y = 3;\n for (z(4);;) {\n }\n }\n}'
'for (z(let (y = 3) 4);;) {\n }\n }\n}'
function test(){ enterFunc ('test'); printBugNumber (bug); printStatus (summary); var f; f = function() { try{} catch(y) { for(z(let(y=3)4); ; ) ; } } expect = 'function () {\n try {\n } catch (y) {\n ' + 'let y = 3;\n for (z(4);;) {\n }\n }\n}' actual = f + ''; reportCompare...
' ({}[alert(5)]);\n' +
' {}[alert(5)];\n' +
function test(){ enterFunc ('test'); printBugNumber (bug); printStatus (summary); var f; expect = 'function () {\n' + ' ({}[alert(5)]);\n' + '}'; try { f = eval('function () { 1 ? {}[alert(5)] : 0; }'); actual = f + ''; } catch(ex) { actual = ex + ''; } reportCompare(expect, actual, ...
reportCompare(expect, actual, summary + ': 1');
reportCompare(expect, actual, summary + ': function() {x = 12 + (yield);}');
function test(){ enterFunc ('test'); printBugNumber (bug); printStatus (summary); try { eval('function() {x = 12 + (yield);}'); actual = 'No Error'; } catch(ex) { actual = ex + ''; } reportCompare(expect, actual, summary + ': 1'); try { eval('function () {foo(yield)}'); actual = 'No Error';...
eval('function () {foo(yield)}');
eval('function () {foo((yield))}');
function test(){ enterFunc ('test'); printBugNumber (bug); printStatus (summary); try { eval('function() {x = 12 + (yield);}'); actual = 'No Error'; } catch(ex) { actual = ex + ''; } reportCompare(expect, actual, summary + ': 1'); try { eval('function () {foo(yield)}'); actual = 'No Error';...
reportCompare(expect, actual, summary + ': 2');
reportCompare(expect, actual, summary + ': function () {foo((yield))}');
function test(){ enterFunc ('test'); printBugNumber (bug); printStatus (summary); try { eval('function() {x = 12 + (yield);}'); actual = 'No Error'; } catch(ex) { actual = ex + ''; } reportCompare(expect, actual, summary + ': 1'); try { eval('function () {foo(yield)}'); actual = 'No Error';...
reportCompare(expect, actual, summary + ': 3');
reportCompare(expect, actual, summary + ': function() {x = 12 + (yield 42)}');
function test(){ enterFunc ('test'); printBugNumber (bug); printStatus (summary); try { eval('function() {x = 12 + (yield);}'); actual = 'No Error'; } catch(ex) { actual = ex + ''; } reportCompare(expect, actual, summary + ': 1'); try { eval('function () {foo(yield)}'); actual = 'No Error';...
eval('function (){foo(yield 42)}');
eval('function (){foo((yield 42))}');
function test(){ enterFunc ('test'); printBugNumber (bug); printStatus (summary); try { eval('function() {x = 12 + (yield);}'); actual = 'No Error'; } catch(ex) { actual = ex + ''; } reportCompare(expect, actual, summary + ': 1'); try { eval('function () {foo(yield)}'); actual = 'No Error';...
reportCompare(expect, actual, summary + ': 4');
reportCompare(expect, actual, summary + ': function (){foo((yield 42))}');
function test(){ enterFunc ('test'); printBugNumber (bug); printStatus (summary); try { eval('function() {x = 12 + (yield);}'); actual = 'No Error'; } catch(ex) { actual = ex + ''; } reportCompare(expect, actual, summary + ': 1'); try { eval('function () {foo(yield)}'); actual = 'No Error';...
if(typeof console != "undefined") {
if( console && console.error ) {
function test(name, callback) { synchronize(function() { Test = []; try { callback(); } catch(e) { if(typeof console != "undefined") { console.error("Test " + name + " died, exception and test follows"); console.error(e); console.warn(callback.toString()); } Test.push( [ false, "Died on test #" + (T...
function test(progid, iid, d, string_val, val_compare_fn, str_compare_fn)
function test(contractid, iid, d, string_val, val_compare_fn, str_compare_fn)
function test(progid, iid, d, string_val, val_compare_fn, str_compare_fn){ var test1_result; var test2_result; var full_progid = progid_prefix+progid;// println("checking... "+progid+" "+iid+ " with "+d); var clazz = Components.classes[full_progid]; if(!clazz) { println(progid+ " is not...
var full_progid = progid_prefix+progid; var clazz = Components.classes[full_progid];
var full_contractid = contractid_prefix+contractid; var clazz = Components.classes[full_contractid];
function test(progid, iid, d, string_val, val_compare_fn, str_compare_fn){ var test1_result; var test2_result; var full_progid = progid_prefix+progid;// println("checking... "+progid+" "+iid+ " with "+d); var clazz = Components.classes[full_progid]; if(!clazz) { println(progid+ " is not...
println(progid+ " is not a valid progid");
println(contractid+ " is not a valid contractid");
function test(progid, iid, d, string_val, val_compare_fn, str_compare_fn){ var test1_result; var test2_result; var full_progid = progid_prefix+progid;// println("checking... "+progid+" "+iid+ " with "+d); var clazz = Components.classes[full_progid]; if(!clazz) { println(progid+ " is not...
println("failed for... "+progid+" with "+d+" returned "+v.data);
println("failed for... "+contractid+" with "+d+" returned "+v.data);
function test(progid, iid, d, string_val, val_compare_fn, str_compare_fn){ var test1_result; var test2_result; var full_progid = progid_prefix+progid;// println("checking... "+progid+" "+iid+ " with "+d); var clazz = Components.classes[full_progid]; if(!clazz) { println(progid+ " is not...
println("failed toString for... "+progid+" with "+d+" returned "+""+v);
println("failed toString for... "+contractid+" with "+d+" returned "+""+v);
function test(progid, iid, d, string_val, val_compare_fn, str_compare_fn){ var test1_result; var test2_result; var full_progid = progid_prefix+progid;// println("checking... "+progid+" "+iid+ " with "+d); var clazz = Components.classes[full_progid]; if(!clazz) { println(progid+ " is not...
var md5 = function(str) { var hasher = new G_CryptoHasher(); hasher.init(G_CryptoHasher.algorithms.MD5); hasher.updateFromString(str); return hasher.digestHex().toLowerCase(); };
function TEST_G_CryptoHasher() { if (G_GDEBUG) { var z = "cryptohasher UNITTEST"; G_debugService.enableZone(z); G_Debug(z, "Starting"); /* Add test vectors * var hasher = new G_CryptoHasher(); * hasher.updateFromtring("0"); * hasher.updateFromtring("1"); * etc * var digest = hasher.d...
var vectors = {"": "d41d8cd98f00b204e9800998ecf8427e", "a": "0cc175b9c0f1b6a831c399e269772661", "abc": "900150983cd24fb0d6963f7d28e17f72", "message digest": "f96b697d7cb7938d525a2f31aaf161d0", "abcdefghijklmnopqrstuvwxyz": "c3fcd3d76192e4007dfb496cca67e13b", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567...
function TEST_G_CryptoHasher() { if (G_GDEBUG) { var z = "cryptohasher UNITTEST"; G_debugService.enableZone(z); G_Debug(z, "Starting"); /* Add test vectors * var hasher = new G_CryptoHasher(); * hasher.updateFromtring("0"); * hasher.updateFromtring("1"); * etc * var digest = hasher.d...
chan.notificationCallbacks = new Requestor(0);
chan.notificationCallbacks = new Requestor(0, 1);
function test_prompt1() { var chan = makeChan("http://localhost:4444/auth"); chan.notificationCallbacks = new Requestor(0); listener.expectedCode = 200; // OK chan.asyncOpen(listener, null); do_test_pending();}
chan.notificationCallbacks = new Requestor(FLAG_RETURN_FALSE);
chan.notificationCallbacks = new Requestor(FLAG_RETURN_FALSE, 1);
function test_returnfalse1() { var chan = makeChan("http://localhost:4444/auth"); chan.notificationCallbacks = new Requestor(FLAG_RETURN_FALSE); listener.expectedCode = 401; // Unauthorized chan.asyncOpen(listener, null); do_test_pending();}
chan.notificationCallbacks = new Requestor(FLAG_WRONG_PASSWORD);
chan.notificationCallbacks = new Requestor(FLAG_WRONG_PASSWORD, 1);
function test_wrongpw1() { var chan = makeChan("http://localhost:4444/auth"); chan.notificationCallbacks = new Requestor(FLAG_WRONG_PASSWORD); listener.expectedCode = 200; // OK chan.asyncOpen(listener, null); do_test_pending();}
function testEquals(actual, expected, depth) { if (depth > 10) { return true;
function testEquals(actual, expected, depth) { if (depth > 10) { return true; } if (expected == null) { if (actual != null) { return "expected: null, actual non-null: " + DWRUtil.toDescriptiveString(actual); } return true; } if (actual == null) { if (expected != null) { return "actual: null, expected non-null: " + D...
function testEquals(actual, expected, depth){ // Rather than failing we assume that it works! if (depth > 10) { return true; } if (expected == null) { if (actual != null) { return "expected: null, actual non-null: " + DWRUtil.toDescriptiveString(actual); } ...
if (expected == null) { if (actual != null) { return "expected: null, actual non-null: " + DWRUtil.toDescriptiveString(actual);
var actualLength = 0; for (var prop in actual) { if (typeof actual[prop] != "function" || typeof expected[prop] != "function") { var nest = testEquals(actual[prop], expected[prop], depth + 1); if (typeof nest != "boolean" || !nest) { return "element '" + prop + "' does not match: " + nest;
function testEquals(actual, expected, depth){ // Rather than failing we assume that it works! if (depth > 10) { return true; } if (expected == null) { if (actual != null) { return "expected: null, actual non-null: " + DWRUtil.toDescriptiveString(actual); } ...
return true;
} actualLength++;
function testEquals(actual, expected, depth){ // Rather than failing we assume that it works! if (depth > 10) { return true; } if (expected == null) { if (actual != null) { return "expected: null, actual non-null: " + DWRUtil.toDescriptiveString(actual); } ...
if (actual == null) { if (expected != null) { return "actual: null, expected non-null: " + DWRUtil.toDescriptiveString(expected); } return true;
var expectedLength = 0; for (prop in expected) { expectedLength++;
function testEquals(actual, expected, depth){ // Rather than failing we assume that it works! if (depth > 10) { return true; } if (expected == null) { if (actual != null) { return "expected: null, actual non-null: " + DWRUtil.toDescriptiveString(actual); } ...
if (expected instanceof Object) { if (!(actual instanceof Object)) { return "expected object, actual not an object"; }
if (actualLength != expectedLength) { return "expected object size = " + expectedLength + ", actual object size = " + actualLength; } return true; }
function testEquals(actual, expected, depth){ // Rather than failing we assume that it works! if (depth > 10) { return true; } if (expected == null) { if (actual != null) { return "expected: null, actual non-null: " + DWRUtil.toDescriptiveString(actual); } ...
var actualLength = 0; for (var prop in actual) { if (typeof actual[prop] != "function" || typeof expected[prop] != "function") { var nest = testEquals(actual[prop], expected[prop], depth + 1); if (typeof nest != "boolean" || !nest) { return "element '" + prop + "' does not match: " + nest; } }
if (actual != expected) { return "expected = " + expected + " (type=" + typeof expected + "), actual = " + actual + " (type=" + typeof actual + ")"; }
function testEquals(actual, expected, depth){ // Rather than failing we assume that it works! if (depth > 10) { return true; } if (expected == null) { if (actual != null) { return "expected: null, actual non-null: " + DWRUtil.toDescriptiveString(actual); } ...
actualLength++; } var expectedLength = 0; for (prop in expected) { expectedLength++; } if (actualLength != expectedLength) { return "expected object size = " + expectedLength + ", actual object size = " + actualLength; } return true;
if (expected instanceof Array) { if (!(actual instanceof Array)) { return "expected array, actual not an array";
function testEquals(actual, expected, depth){ // Rather than failing we assume that it works! if (depth > 10) { return true; } if (expected == null) { if (actual != null) { return "expected: null, actual non-null: " + DWRUtil.toDescriptiveString(actual); } ...
if (actual != expected) { return "expected = " + expected + " (type=" + typeof expected + "), actual = " + actual + " (type=" + typeof actual + ")";
if (actual.length != expected.length) { return "expected array length = " + expected.length + ", actual array length = " + actual.length;
function testEquals(actual, expected, depth){ // Rather than failing we assume that it works! if (depth > 10) { return true; } if (expected == null) { if (actual != null) { return "expected: null, actual non-null: " + DWRUtil.toDescriptiveString(actual); } ...
if (expected instanceof Array) { if (!(actual instanceof Array)) { return "expected array, actual not an array"; } if (actual.length != expected.length) { return "expected array length = " + expected.length + ", actual array length = " + actual.length; } for (var i = 0; i < actual.length; i++) { var inner = testEqual...
for (var i = 0; i < actual.length; i++) { var inner = testEquals(actual[i], expected[i], depth + 1); if (typeof inner != "boolean" || !inner) { return "element " + i + " does not match: " + inner; }
function testEquals(actual, expected, depth){ // Rather than failing we assume that it works! if (depth > 10) { return true; } if (expected == null) { if (actual != null) { return "expected: null, actual non-null: " + DWRUtil.toDescriptiveString(actual); } ...
} return true;
function testEquals(actual, expected, depth){ // Rather than failing we assume that it works! if (depth > 10) { return true; } if (expected == null) { if (actual != null) { return "expected: null, actual non-null: " + DWRUtil.toDescriptiveString(actual); } ...
/n
function TestFunction( name, args, body ) { this.name = name; this.arguments = args.toString(); this.body = body; /* the format of Function.toString() in JavaScript 1.2 is: /n function name ( arguments ) { body } */ this.value = "\nfunction " + (name ? name : "anonymous" )+ "("...
this.value = "\nfunction " + (name ? name : "anonymous" )+ "("+args+") {\n"+ (( body ) ? body +"\n" : "") + "}\n";
this.value = "function " + (name ? name : "anonymous" )+ "("+args+") {\n"+ (( body ) ? body +"\n" : "") + "}";
function TestFunction( name, args, body ) { this.name = name; this.arguments = args.toString(); this.body = body; /* the format of Function.toString() in JavaScript 1.2 is: /n function name ( arguments ) { body } */ this.value = "\nfunction " + (name ? name : "anonymous" )+ "("...
/n
function TestFunction( name, args, body ) { if ( name == "anonymous" && version() == 120 ) { name = ""; } this.name = name; this.arguments = args.toString(); this.body = body; /* the format of Function.toString() in JavaScript 1.2 is: /n function name ( arguments ) { body ...
this.value = "\nfunction " + (name ? name : "" )+ "("+args+") {\n"+ (( body ) ? body +"\n" : "") + "}\n";
this.value = "function " + (name ? name : "" )+ "("+args+") {\n"+ (( body ) ? body +"\n" : "") + "}";
function TestFunction( name, args, body ) { if ( name == "anonymous" && version() == 120 ) { name = ""; } this.name = name; this.arguments = args.toString(); this.body = body; /* the format of Function.toString() in JavaScript 1.2 is: /n function name ( arguments ) { body ...
actual = (e instanceof SyntaxError)? cnSUCCESS : cnFAILURE; expect = cnSUCCESS; reportCompare(expect, actual, status);
if (e instanceof SyntaxError) actual = cnSUCCESS;
function testIllegalRegExps(patterns, flags){ for (i in patterns) { s = patterns[i]; for (j in flags) { f = flags[j]; status = getStatus(s, f); try { // This should cause an exception if either s or f is illegal - eval('obj = new RegExp(s, f...
reportCompare(expect, actual, status);
function testIllegalRegExps(patterns, flags){ for (i in patterns) { s = patterns[i]; for (j in flags) { f = flags[j]; status = getStatus(s, f); try { // This should cause an exception if either s or f is illegal - eval('obj = new RegExp(s, f...
execreport.innerHTML = (index + 1);
function testResults(data, index){ var test = tests[index]; if (test == null) { alert("no test found: index=" + index + ", tests.length=" + tests.length); return; } var passed = testEquals(data, test.data, 0); var numele = DWRUtil.getElementById("t" + index + "-num"); if (typeof passe...
checkTidyUp(index + 1);
function testResults(data, index){ var test = tests[index]; if (test == null) { alert("no test found: index=" + index + ", tests.length=" + tests.length); return; } var passed = testEquals(data, test.data, 0); var numele = DWRUtil.getElementById("t" + index + "-num"); if (typeof passe...
if (test == null) { alert("no test found: index=" + index + ", tests.length=" + tests.length); return;
if (test == null) { alert("no test found: index=" + index + ", tests.length=" + tests.length); return; } var passed = testEquals(data, test.data, 0); var numele = $("t" + index + "-num"); execreport.innerHTML = (index + 1); if (typeof passed == "boolean" && passed) { numele.style.backgroundColor = "lightgreen"; DWRU...
function testResults(data, index){ var test = tests[index]; if (test == null) { alert("no test found: index=" + index + ", tests.length=" + tests.length); return; } var passed = testEquals(data, test.data, 0); var numele = $("t" + index + "-num"); execreport.innerHTML = (index + 1); ...
var passed = testEquals(data, test.data, 0); var numele = $("t" + index + "-num");
numele.style.backgroundColor = "lightpink"; DWRUtil.setValue("t" + index + "-results", report); }
function testResults(data, index){ var test = tests[index]; if (test == null) { alert("no test found: index=" + index + ", tests.length=" + tests.length); return; } var passed = testEquals(data, test.data, 0); var numele = $("t" + index + "-num"); execreport.innerHTML = (index + 1); ...
execreport.innerHTML = (index + 1); if (typeof passed == "boolean" && passed) { numele.style.backgroundColor = "lightgreen"; DWRUtil.setValue("t" + index + "-results", "Passed"); } else { var report = test.code + "<br/>&nbsp;&nbsp;" + passed + "<br/>&nbsp;&nbsp;Expected: " + DWRUtil.toDescriptiveString(test.data) + " ...
checkTidyUp(index + 1);
function testResults(data, index){ var test = tests[index]; if (test == null) { alert("no test found: index=" + index + ", tests.length=" + tests.length); return; } var passed = testEquals(data, test.data, 0); var numele = $("t" + index + "-num"); execreport.innerHTML = (index + 1); ...
for ( var j = 0; j < e.length; j++ ) {
for ( var j = 0, el = e.length; j < el; j++ ) {
text: function(e) { // A surprisingly high number of people expect the // .text() method to do this, so lets do it! if ( typeof e == "string" ) return this.html( e ); e = e || this; var t = ""; for ( var j = 0; j < e.length; j++ ) { var r = e[j].childNodes; for ( var i = 0; i < r.length; i++ ) if ( r[i]...
for ( var i = 0; i < r.length; i++ )
for ( var i = 0, rl = r.length; i < rl; i++ )
text: function(e) { // A surprisingly high number of people expect the // .text() method to do this, so lets do it! if ( typeof e == "string" ) return this.html( e ); e = e || this; var t = ""; for ( var j = 0; j < e.length; j++ ) { var r = e[j].childNodes; for ( var i = 0; i < r.length; i++ ) if ( r[i]...
for ( var j = 0; j < e.length; j++ ) for ( var i = 0; i < e[j].childNodes.length; i++ ) t += e[j].childNodes[i].nodeType != 1 ? e[j].childNodes[i].nodeValue : jQuery.fn.text(e[j].childNodes[i].childNodes);
for ( var j = 0; j < e.length; j++ ) { var r = e[j].childNodes; for ( var i = 0; i < r.length; i++ ) t += r[i].nodeType != 1 ? r[i].nodeValue : jQuery.fn.text([ r[i] ]); }
text: function(e) { e = e || this.get(); var t = ""; for ( var j = 0; j < e.length; j++ ) for ( var i = 0; i < e[j].childNodes.length; i++ ) t += e[j].childNodes[i].nodeType != 1 ? e[j].childNodes[i].nodeValue : jQuery.fn.text(e[j].childNodes[i].childNodes); return t; },
$.fn.text = function(e) { e = e || this.cur; var t = ""; for ( var j = 0; j < e.length; j++ ) { for ( var i = 0; i < e[j].childNodes.length; i++ ) { t += e[j].childNodes[i].nodeType != 1 ? e[j].childNodes[i].nodeValue : $.fn.text(e[j].childNodes[i].childNodes); } } return t; };
text: function(e) { e = e || this.get(); var t = ""; for ( var j = 0; j < e.length; j++ ) for ( var i = 0; i < e[j].childNodes.length; i++ ) t += e[j].childNodes[i].nodeType != 1 ? e[j].childNodes[i].nodeValue : $.fn.text(e[j].childNodes[i].childNodes); return t; },
$.fn.text = function(e) { e = e || this.cur; var t = ""; for ( var j = 0; j < e.length; j++ ) { for ( var i = 0; i < e[j].childNodes.length; i++ ) { t += e[j].childNodes[i].nodeType != 1 ? e[j].childNodes[i].nodeValue : $.fn.text(e[j].childNodes[i].childNodes); } } return t;};
const kPrefSvcContractID = "@mozilla.org/preferences;1"; const kPrefSvcIID = Components.interfaces.nsIPref; const kPrefSvc = Components.classes[kPrefSvcContractID].getService(kPrefSvcIID); selectedSkin = kPrefSvc.CopyCharPref("general.skins.selectedSkin");
selectedSkin = parent.hPrefWindow.pref.getComplexValue("general.skins.selectedSkin", Components.interfaces.nsISupportsString).data;
function themeSelect(){ var list = document.getElementById("skinsList"); if (!list) return; var prefbundle = document.getElementById("bundle_prefutilities"); var selectedItem = list.selectedItems.length ? list.selectedItems[0] : null; if (selectedItem && selectedItem.getAttribute("skin") == "true") { var the...
var applyButton = document.getElementById("applySkin");
function themeSelect(){ var tree = document.getElementById("skinsTree"); var selectedItem = tree.selectedItems.length ? tree.selectedItems[0] : null; if (selectedItem && selectedItem.getAttribute("skin") == "true") { var themeName = selectedItem.getAttribute("displayName"); var nameField = document.getElementB...
else { applyButton.setAttribute("disabled", true); }
function themeSelect(){ var tree = document.getElementById("skinsTree"); var selectedItem = tree.selectedItems.length ? tree.selectedItems[0] : null; if (selectedItem && selectedItem.getAttribute("skin") == "true") { var themeName = selectedItem.getAttribute("displayName"); var nameField = document.getElementB...
const kPrefSvcContractID = "@mozilla.org/preferences;1"; const kPrefSvcIID = Components.interfaces.nsIPref;
const kPrefSvcContractID = "@mozilla.org/preferences-service;1"; const kPrefSvcIID = Components.interfaces.nsIPrefService;
function themeSelect(){ var list = document.getElementById("skinsList"); if (!list) return; var prefbundle = document.getElementById("bundle_prefutilities"); var selectedItem = list.selectedItems.length ? list.selectedItems[0] : null; if (selectedItem && selectedItem.getAttribute("skin") == "true") { var the...
selectedSkin = kPrefSvc.CopyCharPref("general.skins.selectedSkin");
selectedSkin = kPrefSvc.getComplexValue("general.skins.selectedSkin", Components.interfaces.nsISupportsString).data;
function themeSelect(){ var list = document.getElementById("skinsList"); if (!list) return; var prefbundle = document.getElementById("bundle_prefutilities"); var selectedItem = list.selectedItems.length ? list.selectedItems[0] : null; if (selectedItem && selectedItem.getAttribute("skin") == "true") { var the...
function ThreadPaneDoubleClick(treeitem,isClick)
function ThreadPaneDoubleClick()
function ThreadPaneDoubleClick(treeitem,isClick){ var loadedFolder; var messageArray; var messageUri; if(IsSpecialFolderSelected("Drafts")) { loadedFolder = GetLoadedMsgFolder(); messageArray = GetSelectedMessages(); ComposeMessage(msgComposeType.Draft, msgComposeFormat.Default, loadedFolder, messageArray); } else i...
else if(isClick) { messageUri = treeitem.getAttribute("id"); MsgOpenNewWindowForMessage(messageUri, null); }
function ThreadPaneDoubleClick(treeitem,isClick){ var loadedFolder; var messageArray; var messageUri; if(IsSpecialFolderSelected("Drafts")) { loadedFolder = GetLoadedMsgFolder(); messageArray = GetSelectedMessages(); ComposeMessage(msgComposeType.Draft, msgComposeFormat.Default, loadedFolder, messageArray); } else i...
var threadTree = GetThreadTree(); var selectedMessages = threadTree.selectedItems; var numMessages = selectedMessages.length; for(var i = 0; i < numMessages; i++) { var messageNode = selectedMessages[i]; messageUri = messageNode.getAttribute("id"); if(messageUri) { MsgOpenNewWindowForMessage(messageUri, null); } }
MsgOpenSelectedMessages();
function ThreadPaneDoubleClick(treeitem,isClick){ var loadedFolder; var messageArray; var messageUri; if(IsSpecialFolderSelected("Drafts")) { loadedFolder = GetLoadedMsgFolder(); messageArray = GetSelectedMessages(); ComposeMessage(msgComposeType.Draft, msgComposeFormat.Default, loadedFolder, messageArray); } else i...
var loadedFolder; var messageArray; var messageUri;
function ThreadPaneDoubleClick(){ var loadedFolder; var messageArray; var messageUri; if (IsSpecialFolderSelected(MSG_FOLDER_FLAG_DRAFTS)) { MsgComposeDraftMessage(); } else if(IsSpecialFolderSelected(MSG_FOLDER_FLAG_TEMPLATES)) { loadedFolder = GetLoadedMsgFolder(); messageArray = GetSelectedMessages(); ComposeMes...
loadedFolder = GetLoadedMsgFolder(); messageArray = GetSelectedMessages();
var loadedFolder = GetLoadedMsgFolder(); var messageArray = GetSelectedMessages();
function ThreadPaneDoubleClick(){ var loadedFolder; var messageArray; var messageUri; if (IsSpecialFolderSelected(MSG_FOLDER_FLAG_DRAFTS)) { MsgComposeDraftMessage(); } else if(IsSpecialFolderSelected(MSG_FOLDER_FLAG_TEMPLATES)) { loadedFolder = GetLoadedMsgFolder(); messageArray = GetSelectedMessages(); ComposeMes...
ThreadPaneDoubleClick(null,false);
ThreadPaneDoubleClick();
function ThreadPaneKeyPress(event){ if (event.keyCode == 13) ThreadPaneDoubleClick(null,false); return;}
debug('targetclass = ' + targetclass + '\n');
dump('targetclass = ' + targetclass + '\n');
function ThreadPaneOnClick(event){ if (event.target.localName != "treecell" && event.target.localName != "treeitem") return; var targetclass = event.target.getAttribute('class'); debug('targetclass = ' + targetclass + '\n'); if (targetclass == 'tree-cell-twisty') { // The twisty is ...
else if (event.detail == 2 && t.localName == "outlinerbody") {
else if (event.detail == 2 && t.localName == "outlinerchildren") {
function ThreadPaneOnClick(event){ // we only care about button 0 (left click) events if (event.button != 0) return; // we are already handling marking as read and flagging // in nsMsgDBView.cpp // so all we need to worry about here is double clicks // and column header. // // we get in here for...
ThreadPaneDoubleClick(t.parentNode.parentNode,true);
ThreadPaneDoubleClick();
function ThreadPaneOnClick(event){ var t = event.originalTarget; if (t.localName != "treecell" && t.localName != "treeitem" && t.localName != "image") return; // fix for #48424. bail out of here when the user is // clicking on the column headers if (t.localName == "treecell") { ...
if (event.button != 0) return;
function ThreadPaneOnClick(event){ // we are already handling marking as read and flagging // in nsMsgDBView.cpp // so all we need to worry about here is double clicks // and column header. // // we get in here for clicks on the "outlinercol" (headers) // and the "scrollbarbutton" (scrollbar button...
if (targetclass == 'twisty') {
if (targetclass == 'tree-cell-twisty') {
function ThreadPaneOnClick(event){ var targetclass = event.target.getAttribute('class'); debug('targetclass = ' + targetclass + '\n'); if (targetclass == 'twisty') { // The twisty is nested three below the treeitem: // <treeitem> // <treerow> // <treecell> // <t...
ThreadPaneDoubleClick();
var row = new Object; var colID = new Object; var childElt = new Object; var outliner = GetThreadOutliner(); outliner.boxObject.QueryInterface(Components.interfaces.nsIOutlinerBoxObject).getCellAt(event.clientX, event.clientY, row, colID, childElt); var col = document.getElementById(colID.value); if (col && col.ge...
function ThreadPaneOnClick(event){ // we are already handling marking as read and flagging // in nsMsgDBView.cpp // so all we need to worry about here is double clicks // and column header. // // we get in here for clicks on the "outlinercol" (headers) // and the "scrollbarbutton" (scrollbar button...
}
} else if (col.value.id == "threadCol" && !event.shiftKey && (event.ctrlKey || event.metaKey)) { gDBView.ExpandAndSelectThreadByIndex(row.value, true); event.preventBubble(); }
function ThreadPaneOnClick(event){ // we only care about button 0 (left click) events if (event.button != 0) return; // we are already handling marking as read and flagging // in nsMsgDBView.cpp // so all we need to worry about here is double clicks // and column header. // // we get in here for...
dump('clicked on a twisty\n');
function ThreadPaneOnClick(event){ var targetclass = event.target.getAttribute('class'); debug('targetclass = ' + targetclass + '\n'); if (targetclass == 'twisty') { // The twisty is nested three below the treeitem: // <treeitem> // <treerow> // <treecell> // <t...
var tree = GetThreadTree(); var selectedMessages = tree.selectedItems; var numSelected = selectedMessages.length; if(numSelected == 0 | numSelected == 1) document.commandDispatcher.updateCommands('threadTree-select');
function ThreadPaneSelectionChange(){ var collapsed = IsThreadAndMessagePaneSplitterCollapsed(); if(!collapsed) { LoadSelectionIntoMessagePane(); }}
var windowManager = Components.classes['component:
var windowManager = Components.classes['@mozilla.org/rdf/datasource;1?name=window-mediator'].getService();
function TileWindow(){ var xShift = 25; var yShift = 50; var done = false; var windowManager = Components.classes['component://netscape/rdf/datasource?name=window-mediator'].getService(); dump("got window Manager \n"); var windowManagerInterface = windowManager.QueryInterface( Components.interfaces.nsIWindowMediator); ...
if (data.isArray)
if (DWRUtil.isArray(data))
DWRUtil.toDescriptiveString = function(data){ var reply = ""; var i = 0; if (data.isArray) { reply = "["; for (i = 0; i < data.length; i++) { var value = data[i]; if (value.length > 13) { value = value.substring(0, 10) + "..."; ...
if (data.isString || data.isNumber || data.isDate)
if (typeof data == "string" || typeof data == "number" || DWRUtil.isDate(data))
DWRUtil.toDescriptiveString = function(data){ var reply = ""; var i = 0; if (data.isArray) { reply = "["; for (i = 0; i < data.length; i++) { var value = data[i]; if (value.length > 13) { value = value.substring(0, 10) + "..."; ...
if (data.isObject)
if (typeof data == "object")
DWRUtil.toDescriptiveString = function(data){ var reply = ""; var i = 0; if (data.isArray) { reply = "["; for (i = 0; i < data.length; i++) { var value = data[i]; if (value.length > 13) { value = value.substring(0, 10) + "..."; ...
function toDescriptiveString(object)
DWRUtil.toDescriptiveString = function(object)
function toDescriptiveString(object){ if (typeof object != "object") { return object.toString(); } /* if (data instanceof Boolean || data instanceof Number || data instanceof String || data instanceof Date) { return object.toString(); } */ if (object.toString != Object.pr...
var reply = "" + detailedTypeOf(object) + " {";
var reply = "" + DWRUtil.detailedTypeOf(object) + " {";
function toDescriptiveString(object){ if (typeof object != "object") { return object.toString(); } /* if (data instanceof Boolean || data instanceof Number || data instanceof String || data instanceof Date) { return object.toString(); } */ if (object.toString != Object.pr...
if( tonightMidnight.getTime() > dueDate.getTime() )
if( thisMorning.getTime() > dueDate.getTime() )
function ToDoProgressAtom( calendarToDo ){ var now = new Date(); var thisMorning = new Date( now.getFullYear(), now.getMonth(), now.getDate(), 0, 0, 0 ); var completed = calendarToDo.completed.getTime(); if( completed > 0 ) { return("completed"); } var sta...
var ccalendar = getDisplayComposite();
var ccalendar = getCompositeCalendar();
function toDoUnifinderRefresh(){ var hideCompleted = document.getElementById("hide-completed-checkbox").checked; var savedThis = this; var refreshListener = { mTaskArray: new Array(), onOperationComplete: function (aCalendar, aStatus, aOperationType, aId, aDateTime) { setTimeout(function () ...
dlmgr.open(window);
dlmgr.open(window, null);
function toDownloadManager(){ var dlmgr = Components.classes['@mozilla.org/download-manager;1'].getService(); dlmgr = dlmgr.QueryInterface(Components.interfaces.nsIDownloadManager); var windowMediator = Components.classes['@mozilla.org/appshell/window-mediator;1'].getService(); windowMediator = windowMediator.Query...
toNewTextEditorWindow();
window.openDialog( "chrome:
function toEditor(){ //TODO: Find and existing editor window using CycleWindow() // For now, this opens a new blank window toNewTextEditorWindow();}
var toolkitCore = XPAppCoresManager.Find("ToolkitCore"); if (!toolkitCore) { toolkitCore = new ToolkitCore(); if (toolkitCore) { toolkitCore.Init("ToolkitCore"); } } if (toolkitCore) { toolkitCore.ShowWindowWithArgs("chrome: }
window.openDialog( "chrome:
function toEditor(url){ var toolkitCore = XPAppCoresManager.Find("ToolkitCore"); if (!toolkitCore) { toolkitCore = new ToolkitCore(); if (toolkitCore) { toolkitCore.Init("ToolkitCore"); } } if (toolkitCore) { toolkitCore.ShowWindowWithArgs("chrome://editor/content/EditorAppShell.xul",window,url); }}
toggle: function(a,b) { return a && b && a.constructor == Function && b.constructor == Function ? this.click(function(e){
toggle: function() { var a = arguments; return typeof a[0] == "function" && typeof a[1] == "function" ? this.click(function(e) {
toggle: function(a,b) { // If two functions are passed in, we're // toggling on a click return a && b && a.constructor == Function && b.constructor == Function ? this.click(function(e){ // Figure out which function to execute this.last = this.last == a ? b : a; // Make sure that clicks stop e.preventDefa...
this.last = this.last == a ? b : a;
this.lastToggle = this.lastToggle == 0 ? 1 : 0;
toggle: function(a,b) { // If two functions are passed in, we're // toggling on a click return a && b && a.constructor == Function && b.constructor == Function ? this.click(function(e){ // Figure out which function to execute this.last = this.last == a ? b : a; // Make sure that clicks stop e.preventDefa...
return this.last.apply( this, [e] ) || false;
return a[this.lastToggle].apply( this, [e] ) || false;
toggle: function(a,b) { // If two functions are passed in, we're // toggling on a click return a && b && a.constructor == Function && b.constructor == Function ? this.click(function(e){ // Figure out which function to execute this.last = this.last == a ? b : a; // Make sure that clicks stop e.preventDefa...