rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
document.title = gCommonDialogParam.GetString(12);
if (/Mac/.test(navigator.platform)) { var titleString = gCommonDialogParam.GetString(12); if (/^\w+:\/\/\w/.test(titleString)) { setElementText("info.title", titleString, true); unHideElementById("info.title"); } } else { document.title = gCommonDialogParam.GetString(12); }
function commonDialogOnLoad(){ // set the document title document.title = gCommonDialogParam.GetString(12); // set the number of command buttons var nButtons = gCommonDialogParam.GetInt(2); var dialog = document.documentElement; switch (nButtons) { case 1: dialog.getButton("cancel").hidden = true; break; case 4: dialog.getButton("extra2").hidden = false; case 3: dialog.getButton("extra1").hidden = false; } // display the main text var messageText = gCommonDialogParam.GetString(0); var messageParent = document.getElementById("info.box"); var messageParagraphs = messageText.split("\n"); for (var i = 0; i < messageParagraphs.length; i++) { var descriptionNode = document.createElement("description"); var text = document.createTextNode(messageParagraphs[i]); descriptionNode.appendChild(text); messageParent.appendChild(descriptionNode); } setElementText("info.header", gCommonDialogParam.GetString(3), true); // set the icon var iconElement = document.getElementById("info.icon"); var iconClass = gCommonDialogParam.GetString(2); if (!iconClass) iconClass = "message-icon"; iconElement.setAttribute("class", iconElement.getAttribute("class") + " " + iconClass); switch (nButtons) { case 4: setLabelForNode(document.documentElement.getButton("extra2"), gCommonDialogParam.GetString(11)); // fall through case 3: setLabelForNode(document.documentElement.getButton("extra1"), gCommonDialogParam.GetString(10)); // fall through default: case 2: var string = gCommonDialogParam.GetString(9); if (string) setLabelForNode(document.documentElement.getButton("cancel"), string); // fall through case 1: string = gCommonDialogParam.GetString(8); if (string) setLabelForNode(document.documentElement.getButton("accept"), string); break; } // set default result to cancelled gCommonDialogParam.SetInt(0, 1); // initialize the checkbox setCheckbox(gCommonDialogParam.GetString(1), gCommonDialogParam.GetInt(1)); if (gCommonDialogParam.GetInt(3) == 0) // If no text fields { var dlgButtons = ['accept', 'cancel', 'extra1', 'extra2']; // Set the default button and focus it var dButton = dlgButtons[gCommonDialogParam.GetInt(5)]; document.documentElement.defaultButton = dButton; document.documentElement.getButton(dButton).focus(); } if (gCommonDialogParam.GetInt(6) != 0) // delay button enable { var delayInterval = 2000; try { var prefs = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefBranch); delayInterval = prefs.getIntPref("security.dialog_enable_delay"); } catch (e) {} document.documentElement.getButton("accept").disabled = true; document.documentElement.getButton("extra1").disabled = true; document.documentElement.getButton("extra2").disabled = true; setTimeout(commonDialogReenableButtons, delayInterval); addEventListener("blur", commonDialogBlur, false); addEventListener("focus", commonDialogFocus, false); } getAttention();}
document.documentElement.getButton("extra2").focus();
dButton = document.documentElement.getButton("extra2");
function commonDialogOnLoad(){ // set the window title window.title = gCommonDialogParam.GetString(12); // set the number of command buttons var nButtons = gCommonDialogParam.GetInt(2); var dialog = document.documentElement; switch (nButtons) { case 1: dialog.getButton("cancel").hidden = true; break; case 4: dialog.getButton("extra2").hidden = false; case 3: dialog.getButton("extra1").hidden = false; } // display the main text var messageText = gCommonDialogParam.GetString(0); var messageParent = document.getElementById("info.box"); var messageParagraphs = messageText.split("\n"); for (var i = 0; i < messageParagraphs.length; i++) { var descriptionNode = document.createElement("description"); var text = document.createTextNode(messageParagraphs[i]); descriptionNode.appendChild(text); messageParent.appendChild(descriptionNode); } setElementText("info.header", gCommonDialogParam.GetString(3), true); // set the icon var iconElement = document.getElementById("info.icon"); var iconClass = gCommonDialogParam.GetString(2); if (!iconClass) iconClass = "message-icon"; iconElement.setAttribute("class", iconElement.getAttribute("class") + " " + iconClass); switch (nButtons) { case 4: setLabelForNode(document.documentElement.getButton("extra2"), gCommonDialogParam.GetString(11)); // fall through case 3: setLabelForNode(document.documentElement.getButton("extra1"), gCommonDialogParam.GetString(10)); // fall through default: case 2: var string = gCommonDialogParam.GetString(9); if (string) setLabelForNode(document.documentElement.getButton("cancel"), string); // fall through case 1: string = gCommonDialogParam.GetString(8); if (string) setLabelForNode(document.documentElement.getButton("accept"), string); break; } // set default result to cancelled gCommonDialogParam.SetInt(0, 1); // initialize the checkbox setCheckbox(gCommonDialogParam.GetString(1), gCommonDialogParam.GetInt(1)); if (gCommonDialogParam.GetInt(3) == 0) // If no text fields { var defaultButton = gCommonDialogParam.GetInt(5); switch (defaultButton) { case 3: document.documentElement.getButton("extra2").focus(); break; case 2: document.documentElement.getButton("extra1").focus(); break; case 1: document.documentElement.getButton("cancel").focus(); break; default: case 0: document.documentElement.getButton("accept").focus(); break; } } getAttention();}
document.documentElement.getButton("extra1").focus();
dButton = document.documentElement.getButton("extra1");
function commonDialogOnLoad(){ // set the window title window.title = gCommonDialogParam.GetString(12); // set the number of command buttons var nButtons = gCommonDialogParam.GetInt(2); var dialog = document.documentElement; switch (nButtons) { case 1: dialog.getButton("cancel").hidden = true; break; case 4: dialog.getButton("extra2").hidden = false; case 3: dialog.getButton("extra1").hidden = false; } // display the main text var messageText = gCommonDialogParam.GetString(0); var messageParent = document.getElementById("info.box"); var messageParagraphs = messageText.split("\n"); for (var i = 0; i < messageParagraphs.length; i++) { var descriptionNode = document.createElement("description"); var text = document.createTextNode(messageParagraphs[i]); descriptionNode.appendChild(text); messageParent.appendChild(descriptionNode); } setElementText("info.header", gCommonDialogParam.GetString(3), true); // set the icon var iconElement = document.getElementById("info.icon"); var iconClass = gCommonDialogParam.GetString(2); if (!iconClass) iconClass = "message-icon"; iconElement.setAttribute("class", iconElement.getAttribute("class") + " " + iconClass); switch (nButtons) { case 4: setLabelForNode(document.documentElement.getButton("extra2"), gCommonDialogParam.GetString(11)); // fall through case 3: setLabelForNode(document.documentElement.getButton("extra1"), gCommonDialogParam.GetString(10)); // fall through default: case 2: var string = gCommonDialogParam.GetString(9); if (string) setLabelForNode(document.documentElement.getButton("cancel"), string); // fall through case 1: string = gCommonDialogParam.GetString(8); if (string) setLabelForNode(document.documentElement.getButton("accept"), string); break; } // set default result to cancelled gCommonDialogParam.SetInt(0, 1); // initialize the checkbox setCheckbox(gCommonDialogParam.GetString(1), gCommonDialogParam.GetInt(1)); if (gCommonDialogParam.GetInt(3) == 0) // If no text fields { var defaultButton = gCommonDialogParam.GetInt(5); switch (defaultButton) { case 3: document.documentElement.getButton("extra2").focus(); break; case 2: document.documentElement.getButton("extra1").focus(); break; case 1: document.documentElement.getButton("cancel").focus(); break; default: case 0: document.documentElement.getButton("accept").focus(); break; } } getAttention();}
document.documentElement.getButton("cancel").focus();
dButton = document.documentElement.getButton("cancel");
function commonDialogOnLoad(){ // set the window title window.title = gCommonDialogParam.GetString(12); // set the number of command buttons var nButtons = gCommonDialogParam.GetInt(2); var dialog = document.documentElement; switch (nButtons) { case 1: dialog.getButton("cancel").hidden = true; break; case 4: dialog.getButton("extra2").hidden = false; case 3: dialog.getButton("extra1").hidden = false; } // display the main text var messageText = gCommonDialogParam.GetString(0); var messageParent = document.getElementById("info.box"); var messageParagraphs = messageText.split("\n"); for (var i = 0; i < messageParagraphs.length; i++) { var descriptionNode = document.createElement("description"); var text = document.createTextNode(messageParagraphs[i]); descriptionNode.appendChild(text); messageParent.appendChild(descriptionNode); } setElementText("info.header", gCommonDialogParam.GetString(3), true); // set the icon var iconElement = document.getElementById("info.icon"); var iconClass = gCommonDialogParam.GetString(2); if (!iconClass) iconClass = "message-icon"; iconElement.setAttribute("class", iconElement.getAttribute("class") + " " + iconClass); switch (nButtons) { case 4: setLabelForNode(document.documentElement.getButton("extra2"), gCommonDialogParam.GetString(11)); // fall through case 3: setLabelForNode(document.documentElement.getButton("extra1"), gCommonDialogParam.GetString(10)); // fall through default: case 2: var string = gCommonDialogParam.GetString(9); if (string) setLabelForNode(document.documentElement.getButton("cancel"), string); // fall through case 1: string = gCommonDialogParam.GetString(8); if (string) setLabelForNode(document.documentElement.getButton("accept"), string); break; } // set default result to cancelled gCommonDialogParam.SetInt(0, 1); // initialize the checkbox setCheckbox(gCommonDialogParam.GetString(1), gCommonDialogParam.GetInt(1)); if (gCommonDialogParam.GetInt(3) == 0) // If no text fields { var defaultButton = gCommonDialogParam.GetInt(5); switch (defaultButton) { case 3: document.documentElement.getButton("extra2").focus(); break; case 2: document.documentElement.getButton("extra1").focus(); break; case 1: document.documentElement.getButton("cancel").focus(); break; default: case 0: document.documentElement.getButton("accept").focus(); break; } } getAttention();}
document.documentElement.getButton("accept").focus();
dButton = document.documentElement.getButton("accept");
function commonDialogOnLoad(){ // set the window title window.title = gCommonDialogParam.GetString(12); // set the number of command buttons var nButtons = gCommonDialogParam.GetInt(2); var dialog = document.documentElement; switch (nButtons) { case 1: dialog.getButton("cancel").hidden = true; break; case 4: dialog.getButton("extra2").hidden = false; case 3: dialog.getButton("extra1").hidden = false; } // display the main text var messageText = gCommonDialogParam.GetString(0); var messageParent = document.getElementById("info.box"); var messageParagraphs = messageText.split("\n"); for (var i = 0; i < messageParagraphs.length; i++) { var descriptionNode = document.createElement("description"); var text = document.createTextNode(messageParagraphs[i]); descriptionNode.appendChild(text); messageParent.appendChild(descriptionNode); } setElementText("info.header", gCommonDialogParam.GetString(3), true); // set the icon var iconElement = document.getElementById("info.icon"); var iconClass = gCommonDialogParam.GetString(2); if (!iconClass) iconClass = "message-icon"; iconElement.setAttribute("class", iconElement.getAttribute("class") + " " + iconClass); switch (nButtons) { case 4: setLabelForNode(document.documentElement.getButton("extra2"), gCommonDialogParam.GetString(11)); // fall through case 3: setLabelForNode(document.documentElement.getButton("extra1"), gCommonDialogParam.GetString(10)); // fall through default: case 2: var string = gCommonDialogParam.GetString(9); if (string) setLabelForNode(document.documentElement.getButton("cancel"), string); // fall through case 1: string = gCommonDialogParam.GetString(8); if (string) setLabelForNode(document.documentElement.getButton("accept"), string); break; } // set default result to cancelled gCommonDialogParam.SetInt(0, 1); // initialize the checkbox setCheckbox(gCommonDialogParam.GetString(1), gCommonDialogParam.GetInt(1)); if (gCommonDialogParam.GetInt(3) == 0) // If no text fields { var defaultButton = gCommonDialogParam.GetInt(5); switch (defaultButton) { case 3: document.documentElement.getButton("extra2").focus(); break; case 2: document.documentElement.getButton("extra1").focus(); break; case 1: document.documentElement.getButton("cancel").focus(); break; default: case 0: document.documentElement.getButton("accept").focus(); break; } } getAttention();}
document.documentElement.getButton("accept").setAttribute("default",false); dButton.setAttribute("default", true); dButton.focus(); } if (gCommonDialogParam.GetInt(6) != 0) { var delayInterval = 2000; try { var prefs = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefBranch); delayInterval = prefs.getIntPref("security.dialog_enable_delay"); } catch (e) {} document.documentElement.getButton("accept").disabled = true; document.documentElement.getButton("extra1").disabled = true; document.documentElement.getButton("extra2").disabled = true; setTimeout(commonDialogReenableButtons, delayInterval);
function commonDialogOnLoad(){ // set the window title window.title = gCommonDialogParam.GetString(12); // set the number of command buttons var nButtons = gCommonDialogParam.GetInt(2); var dialog = document.documentElement; switch (nButtons) { case 1: dialog.getButton("cancel").hidden = true; break; case 4: dialog.getButton("extra2").hidden = false; case 3: dialog.getButton("extra1").hidden = false; } // display the main text var messageText = gCommonDialogParam.GetString(0); var messageParent = document.getElementById("info.box"); var messageParagraphs = messageText.split("\n"); for (var i = 0; i < messageParagraphs.length; i++) { var descriptionNode = document.createElement("description"); var text = document.createTextNode(messageParagraphs[i]); descriptionNode.appendChild(text); messageParent.appendChild(descriptionNode); } setElementText("info.header", gCommonDialogParam.GetString(3), true); // set the icon var iconElement = document.getElementById("info.icon"); var iconClass = gCommonDialogParam.GetString(2); if (!iconClass) iconClass = "message-icon"; iconElement.setAttribute("class", iconElement.getAttribute("class") + " " + iconClass); switch (nButtons) { case 4: setLabelForNode(document.documentElement.getButton("extra2"), gCommonDialogParam.GetString(11)); // fall through case 3: setLabelForNode(document.documentElement.getButton("extra1"), gCommonDialogParam.GetString(10)); // fall through default: case 2: var string = gCommonDialogParam.GetString(9); if (string) setLabelForNode(document.documentElement.getButton("cancel"), string); // fall through case 1: string = gCommonDialogParam.GetString(8); if (string) setLabelForNode(document.documentElement.getButton("accept"), string); break; } // set default result to cancelled gCommonDialogParam.SetInt(0, 1); // initialize the checkbox setCheckbox(gCommonDialogParam.GetString(1), gCommonDialogParam.GetInt(1)); if (gCommonDialogParam.GetInt(3) == 0) // If no text fields { var defaultButton = gCommonDialogParam.GetInt(5); switch (defaultButton) { case 3: document.documentElement.getButton("extra2").focus(); break; case 2: document.documentElement.getButton("extra1").focus(); break; case 1: document.documentElement.getButton("cancel").focus(); break; default: case 0: document.documentElement.getButton("accept").focus(); break; } } getAttention();}
GetAttention();
getAttention();
function commonDialogOnLoad(){ // set the window title window.title = gCommonDialogParam.GetString(12); // set the number of command buttons var nButtons = gCommonDialogParam.GetInt(2); var dialog = document.documentElement; switch (nButtons) { case 1: dialog.getButton("cancel").hidden = true; break; case 4: dialog.getButton("extra2").hidden = false; case 3: dialog.getButton("extra1").hidden = false; } // display the main text var messageText = gCommonDialogParam.GetString(0); var messageParent = document.getElementById("info.box"); var messageParagraphs = messageText.split("\n"); for (var i = 0; i < messageParagraphs.length; i++) { var descriptionNode = document.createElement("description"); var text = document.createTextNode(messageParagraphs[i]); descriptionNode.appendChild(text); messageParent.appendChild(descriptionNode); } setElementText("info.header", gCommonDialogParam.GetString(3), true); // set the icon var iconElement = document.getElementById("info.icon"); var iconClass = gCommonDialogParam.GetString(2); if (!iconClass) iconClass = "message-icon"; iconElement.setAttribute("class", iconElement.getAttribute("class") + " " + iconClass); // set the number of command buttons nButtons = gCommonDialogParam.GetInt(2); switch (nButtons) { case 4: document.documentElement.getButton("extra2").label = gCommonDialogParam.GetString(11); // fall through case 3: document.documentElement.getButton("extra1").label = gCommonDialogParam.GetString(10); // fall through default: case 2: var string = gCommonDialogParam.GetString(8); if (string) document.documentElement.getButton("accept").label = string; // fall through case 1: string = gCommonDialogParam.GetString(9); if (string) document.documentElement.getButton("cancel").label = string; break; } // set default result to cancelled gCommonDialogParam.SetInt(0, 1); // initialize the checkbox setCheckbox(gCommonDialogParam.GetString(1), gCommonDialogParam.GetInt(1)); GetAttention();}
setElementText("Button3", gCommonDialogParam.GetString(11));
document.getElementById("Button3").label = gCommonDialogParam.GetString(11);
function commonDialogOnLoad(){ doSetOKCancel(commonDialogOnOK, commonDialogOnCancel, commonDialogOnButton2, commonDialogOnButton3); gCommonDialogParam = window.arguments[0].QueryInterface(Components.interfaces.nsIDialogParamBlock); // display the main text var messageText = gCommonDialogParam.GetString(0); var messageParent = document.getElementById("info.box"); var messageParagraphs = messageText.split("\n"); var i; for (i = 0; i < messageParagraphs.length; i++) { var htmlNode = document.createElement("html"); //htmlNode.setAttribute("style", "max-width: 45em;"); var text = document.createTextNode(messageParagraphs[i]); htmlNode.appendChild(text); messageParent.appendChild(htmlNode); } setElementText("info.header", gCommonDialogParam.GetString(3), true); // set the window title window.title = gCommonDialogParam.GetString(12); // set the icon var iconElement = document.getElementById("info.icon"); var iconURL = gCommonDialogParam.GetString(2); if (iconURL) iconElement.setAttribute("src", iconURL); // set the number of command buttons var nButtons = gCommonDialogParam.GetInt(2); if (nButtons == 1) hideElementById("cancel"); switch (nButtons) { case 4: unHideElementByID("Button3"); setElementText("Button3", gCommonDialogParam.GetString(11)); // fall through case 3: unHideElementByID("Button2"); setElementText("Button2", gCommonDialogParam.GetString(10)); // fall through default: case 2: var string = gCommonDialogParam.GetString(8); if (string) setElementText("ok", string); // fall through case 1: string = gCommonDialogParam.GetString(9); if (string) setElementText("cancel", string); break; } // initialize the checkbox setCheckbox(gCommonDialogParam.GetString(1), gCommonDialogParam.GetInt(1)); // initialize the edit fields var nEditFields = gCommonDialogParam.GetInt(3); switch (nEditFields) { case 2: var containerID, fieldID, labelID; if (gCommonDialogParam.GetInt(4) == 1) { // two password fields ('password' and 'retype password') var password2Container = document.getElementById("password2EditField"); password2Container.removeAttribute("collapsed"); var password2Field = document.getElementById("dialog.password2"); password2Field.value = gCommonDialogParam.GetString(7); var password2Label = gCommonDialogParam.GetString(5); if (password2Label) setElementText("password2.text", password2Label); containerID = "password1EditField"; fieldID = "dialog.password1"; labelID = "password1.text"; } else { // one login field and one password field var passwordContainer = document.getElementById("password1EditField"); passwordContainer.removeAttribute("collapsed"); var passwordField = document.getElementById("dialog.password1"); passwordField.value = gCommonDialogParam.GetString(7); var passwordLabel = gCommonDialogParam.GetString(5); if (passwordLabel) setElementText("password1.text", passwordLabel); containerID = "loginEditField"; fieldID = "dialog.loginname"; labelID = "login.text"; } unHideElementByID(containerID); var field = document.getElementById(fieldID); field.value = gCommonDialogParam.GetString(6); var label = gCommonDialogParam.GetString(4); if (label) setElementText(labelID, label); field.focus(); break; case 1: var editFieldIsPassword = gCommonDialogParam.GetInt(4); if (editFieldIsPassword == 1) { containerID = "password1EditField"; fieldID = "dialog.password1"; setElementText("password1.text", ""); // hide the meaningless text } else { containerID = "loginEditField"; fieldID = "dialog.loginname"; setElementText("login.text", gCommonDialogParam.GetString(4)); } unHideElementByID(containerID); field = document.getElementById(fieldID); field.value = gCommonDialogParam.GetString(6); field.focus(); break; } // set the pressed button to cancel to handle the case where the close box is pressed gCommonDialogParam.SetInt(0, 1); // set default focus // preferred order is textbox1, textbox2, textbox 3, OK, cancel, button2, button3 var visibilityList = ["loginEditField", "password1EditField", "password2EditField", "ok", "cancel", "Button2", "Button3"] var focusList = ["dialog.loginname", "dialog.password1", "dialog.password2", "ok", "cancel", "Button2", "Button3"] for (i = 0; i < visibilityList.length; i++) { if (isVisible(visibilityList[i])) { document.getElementById(focusList[i]).focus(); break; } }}
setElementText("Button2", gCommonDialogParam.GetString(10));
document.getElementById("Button2").label = gCommonDialogParam.GetString(10);
function commonDialogOnLoad(){ doSetOKCancel(commonDialogOnOK, commonDialogOnCancel, commonDialogOnButton2, commonDialogOnButton3); gCommonDialogParam = window.arguments[0].QueryInterface(Components.interfaces.nsIDialogParamBlock); // display the main text var messageText = gCommonDialogParam.GetString(0); var messageParent = document.getElementById("info.box"); var messageParagraphs = messageText.split("\n"); var i; for (i = 0; i < messageParagraphs.length; i++) { var htmlNode = document.createElement("html"); //htmlNode.setAttribute("style", "max-width: 45em;"); var text = document.createTextNode(messageParagraphs[i]); htmlNode.appendChild(text); messageParent.appendChild(htmlNode); } setElementText("info.header", gCommonDialogParam.GetString(3), true); // set the window title window.title = gCommonDialogParam.GetString(12); // set the icon var iconElement = document.getElementById("info.icon"); var iconURL = gCommonDialogParam.GetString(2); if (iconURL) iconElement.setAttribute("src", iconURL); // set the number of command buttons var nButtons = gCommonDialogParam.GetInt(2); if (nButtons == 1) hideElementById("cancel"); switch (nButtons) { case 4: unHideElementByID("Button3"); setElementText("Button3", gCommonDialogParam.GetString(11)); // fall through case 3: unHideElementByID("Button2"); setElementText("Button2", gCommonDialogParam.GetString(10)); // fall through default: case 2: var string = gCommonDialogParam.GetString(8); if (string) setElementText("ok", string); // fall through case 1: string = gCommonDialogParam.GetString(9); if (string) setElementText("cancel", string); break; } // initialize the checkbox setCheckbox(gCommonDialogParam.GetString(1), gCommonDialogParam.GetInt(1)); // initialize the edit fields var nEditFields = gCommonDialogParam.GetInt(3); switch (nEditFields) { case 2: var containerID, fieldID, labelID; if (gCommonDialogParam.GetInt(4) == 1) { // two password fields ('password' and 'retype password') var password2Container = document.getElementById("password2EditField"); password2Container.removeAttribute("collapsed"); var password2Field = document.getElementById("dialog.password2"); password2Field.value = gCommonDialogParam.GetString(7); var password2Label = gCommonDialogParam.GetString(5); if (password2Label) setElementText("password2.text", password2Label); containerID = "password1EditField"; fieldID = "dialog.password1"; labelID = "password1.text"; } else { // one login field and one password field var passwordContainer = document.getElementById("password1EditField"); passwordContainer.removeAttribute("collapsed"); var passwordField = document.getElementById("dialog.password1"); passwordField.value = gCommonDialogParam.GetString(7); var passwordLabel = gCommonDialogParam.GetString(5); if (passwordLabel) setElementText("password1.text", passwordLabel); containerID = "loginEditField"; fieldID = "dialog.loginname"; labelID = "login.text"; } unHideElementByID(containerID); var field = document.getElementById(fieldID); field.value = gCommonDialogParam.GetString(6); var label = gCommonDialogParam.GetString(4); if (label) setElementText(labelID, label); field.focus(); break; case 1: var editFieldIsPassword = gCommonDialogParam.GetInt(4); if (editFieldIsPassword == 1) { containerID = "password1EditField"; fieldID = "dialog.password1"; setElementText("password1.text", ""); // hide the meaningless text } else { containerID = "loginEditField"; fieldID = "dialog.loginname"; setElementText("login.text", gCommonDialogParam.GetString(4)); } unHideElementByID(containerID); field = document.getElementById(fieldID); field.value = gCommonDialogParam.GetString(6); field.focus(); break; } // set the pressed button to cancel to handle the case where the close box is pressed gCommonDialogParam.SetInt(0, 1); // set default focus // preferred order is textbox1, textbox2, textbox 3, OK, cancel, button2, button3 var visibilityList = ["loginEditField", "password1EditField", "password2EditField", "ok", "cancel", "Button2", "Button3"] var focusList = ["dialog.loginname", "dialog.password1", "dialog.password2", "ok", "cancel", "Button2", "Button3"] for (i = 0; i < visibilityList.length; i++) { if (isVisible(visibilityList[i])) { document.getElementById(focusList[i]).focus(); break; } }}
setElementText("ok", string);
document.getElementById("ok").label = string;
function commonDialogOnLoad(){ doSetOKCancel(commonDialogOnOK, commonDialogOnCancel, commonDialogOnButton2, commonDialogOnButton3); gCommonDialogParam = window.arguments[0].QueryInterface(Components.interfaces.nsIDialogParamBlock); // display the main text var messageText = gCommonDialogParam.GetString(0); var messageParent = document.getElementById("info.box"); var messageParagraphs = messageText.split("\n"); var i; for (i = 0; i < messageParagraphs.length; i++) { var htmlNode = document.createElement("html"); //htmlNode.setAttribute("style", "max-width: 45em;"); var text = document.createTextNode(messageParagraphs[i]); htmlNode.appendChild(text); messageParent.appendChild(htmlNode); } setElementText("info.header", gCommonDialogParam.GetString(3), true); // set the window title window.title = gCommonDialogParam.GetString(12); // set the icon var iconElement = document.getElementById("info.icon"); var iconURL = gCommonDialogParam.GetString(2); if (iconURL) iconElement.setAttribute("src", iconURL); // set the number of command buttons var nButtons = gCommonDialogParam.GetInt(2); if (nButtons == 1) hideElementById("cancel"); switch (nButtons) { case 4: unHideElementByID("Button3"); setElementText("Button3", gCommonDialogParam.GetString(11)); // fall through case 3: unHideElementByID("Button2"); setElementText("Button2", gCommonDialogParam.GetString(10)); // fall through default: case 2: var string = gCommonDialogParam.GetString(8); if (string) setElementText("ok", string); // fall through case 1: string = gCommonDialogParam.GetString(9); if (string) setElementText("cancel", string); break; } // initialize the checkbox setCheckbox(gCommonDialogParam.GetString(1), gCommonDialogParam.GetInt(1)); // initialize the edit fields var nEditFields = gCommonDialogParam.GetInt(3); switch (nEditFields) { case 2: var containerID, fieldID, labelID; if (gCommonDialogParam.GetInt(4) == 1) { // two password fields ('password' and 'retype password') var password2Container = document.getElementById("password2EditField"); password2Container.removeAttribute("collapsed"); var password2Field = document.getElementById("dialog.password2"); password2Field.value = gCommonDialogParam.GetString(7); var password2Label = gCommonDialogParam.GetString(5); if (password2Label) setElementText("password2.text", password2Label); containerID = "password1EditField"; fieldID = "dialog.password1"; labelID = "password1.text"; } else { // one login field and one password field var passwordContainer = document.getElementById("password1EditField"); passwordContainer.removeAttribute("collapsed"); var passwordField = document.getElementById("dialog.password1"); passwordField.value = gCommonDialogParam.GetString(7); var passwordLabel = gCommonDialogParam.GetString(5); if (passwordLabel) setElementText("password1.text", passwordLabel); containerID = "loginEditField"; fieldID = "dialog.loginname"; labelID = "login.text"; } unHideElementByID(containerID); var field = document.getElementById(fieldID); field.value = gCommonDialogParam.GetString(6); var label = gCommonDialogParam.GetString(4); if (label) setElementText(labelID, label); field.focus(); break; case 1: var editFieldIsPassword = gCommonDialogParam.GetInt(4); if (editFieldIsPassword == 1) { containerID = "password1EditField"; fieldID = "dialog.password1"; setElementText("password1.text", ""); // hide the meaningless text } else { containerID = "loginEditField"; fieldID = "dialog.loginname"; setElementText("login.text", gCommonDialogParam.GetString(4)); } unHideElementByID(containerID); field = document.getElementById(fieldID); field.value = gCommonDialogParam.GetString(6); field.focus(); break; } // set the pressed button to cancel to handle the case where the close box is pressed gCommonDialogParam.SetInt(0, 1); // set default focus // preferred order is textbox1, textbox2, textbox 3, OK, cancel, button2, button3 var visibilityList = ["loginEditField", "password1EditField", "password2EditField", "ok", "cancel", "Button2", "Button3"] var focusList = ["dialog.loginname", "dialog.password1", "dialog.password2", "ok", "cancel", "Button2", "Button3"] for (i = 0; i < visibilityList.length; i++) { if (isVisible(visibilityList[i])) { document.getElementById(focusList[i]).focus(); break; } }}
setElementText("cancel", string);
document.getElementById("cancel").label = string;
function commonDialogOnLoad(){ doSetOKCancel(commonDialogOnOK, commonDialogOnCancel, commonDialogOnButton2, commonDialogOnButton3); gCommonDialogParam = window.arguments[0].QueryInterface(Components.interfaces.nsIDialogParamBlock); // display the main text var messageText = gCommonDialogParam.GetString(0); var messageParent = document.getElementById("info.box"); var messageParagraphs = messageText.split("\n"); var i; for (i = 0; i < messageParagraphs.length; i++) { var htmlNode = document.createElement("html"); //htmlNode.setAttribute("style", "max-width: 45em;"); var text = document.createTextNode(messageParagraphs[i]); htmlNode.appendChild(text); messageParent.appendChild(htmlNode); } setElementText("info.header", gCommonDialogParam.GetString(3), true); // set the window title window.title = gCommonDialogParam.GetString(12); // set the icon var iconElement = document.getElementById("info.icon"); var iconURL = gCommonDialogParam.GetString(2); if (iconURL) iconElement.setAttribute("src", iconURL); // set the number of command buttons var nButtons = gCommonDialogParam.GetInt(2); if (nButtons == 1) hideElementById("cancel"); switch (nButtons) { case 4: unHideElementByID("Button3"); setElementText("Button3", gCommonDialogParam.GetString(11)); // fall through case 3: unHideElementByID("Button2"); setElementText("Button2", gCommonDialogParam.GetString(10)); // fall through default: case 2: var string = gCommonDialogParam.GetString(8); if (string) setElementText("ok", string); // fall through case 1: string = gCommonDialogParam.GetString(9); if (string) setElementText("cancel", string); break; } // initialize the checkbox setCheckbox(gCommonDialogParam.GetString(1), gCommonDialogParam.GetInt(1)); // initialize the edit fields var nEditFields = gCommonDialogParam.GetInt(3); switch (nEditFields) { case 2: var containerID, fieldID, labelID; if (gCommonDialogParam.GetInt(4) == 1) { // two password fields ('password' and 'retype password') var password2Container = document.getElementById("password2EditField"); password2Container.removeAttribute("collapsed"); var password2Field = document.getElementById("dialog.password2"); password2Field.value = gCommonDialogParam.GetString(7); var password2Label = gCommonDialogParam.GetString(5); if (password2Label) setElementText("password2.text", password2Label); containerID = "password1EditField"; fieldID = "dialog.password1"; labelID = "password1.text"; } else { // one login field and one password field var passwordContainer = document.getElementById("password1EditField"); passwordContainer.removeAttribute("collapsed"); var passwordField = document.getElementById("dialog.password1"); passwordField.value = gCommonDialogParam.GetString(7); var passwordLabel = gCommonDialogParam.GetString(5); if (passwordLabel) setElementText("password1.text", passwordLabel); containerID = "loginEditField"; fieldID = "dialog.loginname"; labelID = "login.text"; } unHideElementByID(containerID); var field = document.getElementById(fieldID); field.value = gCommonDialogParam.GetString(6); var label = gCommonDialogParam.GetString(4); if (label) setElementText(labelID, label); field.focus(); break; case 1: var editFieldIsPassword = gCommonDialogParam.GetInt(4); if (editFieldIsPassword == 1) { containerID = "password1EditField"; fieldID = "dialog.password1"; setElementText("password1.text", ""); // hide the meaningless text } else { containerID = "loginEditField"; fieldID = "dialog.loginname"; setElementText("login.text", gCommonDialogParam.GetString(4)); } unHideElementByID(containerID); field = document.getElementById(fieldID); field.value = gCommonDialogParam.GetString(6); field.focus(); break; } // set the pressed button to cancel to handle the case where the close box is pressed gCommonDialogParam.SetInt(0, 1); // set default focus // preferred order is textbox1, textbox2, textbox 3, OK, cancel, button2, button3 var visibilityList = ["loginEditField", "password1EditField", "password2EditField", "ok", "cancel", "Button2", "Button3"] var focusList = ["dialog.loginname", "dialog.password1", "dialog.password2", "ok", "cancel", "Button2", "Button3"] for (i = 0; i < visibilityList.length; i++) { if (isVisible(visibilityList[i])) { document.getElementById(focusList[i]).focus(); break; } }}
var element1, element2; var numEditfields = param.GetInt( 3 ); if (numEditfields == 2) { var editfield1Password = param.GetInt( 4 ); if ( editfield1Password == 1 ) { element1 = document.getElementById("dialog.password1"); } else { element1 = document.getElementById("dialog.loginname"); } param.SetString( 6, element1.value ); element2 = document.getElementById("dialog.password2"); param.SetString( 7, element2.value ); } else if (numEditfields == 1) { var editfield1Password = param.GetInt( 4 ); if ( editfield1Password == 1 ) { element1 = document.getElementById("dialog.password1"); param.SetString( 6, element1.value ); } else { element1 = document.getElementById("dialog.loginname"); param.SetString( 6, element1.value ); } }
var element = document.getElementById("dialog.loginname"); param.SetString( 6, element.value ); element = document.getElementById("dialog.password"); param.SetString( 7, element.value );
function commonDialogOnOK(){// dump("commonDialogOnOK \n"); param.SetInt(0, 0 ); var element1, element2; var numEditfields = param.GetInt( 3 ); if (numEditfields == 2) { var editfield1Password = param.GetInt( 4 ); if ( editfield1Password == 1 ) { element1 = document.getElementById("dialog.password1"); } else { element1 = document.getElementById("dialog.loginname"); } param.SetString( 6, element1.value ); element2 = document.getElementById("dialog.password2"); param.SetString( 7, element2.value );// dump(" login name - "+ element1.value+ "\n");// dump(" password - "+ element2.value+ "\n"); } else if (numEditfields == 1) { var editfield1Password = param.GetInt( 4 ); if ( editfield1Password == 1 ) { element1 = document.getElementById("dialog.password1"); param.SetString( 6, element1.value ); } else { element1 = document.getElementById("dialog.loginname"); param.SetString( 6, element1.value ); }// dump(" login name - "+ element2.value+ "\n"); } return true;}
param.SetInt(0, 0 );
function commonDialogOnOK(){ dump("commonDialogOnOK \n"); param.SetInt(2, listBox.selectedIndex ); return true;}
document.documentElement.getButton("accept").disabled = false; document.documentElement.getButton("extra1").disabled = false; document.documentElement.getButton("extra2").disabled = false;
if (!gBlurred) { document.documentElement.getButton("accept").disabled = false; document.documentElement.getButton("extra1").disabled = false; document.documentElement.getButton("extra2").disabled = false; } gDelayExpired = true;
function commonDialogReenableButtons(){ document.documentElement.getButton("accept").disabled = false; document.documentElement.getButton("extra1").disabled = false; document.documentElement.getButton("extra2").disabled = false;}
if (first[column] > second[column]) return 1;
compareFunc = function compare(first, second) { if (first[column] < second[column]) return -1; if (first[column] > second[column]) return 1; return 0; }
if (first[column] < second[column]) return 1; if (first[column] > second[column]) return -1; return 0;
return CompareLowerCase(second[column], first[column]);
compareFunc = function compare(first, second) { if (first[column] < second[column]) return 1; if (first[column] > second[column]) return -1; return 0; }
dump("XXX ex " + account1.incomingServer.serverURI + "," + ex + "\n");
dump("XXX ex "); if (account1 && account1.incomingServer && account1.incomingServer.serverURI) dump(account1.incomingServer.serverURI + ","); dump(ex + "\n");
function compareAccountSortOrder(account1, account2){ var sortValue1, sortValue2; try { var res1 = sRDF.GetResource(account1.incomingServer.serverURI); sortValue1 = sAccountManagerDataSource.GetTarget(res1, sNameProperty, true).QueryInterface(Components.interfaces.nsIRDFLiteral).Value; } catch (ex) { dump("XXX ex " + account1.incomingServer.serverURI + "," + ex + "\n"); sortValue1 = ""; } try { var res2 = sRDF.GetResource(account2.incomingServer.serverURI); sortValue2 = sAccountManagerDataSource.GetTarget(res2, sNameProperty, true).QueryInterface(Components.interfaces.nsIRDFLiteral).Value; } catch (ex) { dump("XXX ex " + account1.incomingServer.serverURI + "," + ex + "\n"); sortValue2 = ""; } if (sortValue1 < sortValue2) return -1; else if (sortValue1 > sortValue2) return 1; else return 0;}
dump("XXX ex " + account1.incomingServer.serverURI + "," + ex + "\n");
dump("XXX ex "); if (account2 && account2.incomingServer && account2.incomingServer.serverURI) dump(account2.incomingServer.serverURI + ","); dump(ex + "\n");
function compareAccountSortOrder(account1, account2){ var sortValue1, sortValue2; try { var res1 = sRDF.GetResource(account1.incomingServer.serverURI); sortValue1 = sAccountManagerDataSource.GetTarget(res1, sNameProperty, true).QueryInterface(Components.interfaces.nsIRDFLiteral).Value; } catch (ex) { dump("XXX ex " + account1.incomingServer.serverURI + "," + ex + "\n"); sortValue1 = ""; } try { var res2 = sRDF.GetResource(account2.incomingServer.serverURI); sortValue2 = sAccountManagerDataSource.GetTarget(res2, sNameProperty, true).QueryInterface(Components.interfaces.nsIRDFLiteral).Value; } catch (ex) { dump("XXX ex " + account1.incomingServer.serverURI + "," + ex + "\n"); sortValue2 = ""; } if (sortValue1 < sortValue2) return -1; else if (sortValue1 > sortValue2) return 1; else return 0;}
return 1;
a = now();
function compareDate(a, b) { if (!a) return 1; if (!b) return -1; return (a.compare(b)); }
return -1;
b = now();
function compareDate(a, b) { if (!a) return 1; if (!b) return -1; return (a.compare(b)); }
dateA.getDay() == dateB.getDay() ) {
dateA.getDate() == dateB.getDate() ) {
function compareIgnoringTimeOfDay(dateA, dateB){ if (dateA.getFullYear() == dateB.getFullYear() && dateA.getMonth() == dateB.getMonth() && dateA.getDay() == dateB.getDay() ) { return 0; } else if (dateA < dateB) { return -1; } else if (dateA > dateB) { return 1; }}
dump("XXX ex " + server1.URI + "," + ex + "\n");
dump("XXX ex "); if (server1 && server1.URI) dump(server1.URI + ","); dump(ex + "\n");
function compareServerSortOrder(server1, server2){ var sortValue1, sortValue2; try { var res1 = RDF.GetResource(server1.URI); sortValue1 = gAccountManagerDataSource.GetTarget(res1, gNameProperty, true).QueryInterface(Components.interfaces.nsIRDFLiteral).Value; } catch (ex) { dump("XXX ex " + server1.URI + "," + ex + "\n"); sortValue1 = ""; } try { var res2 = RDF.GetResource(server2.URI); sortValue2 = gAccountManagerDataSource.GetTarget(res2, gNameProperty, true).QueryInterface(Components.interfaces.nsIRDFLiteral).Value; } catch (ex) { dump("XXX ex " + server2.URI + "," + ex + "\n"); sortValue2 = ""; } if (sortValue1 < sortValue2) return -1; else if (sortValue1 > sortValue2) return 1; else return 0;}
dump("XXX ex " + server2.URI + "," + ex + "\n");
dump("XXX ex "); if (server2 && server2.URI) dump(server2.URI + ","); dump(ex + "\n");
function compareServerSortOrder(server1, server2){ var sortValue1, sortValue2; try { var res1 = RDF.GetResource(server1.URI); sortValue1 = gAccountManagerDataSource.GetTarget(res1, gNameProperty, true).QueryInterface(Components.interfaces.nsIRDFLiteral).Value; } catch (ex) { dump("XXX ex " + server1.URI + "," + ex + "\n"); sortValue1 = ""; } try { var res2 = RDF.GetResource(server2.URI); sortValue2 = gAccountManagerDataSource.GetTarget(res2, gNameProperty, true).QueryInterface(Components.interfaces.nsIRDFLiteral).Value; } catch (ex) { dump("XXX ex " + server2.URI + "," + ex + "\n"); sortValue2 = ""; } if (sortValue1 < sortValue2) return -1; else if (sortValue1 > sortValue2) return 1; else return 0;}
return compareDate(taskA.completed, taskB.completed) * modifier;
return compareDate(taskA.completedDate, taskB.completedDate) * modifier;
function compareTasks( taskA, taskB ){ var modifier = 1; if (toDoTreeView.sortDirection == "descending") { modifier = -1; } switch(toDoTreeView.selectedColumn) { case "unifinder-todo-tree-col-priority": // 0-9 return compareNumber(taskA.priority, taskB.priority) * modifier; case "unifinder-todo-tree-col-title": return compareString(taskA.title, taskB.title) * modifier; case "unifinder-todo-tree-col-startdate": return compareDate(taskA.start, taskB.start) * modifier; case "unifinder-todo-tree-col-duedate": return compareDate(taskA.due, taskB.due) * modifier; case "unifinder-todo-tree-col-completed": // checkbox if date exists case "unifinder-todo-tree-col-completeddate": return compareDate(taskA.completed, taskB.completed) * modifier; case "unifinder-todo-tree-col-percentcomplete": return compareNumber(taskA.percent, taskB.percent) * modifier; case "unifinder-todo-tree-col-categories": return compareString(taskA.categories, taskB.categories) * modifier; case "unifinder-todo-tree-col-location": return compareString(taskA.getProperty("LOCATION"), taskB.getProperty("LOCATION")) * modifier; case "unifinder-todo-tree-col-status": return compareNumber(kStatusOrder.indexOf(taskA.status), kStatusOrder.indexOf(taskB.status)) * modifier; case "unifinder-todo-tree-col-calendarname": return compareString(taskA.calendar.name, taskB.calendar.name) * modifier; default: return 0; }}
testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +" )", testval.type, javaval.type );
new TestCase( SECTION, "typeof (" + testval.description +" )", testval.type, javaval.type );
function CompareValues( javaval, testval ) { // Check type, which should be E_TYPE testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +" )", testval.type, javaval.type ); // Check JavaScript class, which should be E_JSCLASS testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +" ).getJSClass()", testval.jsclass, javaval.jsclass );}
testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +" ).getJSClass()", testval.jsclass, javaval.jsclass );
new TestCase( SECTION, "(" + testval.description +" ).getJSClass()", testval.jsclass, javaval.jsclass );
function CompareValues( javaval, testval ) { // Check type, which should be E_TYPE testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +" )", testval.type, javaval.type ); // Check JavaScript class, which should be E_JSCLASS testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +" ).getJSClass()", testval.jsclass, javaval.jsclass );}
testcases[testcases.length] = new TestCase( SECTION, "("+ testval.description +")["+i+"]", testval.value[i], javaval.value[i] );
new TestCase( SECTION, "("+ testval.description +")["+i+"]", testval.value[i], javaval.value[i] );
function CompareValues( javaval, testval ) { // Check value for ( var i = 0; i < testval.value.length; i++ ) { testcases[testcases.length] = new TestCase( SECTION, "("+ testval.description +")["+i+"]", testval.value[i], javaval.value[i] ); } // Check type testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type ); // Check class testcases[testcases.length ] = new TestCase( SECTION, "The Java Class of ( "+ testval.description +" )", testval.lcclass +"", javaval.lcclass +"");}
testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type );
new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type );
function CompareValues( javaval, testval ) { // Check value for ( var i = 0; i < testval.value.length; i++ ) { testcases[testcases.length] = new TestCase( SECTION, "("+ testval.description +")["+i+"]", testval.value[i], javaval.value[i] ); } // Check type testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type ); // Check class testcases[testcases.length ] = new TestCase( SECTION, "The Java Class of ( "+ testval.description +" )", testval.lcclass +"", javaval.lcclass +"");}
testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type );
new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type );
function CompareValues( javaval, testval ) { // Check type, which should be E_TYPE testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type );/* // Check JavaScript class, which should be E_JSCLASS testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +".)getJSClass()", testval.jsclass, javaval.jsclass );*/ // Check the class's name, which should be the description, minus the "Package." part. testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +") +''", testval.classname, javaval.classname );}
testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +".)getJSClass()", testval.jsclass, javaval.jsclass );
new TestCase( SECTION, "(" + testval.description +".)getJSClass()", testval.jsclass, javaval.jsclass );
function CompareValues( javaval, testval ) { // Check type, which should be E_TYPE testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type );/* // Check JavaScript class, which should be E_JSCLASS testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +".)getJSClass()", testval.jsclass, javaval.jsclass );*/ // Check the class's name, which should be the description, minus the "Package." part. testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +") +''", testval.classname, javaval.classname );}
testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +") +''", testval.classname, javaval.classname );
new TestCase( SECTION, "(" + testval.description +") +''", testval.classname, javaval.classname );
function CompareValues( javaval, testval ) { // Check type, which should be E_TYPE testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type );/* // Check JavaScript class, which should be E_JSCLASS testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +".)getJSClass()", testval.jsclass, javaval.jsclass );*/ // Check the class's name, which should be the description, minus the "Package." part. testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +") +''", testval.classname, javaval.classname );}
testcases[testcases.length] = new TestCase( SECTION, testval.description, testval.value, javaval.value );
new TestCase( SECTION, testval.description, testval.value, javaval.value );
function CompareValues( javaval, testval ) { // Check value testcases[testcases.length] = new TestCase( SECTION, testval.description, testval.value, javaval.value ); // Check type. testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type );}
testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type );
new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type );
function CompareValues( javaval, testval ) { // Check value testcases[testcases.length] = new TestCase( SECTION, testval.description, testval.value, javaval.value ); // Check type. testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type );}
testcases[testcases.length] = new TestCase( SECTION, "("+testval.description+").booleanValue()", testval.value, javaval.value );
new TestCase( SECTION, "("+testval.description+").booleanValue()", testval.value, javaval.value );
function CompareValues( javaval, testval ) { // Check value testcases[testcases.length] = new TestCase( SECTION, "("+testval.description+").booleanValue()", testval.value, javaval.value ); // Check type, which should be E_TYPE testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type );/* // Check JavaScript class, which should be E_JSCLASS testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +").getJSClass()", testval.jsclass, javaval.jsclass );*/ // Check Java class, which should equal() E_JAVACLASS testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +").getClass().equals( " + E_JAVACLASS +" )", true, javaval.javaclass.equals( testval.javaclass ) );}
testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type );
new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type );
function CompareValues( javaval, testval ) { // Check value testcases[testcases.length] = new TestCase( SECTION, "("+testval.description+").booleanValue()", testval.value, javaval.value ); // Check type, which should be E_TYPE testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type );/* // Check JavaScript class, which should be E_JSCLASS testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +").getJSClass()", testval.jsclass, javaval.jsclass );*/ // Check Java class, which should equal() E_JAVACLASS testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +").getClass().equals( " + E_JAVACLASS +" )", true, javaval.javaclass.equals( testval.javaclass ) );}
testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +").getJSClass()", testval.jsclass, javaval.jsclass );
new TestCase( SECTION, "(" + testval.description +").getJSClass()", testval.jsclass, javaval.jsclass );
function CompareValues( javaval, testval ) { // Check value testcases[testcases.length] = new TestCase( SECTION, "("+testval.description+").booleanValue()", testval.value, javaval.value ); // Check type, which should be E_TYPE testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type );/* // Check JavaScript class, which should be E_JSCLASS testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +").getJSClass()", testval.jsclass, javaval.jsclass );*/ // Check Java class, which should equal() E_JAVACLASS testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +").getClass().equals( " + E_JAVACLASS +" )", true, javaval.javaclass.equals( testval.javaclass ) );}
testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +").getClass().equals( " + E_JAVACLASS +" )", true, javaval.javaclass.equals( testval.javaclass ) );
new TestCase( SECTION, "(" + testval.description +").getClass().equals( " + E_JAVACLASS +" )", true, javaval.javaclass.equals( testval.javaclass ) );
function CompareValues( javaval, testval ) { // Check value testcases[testcases.length] = new TestCase( SECTION, "("+testval.description+").booleanValue()", testval.value, javaval.value ); // Check type, which should be E_TYPE testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type );/* // Check JavaScript class, which should be E_JSCLASS testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +").getJSClass()", testval.jsclass, javaval.jsclass );*/ // Check Java class, which should equal() E_JAVACLASS testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +").getClass().equals( " + E_JAVACLASS +" )", true, javaval.javaclass.equals( testval.javaclass ) );}
testcases[testcases.length] = new TestCase( SECTION, "("+ testval.description +")["+p+"]", testval.value[p], javaval.value[p] );
new TestCase( SECTION, "("+ testval.description +")["+p+"]", testval.value[p], javaval.value[p] );
function CompareValues( javaval, testval ) { // Check value var p; var e = 0; for ( p in javaval.value ) { testcases[testcases.length] = new TestCase( SECTION, "("+ testval.description +")["+p+"]", testval.value[p], javaval.value[p] ); e++; } /* Number of elements enumerated should be same as number of elements in * the array */ testcases[testcases.length] = new TestCase( SECTION, "number of elements enumerated:", testval.length, e ); // Check type testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type ); // Check class. testcases[testcases.length ] = new TestCase( SECTION, "The Java Class of ( "+ testval.description +" )", testval.lcclass, javaval.lcclass );}
testcases[testcases.length] = new TestCase( SECTION, "number of elements enumerated:", testval.length, e );
new TestCase( SECTION, "number of elements enumerated:", testval.length, e );
function CompareValues( javaval, testval ) { // Check value var p; var e = 0; for ( p in javaval.value ) { testcases[testcases.length] = new TestCase( SECTION, "("+ testval.description +")["+p+"]", testval.value[p], javaval.value[p] ); e++; } /* Number of elements enumerated should be same as number of elements in * the array */ testcases[testcases.length] = new TestCase( SECTION, "number of elements enumerated:", testval.length, e ); // Check type testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type ); // Check class. testcases[testcases.length ] = new TestCase( SECTION, "The Java Class of ( "+ testval.description +" )", testval.lcclass, javaval.lcclass );}
testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type );
new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type );
function CompareValues( javaval, testval ) { // Check value var p; var e = 0; for ( p in javaval.value ) { testcases[testcases.length] = new TestCase( SECTION, "("+ testval.description +")["+p+"]", testval.value[p], javaval.value[p] ); e++; } /* Number of elements enumerated should be same as number of elements in * the array */ testcases[testcases.length] = new TestCase( SECTION, "number of elements enumerated:", testval.length, e ); // Check type testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type ); // Check class. testcases[testcases.length ] = new TestCase( SECTION, "The Java Class of ( "+ testval.description +" )", testval.lcclass, javaval.lcclass );}
testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +" )", testval.type, javaval.type );
new TestCase( SECTION, "typeof (" + testval.description +" )", testval.type, javaval.type );
function CompareValues( javaval, testval ) { // Check type, which should be E_TYPE testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +" )", testval.type, javaval.type );/* // Check JavaScript class, which should be E_JSCLASS testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +" ).getJSClass()", E_JSCLASS, javaval.jsclass );*/ // Check the JavaClass, which should be the same as the result as Class.forName(description). testcases[testcases.length] = new TestCase( SECTION, "("+testval.description +").getClass().equals( " + "java.lang.Class.forName( '" + testval.classname + "' ) )", true, (javaval.javaclass).equals( testval.javaclass ) ); // check the string value testcases[testcases.length] = new TestCase( SECTION, "("+testval.description+") +''", testval.stringval, javaval.value +"" );}
testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +" ).getJSClass()", E_JSCLASS, javaval.jsclass );
new TestCase( SECTION, "(" + testval.description +" ).getJSClass()", E_JSCLASS, javaval.jsclass );
function CompareValues( javaval, testval ) { // Check type, which should be E_TYPE testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +" )", testval.type, javaval.type );/* // Check JavaScript class, which should be E_JSCLASS testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +" ).getJSClass()", E_JSCLASS, javaval.jsclass );*/ // Check the JavaClass, which should be the same as the result as Class.forName(description). testcases[testcases.length] = new TestCase( SECTION, "("+testval.description +").getClass().equals( " + "java.lang.Class.forName( '" + testval.classname + "' ) )", true, (javaval.javaclass).equals( testval.javaclass ) ); // check the string value testcases[testcases.length] = new TestCase( SECTION, "("+testval.description+") +''", testval.stringval, javaval.value +"" );}
testcases[testcases.length] = new TestCase( SECTION, "("+testval.description +").getClass().equals( " + "java.lang.Class.forName( '" + testval.classname + "' ) )", true, (javaval.javaclass).equals( testval.javaclass ) );
new TestCase( SECTION, "("+testval.description +").getClass().equals( " + "java.lang.Class.forName( '" + testval.classname + "' ) )", true, (javaval.javaclass).equals( testval.javaclass ) );
function CompareValues( javaval, testval ) { // Check type, which should be E_TYPE testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +" )", testval.type, javaval.type );/* // Check JavaScript class, which should be E_JSCLASS testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +" ).getJSClass()", E_JSCLASS, javaval.jsclass );*/ // Check the JavaClass, which should be the same as the result as Class.forName(description). testcases[testcases.length] = new TestCase( SECTION, "("+testval.description +").getClass().equals( " + "java.lang.Class.forName( '" + testval.classname + "' ) )", true, (javaval.javaclass).equals( testval.javaclass ) ); // check the string value testcases[testcases.length] = new TestCase( SECTION, "("+testval.description+") +''", testval.stringval, javaval.value +"" );}
testcases[testcases.length] = new TestCase(
new TestCase(
function CompareValues( javaval, testval ) { // Check type, which should be E_TYPE testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +" )", testval.type, javaval.type );/* // Check JavaScript class, which should be E_JSCLASS testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +" ).getJSClass()", E_JSCLASS, javaval.jsclass );*/ // Check the JavaClass, which should be the same as the result as Class.forName(description). testcases[testcases.length] = new TestCase( SECTION, "("+testval.description +").getClass().equals( " + "java.lang.Class.forName( '" + testval.classname + "' ) )", true, (javaval.javaclass).equals( testval.javaclass ) ); // check the string value testcases[testcases.length] = new TestCase( SECTION, "("+testval.description+") +''", testval.stringval, javaval.value +"" );}
testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type );
new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type );
function CompareValues( javaval, testval ) { // Check type, which should be E_TYPE testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type );/* // Check JavaScript class, which should be E_JSCLASS testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +").getJSClass()", testval.jsclass, javaval.jsclass );*/ // Check the class's name, which should be the description, minus the "Package." part. testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +") +''", testval.classname, javaval.classname );}
testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +").getJSClass()", testval.jsclass, javaval.jsclass );
new TestCase( SECTION, "(" + testval.description +").getJSClass()", testval.jsclass, javaval.jsclass );
function CompareValues( javaval, testval ) { // Check type, which should be E_TYPE testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type );/* // Check JavaScript class, which should be E_JSCLASS testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +").getJSClass()", testval.jsclass, javaval.jsclass );*/ // Check the class's name, which should be the description, minus the "Package." part. testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +") +''", testval.classname, javaval.classname );}
testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +") +''", testval.classname, javaval.classname );
new TestCase( SECTION, "(" + testval.description +") +''", testval.classname, javaval.classname );
function CompareValues( javaval, testval ) { // Check type, which should be E_TYPE testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type );/* // Check JavaScript class, which should be E_JSCLASS testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +").getJSClass()", testval.jsclass, javaval.jsclass );*/ // Check the class's name, which should be the description, minus the "Package." part. testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +") +''", testval.classname, javaval.classname );}
testcases[testcases.length] = new TestCase( SECTION, "("+testval.description+").booleanValue()", testval.value, javaval.value );
new TestCase( SECTION, "("+testval.description+").booleanValue()", testval.value, javaval.value );
function CompareValues( javaval, testval ) { // Check booleanValue() testcases[testcases.length] = new TestCase( SECTION, "("+testval.description+").booleanValue()", testval.value, javaval.value ); // Check typeof, which should be E_TYPE testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type );/* // Check JavaScript class, which should be E_JSCLASS testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +").getJSClass()", testval.jsclass, javaval.jsclass );*/ // Check Java class, which should equal() E_JAVACLASS testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +").getClass().equals( " + E_JAVACLASS +" )", true, javaval.javaclass.equals( testval.javaclass ) );}
testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type );
new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type );
function CompareValues( javaval, testval ) { // Check booleanValue() testcases[testcases.length] = new TestCase( SECTION, "("+testval.description+").booleanValue()", testval.value, javaval.value ); // Check typeof, which should be E_TYPE testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type );/* // Check JavaScript class, which should be E_JSCLASS testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +").getJSClass()", testval.jsclass, javaval.jsclass );*/ // Check Java class, which should equal() E_JAVACLASS testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +").getClass().equals( " + E_JAVACLASS +" )", true, javaval.javaclass.equals( testval.javaclass ) );}
testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +").getJSClass()", testval.jsclass, javaval.jsclass );
new TestCase( SECTION, "(" + testval.description +").getJSClass()", testval.jsclass, javaval.jsclass );
function CompareValues( javaval, testval ) { // Check booleanValue() testcases[testcases.length] = new TestCase( SECTION, "("+testval.description+").booleanValue()", testval.value, javaval.value ); // Check typeof, which should be E_TYPE testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type );/* // Check JavaScript class, which should be E_JSCLASS testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +").getJSClass()", testval.jsclass, javaval.jsclass );*/ // Check Java class, which should equal() E_JAVACLASS testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +").getClass().equals( " + E_JAVACLASS +" )", true, javaval.javaclass.equals( testval.javaclass ) );}
testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +").getClass().equals( " + E_JAVACLASS +" )", true, javaval.javaclass.equals( testval.javaclass ) );
new TestCase( SECTION, "(" + testval.description +").getClass().equals( " + E_JAVACLASS +" )", true, javaval.javaclass.equals( testval.javaclass ) );
function CompareValues( javaval, testval ) { // Check booleanValue() testcases[testcases.length] = new TestCase( SECTION, "("+testval.description+").booleanValue()", testval.value, javaval.value ); // Check typeof, which should be E_TYPE testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type );/* // Check JavaScript class, which should be E_JSCLASS testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +").getJSClass()", testval.jsclass, javaval.jsclass );*/ // Check Java class, which should equal() E_JAVACLASS testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +").getClass().equals( " + E_JAVACLASS +" )", true, javaval.javaclass.equals( testval.javaclass ) );}
testcases[testcases.length] = new TestCase( SECTION, "("+ testval.description +").length", testval.value, javaval.length );
new TestCase( SECTION, "("+ testval.description +").length", testval.value, javaval.length );
function CompareValues( javaval, testval ) { // Check length testcases[testcases.length] = new TestCase( SECTION, "("+ testval.description +").length", testval.value, javaval.length ); // access element [-1] testcases[testcases.length] = new TestCase( SECTION, "("+testval.description+")[-1]", void 0, javaval[-1] ); // access element [length] testcases[testcases.length] = new TestCase( SECTION, "("+testval.description+")["+testval.value+"]", void 0, javaval[testval.value] );}
testcases[testcases.length] = new TestCase(
new TestCase(
function CompareValues( javaval, testval ) { // Check length testcases[testcases.length] = new TestCase( SECTION, "("+ testval.description +").length", testval.value, javaval.length ); // access element [-1] testcases[testcases.length] = new TestCase( SECTION, "("+testval.description+")[-1]", void 0, javaval[-1] ); // access element [length] testcases[testcases.length] = new TestCase( SECTION, "("+testval.description+")["+testval.value+"]", void 0, javaval[testval.value] );}
testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type );
new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type );
function CompareValues( javaval, testval ) { // Check typeof, which should be E_TYPE testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type ); // Check JavaScript class, which should be E_JSCLASS + the package name testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +").getJSClass()", testval.jsclass, javaval.jsclass );}
testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +").getJSClass()", testval.jsclass, javaval.jsclass );
new TestCase( SECTION, "(" + testval.description +").getJSClass()", testval.jsclass, javaval.jsclass );
function CompareValues( javaval, testval ) { // Check typeof, which should be E_TYPE testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type ); // Check JavaScript class, which should be E_JSCLASS + the package name testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +").getJSClass()", testval.jsclass, javaval.jsclass );}
testcases[testcases.length] = new TestCase( SECTION, "("+testval.description+").booleanValue()", testval.value, javaval.value );
new TestCase( SECTION, "("+testval.description+").booleanValue()", testval.value, javaval.value );
function CompareValues( javaval, testval ) { // Check booleanValue() testcases[testcases.length] = new TestCase( SECTION, "("+testval.description+").booleanValue()", testval.value, javaval.value ); // Check typeof, which should be E_TYPE testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type );/* // Check JavaScript class, which should be E_JSCLASS testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +").getJSClass()", testval.jsclass, javaval.jsclass );*/ // Check Java class, which should equal() E_JAVACLASS testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +").getClass().equals( " + E_JAVACLASS +" )", true, javaval.javaclass.equals( testval.javaclass ) ); // Check string representation testcases[testcases.length] = new TestCase( SECTION, "("+ testval.description+") + ''", testval.string, javaval.string );}
testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type );
new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type );
function CompareValues( javaval, testval ) { // Check booleanValue() testcases[testcases.length] = new TestCase( SECTION, "("+testval.description+").booleanValue()", testval.value, javaval.value ); // Check typeof, which should be E_TYPE testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type );/* // Check JavaScript class, which should be E_JSCLASS testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +").getJSClass()", testval.jsclass, javaval.jsclass );*/ // Check Java class, which should equal() E_JAVACLASS testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +").getClass().equals( " + E_JAVACLASS +" )", true, javaval.javaclass.equals( testval.javaclass ) ); // Check string representation testcases[testcases.length] = new TestCase( SECTION, "("+ testval.description+") + ''", testval.string, javaval.string );}
testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +").getJSClass()", testval.jsclass, javaval.jsclass );
new TestCase( SECTION, "(" + testval.description +").getJSClass()", testval.jsclass, javaval.jsclass );
function CompareValues( javaval, testval ) { // Check booleanValue() testcases[testcases.length] = new TestCase( SECTION, "("+testval.description+").booleanValue()", testval.value, javaval.value ); // Check typeof, which should be E_TYPE testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type );/* // Check JavaScript class, which should be E_JSCLASS testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +").getJSClass()", testval.jsclass, javaval.jsclass );*/ // Check Java class, which should equal() E_JAVACLASS testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +").getClass().equals( " + E_JAVACLASS +" )", true, javaval.javaclass.equals( testval.javaclass ) ); // Check string representation testcases[testcases.length] = new TestCase( SECTION, "("+ testval.description+") + ''", testval.string, javaval.string );}
testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +").getClass().equals( " + E_JAVACLASS +" )", true, javaval.javaclass.equals( testval.javaclass ) );
new TestCase( SECTION, "(" + testval.description +").getClass().equals( " + E_JAVACLASS +" )", true, javaval.javaclass.equals( testval.javaclass ) );
function CompareValues( javaval, testval ) { // Check booleanValue() testcases[testcases.length] = new TestCase( SECTION, "("+testval.description+").booleanValue()", testval.value, javaval.value ); // Check typeof, which should be E_TYPE testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type );/* // Check JavaScript class, which should be E_JSCLASS testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +").getJSClass()", testval.jsclass, javaval.jsclass );*/ // Check Java class, which should equal() E_JAVACLASS testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +").getClass().equals( " + E_JAVACLASS +" )", true, javaval.javaclass.equals( testval.javaclass ) ); // Check string representation testcases[testcases.length] = new TestCase( SECTION, "("+ testval.description+") + ''", testval.string, javaval.string );}
testcases[testcases.length] = new TestCase( SECTION, "("+ testval.description+") + ''", testval.string, javaval.string );
new TestCase( SECTION, "("+ testval.description+") + ''", testval.string, javaval.string );
function CompareValues( javaval, testval ) { // Check booleanValue() testcases[testcases.length] = new TestCase( SECTION, "("+testval.description+").booleanValue()", testval.value, javaval.value ); // Check typeof, which should be E_TYPE testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type );/* // Check JavaScript class, which should be E_JSCLASS testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +").getJSClass()", testval.jsclass, javaval.jsclass );*/ // Check Java class, which should equal() E_JAVACLASS testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +").getClass().equals( " + E_JAVACLASS +" )", true, javaval.javaclass.equals( testval.javaclass ) ); // Check string representation testcases[testcases.length] = new TestCase( SECTION, "("+ testval.description+") + ''", testval.string, javaval.string );}
testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +" )", testval.type, javaval.type );
new TestCase( SECTION, "typeof (" + testval.description +" )", testval.type, javaval.type );
function CompareValues( javaval, testval ) { // Check type, which should be E_TYPE testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +" )", testval.type, javaval.type );/* // Check JavaScript class, which should be E_JSCLASS testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +" ).getJSClass()", testval.jsclass, javaval.jsclass );*/ // Check the JavaClass, which should be the same as the result as Class.forName(description). testcases[testcases.length] = new TestCase( SECTION, testval.description +".getClass().equals( " + "java.lang.Class.forName( '" + testval.classname + "' ) )", true, javaval.javaclass.equals( testval.javaclass ) );}
testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +" ).getJSClass()", testval.jsclass, javaval.jsclass );
new TestCase( SECTION, "(" + testval.description +" ).getJSClass()", testval.jsclass, javaval.jsclass );
function CompareValues( javaval, testval ) { // Check type, which should be E_TYPE testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +" )", testval.type, javaval.type );/* // Check JavaScript class, which should be E_JSCLASS testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +" ).getJSClass()", testval.jsclass, javaval.jsclass );*/ // Check the JavaClass, which should be the same as the result as Class.forName(description). testcases[testcases.length] = new TestCase( SECTION, testval.description +".getClass().equals( " + "java.lang.Class.forName( '" + testval.classname + "' ) )", true, javaval.javaclass.equals( testval.javaclass ) );}
testcases[testcases.length] = new TestCase( SECTION, testval.description +".getClass().equals( " + "java.lang.Class.forName( '" + testval.classname + "' ) )", true, javaval.javaclass.equals( testval.javaclass ) );
new TestCase( SECTION, testval.description +".getClass().equals( " + "java.lang.Class.forName( '" + testval.classname + "' ) )", true, javaval.javaclass.equals( testval.javaclass ) );
function CompareValues( javaval, testval ) { // Check type, which should be E_TYPE testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +" )", testval.type, javaval.type );/* // Check JavaScript class, which should be E_JSCLASS testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +" ).getJSClass()", testval.jsclass, javaval.jsclass );*/ // Check the JavaClass, which should be the same as the result as Class.forName(description). testcases[testcases.length] = new TestCase( SECTION, testval.description +".getClass().equals( " + "java.lang.Class.forName( '" + testval.classname + "' ) )", true, javaval.javaclass.equals( testval.javaclass ) );}
testcases[testcases.length] = new TestCase( SECTION, testval.description, testval.value, javaval.value );
new TestCase( SECTION, testval.description, testval.value, javaval.value );
function CompareValues( javaval, testval ) { // Check value testcases[testcases.length] = new TestCase( SECTION, testval.description, testval.value, javaval.value ); // Check type, which should be E_TYPE testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type );}
testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type );
new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type );
function CompareValues( javaval, testval ) { // Check value testcases[testcases.length] = new TestCase( SECTION, testval.description, testval.value, javaval.value ); // Check type, which should be E_TYPE testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +")", testval.type, javaval.type );}
testcases[testcases.length] = new TestCase( SECTION, "("+ testval.description +").length", testval.value, javaval.length );
new TestCase( SECTION, "("+ testval.description +").length", testval.value, javaval.length );
function CompareValues( javaval, testval ) { // Check length testcases[testcases.length] = new TestCase( SECTION, "("+ testval.description +").length", testval.value, javaval.length );}
testcases[testcases.length] = new TestCase(
new TestCase(
function CompareValues( t ) { testcases[testcases.length] = new TestCase( SECTION, t.converter +"("+ t.description +")", t.expect, t.actual ); testcases[testcases.length] = new TestCase( SECTION, "typeof (" + t.converter +"( "+ t.description +" ) )", t.type, typeof t.actual );}
testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +" )", testval.type, javaval.type );
new TestCase( SECTION, "typeof (" + testval.description +" )", testval.type, javaval.type );
function CompareValues( javaval, testval ) { // Check type, which should be E_TYPE testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +" )", testval.type, javaval.type ); // Check JavaScript class, which should be E_JSCLASS testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +" ).getJSClass()", testval.jsclass, javaval.jsclass ); // Check the JavaClass, which should be the same as the result as Class.forName(description). testcases[testcases.length] = new TestCase( SECTION, testval.description +".getClass().equals( " + "java.lang.Class.forName( '" + testval.classname + "' ) )", true, javaval.javaclass.equals( testval.javaclass ) );}
testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +" ).getJSClass()", testval.jsclass, javaval.jsclass );
new TestCase( SECTION, "(" + testval.description +" ).getJSClass()", testval.jsclass, javaval.jsclass );
function CompareValues( javaval, testval ) { // Check type, which should be E_TYPE testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +" )", testval.type, javaval.type ); // Check JavaScript class, which should be E_JSCLASS testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +" ).getJSClass()", testval.jsclass, javaval.jsclass ); // Check the JavaClass, which should be the same as the result as Class.forName(description). testcases[testcases.length] = new TestCase( SECTION, testval.description +".getClass().equals( " + "java.lang.Class.forName( '" + testval.classname + "' ) )", true, javaval.javaclass.equals( testval.javaclass ) );}
testcases[testcases.length] = new TestCase( SECTION, testval.description +".getClass().equals( " + "java.lang.Class.forName( '" + testval.classname + "' ) )", true, javaval.javaclass.equals( testval.javaclass ) );
new TestCase( SECTION, testval.description +".getClass().equals( " + "java.lang.Class.forName( '" + testval.classname + "' ) )", true, javaval.javaclass.equals( testval.javaclass ) );
function CompareValues( javaval, testval ) { // Check type, which should be E_TYPE testcases[testcases.length] = new TestCase( SECTION, "typeof (" + testval.description +" )", testval.type, javaval.type ); // Check JavaScript class, which should be E_JSCLASS testcases[testcases.length] = new TestCase( SECTION, "(" + testval.description +" ).getJSClass()", testval.jsclass, javaval.jsclass ); // Check the JavaClass, which should be the same as the result as Class.forName(description). testcases[testcases.length] = new TestCase( SECTION, testval.description +".getClass().equals( " + "java.lang.Class.forName( '" + testval.classname + "' ) )", true, javaval.javaclass.equals( testval.javaclass ) );}
row = awSetInputAndPopupFromArray(row, msgCompFields.SplitRecipients(msgCompFields.GetTo()), "addr_to"); row = awSetInputAndPopupFromArray(row, msgCompFields.SplitRecipients(msgCompFields.GetCc()), "addr_cc"); row = awSetInputAndPopupFromArray(row, msgCompFields.SplitRecipients(msgCompFields.GetBcc()), "addr_bcc"); row = awSetInputAndPopupFromArray(row, msgCompFields.SplitRecipients(msgCompFields.GetReplyTo()), "addr_reply");
row = awSetInputAndPopupFromArray(row, msgCompFields.SplitRecipients(msgCompFields.GetTo()), false, "addr_to"); row = awSetInputAndPopupFromArray(row, msgCompFields.SplitRecipients(msgCompFields.GetCc()), false, "addr_cc"); row = awSetInputAndPopupFromArray(row, msgCompFields.SplitRecipients(msgCompFields.GetBcc()), false, "addr_bcc"); row = awSetInputAndPopupFromArray(row, msgCompFields.SplitRecipients(msgCompFields.GetReplyTo()), false, "addr_reply");
function CompFields2Recipients(msgCompFields){ if (msgCompFields) { var row = 1; row = awSetInputAndPopupFromArray(row, msgCompFields.SplitRecipients(msgCompFields.GetTo()), "addr_to"); row = awSetInputAndPopupFromArray(row, msgCompFields.SplitRecipients(msgCompFields.GetCc()), "addr_cc"); row = awSetInputAndPopupFromArray(row, msgCompFields.SplitRecipients(msgCompFields.GetBcc()), "addr_bcc"); row = awSetInputAndPopupFromArray(row, msgCompFields.SplitRecipients(msgCompFields.GetReplyTo()), "addr_reply"); row = awSetInputAndPopup(row, msgCompFields.GetOtherRandomHeaders(), "addr_other"); row = awSetInputAndPopup(row, msgCompFields.GetNewsgroups(), "addr_newsgroups"); row = awSetInputAndPopup(row, msgCompFields.GetFollowupTo(), "addr_followup"); if ( row > 1 ) row--; // remove extra rows while ( top.MAX_RECIPIENTS > row ) awRemoveRow(top.MAX_RECIPIENTS); setTimeout("awFinishCopyNodes();", 0); }}
if (msgCompFields) { var treeChildren = document.getElementById('addressWidgetBody'); var newTreeChildrenNode = treeChildren.cloneNode(false); var templateNode = treeChildren.firstChild; top.MAX_RECIPIENTS = 0;
if (msgCompFields) { var treeChildren = document.getElementById('addressWidgetBody'); var newTreeChildrenNode = treeChildren.cloneNode(false); var templateNode = treeChildren.firstChild;
function CompFields2Recipients(msgCompFields, msgType){ if (msgCompFields) { var treeChildren = document.getElementById('addressWidgetBody'); var newTreeChildrenNode = treeChildren.cloneNode(false); var templateNode = treeChildren.firstChild; top.MAX_RECIPIENTS = 0; awSetInputAndPopupFromArray(msgCompFields.SplitRecipients(msgCompFields.replyTo, false), "addr_reply", newTreeChildrenNode, templateNode); awSetInputAndPopupFromArray(msgCompFields.SplitRecipients(msgCompFields.to, false), "addr_to", newTreeChildrenNode, templateNode); awSetInputAndPopupFromArray(msgCompFields.SplitRecipients(msgCompFields.cc, false), "addr_cc", newTreeChildrenNode, templateNode); awSetInputAndPopupFromArray(msgCompFields.SplitRecipients(msgCompFields.bcc, false), "addr_bcc", newTreeChildrenNode, templateNode); awSetInputAndPopup(msgCompFields.otherRandomHeaders, "addr_other", newTreeChildrenNode, templateNode); awSetInputAndPopup(msgCompFields.newsgroups, "addr_newsgroups", newTreeChildrenNode, templateNode); awSetInputAndPopup(msgCompFields.followupTo, "addr_followup", newTreeChildrenNode, templateNode); //If it's a new message, we need to add an extrat empty recipient. var msgComposeType = Components.interfaces.nsIMsgCompType; if (msgType == msgComposeType.New || top.MAX_RECIPIENTS == 0) _awSetInputAndPopup("", "addr_to", newTreeChildrenNode, templateNode); dump("replacing child in comp fields 2 recips \n"); var parent = treeChildren.parentNode; parent.replaceChild(newTreeChildrenNode, treeChildren); awFitDummyRows(); setTimeout("awFinishCopyNodes();", 0); }}
awSetInputAndPopupFromArray(msgCompFields.SplitRecipients(msgCompFields.replyTo, false), "addr_reply", newTreeChildrenNode, templateNode); awSetInputAndPopupFromArray(msgCompFields.SplitRecipients(msgCompFields.to, false), "addr_to", newTreeChildrenNode, templateNode); awSetInputAndPopupFromArray(msgCompFields.SplitRecipients(msgCompFields.cc, false), "addr_cc", newTreeChildrenNode, templateNode); awSetInputAndPopupFromArray(msgCompFields.SplitRecipients(msgCompFields.bcc, false), "addr_bcc", newTreeChildrenNode, templateNode); awSetInputAndPopup(msgCompFields.otherRandomHeaders, "addr_other", newTreeChildrenNode, templateNode); awSetInputAndPopup(msgCompFields.newsgroups, "addr_newsgroups", newTreeChildrenNode, templateNode); awSetInputAndPopup(msgCompFields.followupTo, "addr_followup", newTreeChildrenNode, templateNode); var msgComposeType = Components.interfaces.nsIMsgCompType; if (msgType == msgComposeType.New || top.MAX_RECIPIENTS == 0) _awSetInputAndPopup("", "addr_to", newTreeChildrenNode, templateNode); dump("replacing child in comp fields 2 recips \n"); var parent = treeChildren.parentNode; parent.replaceChild(newTreeChildrenNode, treeChildren);
top.MAX_RECIPIENTS = 0; awSetInputAndPopupFromArray(msgCompFields.SplitRecipients(msgCompFields.replyTo, false), "addr_reply", newTreeChildrenNode, templateNode); awSetInputAndPopupFromArray(msgCompFields.SplitRecipients(msgCompFields.to, false), "addr_to", newTreeChildrenNode, templateNode); awSetInputAndPopupFromArray(msgCompFields.SplitRecipients(msgCompFields.cc, false), "addr_cc", newTreeChildrenNode, templateNode); awSetInputAndPopupFromArray(msgCompFields.SplitRecipients(msgCompFields.bcc, false), "addr_bcc", newTreeChildrenNode, templateNode); awSetInputAndPopup(msgCompFields.otherRandomHeaders, "addr_other", newTreeChildrenNode, templateNode); awSetInputAndPopup(msgCompFields.newsgroups, "addr_newsgroups", newTreeChildrenNode, templateNode); awSetInputAndPopup(msgCompFields.followupTo, "addr_followup", newTreeChildrenNode, templateNode); var msgComposeType = Components.interfaces.nsIMsgCompType; if (msgType == msgComposeType.New || top.MAX_RECIPIENTS == 0) _awSetInputAndPopup("", "addr_to", newTreeChildrenNode, templateNode); dump("replacing child in comp fields 2 recips \n"); var parent = treeChildren.parentNode; parent.replaceChild(newTreeChildrenNode, treeChildren);
function CompFields2Recipients(msgCompFields, msgType){ if (msgCompFields) { var treeChildren = document.getElementById('addressWidgetBody'); var newTreeChildrenNode = treeChildren.cloneNode(false); var templateNode = treeChildren.firstChild; top.MAX_RECIPIENTS = 0; awSetInputAndPopupFromArray(msgCompFields.SplitRecipients(msgCompFields.replyTo, false), "addr_reply", newTreeChildrenNode, templateNode); awSetInputAndPopupFromArray(msgCompFields.SplitRecipients(msgCompFields.to, false), "addr_to", newTreeChildrenNode, templateNode); awSetInputAndPopupFromArray(msgCompFields.SplitRecipients(msgCompFields.cc, false), "addr_cc", newTreeChildrenNode, templateNode); awSetInputAndPopupFromArray(msgCompFields.SplitRecipients(msgCompFields.bcc, false), "addr_bcc", newTreeChildrenNode, templateNode); awSetInputAndPopup(msgCompFields.otherRandomHeaders, "addr_other", newTreeChildrenNode, templateNode); awSetInputAndPopup(msgCompFields.newsgroups, "addr_newsgroups", newTreeChildrenNode, templateNode); awSetInputAndPopup(msgCompFields.followupTo, "addr_followup", newTreeChildrenNode, templateNode); //If it's a new message, we need to add an extrat empty recipient. var msgComposeType = Components.interfaces.nsIMsgCompType; if (msgType == msgComposeType.New || top.MAX_RECIPIENTS == 0) _awSetInputAndPopup("", "addr_to", newTreeChildrenNode, templateNode); dump("replacing child in comp fields 2 recips \n"); var parent = treeChildren.parentNode; parent.replaceChild(newTreeChildrenNode, treeChildren); awFitDummyRows(); setTimeout("awFinishCopyNodes();", 0); }}
if (LastToClose()) NotifyQuitApplication();
function ComposeCanClose(){ if (gSendOrSaveOperationInProgress) { var result; if (gPromptService) { var promptTitle = sComposeMsgsBundle.getString("quitComposeWindowTitle"); var promptMsg = sComposeMsgsBundle.getString("quitComposeWindowMessage"); var quitButtonLabel = sComposeMsgsBundle.getString("quitComposeWindowQuitButtonLabel"); var waitButtonLabel = sComposeMsgsBundle.getString("quitComposeWindowWaitButtonLabel"); result = gPromptService.confirmEx(window, promptTitle, promptMsg, (gPromptService.BUTTON_TITLE_IS_STRING*gPromptService.BUTTON_POS_0) + (gPromptService.BUTTON_TITLE_IS_STRING*gPromptService.BUTTON_POS_1), waitButtonLabel, quitButtonLabel, null, null, {value:0}); if (result == 1) { gMsgCompose.abort(); return true; } return false; } } dump("XXX changed? " + gContentChanged + "," + gMsgCompose.bodyModified + "\n"); // Returns FALSE only if user cancels save action if (gContentChanged || gMsgCompose.bodyModified) { // call window.focus, since we need to pop up a dialog // and therefore need to be visible (to prevent user confusion) window.focus(); if (gPromptService) { result = gPromptService.confirmEx(window, sComposeMsgsBundle.getString("saveDlogTitle"), sComposeMsgsBundle.getString("saveDlogMessage"), (gPromptService.BUTTON_TITLE_SAVE * gPromptService.BUTTON_POS_0) + (gPromptService.BUTTON_TITLE_CANCEL * gPromptService.BUTTON_POS_1) + (gPromptService.BUTTON_TITLE_DONT_SAVE * gPromptService.BUTTON_POS_2), null, null, null, null, {value:0}); switch (result) { case 0: //Save if (LastToClose()) NotifyQuitApplication(); gCloseWindowAfterSave = true; SaveAsDraft(); return false; case 1: //Cancel return false; case 2: //Don't Save break; } } SetContentAndBodyAsUnmodified(); } return true;}
(promptService.BUTTON_TITLE_CANCEL * promptService.BUTTON_POS_1), gComposeMsgsBundle.getString("saveDlogDontSaveBtn"),
(promptService.BUTTON_TITLE_CANCEL * promptService.BUTTON_POS_1) + (promptService.BUTTON_TITLE_DONT_SAVE * promptService.BUTTON_POS_2), null, null, null,
function ComposeCanClose(){ if (sendOrSaveOperationInProgress) { if (promptService) { var promptTitle = gComposeMsgsBundle.getString("quitComposeWindowTitle"); var promptMsg = gComposeMsgsBundle.getString("quitComposeWindowMessage"); if (promptService.confirm(window, promptTitle, promptMsg)) { msgCompose.abort(); return true; } else { return false; } } } // Returns FALSE only if user cancels save action if (contentChanged || msgCompose.bodyModified) { // call window.focus, since we need to pop up a dialog // and therefore need to be visible (to prevent user confusion) window.focus(); if (promptService) { var result = {value:0}; promptService.confirmEx(window, gComposeMsgsBundle.getString("saveDlogTitle"), gComposeMsgsBundle.getString("saveDlogMessage"), (promptService.BUTTON_TITLE_SAVE * promptService.BUTTON_POS_0) + (promptService.BUTTON_TITLE_CANCEL * promptService.BUTTON_POS_1), gComposeMsgsBundle.getString("saveDlogDontSaveBtn"), null, {value:0}, result); if (result) { switch (result.value) { case 0: //Save if (LastToClose()) NotifyQuitApplication(); SaveAsDraft(); break; case 1: //Cancel return false; case 2: //Don't Save break; } } } msgCompose.bodyModified = false; contentChanged = false; } return true;}
if (promptService)
if (gPromptService)
function ComposeCanClose(){ if (sendOrSaveOperationInProgress) { if (promptService) { var promptTitle = gComposeMsgsBundle.getString("quitComposeWindowTitle"); var promptMsg = gComposeMsgsBundle.getString("quitComposeWindowMessage"); if (promptService.confirm(window, promptTitle, promptMsg)) { msgCompose.abort(); return true; } else { return false; } } } // Returns FALSE only if user cancels save action if (contentChanged || msgCompose.bodyModified) { // call window.focus, since we need to pop up a dialog // and therefore need to be visible (to prevent user confusion) window.focus(); if (promptService) { var result = {value:0}; promptService.confirmEx(window, gComposeMsgsBundle.getString("saveDlogTitle"), gComposeMsgsBundle.getString("saveDlogMessage"), (promptService.BUTTON_TITLE_SAVE * promptService.BUTTON_POS_0) + (promptService.BUTTON_TITLE_CANCEL * promptService.BUTTON_POS_1) + (promptService.BUTTON_TITLE_DONT_SAVE * promptService.BUTTON_POS_2), null, null, null, null, {value:0}, result); if (result) { switch (result.value) { case 0: //Save if (LastToClose()) NotifyQuitApplication(); SaveAsDraft(); break; case 1: //Cancel return false; case 2: //Don't Save break; } } } msgCompose.bodyModified = false; contentChanged = false; } return true;}
if (promptService.confirm(window, promptTitle, promptMsg))
if (gPromptService.confirm(window, promptTitle, promptMsg))
function ComposeCanClose(){ if (sendOrSaveOperationInProgress) { if (promptService) { var promptTitle = gComposeMsgsBundle.getString("quitComposeWindowTitle"); var promptMsg = gComposeMsgsBundle.getString("quitComposeWindowMessage"); if (promptService.confirm(window, promptTitle, promptMsg)) { msgCompose.abort(); return true; } else { return false; } } } // Returns FALSE only if user cancels save action if (contentChanged || msgCompose.bodyModified) { // call window.focus, since we need to pop up a dialog // and therefore need to be visible (to prevent user confusion) window.focus(); if (promptService) { var result = {value:0}; promptService.confirmEx(window, gComposeMsgsBundle.getString("saveDlogTitle"), gComposeMsgsBundle.getString("saveDlogMessage"), (promptService.BUTTON_TITLE_SAVE * promptService.BUTTON_POS_0) + (promptService.BUTTON_TITLE_CANCEL * promptService.BUTTON_POS_1) + (promptService.BUTTON_TITLE_DONT_SAVE * promptService.BUTTON_POS_2), null, null, null, null, {value:0}, result); if (result) { switch (result.value) { case 0: //Save if (LastToClose()) NotifyQuitApplication(); SaveAsDraft(); break; case 1: //Cancel return false; case 2: //Don't Save break; } } } msgCompose.bodyModified = false; contentChanged = false; } return true;}
promptService.confirmEx(window,
gPromptService.confirmEx(window,
function ComposeCanClose(){ if (sendOrSaveOperationInProgress) { if (promptService) { var promptTitle = gComposeMsgsBundle.getString("quitComposeWindowTitle"); var promptMsg = gComposeMsgsBundle.getString("quitComposeWindowMessage"); if (promptService.confirm(window, promptTitle, promptMsg)) { msgCompose.abort(); return true; } else { return false; } } } // Returns FALSE only if user cancels save action if (contentChanged || msgCompose.bodyModified) { // call window.focus, since we need to pop up a dialog // and therefore need to be visible (to prevent user confusion) window.focus(); if (promptService) { var result = {value:0}; promptService.confirmEx(window, gComposeMsgsBundle.getString("saveDlogTitle"), gComposeMsgsBundle.getString("saveDlogMessage"), (promptService.BUTTON_TITLE_SAVE * promptService.BUTTON_POS_0) + (promptService.BUTTON_TITLE_CANCEL * promptService.BUTTON_POS_1) + (promptService.BUTTON_TITLE_DONT_SAVE * promptService.BUTTON_POS_2), null, null, null, null, {value:0}, result); if (result) { switch (result.value) { case 0: //Save if (LastToClose()) NotifyQuitApplication(); SaveAsDraft(); break; case 1: //Cancel return false; case 2: //Don't Save break; } } } msgCompose.bodyModified = false; contentChanged = false; } return true;}
(promptService.BUTTON_TITLE_SAVE * promptService.BUTTON_POS_0) + (promptService.BUTTON_TITLE_CANCEL * promptService.BUTTON_POS_1) + (promptService.BUTTON_TITLE_DONT_SAVE * promptService.BUTTON_POS_2),
(gPromptService.BUTTON_TITLE_SAVE * gPromptService.BUTTON_POS_0) + (gPromptService.BUTTON_TITLE_CANCEL * gPromptService.BUTTON_POS_1) + (gPromptService.BUTTON_TITLE_DONT_SAVE * gPromptService.BUTTON_POS_2),
function ComposeCanClose(){ if (sendOrSaveOperationInProgress) { if (promptService) { var promptTitle = gComposeMsgsBundle.getString("quitComposeWindowTitle"); var promptMsg = gComposeMsgsBundle.getString("quitComposeWindowMessage"); if (promptService.confirm(window, promptTitle, promptMsg)) { msgCompose.abort(); return true; } else { return false; } } } // Returns FALSE only if user cancels save action if (contentChanged || msgCompose.bodyModified) { // call window.focus, since we need to pop up a dialog // and therefore need to be visible (to prevent user confusion) window.focus(); if (promptService) { var result = {value:0}; promptService.confirmEx(window, gComposeMsgsBundle.getString("saveDlogTitle"), gComposeMsgsBundle.getString("saveDlogMessage"), (promptService.BUTTON_TITLE_SAVE * promptService.BUTTON_POS_0) + (promptService.BUTTON_TITLE_CANCEL * promptService.BUTTON_POS_1) + (promptService.BUTTON_TITLE_DONT_SAVE * promptService.BUTTON_POS_2), null, null, null, null, {value:0}, result); if (result) { switch (result.value) { case 0: //Save if (LastToClose()) NotifyQuitApplication(); SaveAsDraft(); break; case 1: //Cancel return false; case 2: //Don't Save break; } } } msgCompose.bodyModified = false; contentChanged = false; } return true;}
SetComposeWindowTitle(13);
function ComposeFieldsReady(msgType){ //If we are in plain text, we need to set the wrap column if (! msgCompose.composeHTML) { try { window.editorShell.wrapColumn = msgCompose.wrapLength; } catch (e) { dump("### window.editorShell.wrapColumn exception text: " + e + " - failed\n"); } } CompFields2Recipients(msgCompose.compFields, msgCompose.type); AdjustFocus();}
if (! msgCompose.composeHTML) try { window.editorShell.wrapColumn = msgCompose.wrapLength; } catch (e) { dump("### window.editorShell.wrapColumn exception text: " + e + " - failed\n"); } CompFields2Recipients(msgCompose.compFields, msgCompose.type); setupLdapAutocompleteSession(); SetComposeWindowTitle(13); AdjustFocus(); try { window.updateCommands("create"); } catch(e) {}
if (! msgCompose.composeHTML) { try { window.editorShell.wrapColumn = msgCompose.wrapLength; } catch (e) { dump("### window.editorShell.wrapColumn exception text: " + e + " - failed\n"); } } CompFields2Recipients(msgCompose.compFields, msgCompose.type); AdjustFocus();
function ComposeFieldsReady(msgType){ //If we are in plain text, we nee to set the wrap column if (! msgCompose.composeHTML) try { window.editorShell.wrapColumn = msgCompose.wrapLength; } catch (e) { dump("### window.editorShell.wrapColumn exception text: " + e + " - failed\n"); } CompFields2Recipients(msgCompose.compFields, msgCompose.type); setupLdapAutocompleteSession(); SetComposeWindowTitle(13); AdjustFocus(); try { window.updateCommands("create"); } catch(e) {}}
if (gMsgCompose.composeHTML) setTimeout("loadHTMLMsgPrefs();", 0);
function ComposeFieldsReady(msgType){ //If we are in plain text, we need to set the wrap column if (! gMsgCompose.composeHTML) { try { gMsgCompose.editor.QueryInterface(nsIPlaintextEditorMail).wrapWidth = gMsgCompose.wrapLength; } catch (e) { dump("### textEditor.wrapWidth exception text: " + e + " - failed\n"); } } CompFields2Recipients(gMsgCompose.compFields, gMsgCompose.type); SetComposeWindowTitle(); enableEditableFields(); AdjustFocus();}
if (DEBUG && msgComposeService)
if (gLogComposePerformance)
function ComposeLoad(){ AddMessageComposeOfflineObserver(); AddDirectoryServerObserver(true); if (DEBUG && msgComposeService) msgComposeService.TimeStamp("Start Initializing the compose window (ComposeLoad)", false); gComposeMsgsBundle = document.getElementById("bundle_composeMsgs"); try { SetupCommandUpdateHandlers(); var wizardcallback = true; var state = verifyAccounts(wizardcallback); // this will do migration, or create a new account if we need to. if (other_header != "") { var selectNode = document.getElementById('msgRecipientType#1'); selectNode = selectNode.childNodes[0]; var opt = document.createElement('menuitem'); opt.setAttribute("value", "addr_other"); opt.setAttribute("label", other_header + ":"); selectNode.appendChild(opt); } if (state) ComposeStartup(); } catch (ex) { var errorTitle = gComposeMsgsBundle.getString("initErrorDlogTitle"); var errorMsg = gComposeMsgsBundle.getFormattedString("initErrorDlogMessage", [ex]); if (!gPromptService) { gPromptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(); gPromptService = gPromptService.QueryInterface(Components.interfaces.nsIPromptService); } if (gPromptService) gPromptService.alert(window, errorTitle, errorMsg); else window.alert(errorMsg); if (msgCompose) msgCompose.CloseWindow(); else window.close(); return; } window.tryToClose=ComposeCanClose; if (DEBUG && msgComposeService) msgComposeService.TimeStamp("Done with the initialization (ComposeLoad). Waiting on editor to load about::blank", false);}
if (msgComposeService)
if (DEBUG && msgComposeService)
function ComposeLoad(){ AddMessageComposeOfflineObserver(); AddDirectoryServerObserver(true); if (msgComposeService) msgComposeService.TimeStamp("Start Initializing the compose window (ComposeLoad)", false); gComposeMsgsBundle = document.getElementById("bundle_composeMsgs"); try { SetupCommandUpdateHandlers(); var wizardcallback = true; var state = verifyAccounts(wizardcallback); // this will do migration, or create a new account if we need to. if (other_header != "") { var selectNode = document.getElementById('msgRecipientType#1'); selectNode = selectNode.childNodes[0]; var opt = document.createElement('menuitem'); opt.setAttribute("value", "addr_other"); opt.setAttribute("label", other_header + ":"); selectNode.appendChild(opt); } if(state) ComposeStartup(); } catch (ex) { dump("###ERROR WHILE LOADING MESSAGE COMPOSE: " + ex + "\n"); var errorTitle = gComposeMsgsBundle.getString("initErrorDlogTitle"); var errorMsg = gComposeMsgsBundle.getFormattedString("initErrorDlogMessage", [ex]); if (promptService) promptService.alert(window, errorTitle, errorMsg); else window.alert(errorMsg); if (msgCompose) msgCompose.CloseWindow(); else window.close(); return; } window.tryToClose=ComposeCanClose; if (msgComposeService) msgComposeService.TimeStamp("Done with the initialization (ComposeLoad). Waiting on editor to load about::blank", false);}
dump("###ERROR WHILE LOADING MESSAGE COMPOSE: " + ex + "\n");
function ComposeLoad(){ AddMessageComposeOfflineObserver(); AddDirectoryServerObserver(true); if (msgComposeService) msgComposeService.TimeStamp("Start Initializing the compose window (ComposeLoad)", false); gComposeMsgsBundle = document.getElementById("bundle_composeMsgs"); try { SetupCommandUpdateHandlers(); var wizardcallback = true; var state = verifyAccounts(wizardcallback); // this will do migration, or create a new account if we need to. if (other_header != "") { var selectNode = document.getElementById('msgRecipientType#1'); selectNode = selectNode.childNodes[0]; var opt = document.createElement('menuitem'); opt.setAttribute("value", "addr_other"); opt.setAttribute("label", other_header + ":"); selectNode.appendChild(opt); } if(state) ComposeStartup(); } catch (ex) { dump("###ERROR WHILE LOADING MESSAGE COMPOSE: " + ex + "\n"); var errorTitle = gComposeMsgsBundle.getString("initErrorDlogTitle"); var errorMsg = gComposeMsgsBundle.getFormattedString("initErrorDlogMessage", [ex]); if (promptService) promptService.alert(window, errorTitle, errorMsg); else window.alert(errorMsg); if (msgCompose) msgCompose.CloseWindow(); else window.close(); return; } window.tryToClose=ComposeCanClose; if (msgComposeService) msgComposeService.TimeStamp("Done with the initialization (ComposeLoad). Waiting on editor to load about::blank", false);}
if (promptService) promptService.alert(window, errorTitle, errorMsg);
if (!gPromptService) { gPromptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(); gPromptService = gPromptService.QueryInterface(Components.interfaces.nsIPromptService); } if (gPromptService) gPromptService.alert(window, errorTitle, errorMsg);
function ComposeLoad(){ AddMessageComposeOfflineObserver(); AddDirectoryServerObserver(true); if (msgComposeService) msgComposeService.TimeStamp("Start Initializing the compose window (ComposeLoad)", false); gComposeMsgsBundle = document.getElementById("bundle_composeMsgs"); try { SetupCommandUpdateHandlers(); var wizardcallback = true; var state = verifyAccounts(wizardcallback); // this will do migration, or create a new account if we need to. if (other_header != "") { var selectNode = document.getElementById('msgRecipientType#1'); selectNode = selectNode.childNodes[0]; var opt = document.createElement('menuitem'); opt.setAttribute("value", "addr_other"); opt.setAttribute("label", other_header + ":"); selectNode.appendChild(opt); } if(state) ComposeStartup(); } catch (ex) { dump("###ERROR WHILE LOADING MESSAGE COMPOSE: " + ex + "\n"); var errorTitle = gComposeMsgsBundle.getString("initErrorDlogTitle"); var errorMsg = gComposeMsgsBundle.getFormattedString("initErrorDlogMessage", [ex]); if (promptService) promptService.alert(window, errorTitle, errorMsg); else window.alert(errorMsg); if (msgCompose) msgCompose.CloseWindow(); else window.close(); return; } window.tryToClose=ComposeCanClose; if (msgComposeService) msgComposeService.TimeStamp("Done with the initialization (ComposeLoad). Waiting on editor to load about::blank", false);}
window.tryToClose=ComposeCanClose; if (msgComposeService)
window.tryToClose=ComposeCanClose; if (DEBUG && msgComposeService)
function ComposeLoad(){ AddMessageComposeOfflineObserver(); AddDirectoryServerObserver(true); if (msgComposeService) msgComposeService.TimeStamp("Start Initializing the compose window (ComposeLoad)", false); gComposeMsgsBundle = document.getElementById("bundle_composeMsgs"); try { SetupCommandUpdateHandlers(); var wizardcallback = true; var state = verifyAccounts(wizardcallback); // this will do migration, or create a new account if we need to. if (other_header != "") { var selectNode = document.getElementById('msgRecipientType#1'); selectNode = selectNode.childNodes[0]; var opt = document.createElement('menuitem'); opt.setAttribute("value", "addr_other"); opt.setAttribute("label", other_header + ":"); selectNode.appendChild(opt); } if(state) ComposeStartup(); } catch (ex) { dump("###ERROR WHILE LOADING MESSAGE COMPOSE: " + ex + "\n"); var errorTitle = gComposeMsgsBundle.getString("initErrorDlogTitle"); var errorMsg = gComposeMsgsBundle.getFormattedString("initErrorDlogMessage", [ex]); if (promptService) promptService.alert(window, errorTitle, errorMsg); else window.alert(errorMsg); if (msgCompose) msgCompose.CloseWindow(); else window.close(); return; } window.tryToClose=ComposeCanClose; if (msgComposeService) msgComposeService.TimeStamp("Done with the initialization (ComposeLoad). Waiting on editor to load about::blank", false);}
AddMessageComposeOfflineObserver();
function ComposeLoad(){ if (msgComposeService) msgComposeService.TimeStamp("Start Initializing the compose window (ComposeLoad)", false); gComposeMsgsBundle = document.getElementById("bundle_composeMsgs"); try { SetupCommandUpdateHandlers(); var wizardcallback = true; var state = verifyAccounts(wizardcallback); // this will do migration, or create a new account if we need to. if (other_header != "") { var selectNode = document.getElementById('msgRecipientType#1'); selectNode = selectNode.childNodes[0]; var opt = document.createElement('menuitem'); opt.setAttribute("value", "addr_other"); opt.setAttribute("label", other_header + ":"); selectNode.appendChild(opt); } if(state) ComposeStartup(); } catch (ex) { dump("###ERROR WHILE LOADING MESSAGE COMPOSE: " + ex + "\n"); var errorTitle = gComposeMsgsBundle.getString("initErrorDlogTitle"); var errorMsg = gComposeMsgsBundle.getFormattedString("initErrorDlogMessage", [ex]); if (promptService) promptService.alert(window, errorTitle, errorMsg); else window.alert(errorMsg); if (msgCompose) msgCompose.CloseWindow(); else window.close(); return; } window.tryToClose=ComposeCanClose; if (msgComposeService) msgComposeService.TimeStamp("Done with the initialization (ComposeLoad). Waiting on editor to load about::blank", false);}
var errorMsg = gComposeMsgsBundle.getString("initErrorDlogMessage"); errorMsg = errorMsg.replace(/%1\$s/, ex);
var errorMsg = gComposeMsgsBundle.getFormattedString("initErrorDlogMessage", [ex]);
function ComposeLoad(){ if (msgComposeService) msgComposeService.TimeStamp("Start Initializing the compose window (ComposeLoad)", false); gComposeMsgsBundle = document.getElementById("bundle_composeMsgs"); try { SetupCommandUpdateHandlers(); var wizardcallback = true; var state = verifyAccounts(wizardcallback); // this will do migration, or create a new account if we need to. if (other_header != "") { var selectNode = document.getElementById('msgRecipientType#1'); selectNode = selectNode.childNodes[0]; var opt = document.createElement('menuitem'); opt.setAttribute("value", "addr_other"); opt.setAttribute("label", other_header + ":"); selectNode.appendChild(opt); } if(state) ComposeStartup(); } catch (ex) { dump("###ERROR WHILE LOADING MESSAGE COMPOSE: " + ex + "\n"); var errorTitle = gComposeMsgsBundle.getString("initErrorDlogTitle"); var errorMsg = gComposeMsgsBundle.getString("initErrorDlogMessage"); errorMsg = errorMsg.replace(/%1\$s/, ex); if (promptService) promptService.alert(window, errorTitle, errorMsg); else window.alert(errorMsg); if (msgCompose) msgCompose.CloseWindow(); else window.close(); return; } window.tryToClose=ComposeCanClose; if (msgComposeService) msgComposeService.TimeStamp("Done with the initialization (ComposeLoad). Waiting on editor to load about::blank", false);}
SetupCommandUpdateHandlers();
function ComposeLoad(){ dump("\nComposeLoad from XUL\n"); verifyAccounts(); // this will do migration, if we need to. var selectNode = document.getElementById('msgRecipientType#1'); if (other_header != "") { var opt = new Option(other_header + ":", "addr_other"); selectNode.add(opt, null); } // See if we got arguments. if ( window.arguments && window.arguments[0] != null ) { // Window was opened via window.openDialog. Copy argument // and perform compose initialization (as if we were // opened via toolkitCore's ShowWindowWithArgs). document.getElementById( "args" ).setAttribute( "value", window.arguments[0] ); ComposeStartup(); } window.tryToClose=ComposeCanClose;}
return NewMessageToSelectedAddresses(type, format, identity);
NewMessageToSelectedAddresses(type, format, identity);
function ComposeMessage(type, format, folder, messageArray) { var msgComposeType = Components.interfaces.nsIMsgCompType; var identity = null; var newsgroup = null; var server; //dump("ComposeMessage folder="+folder+"\n"); try { if(folder) { // get the incoming server associated with this uri server = folder.server; // if they hit new or reply and they are reading a newsgroup // turn this into a new post or a reply to group. if (!folder.isServer && server.type == "nntp" && type == msgComposeType.New) { type = msgComposeType.NewsPost; newsgroup = folder.folderURL; } identity = getIdentityForServer(server); // dump("identity = " + identity + "\n"); } } catch (ex) { dump("failed to get an identity to pre-select: " + ex + "\n"); } //dump("\nComposeMessage from XUL: " + identity + "\n"); var uri = null; if (! msgComposeService) { dump("### msgComposeService is invalid\n"); return; } if (type == msgComposeType.New) //new message { //dump("OpenComposeWindow with " + identity + "\n"); // if the addressbook sidebar panel is open and has focus, get // the selected addresses from it if (document.commandDispatcher.focusedWindow.document.documentElement.hasAttribute("selectedaddresses")) return NewMessageToSelectedAddresses(type, format, identity); msgComposeService.OpenComposeWindow(null, null, type, format, identity, msgWindow); return; } else if (type == msgComposeType.NewsPost) { //dump("OpenComposeWindow with " + identity + " and " + newsgroup + "\n"); msgComposeService.OpenComposeWindow(null, newsgroup, type, format, identity, msgWindow); return; } messenger.SetWindow(window, msgWindow); var object = null; if (messageArray && messageArray.length > 0) { uri = ""; for (var i = 0; i < messageArray.length && i < 8; i ++) { var messageUri = messageArray[i]; //dump("XXX messageUri in ComposeMessage = " + messageUri + "\n"); //dump('i = '+ i); //dump('\n'); if (type == msgComposeType.Reply || type == msgComposeType.ReplyAll || type == msgComposeType.ForwardInline || type == msgComposeType.ReplyToGroup || type == msgComposeType.ReplyToSender || type == msgComposeType.ReplyToSenderAndGroup || type == msgComposeType.Template || type == msgComposeType.Draft) { msgComposeService.OpenComposeWindow(null, messageUri, type, format, identity, msgWindow); } else { if (i) uri += "," uri += messageUri; } } if (type == msgComposeType.ForwardAsAttachment) { msgComposeService.OpenComposeWindow(null, uri, type, format, identity, msgWindow); } } else dump("### nodeList is invalid\n");}
msgComposeService.OpenComposeWindow(null, null, type, format, identity, msgWindow);
else msgComposeService.OpenComposeWindow(null, null, type, format, identity, msgWindow);
function ComposeMessage(type, format, folder, messageArray) { var msgComposeType = Components.interfaces.nsIMsgCompType; var identity = null; var newsgroup = null; var server; //dump("ComposeMessage folder="+folder+"\n"); try { if(folder) { // get the incoming server associated with this uri server = folder.server; // if they hit new or reply and they are reading a newsgroup // turn this into a new post or a reply to group. if (!folder.isServer && server.type == "nntp" && type == msgComposeType.New) { type = msgComposeType.NewsPost; newsgroup = folder.folderURL; } identity = getIdentityForServer(server); // dump("identity = " + identity + "\n"); } } catch (ex) { dump("failed to get an identity to pre-select: " + ex + "\n"); } //dump("\nComposeMessage from XUL: " + identity + "\n"); var uri = null; if (! msgComposeService) { dump("### msgComposeService is invalid\n"); return; } if (type == msgComposeType.New) //new message { //dump("OpenComposeWindow with " + identity + "\n"); // if the addressbook sidebar panel is open and has focus, get // the selected addresses from it if (document.commandDispatcher.focusedWindow.document.documentElement.hasAttribute("selectedaddresses")) return NewMessageToSelectedAddresses(type, format, identity); msgComposeService.OpenComposeWindow(null, null, type, format, identity, msgWindow); return; } else if (type == msgComposeType.NewsPost) { //dump("OpenComposeWindow with " + identity + " and " + newsgroup + "\n"); msgComposeService.OpenComposeWindow(null, newsgroup, type, format, identity, msgWindow); return; } messenger.SetWindow(window, msgWindow); var object = null; if (messageArray && messageArray.length > 0) { uri = ""; for (var i = 0; i < messageArray.length && i < 8; i ++) { var messageUri = messageArray[i]; //dump("XXX messageUri in ComposeMessage = " + messageUri + "\n"); //dump('i = '+ i); //dump('\n'); if (type == msgComposeType.Reply || type == msgComposeType.ReplyAll || type == msgComposeType.ForwardInline || type == msgComposeType.ReplyToGroup || type == msgComposeType.ReplyToSender || type == msgComposeType.ReplyToSenderAndGroup || type == msgComposeType.Template || type == msgComposeType.Draft) { msgComposeService.OpenComposeWindow(null, messageUri, type, format, identity, msgWindow); } else { if (i) uri += "," uri += messageUri; } } if (type == msgComposeType.ForwardAsAttachment) { msgComposeService.OpenComposeWindow(null, uri, type, format, identity, msgWindow); } } else dump("### nodeList is invalid\n");}
type == msgComposeType.ReplyToGroup || type == msgComposeType.ReplyToSenderAndGroup ||
type == msgComposeType.ReplyToGroup || type == msgComposeType.ReplyToSender || type == msgComposeType.ReplyToSenderAndGroup ||
function ComposeMessage(type, format, folder, messageArray) //type is a nsIMsgCompType and format is a nsIMsgCompFormat{ var msgComposeType = Components.interfaces.nsIMsgCompType; var identity = null; var newsgroup = null; var server; dump("ComposeMessage folder="+folder+"\n"); try { if(folder) { // get the incoming server associated with this uri server = folder.server; // if they hit new or reply and they are reading a newsgroup // turn this into a new post or a reply to group. if (server.type == "nntp") { if (type == msgComposeType.New) { type = msgComposeType.NewsPost; if (folder.isServer) newsgroup = ""; else newsgroup = server.hostName + "/" + folder.name; } } identity = getIdentityForServer(server); // dump("identity = " + identity + "\n"); } } catch (ex) { dump("failed to get an identity to pre-select: " + ex + "\n"); } dump("\nComposeMessage from XUL: " + identity + "\n"); var uri = null; if (! msgComposeService) { dump("### msgComposeService is invalid\n"); return; } if (type == msgComposeType.New) //new message { //dump("OpenComposeWindow with " + identity + "\n"); msgComposeService.OpenComposeWindow(null, null, type, format, identity); return; } else if (type == msgComposeType.NewsPost) { dump("OpenComposeWindow with " + identity + " and " + newsgroup + "\n"); msgComposeService.OpenComposeWindow(null, newsgroup, type, format, identity); return; } messenger.SetWindow(window, msgWindow); var object = null; if (messageArray && messageArray.length > 0) { uri = ""; for (var i = 0; i < messageArray.length && i < 8; i ++) { var messageResource = messageArray[i].QueryInterface(Components.interfaces.nsIRDFResource); var messageUri = messageResource.Value; dump('i = '+ i); dump('\n'); if (type == msgComposeType.Reply || type == msgComposeType.ReplyAll || type == msgComposeType.ForwardInline || type == msgComposeType.ReplyToGroup || type == msgComposeType.ReplyToSenderAndGroup || type == msgComposeType.Template || type == msgComposeType.Draft) { msgComposeService.OpenComposeWindow(null, messageUri, type, format, identity); } else { if (i) uri += "," uri += messageUri; } } if (type == msgComposeType.ForwardAsAttachment) { msgComposeService.OpenComposeWindow(null, uri, type, format, identity); } } else dump("### nodeList is invalid\n");}
newsgroup = server.hostName + "/" + folder.name;
newsgroup = folder.folderURL;
function ComposeMessage(type, format, folder, messageArray) { var msgComposeType = Components.interfaces.nsIMsgCompType; var identity = null; var newsgroup = null; var server; //dump("ComposeMessage folder="+folder+"\n"); try { if(folder) { // get the incoming server associated with this uri server = folder.server; // if they hit new or reply and they are reading a newsgroup // turn this into a new post or a reply to group. if (!folder.isServer && server.type == "nntp" && type == msgComposeType.New) { type = msgComposeType.NewsPost; newsgroup = server.hostName + "/" + folder.name; } identity = getIdentityForServer(server); // dump("identity = " + identity + "\n"); } } catch (ex) { dump("failed to get an identity to pre-select: " + ex + "\n"); } //dump("\nComposeMessage from XUL: " + identity + "\n"); var uri = null; if (! msgComposeService) { dump("### msgComposeService is invalid\n"); return; } if (type == msgComposeType.New) //new message { //dump("OpenComposeWindow with " + identity + "\n"); msgComposeService.OpenComposeWindow(null, null, type, format, identity, msgWindow); return; } else if (type == msgComposeType.NewsPost) { //dump("OpenComposeWindow with " + identity + " and " + newsgroup + "\n"); msgComposeService.OpenComposeWindow(null, newsgroup, type, format, identity, msgWindow); return; } messenger.SetWindow(window, msgWindow); var object = null; if (messageArray && messageArray.length > 0) { uri = ""; for (var i = 0; i < messageArray.length && i < 8; i ++) { var messageUri = messageArray[i]; //dump("XXX messageUri in ComposeMessage = " + messageUri + "\n"); //dump('i = '+ i); //dump('\n'); if (type == msgComposeType.Reply || type == msgComposeType.ReplyAll || type == msgComposeType.ForwardInline || type == msgComposeType.ReplyToGroup || type == msgComposeType.ReplyToSender || type == msgComposeType.ReplyToSenderAndGroup || type == msgComposeType.Template || type == msgComposeType.Draft) { msgComposeService.OpenComposeWindow(null, messageUri, type, format, identity, msgWindow); } else { if (i) uri += "," uri += messageUri; } } if (type == msgComposeType.ForwardAsAttachment) { msgComposeService.OpenComposeWindow(null, uri, type, format, identity, msgWindow); } } else dump("### nodeList is invalid\n");}
server = folder.server;
function ComposeMessage(type, format, folder, messageArray) //type is a nsIMsgCompType and format is a nsIMsgCompFormat{ var msgComposeType = Components.interfaces.nsIMsgCompType; var identity = null; var newsgroup = null; var server; dump("ComposeMessage folder="+folder+"\n"); try { server = folder.server; if(folder) { // get the incoming server associated with this uri var server = folder.server; // if they hit new or reply and they are reading a newsgroup // turn this into a new post or a reply to group. if (server.type == "nntp") { if (type == msgComposeType.Reply) type = msgComposeType.ReplyToGroup; else if (type == msgComposeType.New) { type = msgComposeType.NewsPost; if (folder.isServer) newsgroup = ""; else newsgroup = folder.name; } } } identity = getIdentityForServer(server); // dump("identity = " + identity + "\n"); } catch (ex) { dump("failed to get an identity to pre-select: " + ex + "\n"); } dump("\nComposeMessage from XUL: " + identity + "\n"); var uri = null; if (! msgComposeService) { dump("### msgComposeService is invalid\n"); return; } if (type == msgComposeType.New) //new message { //dump("OpenComposeWindow with " + identity + "\n"); msgComposeService.OpenComposeWindow(null, null, type, format, identity); return; } else if (type == msgComposeType.NewsPost) { dump("OpenComposeWindow with " + identity + " and " + newsgroup + "\n"); msgComposeService.OpenComposeWindow(null, newsgroup, type, format, identity); return; } messenger.SetWindow(window, msgWindow); var object = null; if (messageArray && messageArray.length > 0) { uri = ""; for (var i = 0; i < messageArray.length && i < 8; i ++) { var messageResource = messageArray[i].QueryInterface(Components.interfaces.nsIRDFResource); var messageUri = messageResource.Value; dump('i = '+ i); dump('\n'); if (type == msgComposeType.Reply || type == msgComposeType.ReplyAll || type == msgComposeType.ForwardInline || type == msgComposeType.ReplyToGroup || type == msgComposeType.ReplyToSenderAndGroup || type == msgComposeType.Template || type == msgComposeType.Draft) { msgComposeService.OpenComposeWindow(null, messageUri, type, format, identity); } else { if (i) uri += "," uri += messageUri; } } if (type == msgComposeType.ForwardAsAttachment) { msgComposeService.OpenComposeWindow(null, uri, type, format, identity); } } else dump("### nodeList is invalid\n");}
var server = folder.server;
server = folder.server;
function ComposeMessage(type, format, folder, messageArray) //type is a nsIMsgCompType and format is a nsIMsgCompFormat{ var msgComposeType = Components.interfaces.nsIMsgCompType; var identity = null; var newsgroup = null; var server; dump("ComposeMessage folder="+folder+"\n"); try { server = folder.server; if(folder) { // get the incoming server associated with this uri var server = folder.server; // if they hit new or reply and they are reading a newsgroup // turn this into a new post or a reply to group. if (server.type == "nntp") { if (type == msgComposeType.Reply) type = msgComposeType.ReplyToGroup; else if (type == msgComposeType.New) { type = msgComposeType.NewsPost; if (folder.isServer) newsgroup = ""; else newsgroup = folder.name; } } } identity = getIdentityForServer(server); // dump("identity = " + identity + "\n"); } catch (ex) { dump("failed to get an identity to pre-select: " + ex + "\n"); } dump("\nComposeMessage from XUL: " + identity + "\n"); var uri = null; if (! msgComposeService) { dump("### msgComposeService is invalid\n"); return; } if (type == msgComposeType.New) //new message { //dump("OpenComposeWindow with " + identity + "\n"); msgComposeService.OpenComposeWindow(null, null, type, format, identity); return; } else if (type == msgComposeType.NewsPost) { dump("OpenComposeWindow with " + identity + " and " + newsgroup + "\n"); msgComposeService.OpenComposeWindow(null, newsgroup, type, format, identity); return; } messenger.SetWindow(window, msgWindow); var object = null; if (messageArray && messageArray.length > 0) { uri = ""; for (var i = 0; i < messageArray.length && i < 8; i ++) { var messageResource = messageArray[i].QueryInterface(Components.interfaces.nsIRDFResource); var messageUri = messageResource.Value; dump('i = '+ i); dump('\n'); if (type == msgComposeType.Reply || type == msgComposeType.ReplyAll || type == msgComposeType.ForwardInline || type == msgComposeType.ReplyToGroup || type == msgComposeType.ReplyToSenderAndGroup || type == msgComposeType.Template || type == msgComposeType.Draft) { msgComposeService.OpenComposeWindow(null, messageUri, type, format, identity); } else { if (i) uri += "," uri += messageUri; } } if (type == msgComposeType.ForwardAsAttachment) { msgComposeService.OpenComposeWindow(null, uri, type, format, identity); } } else dump("### nodeList is invalid\n");}
identity = getIdentityForServer(server);
function ComposeMessage(type, format, folder, messageArray) //type is a nsIMsgCompType and format is a nsIMsgCompFormat{ var msgComposeType = Components.interfaces.nsIMsgCompType; var identity = null; var newsgroup = null; var server; dump("ComposeMessage folder="+folder+"\n"); try { server = folder.server; if(folder) { // get the incoming server associated with this uri var server = folder.server; // if they hit new or reply and they are reading a newsgroup // turn this into a new post or a reply to group. if (server.type == "nntp") { if (type == msgComposeType.Reply) type = msgComposeType.ReplyToGroup; else if (type == msgComposeType.New) { type = msgComposeType.NewsPost; if (folder.isServer) newsgroup = ""; else newsgroup = folder.name; } } } identity = getIdentityForServer(server); // dump("identity = " + identity + "\n"); } catch (ex) { dump("failed to get an identity to pre-select: " + ex + "\n"); } dump("\nComposeMessage from XUL: " + identity + "\n"); var uri = null; if (! msgComposeService) { dump("### msgComposeService is invalid\n"); return; } if (type == msgComposeType.New) //new message { //dump("OpenComposeWindow with " + identity + "\n"); msgComposeService.OpenComposeWindow(null, null, type, format, identity); return; } else if (type == msgComposeType.NewsPost) { dump("OpenComposeWindow with " + identity + " and " + newsgroup + "\n"); msgComposeService.OpenComposeWindow(null, newsgroup, type, format, identity); return; } messenger.SetWindow(window, msgWindow); var object = null; if (messageArray && messageArray.length > 0) { uri = ""; for (var i = 0; i < messageArray.length && i < 8; i ++) { var messageResource = messageArray[i].QueryInterface(Components.interfaces.nsIRDFResource); var messageUri = messageResource.Value; dump('i = '+ i); dump('\n'); if (type == msgComposeType.Reply || type == msgComposeType.ReplyAll || type == msgComposeType.ForwardInline || type == msgComposeType.ReplyToGroup || type == msgComposeType.ReplyToSenderAndGroup || type == msgComposeType.Template || type == msgComposeType.Draft) { msgComposeService.OpenComposeWindow(null, messageUri, type, format, identity); } else { if (i) uri += "," uri += messageUri; } } if (type == msgComposeType.ForwardAsAttachment) { msgComposeService.OpenComposeWindow(null, uri, type, format, identity); } } else dump("### nodeList is invalid\n");}
}
ComposeProcessDone: function(aResult) { gWindowLocked = false; CommandUpdate_MsgCompose(); enableEditableFields(); if (aResult== Components.results.NS_OK) { SetContentAndBodyAsUnmodified(); if (gCloseWindowAfterSave) MsgComposeCloseWindow(true); } gCloseWindowAfterSave = false; },
dump("\n RECEIVE ComposeProcessDone\n\n"); windowLocked = false; CommandUpdate_MsgCompose();
dump("\n RECEIVE ComposeProcessDone\n\n"); windowLocked = false; CommandUpdate_MsgCompose(); enableEditableFields();
ComposeProcessDone: function(aResult) { dump("\n RECEIVE ComposeProcessDone\n\n"); windowLocked = false; CommandUpdate_MsgCompose(); if (aResult== Components.results.NS_OK) { contentChanged = false; msgCompose.bodyModified = false; } },
var pref = Components.classes['@mozilla.org/preferences;1'];
var pref = Components.classes['@mozilla.org/preferences-service;1'];
function ComposerSelectDetector(event){ //dump("Charset Detector menu item pressed: " + event.target.getAttribute('id') + "\n"); var uri = event.target.getAttribute("id"); var prefvalue = uri.substring('chardet.'.length, uri.length); if("off" == prefvalue) { // "off" is special value to turn off the detectors prefvalue = ""; } var pref = Components.classes['@mozilla.org/preferences;1']; if (pref) { pref = pref.getService(); pref = pref.QueryInterface(Components.interfaces.nsIPref); } if (pref) { pref.SetCharPref("intl.charset.detector", prefvalue); editorShell.LoadUrl(editorShell.editorDocument.location); }}