rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 15
136k
|
---|---|---|
gNameField.setAttribute('value',""); | gNameField.value = ""; | function SetUpTree(forceToServer){ //dump("SetUpTree()\n"); gStatusBar = document.getElementById('statusbar-icon'); if (!gServerURI) return; var folder = GetMsgFolderFromUri(gServerURI, true); var server = folder.server; try { CleanUpSearchView(); gSubscribableServer = server.QueryInterface(Components.interfaces.nsISubscribableServer); gSubscribeTree.setAttribute('ref',null); // enable (or disable) the search related UI EnableSearchUI(); // clear out the text field when switching server gNameField.setAttribute('value',""); // since there is no text, switch to the non-search view... SwitchToNormalView(); gSubscribeTree.database.RemoveDataSource(subscribeDS); gSubscribableServer.subscribeListener = MySubscribeListener; gStatusFeedback.showProgress(0); gStatusFeedback.showStatusString(gSubscribeBundle.getString("pleaseWaitString")); gStatusBar.setAttribute("mode","undetermined"); gSubscribableServer.startPopulating(msgWindow, forceToServer); } catch (ex) { //dump("failed to populate subscribe ds: " + ex + "\n"); }} |
function setValue(id, val) | DWRUtil.setValue = function(id, val) | function setValue(id, val){ if (val == null) { val = ""; } var ele = document.getElementById(id); if (ele == null) { alert("Element id: "+id+" not found."); throw id; } if (isHTMLSelectElement(ele)) { // search through the values var found = false; for (var i = 0; i < ele.options.length; i++) { if (ele.options[i].value == val) { ele.options[i].selected = true; found = true; } else { ele.options[i].selected = false; } } // If that fails then try searching through the visible text if (found) { return; } for (var i = 0; i < ele.options.length; i++) { if (ele.options[i].text == val) { ele.options[i].selected = true; break; } } return; } if (isHTMLInputElement(ele)) { switch (ele.type) { case "check-box": case "radio": ele.checked = (val == true); return; case "hidden": case "text": ele.value = val; return; default: alert("Not sure how to setValue on a input element of type " + ele.type); ele.value = val; return; } } if (isHTMLTextAreaElement(ele)) { ele.value = val; return; } if (isHTMLElement(ele)) { ele.innerHTML = val; return; } alert("Not sure how to setValue on a " + ele); ele.innerHTML = val;} |
alert("Element id: "+id+" not found."); | alert("setValue() can't find an element with id: " + id + "."); | function setValue(id, val){ if (val == null) { val = ""; } var ele = document.getElementById(id); if (ele == null) { alert("Element id: "+id+" not found."); throw id; } if (isHTMLSelectElement(ele)) { // search through the values var found = false; for (var i = 0; i < ele.options.length; i++) { if (ele.options[i].value == val) { ele.options[i].selected = true; found = true; } else { ele.options[i].selected = false; } } // If that fails then try searching through the visible text if (found) { return; } for (var i = 0; i < ele.options.length; i++) { if (ele.options[i].text == val) { ele.options[i].selected = true; break; } } return; } if (isHTMLInputElement(ele)) { switch (ele.type) { case "check-box": case "radio": ele.checked = (val == true); return; case "hidden": case "text": ele.value = val; return; default: alert("Not sure how to setValue on a input element of type " + ele.type); ele.value = val; return; } } if (isHTMLTextAreaElement(ele)) { ele.value = val; return; } if (isHTMLElement(ele)) { ele.innerHTML = val; return; } alert("Not sure how to setValue on a " + ele); ele.innerHTML = val;} |
if (isHTMLSelectElement(ele)) | if (DWRUtil.isHTMLSelectElement(ele)) | function setValue(id, val){ if (val == null) { val = ""; } var ele = document.getElementById(id); if (ele == null) { alert("Element id: "+id+" not found."); throw id; } if (isHTMLSelectElement(ele)) { // search through the values var found = false; for (var i = 0; i < ele.options.length; i++) { if (ele.options[i].value == val) { ele.options[i].selected = true; found = true; } else { ele.options[i].selected = false; } } // If that fails then try searching through the visible text if (found) { return; } for (var i = 0; i < ele.options.length; i++) { if (ele.options[i].text == val) { ele.options[i].selected = true; break; } } return; } if (isHTMLInputElement(ele)) { switch (ele.type) { case "check-box": case "radio": ele.checked = (val == true); return; case "hidden": case "text": ele.value = val; return; default: alert("Not sure how to setValue on a input element of type " + ele.type); ele.value = val; return; } } if (isHTMLTextAreaElement(ele)) { ele.value = val; return; } if (isHTMLElement(ele)) { ele.innerHTML = val; return; } alert("Not sure how to setValue on a " + ele); ele.innerHTML = val;} |
if (isHTMLInputElement(ele)) | if (DWRUtil.isHTMLInputElement(ele)) | function setValue(id, val){ if (val == null) { val = ""; } var ele = document.getElementById(id); if (ele == null) { alert("Element id: "+id+" not found."); throw id; } if (isHTMLSelectElement(ele)) { // search through the values var found = false; for (var i = 0; i < ele.options.length; i++) { if (ele.options[i].value == val) { ele.options[i].selected = true; found = true; } else { ele.options[i].selected = false; } } // If that fails then try searching through the visible text if (found) { return; } for (var i = 0; i < ele.options.length; i++) { if (ele.options[i].text == val) { ele.options[i].selected = true; break; } } return; } if (isHTMLInputElement(ele)) { switch (ele.type) { case "check-box": case "radio": ele.checked = (val == true); return; case "hidden": case "text": ele.value = val; return; default: alert("Not sure how to setValue on a input element of type " + ele.type); ele.value = val; return; } } if (isHTMLTextAreaElement(ele)) { ele.value = val; return; } if (isHTMLElement(ele)) { ele.innerHTML = val; return; } alert("Not sure how to setValue on a " + ele); ele.innerHTML = val;} |
if (isHTMLTextAreaElement(ele)) | if (DWRUtil.isHTMLTextAreaElement(ele)) | function setValue(id, val){ if (val == null) { val = ""; } var ele = document.getElementById(id); if (ele == null) { alert("Element id: "+id+" not found."); throw id; } if (isHTMLSelectElement(ele)) { // search through the values var found = false; for (var i = 0; i < ele.options.length; i++) { if (ele.options[i].value == val) { ele.options[i].selected = true; found = true; } else { ele.options[i].selected = false; } } // If that fails then try searching through the visible text if (found) { return; } for (var i = 0; i < ele.options.length; i++) { if (ele.options[i].text == val) { ele.options[i].selected = true; break; } } return; } if (isHTMLInputElement(ele)) { switch (ele.type) { case "check-box": case "radio": ele.checked = (val == true); return; case "hidden": case "text": ele.value = val; return; default: alert("Not sure how to setValue on a input element of type " + ele.type); ele.value = val; return; } } if (isHTMLTextAreaElement(ele)) { ele.value = val; return; } if (isHTMLElement(ele)) { ele.innerHTML = val; return; } alert("Not sure how to setValue on a " + ele); ele.innerHTML = val;} |
if (isHTMLElement(ele)) | if (DWRUtil.isHTMLElement(ele)) | function setValue(id, val){ if (val == null) { val = ""; } var ele = document.getElementById(id); if (ele == null) { alert("Element id: "+id+" not found."); throw id; } if (isHTMLSelectElement(ele)) { // search through the values var found = false; for (var i = 0; i < ele.options.length; i++) { if (ele.options[i].value == val) { ele.options[i].selected = true; found = true; } else { ele.options[i].selected = false; } } // If that fails then try searching through the visible text if (found) { return; } for (var i = 0; i < ele.options.length; i++) { if (ele.options[i].text == val) { ele.options[i].selected = true; break; } } return; } if (isHTMLInputElement(ele)) { switch (ele.type) { case "check-box": case "radio": ele.checked = (val == true); return; case "hidden": case "text": ele.value = val; return; default: alert("Not sure how to setValue on a input element of type " + ele.type); ele.value = val; return; } } if (isHTMLTextAreaElement(ele)) { ele.value = val; return; } if (isHTMLElement(ele)) { ele.innerHTML = val; return; } alert("Not sure how to setValue on a " + ele); ele.innerHTML = val;} |
if (options.useHtml ) | dwr.util.setValue = function(ele, val, options) { if (val == null) val = ""; if (options == null) options = {}; if (options.useHtml ) if (options.escapeHtml) { val = dwr.util.addEntities(val); } var orig = ele; var nodes, node, i; ele = dwr.util.byId(ele); // We can work with names and need to sometimes for radio buttons if (ele == null) { nodes = document.getElementsByName(orig); if (nodes.length >= 1) ele = nodes.item(0); } if (ele == null) { dwr.util._debug("setValue() can't find an element with id/name: " + orig + "."); return; } // All paths now lead to some update so we highlight a change dwr.util.highlight(ele, options); if (dwr.util._isHTMLElement(ele, "select")) { if (ele.type == "select-multiple" && dwr.util._isArray(val)) dwr.util._selectListItems(ele, val); else dwr.util._selectListItem(ele, val); return; } if (dwr.util._isHTMLElement(ele, "input")) { if (ele.type == "radio") { // Some browsers match names when looking for ids, so check names anyway. if (nodes == null) nodes = document.getElementsByName(orig); if (nodes != null && nodes.length > 1) { for (i = 0; i < nodes.length; i++) { node = nodes.item(i); if (node.type == "radio") node.checked = (node.value == val); } } else ele.checked = (val == true); } else if (ele.type == "checkbox") ele.checked = val; else ele.value = val; return; } if (dwr.util._isHTMLElement(ele, "textarea")) { ele.value = val; return; } // If the value to be set is a DOM object then we try importing the node // rather than serializing it out if (val.nodeType) { if (val.nodeType == 9 /*Node.DOCUMENT_NODE*/) val = val.documentElement; val = dwr.util._importNode(ele.ownerDocument, val, true); ele.appendChild(val); return; } // Fall back to innerHTML ele.innerHTML = val;}; |
|
if (options != null) { if (options.escapeHtml) { val = val.replace(/&/, "&"); val = val.replace(/'/, "'"); val = val.replace(/</, "<"); val = val.replace(/>/, ">"); } | if (options == null) options = {}; if (options.escapeHtml) { val = val.replace(/&/, "&"); val = val.replace(/'/, "'"); val = val.replace(/</, "<"); val = val.replace(/>/, ">"); | DWRUtil.setValue = function(ele, val, options) { if (val == null) val = ""; if (options != null) { if (options.escapeHtml) { val = val.replace(/&/, "&"); val = val.replace(/'/, "'"); val = val.replace(/</, "<"); val = val.replace(/>/, ">"); } } var orig = ele; var nodes, node, i; ele = $(ele); // We can work with names and need to sometimes for radio buttons if (ele == null) { nodes = document.getElementsByName(orig); if (nodes.length >= 1) { ele = nodes.item(0); } } if (ele == null) { DWRUtil.debug("setValue() can't find an element with id/name: " + orig + "."); return; } if (DWRUtil._isHTMLElement(ele, "select")) { if (ele.type == "select-multiple" && DWRUtil._isArray(val)) { DWRUtil._selectListItems(ele, val); } else { DWRUtil._selectListItem(ele, val); } return; } if (DWRUtil._isHTMLElement(ele, "input")) { if (ele.type == "radio") { // Some browsers match names when looking for ids, so check names anyway. if (nodes == null) nodes = document.getElementsByName(orig); if (nodes != null && nodes.length > 1) { for (i = 0; i < nodes.length; i++) { node = nodes.item(i); if (node.type == "radio") { node.checked = (node.value == val); } } } else { ele.checked = (val == true); } } else if (ele.type == "checkbox") { ele.checked = val; } else { ele.value = val; } return; } if (DWRUtil._isHTMLElement(ele, "textarea")) { ele.value = val; return; } // If the value to be set is a DOM object then we try importing the node // rather than serializing it out if (val.nodeType) { if (val.nodeType == 9 /*Node.DOCUMENT_NODE*/) { val = val.documentElement; } val = DWRUtil._importNode(ele.ownerDocument, val, true); ele.appendChild(val); return; } // Fall back to innerHTML ele.innerHTML = val;}; |
ele = $(ele); | DWRUtil.setValue = function(ele, val, options) { if (val == null) val = ""; if (options != null) { if (options.escapeHtml) { val = val.replace(/&/, "&"); val = val.replace(/'/, "'"); val = val.replace(/</, "<"); val = val.replace(/>/, ">"); } } var orig = ele; var nodes, node, i; ele = $(ele); // We can work with names and need to sometimes for radio buttons if (ele == null) { nodes = document.getElementsByName(orig); if (nodes.length >= 1) { ele = nodes.item(0); } } if (ele == null) { DWRUtil.debug("setValue() can't find an element with id/name: " + orig + "."); return; } if (DWRUtil._isHTMLElement(ele, "select")) { if (ele.type == "select-multiple" && DWRUtil._isArray(val)) { DWRUtil._selectListItems(ele, val); } else { DWRUtil._selectListItem(ele, val); } return; } if (DWRUtil._isHTMLElement(ele, "input")) { if (ele.type == "radio") { // Some browsers match names when looking for ids, so check names anyway. if (nodes == null) nodes = document.getElementsByName(orig); if (nodes != null && nodes.length > 1) { for (i = 0; i < nodes.length; i++) { node = nodes.item(i); if (node.type == "radio") { node.checked = (node.value == val); } } } else { ele.checked = (val == true); } } else if (ele.type == "checkbox") { ele.checked = val; } else { ele.value = val; } return; } if (DWRUtil._isHTMLElement(ele, "textarea")) { ele.value = val; return; } // If the value to be set is a DOM object then we try importing the node // rather than serializing it out if (val.nodeType) { if (val.nodeType == 9 /*Node.DOCUMENT_NODE*/) { val = val.documentElement; } val = DWRUtil._importNode(ele.ownerDocument, val, true); ele.appendChild(val); return; } // Fall back to innerHTML ele.innerHTML = val;}; |
|
if (nodes.length >= 1) { ele = nodes.item(0); } | if (nodes.length >= 1) ele = nodes.item(0); | DWRUtil.setValue = function(ele, val, options) { if (val == null) val = ""; if (options != null) { if (options.escapeHtml) { val = val.replace(/&/, "&"); val = val.replace(/'/, "'"); val = val.replace(/</, "<"); val = val.replace(/>/, ">"); } } var orig = ele; var nodes, node, i; ele = $(ele); // We can work with names and need to sometimes for radio buttons if (ele == null) { nodes = document.getElementsByName(orig); if (nodes.length >= 1) { ele = nodes.item(0); } } if (ele == null) { DWRUtil.debug("setValue() can't find an element with id/name: " + orig + "."); return; } if (DWRUtil._isHTMLElement(ele, "select")) { if (ele.type == "select-multiple" && DWRUtil._isArray(val)) { DWRUtil._selectListItems(ele, val); } else { DWRUtil._selectListItem(ele, val); } return; } if (DWRUtil._isHTMLElement(ele, "input")) { if (ele.type == "radio") { // Some browsers match names when looking for ids, so check names anyway. if (nodes == null) nodes = document.getElementsByName(orig); if (nodes != null && nodes.length > 1) { for (i = 0; i < nodes.length; i++) { node = nodes.item(i); if (node.type == "radio") { node.checked = (node.value == val); } } } else { ele.checked = (val == true); } } else if (ele.type == "checkbox") { ele.checked = val; } else { ele.value = val; } return; } if (DWRUtil._isHTMLElement(ele, "textarea")) { ele.value = val; return; } // If the value to be set is a DOM object then we try importing the node // rather than serializing it out if (val.nodeType) { if (val.nodeType == 9 /*Node.DOCUMENT_NODE*/) { val = val.documentElement; } val = DWRUtil._importNode(ele.ownerDocument, val, true); ele.appendChild(val); return; } // Fall back to innerHTML ele.innerHTML = val;}; |
if (ele.type == "select-multiple" && DWRUtil._isArray(val)) { DWRUtil._selectListItems(ele, val); } else { DWRUtil._selectListItem(ele, val); } | if (ele.type == "select-multiple" && DWRUtil._isArray(val)) DWRUtil._selectListItems(ele, val); else DWRUtil._selectListItem(ele, val); | DWRUtil.setValue = function(ele, val, options) { if (val == null) val = ""; if (options != null) { if (options.escapeHtml) { val = val.replace(/&/, "&"); val = val.replace(/'/, "'"); val = val.replace(/</, "<"); val = val.replace(/>/, ">"); } } var orig = ele; var nodes, node, i; ele = $(ele); // We can work with names and need to sometimes for radio buttons if (ele == null) { nodes = document.getElementsByName(orig); if (nodes.length >= 1) { ele = nodes.item(0); } } if (ele == null) { DWRUtil.debug("setValue() can't find an element with id/name: " + orig + "."); return; } if (DWRUtil._isHTMLElement(ele, "select")) { if (ele.type == "select-multiple" && DWRUtil._isArray(val)) { DWRUtil._selectListItems(ele, val); } else { DWRUtil._selectListItem(ele, val); } return; } if (DWRUtil._isHTMLElement(ele, "input")) { if (ele.type == "radio") { // Some browsers match names when looking for ids, so check names anyway. if (nodes == null) nodes = document.getElementsByName(orig); if (nodes != null && nodes.length > 1) { for (i = 0; i < nodes.length; i++) { node = nodes.item(i); if (node.type == "radio") { node.checked = (node.value == val); } } } else { ele.checked = (val == true); } } else if (ele.type == "checkbox") { ele.checked = val; } else { ele.value = val; } return; } if (DWRUtil._isHTMLElement(ele, "textarea")) { ele.value = val; return; } // If the value to be set is a DOM object then we try importing the node // rather than serializing it out if (val.nodeType) { if (val.nodeType == 9 /*Node.DOCUMENT_NODE*/) { val = val.documentElement; } val = DWRUtil._importNode(ele.ownerDocument, val, true); ele.appendChild(val); return; } // Fall back to innerHTML ele.innerHTML = val;}; |
if (node.type == "radio") { node.checked = (node.value == val); } | if (node.type == "radio") node.checked = (node.value == val); | DWRUtil.setValue = function(ele, val, options) { if (val == null) val = ""; if (options != null) { if (options.escapeHtml) { val = val.replace(/&/, "&"); val = val.replace(/'/, "'"); val = val.replace(/</, "<"); val = val.replace(/>/, ">"); } } var orig = ele; var nodes, node, i; ele = $(ele); // We can work with names and need to sometimes for radio buttons if (ele == null) { nodes = document.getElementsByName(orig); if (nodes.length >= 1) { ele = nodes.item(0); } } if (ele == null) { DWRUtil.debug("setValue() can't find an element with id/name: " + orig + "."); return; } if (DWRUtil._isHTMLElement(ele, "select")) { if (ele.type == "select-multiple" && DWRUtil._isArray(val)) { DWRUtil._selectListItems(ele, val); } else { DWRUtil._selectListItem(ele, val); } return; } if (DWRUtil._isHTMLElement(ele, "input")) { if (ele.type == "radio") { // Some browsers match names when looking for ids, so check names anyway. if (nodes == null) nodes = document.getElementsByName(orig); if (nodes != null && nodes.length > 1) { for (i = 0; i < nodes.length; i++) { node = nodes.item(i); if (node.type == "radio") { node.checked = (node.value == val); } } } else { ele.checked = (val == true); } } else if (ele.type == "checkbox") { ele.checked = val; } else { ele.value = val; } return; } if (DWRUtil._isHTMLElement(ele, "textarea")) { ele.value = val; return; } // If the value to be set is a DOM object then we try importing the node // rather than serializing it out if (val.nodeType) { if (val.nodeType == 9 /*Node.DOCUMENT_NODE*/) { val = val.documentElement; } val = DWRUtil._importNode(ele.ownerDocument, val, true); ele.appendChild(val); return; } // Fall back to innerHTML ele.innerHTML = val;}; |
else { ele.checked = (val == true); } | else ele.checked = (val == true); | DWRUtil.setValue = function(ele, val, options) { if (val == null) val = ""; if (options != null) { if (options.escapeHtml) { val = val.replace(/&/, "&"); val = val.replace(/'/, "'"); val = val.replace(/</, "<"); val = val.replace(/>/, ">"); } } var orig = ele; var nodes, node, i; ele = $(ele); // We can work with names and need to sometimes for radio buttons if (ele == null) { nodes = document.getElementsByName(orig); if (nodes.length >= 1) { ele = nodes.item(0); } } if (ele == null) { DWRUtil.debug("setValue() can't find an element with id/name: " + orig + "."); return; } if (DWRUtil._isHTMLElement(ele, "select")) { if (ele.type == "select-multiple" && DWRUtil._isArray(val)) { DWRUtil._selectListItems(ele, val); } else { DWRUtil._selectListItem(ele, val); } return; } if (DWRUtil._isHTMLElement(ele, "input")) { if (ele.type == "radio") { // Some browsers match names when looking for ids, so check names anyway. if (nodes == null) nodes = document.getElementsByName(orig); if (nodes != null && nodes.length > 1) { for (i = 0; i < nodes.length; i++) { node = nodes.item(i); if (node.type == "radio") { node.checked = (node.value == val); } } } else { ele.checked = (val == true); } } else if (ele.type == "checkbox") { ele.checked = val; } else { ele.value = val; } return; } if (DWRUtil._isHTMLElement(ele, "textarea")) { ele.value = val; return; } // If the value to be set is a DOM object then we try importing the node // rather than serializing it out if (val.nodeType) { if (val.nodeType == 9 /*Node.DOCUMENT_NODE*/) { val = val.documentElement; } val = DWRUtil._importNode(ele.ownerDocument, val, true); ele.appendChild(val); return; } // Fall back to innerHTML ele.innerHTML = val;}; |
else if (ele.type == "checkbox") { ele.checked = val; } else { ele.value = val; } | else if (ele.type == "checkbox") ele.checked = val; else ele.value = val; | DWRUtil.setValue = function(ele, val, options) { if (val == null) val = ""; if (options != null) { if (options.escapeHtml) { val = val.replace(/&/, "&"); val = val.replace(/'/, "'"); val = val.replace(/</, "<"); val = val.replace(/>/, ">"); } } var orig = ele; var nodes, node, i; ele = $(ele); // We can work with names and need to sometimes for radio buttons if (ele == null) { nodes = document.getElementsByName(orig); if (nodes.length >= 1) { ele = nodes.item(0); } } if (ele == null) { DWRUtil.debug("setValue() can't find an element with id/name: " + orig + "."); return; } if (DWRUtil._isHTMLElement(ele, "select")) { if (ele.type == "select-multiple" && DWRUtil._isArray(val)) { DWRUtil._selectListItems(ele, val); } else { DWRUtil._selectListItem(ele, val); } return; } if (DWRUtil._isHTMLElement(ele, "input")) { if (ele.type == "radio") { // Some browsers match names when looking for ids, so check names anyway. if (nodes == null) nodes = document.getElementsByName(orig); if (nodes != null && nodes.length > 1) { for (i = 0; i < nodes.length; i++) { node = nodes.item(i); if (node.type == "radio") { node.checked = (node.value == val); } } } else { ele.checked = (val == true); } } else if (ele.type == "checkbox") { ele.checked = val; } else { ele.value = val; } return; } if (DWRUtil._isHTMLElement(ele, "textarea")) { ele.value = val; return; } // If the value to be set is a DOM object then we try importing the node // rather than serializing it out if (val.nodeType) { if (val.nodeType == 9 /*Node.DOCUMENT_NODE*/) { val = val.documentElement; } val = DWRUtil._importNode(ele.ownerDocument, val, true); ele.appendChild(val); return; } // Fall back to innerHTML ele.innerHTML = val;}; |
if (val.nodeType == 9 ) { val = val.documentElement; } | if (val.nodeType == 9 ) val = val.documentElement; | DWRUtil.setValue = function(ele, val, options) { if (val == null) val = ""; if (options != null) { if (options.escapeHtml) { val = val.replace(/&/, "&"); val = val.replace(/'/, "'"); val = val.replace(/</, "<"); val = val.replace(/>/, ">"); } } var orig = ele; var nodes, node, i; ele = $(ele); // We can work with names and need to sometimes for radio buttons if (ele == null) { nodes = document.getElementsByName(orig); if (nodes.length >= 1) { ele = nodes.item(0); } } if (ele == null) { DWRUtil.debug("setValue() can't find an element with id/name: " + orig + "."); return; } if (DWRUtil._isHTMLElement(ele, "select")) { if (ele.type == "select-multiple" && DWRUtil._isArray(val)) { DWRUtil._selectListItems(ele, val); } else { DWRUtil._selectListItem(ele, val); } return; } if (DWRUtil._isHTMLElement(ele, "input")) { if (ele.type == "radio") { // Some browsers match names when looking for ids, so check names anyway. if (nodes == null) nodes = document.getElementsByName(orig); if (nodes != null && nodes.length > 1) { for (i = 0; i < nodes.length; i++) { node = nodes.item(i); if (node.type == "radio") { node.checked = (node.value == val); } } } else { ele.checked = (val == true); } } else if (ele.type == "checkbox") { ele.checked = val; } else { ele.value = val; } return; } if (DWRUtil._isHTMLElement(ele, "textarea")) { ele.value = val; return; } // If the value to be set is a DOM object then we try importing the node // rather than serializing it out if (val.nodeType) { if (val.nodeType == 9 /*Node.DOCUMENT_NODE*/) { val = val.documentElement; } val = DWRUtil._importNode(ele.ownerDocument, val, true); ele.appendChild(val); return; } // Fall back to innerHTML ele.innerHTML = val;}; |
return; | throw id; | function setValue(id, val){ if (val == null) { val = ""; } var ele = document.getElementById(id); if (ele == null) { alert("Element id: "+id+" not found."); return; } if (isHTMLSelectElement(ele)) { // search through the values var found = false; for (var i = 0; i < ele.options.length; i++) { if (ele.options[i].value == val) { ele.options[i].selected = true; found = true; } else { ele.options[i].selected = false; } } // If that fails then try searching through the visible text if (found) { return; } for (var i = 0; i < ele.options.length; i++) { if (ele.options[i].text == val) { ele.options[i].selected = true; break; } } return; } if (isHTMLInputElement(ele)) { switch (ele.type) { case "check-box": case "radio": ele.checked = (val == true); return; case "hidden": case "text": case "textarea": ele.value = val; return; default: alert("Not sure how to setValue on a input element of type " + ele.type); ele.value = val; return; } } if (isHTMLElement(ele)) { try { ele.innerHTML = val; return; } catch (ex) { return; } } alert("Not sure how to setValue on a " + ele); ele.innerHTML = val;} |
case "textarea": | function setValue(id, val){ if (val == null) { val = ""; } var ele = document.getElementById(id); if (ele == null) { alert("Element id: "+id+" not found."); return; } if (isHTMLSelectElement(ele)) { // search through the values var found = false; for (var i = 0; i < ele.options.length; i++) { if (ele.options[i].value == val) { ele.options[i].selected = true; found = true; } else { ele.options[i].selected = false; } } // If that fails then try searching through the visible text if (found) { return; } for (var i = 0; i < ele.options.length; i++) { if (ele.options[i].text == val) { ele.options[i].selected = true; break; } } return; } if (isHTMLInputElement(ele)) { switch (ele.type) { case "check-box": case "radio": ele.checked = (val == true); return; case "hidden": case "text": case "textarea": ele.value = val; return; default: alert("Not sure how to setValue on a input element of type " + ele.type); ele.value = val; return; } } if (isHTMLElement(ele)) { try { ele.innerHTML = val; return; } catch (ex) { return; } } alert("Not sure how to setValue on a " + ele); ele.innerHTML = val;} |
|
try { ele.innerHTML = val; return; } catch (ex) { return; } | ele.innerHTML = val; return; | function setValue(id, val){ if (val == null) { val = ""; } var ele = document.getElementById(id); if (ele == null) { alert("Element id: "+id+" not found."); return; } if (isHTMLSelectElement(ele)) { // search through the values var found = false; for (var i = 0; i < ele.options.length; i++) { if (ele.options[i].value == val) { ele.options[i].selected = true; found = true; } else { ele.options[i].selected = false; } } // If that fails then try searching through the visible text if (found) { return; } for (var i = 0; i < ele.options.length; i++) { if (ele.options[i].text == val) { ele.options[i].selected = true; break; } } return; } if (isHTMLInputElement(ele)) { switch (ele.type) { case "check-box": case "radio": ele.checked = (val == true); return; case "hidden": case "text": case "textarea": ele.value = val; return; default: alert("Not sure how to setValue on a input element of type " + ele.type); ele.value = val; return; } } if (isHTMLElement(ele)) { try { ele.innerHTML = val; return; } catch (ex) { return; } } alert("Not sure how to setValue on a " + ele); ele.innerHTML = val;} |
if (ele instanceof HTMLInputElement) | if (isHTMLSelectElement(ele)) | function setValue(id, val){ var ele = document.getElementById(id); if (ele == null) { alert("Element id: "+id+" not found."); return; } if (ele instanceof HTMLInputElement) { ele.value = val; } else if (ele instanceof HTMLSpanElement || ele instanceof HTMLDivElement) { ele.innerHTML = val; } else { alert("Not sure how to setValue on a " + ele); }} |
ele.value = val; | var found = false; for (var i = 0; i < ele.options.length; i++) { if (ele.options[i].value == val) { ele.options[i].selected = true; found = true; } else { ele.options[i].selected = false; } } if (found) { return; } for (var i = 0; i < ele.options.length; i++) { if (ele.options[i].text == val) { ele.options[i].selected = true; break; } } return; | function setValue(id, val){ var ele = document.getElementById(id); if (ele == null) { alert("Element id: "+id+" not found."); return; } if (ele instanceof HTMLInputElement) { ele.value = val; } else if (ele instanceof HTMLSpanElement || ele instanceof HTMLDivElement) { ele.innerHTML = val; } else { alert("Not sure how to setValue on a " + ele); }} |
else if (ele instanceof HTMLSpanElement || ele instanceof HTMLDivElement) | if (isHTMLInputElement(ele)) | function setValue(id, val){ var ele = document.getElementById(id); if (ele == null) { alert("Element id: "+id+" not found."); return; } if (ele instanceof HTMLInputElement) { ele.value = val; } else if (ele instanceof HTMLSpanElement || ele instanceof HTMLDivElement) { ele.innerHTML = val; } else { alert("Not sure how to setValue on a " + ele); }} |
ele.innerHTML = val; | switch (ele.type) { case "check-box": case "radio": ele.checked = (val == true); return; case "hidden": case "text": case "textarea": ele.value = val; return; default: alert("Not sure how to setValue on a input element of type " + ele.type); ele.value = val; return; } | function setValue(id, val){ var ele = document.getElementById(id); if (ele == null) { alert("Element id: "+id+" not found."); return; } if (ele instanceof HTMLInputElement) { ele.value = val; } else if (ele instanceof HTMLSpanElement || ele instanceof HTMLDivElement) { ele.innerHTML = val; } else { alert("Not sure how to setValue on a " + ele); }} |
else | if (isHTMLElement(ele)) | function setValue(id, val){ var ele = document.getElementById(id); if (ele == null) { alert("Element id: "+id+" not found."); return; } if (ele instanceof HTMLInputElement) { ele.value = val; } else if (ele instanceof HTMLSpanElement || ele instanceof HTMLDivElement) { ele.innerHTML = val; } else { alert("Not sure how to setValue on a " + ele); }} |
alert("Not sure how to setValue on a " + ele); | try { ele.innerHTML = val; return; } catch (ex) { return; } | function setValue(id, val){ var ele = document.getElementById(id); if (ele == null) { alert("Element id: "+id+" not found."); return; } if (ele instanceof HTMLInputElement) { ele.value = val; } else if (ele instanceof HTMLSpanElement || ele instanceof HTMLDivElement) { ele.innerHTML = val; } else { alert("Not sure how to setValue on a " + ele); }} |
alert("Not sure how to setValue on a " + ele); ele.innerHTML = val; | function setValue(id, val){ var ele = document.getElementById(id); if (ele == null) { alert("Element id: "+id+" not found."); return; } if (ele instanceof HTMLInputElement) { ele.value = val; } else if (ele instanceof HTMLSpanElement || ele instanceof HTMLDivElement) { ele.innerHTML = val; } else { alert("Not sure how to setValue on a " + ele); }} |
|
function setValues(map) | DWRUtil.setValues = function(map) | function setValues(map){ for (var property in map) { var value = map[property]; setValue(property, value); }} |
setValue(property, value); | DWRUtil.setValue(property, value); | function setValues(map){ for (var property in map) { var value = map[property]; setValue(property, value); }} |
DWREngine.setVerb = function(verb) { if (verb != "GET" && verb != "POST") { if (DWREngine._errorHandler) { DWREngine._errorHandler("Remoting verb must be one of GET or POST"); } | DWREngine.setVerb = function(verb) { if (verb != "GET" && verb != "POST") { DWREngine._handleError("Remoting verb must be one of GET or POST"); | DWREngine.setVerb = function(verb){ if (verb != "GET" && verb != "POST") { if (DWREngine._errorHandler) { DWREngine._errorHandler("Remoting verb must be one of GET or POST"); } return; } DWREngine._verb = verb;}; |
DWREngine.setVerb = function(verb) { DWREngine.setHttpMethod(verb); }; | dwr.engine.setVerb = function(verb) { dwr.engine.setHttpMethod(verb); }; | DWREngine.setVerb = function(verb) { DWREngine.setHttpMethod(verb); }; |
DWREngine.setWarningHandler = function(handler) { DWREngine._warningHandler = handler; | dwr.engine.setWarningHandler = function(handler) { dwr.engine._warningHandler = handler; | DWREngine.setWarningHandler = function(handler) { DWREngine._warningHandler = handler;}; |
dialog.MisspelledWord.setAttribute("value",MisspelledWord); | dialog.MisspelledWord.setAttribute("value", gMisspelledWord); | function SetWidgetsForMisspelledWord(){ dialog.MisspelledWord.setAttribute("value",MisspelledWord); // Initial replace word is misspelled word dialog.ReplaceWordInput.value = MisspelledWord; PreviousReplaceWord = MisspelledWord; // This sets dialog.ReplaceWordInput to first suggested word in list FillSuggestedList(); DoEnabling(); if (MisspelledWord) SetTextboxFocus(dialog.ReplaceWordInput);} |
dialog.ReplaceWordInput.value = MisspelledWord; PreviousReplaceWord = MisspelledWord; | dialog.ReplaceWordInput.value = gMisspelledWord; PreviousReplaceWord = gMisspelledWord; | function SetWidgetsForMisspelledWord(){ dialog.MisspelledWord.setAttribute("value",MisspelledWord); // Initial replace word is misspelled word dialog.ReplaceWordInput.value = MisspelledWord; PreviousReplaceWord = MisspelledWord; // This sets dialog.ReplaceWordInput to first suggested word in list FillSuggestedList(); DoEnabling(); if (MisspelledWord) SetTextboxFocus(dialog.ReplaceWordInput);} |
FillSuggestedList(); | FillSuggestedList(gMisspelledWord); | function SetWidgetsForMisspelledWord(){ dialog.MisspelledWord.setAttribute("value",MisspelledWord); // Initial replace word is misspelled word dialog.ReplaceWordInput.value = MisspelledWord; PreviousReplaceWord = MisspelledWord; // This sets dialog.ReplaceWordInput to first suggested word in list FillSuggestedList(); DoEnabling(); if (MisspelledWord) SetTextboxFocus(dialog.ReplaceWordInput);} |
if (MisspelledWord) | if (gMisspelledWord) | function SetWidgetsForMisspelledWord(){ dialog.MisspelledWord.setAttribute("value",MisspelledWord); // Initial replace word is misspelled word dialog.ReplaceWordInput.value = MisspelledWord; PreviousReplaceWord = MisspelledWord; // This sets dialog.ReplaceWordInput to first suggested word in list FillSuggestedList(); DoEnabling(); if (MisspelledWord) SetTextboxFocus(dialog.ReplaceWordInput);} |
SetTextfieldFocus(dialog.ReplaceWordInput); | SetTextboxFocus(dialog.ReplaceWordInput); | function SetWidgetsForMisspelledWord(){ dialog.MisspelledWord.setAttribute("value",MisspelledWord); // Initial replace word is misspelled word dialog.ReplaceWordInput.value = MisspelledWord; PreviousReplaceWord = MisspelledWord; // This sets dialog.ReplaceWordInput to first suggested word in list FillSuggestedList(); DoEnabling(); if (MisspelledWord) SetTextfieldFocus(dialog.ReplaceWordInput);} |
for(var x=0;x<certs.length;x++) | for(x=0;x<certs.length;x++) | function setWindowName(){ var params = window.arguments[0].QueryInterface(nsIDialogParamBlock); // Get the cert from the cert database certdb = Components.classes[nsX509CertDB].getService(nsIX509CertDB); var typeFlag = params.GetString(1); var numberOfCerts = params.GetInt(2); var dbkey; for(var x=0; x<numberOfCerts;x++) { dbkey = params.GetString(x+3); certs[x] = certdb.getCertByDBKey(dbkey , null); } var bundle = srGetStrBundle("chrome://pippki/locale/pippki.properties"); var title; var confirm; var impact; if(typeFlag == bundle.GetStringFromName("deleteUserCertFlag")) { title = bundle.GetStringFromName("deleteUserCertTitle"); confirm = bundle.GetStringFromName("deleteUserCertConfirm"); impact = bundle.GetStringFromName("deleteUserCertImpact"); helpUrl = "chrome://help/content/help.xul?delete_my_certs" } else if(typeFlag == bundle.GetStringFromName("deleteSslCertFlag")) { title = bundle.GetStringFromName("deleteSslCertTitle"); confirm = bundle.GetStringFromName("deleteSslCertConfirm"); impact = bundle.GetStringFromName("deleteSslCertImpact"); helpUrl = "chrome://help/content/help.xul?delete_web_certs" } else if(typeFlag == bundle.GetStringFromName("deleteCaCertFlag")) { title = bundle.GetStringFromName("deleteCaCertTitle"); confirm = bundle.GetStringFromName("deleteCaCertConfirm"); impact = bundle.GetStringFromName("deleteCaCertImpact"); helpUrl = "chrome://help/content/help.xul?delete_ca_certs" } else if(typeFlag == bundle.GetStringFromName("deleteEmailCertFlag")) { title = bundle.GetStringFromName("deleteEmailCertTitle"); confirm = bundle.GetStringFromName("deleteEmailCertConfirm"); impact = bundle.GetStringFromName("deleteEmailCertImpact"); helpUrl = "chrome://help/content/help.xul?delete_email_certs" } else { return; } var windowReference = document.getElementById('deleteCertificate'); var confirReference = document.getElementById('confirm'); var impactReference = document.getElementById('impact'); windowReference.setAttribute("title", title); setText("confirm",confirm); var box=document.getElementById("certlist"); var text; for(var x=0;x<certs.length;x++) { text = document.createElement("text"); text.setAttribute("value",certs[x].commonName); box.appendChild(text); } setText("impact",impact); var wdth = window.innerWidth; // THIS IS NEEDED, window.sizeToContent(); windowReference.setAttribute("width",window.innerWidth + 30); var hght = window.innerHeight; // THIS IS NEEDED, window.sizeToContent(); windowReference.setAttribute("height",window.innerHeight + 40); } |
if (cert instanceof nsIX509Cert3) { cert.requestUsagesArrayAsync( getProxyOnUIThread(new listener(), Components.interfaces.nsICertVerificationListener)); } | function setWindowName(){ // Get the cert from the cert database var certdb = Components.classes[nsX509CertDB].getService(nsIX509CertDB); var myName = self.name; bundle = srGetStrBundle("chrome://pippki/locale/pippki.properties"); var cert; var certDetails = bundle.GetStringFromName('certDetails'); if (myName != "") { document.title = certDetails + '"' + myName + '"'; // XXX l10n? // Get the token // XXX ignore this for now. NSS will find the cert on a token // by "tokenname:certname", which is what we have. //var tokenName = ""; //var pk11db = Components.classes[nsPK11TokenDB].getService(nsIPK11TokenDB); //var token = pk11db.findTokenByName(tokenName); //var cert = certdb.findCertByNickname(token, myName); cert = certdb.findCertByNickname(null, myName); } else { var pkiParams = window.arguments[0].QueryInterface(nsIPKIParamBlock); var isupport = pkiParams.getISupportAtIndex(1); cert = isupport.QueryInterface(nsIX509Cert); document.title = certDetails + '"' + cert.windowTitle + '"'; // XXX l10n? } // // Set the cert attributes for viewing // // The chain of trust var chain = cert.getChain(); AddCertChain("treesetDump", chain, "dump_"); DisplayGeneralDataFromCert(cert); BuildPrettyPrint(cert);} |
|
var windowReference=document.getElementById('certDetails'); | function setWindowName(){ // Get the cert from the cert database var certdb = Components.classes[nsX509CertDB].getService(nsIX509CertDB); var windowReference=document.getElementById('certDetails'); var myName = self.name; bundle = srGetStrBundle("chrome://pippki/locale/pippki.properties"); var cert; var certDetails = bundle.GetStringFromName('certDetails'); if (myName != "") { windowReference.setAttribute("title",certDetails+'"'+myName+'"'); // Get the token // XXX ignore this for now. NSS will find the cert on a token // by "tokenname:certname", which is what we have. //var tokenName = ""; //var pk11db = Components.classes[nsPK11TokenDB].getService(nsIPK11TokenDB); //var token = pk11db.findTokenByName(tokenName); //var cert = certdb.findCertByNickname(token, myName); cert = certdb.findCertByNickname(null, myName); } else { var pkiParams = window.arguments[0].QueryInterface(nsIPKIParamBlock); var isupport = pkiParams.getISupportAtIndex(1); cert = isupport.QueryInterface(nsIX509Cert); windowReference.setAttribute("title", certDetails+'"'+cert.windowTitle+'"'); } // // Set the cert attributes for viewing // // The chain of trust var chain = cert.getChain(); AddCertChain("treesetDump", chain, "dump_"); DisplayGeneralDataFromCert(cert); BuildPrettyPrint(cert);} |
|
windowReference.setAttribute("title",certDetails+'"'+myName+'"'); | document.title = certDetails + '"' + myName + '"'; | function setWindowName(){ // Get the cert from the cert database var certdb = Components.classes[nsX509CertDB].getService(nsIX509CertDB); var windowReference=document.getElementById('certDetails'); var myName = self.name; bundle = srGetStrBundle("chrome://pippki/locale/pippki.properties"); var cert; var certDetails = bundle.GetStringFromName('certDetails'); if (myName != "") { windowReference.setAttribute("title",certDetails+'"'+myName+'"'); // Get the token // XXX ignore this for now. NSS will find the cert on a token // by "tokenname:certname", which is what we have. //var tokenName = ""; //var pk11db = Components.classes[nsPK11TokenDB].getService(nsIPK11TokenDB); //var token = pk11db.findTokenByName(tokenName); //var cert = certdb.findCertByNickname(token, myName); cert = certdb.findCertByNickname(null, myName); } else { var pkiParams = window.arguments[0].QueryInterface(nsIPKIParamBlock); var isupport = pkiParams.getISupportAtIndex(1); cert = isupport.QueryInterface(nsIX509Cert); windowReference.setAttribute("title", certDetails+'"'+cert.windowTitle+'"'); } // // Set the cert attributes for viewing // // The chain of trust var chain = cert.getChain(); AddCertChain("treesetDump", chain, "dump_"); DisplayGeneralDataFromCert(cert); BuildPrettyPrint(cert);} |
windowReference.setAttribute("title", certDetails+'"'+cert.windowTitle+'"'); | document.title = certDetails + '"' + cert.windowTitle + '"'; | function setWindowName(){ // Get the cert from the cert database var certdb = Components.classes[nsX509CertDB].getService(nsIX509CertDB); var windowReference=document.getElementById('certDetails'); var myName = self.name; bundle = srGetStrBundle("chrome://pippki/locale/pippki.properties"); var cert; var certDetails = bundle.GetStringFromName('certDetails'); if (myName != "") { windowReference.setAttribute("title",certDetails+'"'+myName+'"'); // Get the token // XXX ignore this for now. NSS will find the cert on a token // by "tokenname:certname", which is what we have. //var tokenName = ""; //var pk11db = Components.classes[nsPK11TokenDB].getService(nsIPK11TokenDB); //var token = pk11db.findTokenByName(tokenName); //var cert = certdb.findCertByNickname(token, myName); cert = certdb.findCertByNickname(null, myName); } else { var pkiParams = window.arguments[0].QueryInterface(nsIPKIParamBlock); var isupport = pkiParams.getISupportAtIndex(1); cert = isupport.QueryInterface(nsIX509Cert); windowReference.setAttribute("title", certDetails+'"'+cert.windowTitle+'"'); } // // Set the cert attributes for viewing // // The chain of trust var chain = cert.getChain(); AddCertChain("treesetDump", chain, "dump_"); DisplayGeneralDataFromCert(cert); BuildPrettyPrint(cert);} |
helpUrl = "delete_my_certs" | function setWindowName(){ gParams = window.arguments[0].QueryInterface(nsIDialogParamBlock); // Get the cert from the cert database certdb = Components.classes[nsX509CertDB].getService(nsIX509CertDB); var typeFlag = gParams.GetString(0); var numberOfCerts = gParams.GetInt(0); var dbkey; for(var x=0; x<numberOfCerts;x++) { dbkey = gParams.GetString(x+1); certs[x] = certdb.findCertByDBKey(dbkey , null); } var bundle = srGetStrBundle("chrome://pippki/locale/pippki.properties"); var title; var confirm; var impact; if(typeFlag == bundle.GetStringFromName("deleteUserCertFlag")) { title = bundle.GetStringFromName("deleteUserCertTitle"); confirm = bundle.GetStringFromName("deleteUserCertConfirm"); impact = bundle.GetStringFromName("deleteUserCertImpact"); helpUrl = "delete_my_certs" } else if(typeFlag == bundle.GetStringFromName("deleteSslCertFlag")) { title = bundle.GetStringFromName("deleteSslCertTitle"); confirm = bundle.GetStringFromName("deleteSslCertConfirm"); impact = bundle.GetStringFromName("deleteSslCertImpact"); helpUrl = "delete_web_certs" } else if(typeFlag == bundle.GetStringFromName("deleteCaCertFlag")) { title = bundle.GetStringFromName("deleteCaCertTitle"); confirm = bundle.GetStringFromName("deleteCaCertConfirm"); impact = bundle.GetStringFromName("deleteCaCertImpact"); helpUrl = "delete_ca_certs" } else if(typeFlag == bundle.GetStringFromName("deleteEmailCertFlag")) { title = bundle.GetStringFromName("deleteEmailCertTitle"); confirm = bundle.GetStringFromName("deleteEmailCertConfirm"); impact = bundle.GetStringFromName("deleteEmailCertImpact"); helpUrl = "delete_email_certs" } else { return; } var confirReference = document.getElementById('confirm'); var impactReference = document.getElementById('impact'); document.title = title; setText("confirm",confirm); var box=document.getElementById("certlist"); var text; for(x=0;x<certs.length;x++) { if (!certs[x]) continue; text = document.createElement("text"); text.setAttribute("value",certs[x].commonName); box.appendChild(text); } setText("impact",impact);} |
|
helpUrl = "delete_web_certs" | function setWindowName(){ gParams = window.arguments[0].QueryInterface(nsIDialogParamBlock); // Get the cert from the cert database certdb = Components.classes[nsX509CertDB].getService(nsIX509CertDB); var typeFlag = gParams.GetString(0); var numberOfCerts = gParams.GetInt(0); var dbkey; for(var x=0; x<numberOfCerts;x++) { dbkey = gParams.GetString(x+1); certs[x] = certdb.findCertByDBKey(dbkey , null); } var bundle = srGetStrBundle("chrome://pippki/locale/pippki.properties"); var title; var confirm; var impact; if(typeFlag == bundle.GetStringFromName("deleteUserCertFlag")) { title = bundle.GetStringFromName("deleteUserCertTitle"); confirm = bundle.GetStringFromName("deleteUserCertConfirm"); impact = bundle.GetStringFromName("deleteUserCertImpact"); helpUrl = "delete_my_certs" } else if(typeFlag == bundle.GetStringFromName("deleteSslCertFlag")) { title = bundle.GetStringFromName("deleteSslCertTitle"); confirm = bundle.GetStringFromName("deleteSslCertConfirm"); impact = bundle.GetStringFromName("deleteSslCertImpact"); helpUrl = "delete_web_certs" } else if(typeFlag == bundle.GetStringFromName("deleteCaCertFlag")) { title = bundle.GetStringFromName("deleteCaCertTitle"); confirm = bundle.GetStringFromName("deleteCaCertConfirm"); impact = bundle.GetStringFromName("deleteCaCertImpact"); helpUrl = "delete_ca_certs" } else if(typeFlag == bundle.GetStringFromName("deleteEmailCertFlag")) { title = bundle.GetStringFromName("deleteEmailCertTitle"); confirm = bundle.GetStringFromName("deleteEmailCertConfirm"); impact = bundle.GetStringFromName("deleteEmailCertImpact"); helpUrl = "delete_email_certs" } else { return; } var confirReference = document.getElementById('confirm'); var impactReference = document.getElementById('impact'); document.title = title; setText("confirm",confirm); var box=document.getElementById("certlist"); var text; for(x=0;x<certs.length;x++) { if (!certs[x]) continue; text = document.createElement("text"); text.setAttribute("value",certs[x].commonName); box.appendChild(text); } setText("impact",impact);} |
|
helpUrl = "delete_ca_certs" | function setWindowName(){ gParams = window.arguments[0].QueryInterface(nsIDialogParamBlock); // Get the cert from the cert database certdb = Components.classes[nsX509CertDB].getService(nsIX509CertDB); var typeFlag = gParams.GetString(0); var numberOfCerts = gParams.GetInt(0); var dbkey; for(var x=0; x<numberOfCerts;x++) { dbkey = gParams.GetString(x+1); certs[x] = certdb.findCertByDBKey(dbkey , null); } var bundle = srGetStrBundle("chrome://pippki/locale/pippki.properties"); var title; var confirm; var impact; if(typeFlag == bundle.GetStringFromName("deleteUserCertFlag")) { title = bundle.GetStringFromName("deleteUserCertTitle"); confirm = bundle.GetStringFromName("deleteUserCertConfirm"); impact = bundle.GetStringFromName("deleteUserCertImpact"); helpUrl = "delete_my_certs" } else if(typeFlag == bundle.GetStringFromName("deleteSslCertFlag")) { title = bundle.GetStringFromName("deleteSslCertTitle"); confirm = bundle.GetStringFromName("deleteSslCertConfirm"); impact = bundle.GetStringFromName("deleteSslCertImpact"); helpUrl = "delete_web_certs" } else if(typeFlag == bundle.GetStringFromName("deleteCaCertFlag")) { title = bundle.GetStringFromName("deleteCaCertTitle"); confirm = bundle.GetStringFromName("deleteCaCertConfirm"); impact = bundle.GetStringFromName("deleteCaCertImpact"); helpUrl = "delete_ca_certs" } else if(typeFlag == bundle.GetStringFromName("deleteEmailCertFlag")) { title = bundle.GetStringFromName("deleteEmailCertTitle"); confirm = bundle.GetStringFromName("deleteEmailCertConfirm"); impact = bundle.GetStringFromName("deleteEmailCertImpact"); helpUrl = "delete_email_certs" } else { return; } var confirReference = document.getElementById('confirm'); var impactReference = document.getElementById('impact'); document.title = title; setText("confirm",confirm); var box=document.getElementById("certlist"); var text; for(x=0;x<certs.length;x++) { if (!certs[x]) continue; text = document.createElement("text"); text.setAttribute("value",certs[x].commonName); box.appendChild(text); } setText("impact",impact);} |
|
helpUrl = "delete_email_certs" | function setWindowName(){ gParams = window.arguments[0].QueryInterface(nsIDialogParamBlock); // Get the cert from the cert database certdb = Components.classes[nsX509CertDB].getService(nsIX509CertDB); var typeFlag = gParams.GetString(0); var numberOfCerts = gParams.GetInt(0); var dbkey; for(var x=0; x<numberOfCerts;x++) { dbkey = gParams.GetString(x+1); certs[x] = certdb.findCertByDBKey(dbkey , null); } var bundle = srGetStrBundle("chrome://pippki/locale/pippki.properties"); var title; var confirm; var impact; if(typeFlag == bundle.GetStringFromName("deleteUserCertFlag")) { title = bundle.GetStringFromName("deleteUserCertTitle"); confirm = bundle.GetStringFromName("deleteUserCertConfirm"); impact = bundle.GetStringFromName("deleteUserCertImpact"); helpUrl = "delete_my_certs" } else if(typeFlag == bundle.GetStringFromName("deleteSslCertFlag")) { title = bundle.GetStringFromName("deleteSslCertTitle"); confirm = bundle.GetStringFromName("deleteSslCertConfirm"); impact = bundle.GetStringFromName("deleteSslCertImpact"); helpUrl = "delete_web_certs" } else if(typeFlag == bundle.GetStringFromName("deleteCaCertFlag")) { title = bundle.GetStringFromName("deleteCaCertTitle"); confirm = bundle.GetStringFromName("deleteCaCertConfirm"); impact = bundle.GetStringFromName("deleteCaCertImpact"); helpUrl = "delete_ca_certs" } else if(typeFlag == bundle.GetStringFromName("deleteEmailCertFlag")) { title = bundle.GetStringFromName("deleteEmailCertTitle"); confirm = bundle.GetStringFromName("deleteEmailCertConfirm"); impact = bundle.GetStringFromName("deleteEmailCertImpact"); helpUrl = "delete_email_certs" } else { return; } var confirReference = document.getElementById('confirm'); var impactReference = document.getElementById('impact'); document.title = title; setText("confirm",confirm); var box=document.getElementById("certlist"); var text; for(x=0;x<certs.length;x++) { if (!certs[x]) continue; text = document.createElement("text"); text.setAttribute("value",certs[x].commonName); box.appendChild(text); } setText("impact",impact);} |
|
var windowReference = document.getElementById('deleteCertificate'); | function setWindowName(){ gParams = window.arguments[0].QueryInterface(nsIDialogParamBlock); // Get the cert from the cert database certdb = Components.classes[nsX509CertDB].getService(nsIX509CertDB); var typeFlag = gParams.GetString(0); var numberOfCerts = gParams.GetInt(0); var dbkey; for(var x=0; x<numberOfCerts;x++) { dbkey = gParams.GetString(x+1); certs[x] = certdb.findCertByDBKey(dbkey , null); } var bundle = srGetStrBundle("chrome://pippki/locale/pippki.properties"); var title; var confirm; var impact; if(typeFlag == bundle.GetStringFromName("deleteUserCertFlag")) { title = bundle.GetStringFromName("deleteUserCertTitle"); confirm = bundle.GetStringFromName("deleteUserCertConfirm"); impact = bundle.GetStringFromName("deleteUserCertImpact"); helpUrl = "delete_my_certs" } else if(typeFlag == bundle.GetStringFromName("deleteSslCertFlag")) { title = bundle.GetStringFromName("deleteSslCertTitle"); confirm = bundle.GetStringFromName("deleteSslCertConfirm"); impact = bundle.GetStringFromName("deleteSslCertImpact"); helpUrl = "delete_web_certs" } else if(typeFlag == bundle.GetStringFromName("deleteCaCertFlag")) { title = bundle.GetStringFromName("deleteCaCertTitle"); confirm = bundle.GetStringFromName("deleteCaCertConfirm"); impact = bundle.GetStringFromName("deleteCaCertImpact"); helpUrl = "delete_ca_certs" } else if(typeFlag == bundle.GetStringFromName("deleteEmailCertFlag")) { title = bundle.GetStringFromName("deleteEmailCertTitle"); confirm = bundle.GetStringFromName("deleteEmailCertConfirm"); impact = bundle.GetStringFromName("deleteEmailCertImpact"); helpUrl = "delete_email_certs" } else { return; } var windowReference = document.getElementById('deleteCertificate'); var confirReference = document.getElementById('confirm'); var impactReference = document.getElementById('impact'); windowReference.setAttribute("title", title); setText("confirm",confirm); var box=document.getElementById("certlist"); var text; for(x=0;x<certs.length;x++) { if (!certs[x]) continue; text = document.createElement("text"); text.setAttribute("value",certs[x].commonName); box.appendChild(text); } setText("impact",impact); window.sizeToContent();} |
|
windowReference.setAttribute("title", title); | document.title = title; | function setWindowName(){ gParams = window.arguments[0].QueryInterface(nsIDialogParamBlock); // Get the cert from the cert database certdb = Components.classes[nsX509CertDB].getService(nsIX509CertDB); var typeFlag = gParams.GetString(0); var numberOfCerts = gParams.GetInt(0); var dbkey; for(var x=0; x<numberOfCerts;x++) { dbkey = gParams.GetString(x+1); certs[x] = certdb.findCertByDBKey(dbkey , null); } var bundle = srGetStrBundle("chrome://pippki/locale/pippki.properties"); var title; var confirm; var impact; if(typeFlag == bundle.GetStringFromName("deleteUserCertFlag")) { title = bundle.GetStringFromName("deleteUserCertTitle"); confirm = bundle.GetStringFromName("deleteUserCertConfirm"); impact = bundle.GetStringFromName("deleteUserCertImpact"); helpUrl = "delete_my_certs" } else if(typeFlag == bundle.GetStringFromName("deleteSslCertFlag")) { title = bundle.GetStringFromName("deleteSslCertTitle"); confirm = bundle.GetStringFromName("deleteSslCertConfirm"); impact = bundle.GetStringFromName("deleteSslCertImpact"); helpUrl = "delete_web_certs" } else if(typeFlag == bundle.GetStringFromName("deleteCaCertFlag")) { title = bundle.GetStringFromName("deleteCaCertTitle"); confirm = bundle.GetStringFromName("deleteCaCertConfirm"); impact = bundle.GetStringFromName("deleteCaCertImpact"); helpUrl = "delete_ca_certs" } else if(typeFlag == bundle.GetStringFromName("deleteEmailCertFlag")) { title = bundle.GetStringFromName("deleteEmailCertTitle"); confirm = bundle.GetStringFromName("deleteEmailCertConfirm"); impact = bundle.GetStringFromName("deleteEmailCertImpact"); helpUrl = "delete_email_certs" } else { return; } var windowReference = document.getElementById('deleteCertificate'); var confirReference = document.getElementById('confirm'); var impactReference = document.getElementById('impact'); windowReference.setAttribute("title", title); setText("confirm",confirm); var box=document.getElementById("certlist"); var text; for(x=0;x<certs.length;x++) { if (!certs[x]) continue; text = document.createElement("text"); text.setAttribute("value",certs[x].commonName); box.appendChild(text); } setText("impact",impact); window.sizeToContent();} |
var val = this[0]; for (var i = 1; i < this.length; ++i) { this[i - 1] = this[i]; } this.length--; return val; | var val = this[0]; for (var i = 1; i < this.length; ++i) { this[i - 1] = this[i]; | Array.prototype.shift = function(str) { var val = this[0]; for (var i = 1; i < this.length; ++i) { this[i - 1] = this[i]; } this.length--; return val; } |
this.length--; return val; } | Array.prototype.shift = function(str) { var val = this[0]; for (var i = 1; i < this.length; ++i) { this[i - 1] = this[i]; } this.length--; return val; } |
|
return (str != str.toLowerCase() && str != str.toUpperCase()); | return (str != str.toLowerCase()); | shouldBeCaseSensitive: function (str) { if (this.mTypeAheadCaseSensitive == 0) return false; if (this.mTypeAheadCaseSensitive == 1) return true; return (str != str.toLowerCase() && str != str.toUpperCase()); }, |
var url = getBrowser().selectedBrowser.webNavigation.currentURI.spec; | var url = getBrowser().currentURI.spec; | function shouldFastFind(evt){ if (evt.ctrlKey || evt.altKey || evt.metaKey || evt.getPreventDefault()) return false; var elt = document.commandDispatcher.focusedElement; if (elt) { if (elt instanceof HTMLInputElement) { // block FAYT when an <input> textfield element is focused var inputType = elt.type; switch (inputType) { case "text": case "password": case "file": return false; } } else if (elt instanceof HTMLTextAreaElement || elt instanceof HTMLSelectElement || elt instanceof HTMLIsIndexElement) return false; } // disable FAYT in about:config and about:blank to prevent FAYT opening // unexpectedly - to fix bugs 264562, 267150, 269712 var url = getBrowser().selectedBrowser.webNavigation.currentURI.spec; if (url == "about:blank" || url == "about:config") return false; var win = document.commandDispatcher.focusedWindow; if (win && win.document.designMode == "on") return false; return true;} |
if (aEvent.shiftKey) | if (aEvent && aEvent.shiftKey) | shouldLoadTabInBackground: function(aEvent) { var loadInBackground = PREF.getBoolPref("browser.tabs.loadInBackground"); if (aEvent.shiftKey) loadInBackground = !loadInBackground; return loadInBackground; }, |
dump("nsIDOMWindow id value = " + nsIDOMWindow.id + "\n"); | dump("@mozilla.org/js/xpc/ID;1OMWindow id value = " + nsIDOMWindow.id + "\n"); | show: function() { var o = new Object(); o.title = this.mTitle; o.mode = this.mMode; o.displayDirectory = this.mDisplayDirectory; o.defaultString = this.mDefaultString; o.filters = new Object(); o.filters.titles = this.mFilterTitles; o.filters.types = this.mFilters; o.retvals = new Object(); dump("nsIDOMWindow id value = " + nsIDOMWindow.id + "\n"); var parent; try { if (this.mParentWindow) { parent = this.mParentWindow; } else if (typeof(window) == "object" && window != null) { parent = window; } else { try { var appShellService = Components.classes[APPSHELL_SERV_PROGID].getService(nsIAppShellService); parent = appShellService.getHiddenDOMWindow(); } catch(ex) { dump("Can't get parent. xpconnect hates me so we can't get one from the appShellService.\n"); dump(ex + "\n"); } } } catch(ex) { dump("fuck\n"); } try { parent.openDialog("chrome://global/content/filepicker.xul", "", "chrome,modal,titlebar,resizeable=yes,dependent=yes", o); this.mFile = o.retvals.file; lastDirectory = o.retvals.directory; return o.retvals.buttonStatus; } catch(ex) { dump("unable to open file picker\n" + ex + "\n"); } } |
var appShellService = Components.classes[APPSHELL_SERV_PROGID].getService(nsIAppShellService); | var appShellService = Components.classes[APPSHELL_SERV_CONTRACTID].getService(nsIAppShellService); | show: function() { var o = new Object(); o.title = this.mTitle; o.mode = this.mMode; o.displayDirectory = this.mDisplayDirectory; o.defaultString = this.mDefaultString; o.filters = new Object(); o.filters.titles = this.mFilterTitles; o.filters.types = this.mFilters; o.retvals = new Object(); dump("nsIDOMWindow id value = " + nsIDOMWindow.id + "\n"); var parent; try { if (this.mParentWindow) { parent = this.mParentWindow; } else if (typeof(window) == "object" && window != null) { parent = window; } else { try { var appShellService = Components.classes[APPSHELL_SERV_PROGID].getService(nsIAppShellService); parent = appShellService.getHiddenDOMWindow(); } catch(ex) { dump("Can't get parent. xpconnect hates me so we can't get one from the appShellService.\n"); dump(ex + "\n"); } } } catch(ex) { dump("fuck\n"); } try { parent.openDialog("chrome://global/content/filepicker.xul", "", "chrome,modal,titlebar,resizeable=yes,dependent=yes", o); this.mFile = o.retvals.file; lastDirectory = o.retvals.directory; return o.retvals.buttonStatus; } catch(ex) { dump("unable to open file picker\n" + ex + "\n"); } } |
jQuery.prototype.show = function(speed,callback){ return speed ? this.animate({ height: "show", width: "show", opacity: "show" }, speed, callback) : this._show(); }; | z.show = function(){ y.display = "block"; z.o.auto = true; z.custom(0,z.max()); }; | jQuery.prototype.show = function(speed,callback){ return speed ? this.animate({ height: "show", width: "show", opacity: "show" }, speed, callback) : this._show();}; |
z.show = function(){ | z.show = function( p ){ | z.show = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); if ( !y[prop] ) z.o.auto = true; z.custom(0,z.max()); // Stupid IE, look what you made me do if ( prop != "opacity" ) y[prop] = "1px"; y.display = "block"; }; |
if ( !y[prop] ) z.o.auto = true; z.custom(0,z.max()); | z.custom( 0, z.el.orig[prop] ); | z.show = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); if ( !y[prop] ) z.o.auto = true; z.custom(0,z.max()); // Stupid IE, look what you made me do if ( prop != "opacity" ) y[prop] = "1px"; y.display = "block"; }; |
y.display = "block"; | z.show = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); if ( !y[prop] ) z.o.auto = true; z.custom(0,z.max()); // Stupid IE, look what you made me do if ( prop != "opacity" ) y[prop] = "1px"; y.display = "block"; }; |
|
this.mFilterIndex = o.retvals.filterindex; | this.mFilterIndex = o.retvals.filterIndex; | show: function() { var o = new Object(); o.title = this.mTitle; o.mode = this.mMode; o.displayDirectory = this.mDisplayDirectory; o.defaultString = this.mDefaultString; o.filterIndex = this.mFilterIndex; o.filters = new Object(); o.filters.titles = this.mFilterTitles; o.filters.types = this.mFilters; o.retvals = new Object(); var parent; try { if (this.mParentWindow) { parent = this.mParentWindow; } else if (typeof(window) == "object" && window != null) { parent = window; } else { try { var appShellService = Components.classes[APPSHELL_SERV_CONTRACTID].getService(nsIAppShellService); parent = appShellService.hiddenDOMWindow; } catch(ex) { debug("Can't get parent. xpconnect hates me so we can't get one from the appShellService.\n"); debug(ex + "\n"); } } } catch(ex) { debug("fuck\n"); } try { parent.openDialog("chrome://global/content/filepicker.xul", "", "chrome,modal,titlebar,resizable=yes,dependent=yes", o); this.mFile = o.retvals.file; this.mFilterIndex = o.retvals.filterindex; lastDirectory = o.retvals.directory; return o.retvals.buttonStatus; } catch(ex) { dump("unable to open file picker\n" + ex + "\n"); } return null; } |
$.fn.show = function(a,o) { o = $.speed(a,o); return a ? this.queue(function(){ new $.fx.FadeSize(this,o).show(); }) : this._show(); | $.fn.show = function(speed,callback){ return speed ? this.animate({ height: "show", width: "show", opacity: "show" }, speed, callback) : this._show(); | $.fn.show = function(a,o) { o = $.speed(a,o); return a ? this.queue(function(){ new $.fx.FadeSize(this,o).show(); }) : this._show();}; |
} else if (window) { | } else if (typeof(window) == "object" && window != null) { | show: function() { var o = new Object(); o.title = this.mTitle; o.mode = this.mMode; o.displayDirectory = this.mDisplayDirectory; o.defaultString = this.mDefaultString; o.filters = new Object(); o.filters.titles = this.mFilterTitles; o.filters.types = this.mFilters; o.retvals = new Object(); var parent; try { if (this.mParentWindow) { parent = this.mParentWindow; } else if (window) { parent = window; } else { var appShellService = Components.classes[APPSHELL_SERV_PROGID].getService(nsIAppShellService); parent = appShellService.GetHiddenWindow(); } } catch(ex) { } parent.openDialog("chrome://global/content/filepicker.xul", "", "chrome,modal,resizeable=yes,dependent=yes", o); this.mFile = o.retvals.file; lastDirectory = o.retvals.directory; return o.retvals.buttonStatus; } |
var appShellService = Components.classes[APPSHELL_SERV_PROGID].getService(nsIAppShellService); parent = appShellService.GetHiddenWindow(); | try { var appShellService = Components.classes[APPSHELL_SERV_PROGID].getService(nsIAppShellService); parent = appShellService.getHiddenDOMWindow(); } catch(ex) { dump("Can't get parent. xpconnect hates me so we can't get one from the appShellService.\n"); dump(ex + "\n"); } | show: function() { var o = new Object(); o.title = this.mTitle; o.mode = this.mMode; o.displayDirectory = this.mDisplayDirectory; o.defaultString = this.mDefaultString; o.filters = new Object(); o.filters.titles = this.mFilterTitles; o.filters.types = this.mFilters; o.retvals = new Object(); var parent; try { if (this.mParentWindow) { parent = this.mParentWindow; } else if (window) { parent = window; } else { var appShellService = Components.classes[APPSHELL_SERV_PROGID].getService(nsIAppShellService); parent = appShellService.GetHiddenWindow(); } } catch(ex) { } parent.openDialog("chrome://global/content/filepicker.xul", "", "chrome,modal,resizeable=yes,dependent=yes", o); this.mFile = o.retvals.file; lastDirectory = o.retvals.directory; return o.retvals.buttonStatus; } |
} catch(ex) { } | } catch(ex) { dump("fuck\n"); } | show: function() { var o = new Object(); o.title = this.mTitle; o.mode = this.mMode; o.displayDirectory = this.mDisplayDirectory; o.defaultString = this.mDefaultString; o.filters = new Object(); o.filters.titles = this.mFilterTitles; o.filters.types = this.mFilters; o.retvals = new Object(); var parent; try { if (this.mParentWindow) { parent = this.mParentWindow; } else if (window) { parent = window; } else { var appShellService = Components.classes[APPSHELL_SERV_PROGID].getService(nsIAppShellService); parent = appShellService.GetHiddenWindow(); } } catch(ex) { } parent.openDialog("chrome://global/content/filepicker.xul", "", "chrome,modal,resizeable=yes,dependent=yes", o); this.mFile = o.retvals.file; lastDirectory = o.retvals.directory; return o.retvals.buttonStatus; } |
parent.openDialog("chrome: "", "chrome,modal,resizeable=yes,dependent=yes", o); this.mFile = o.retvals.file; lastDirectory = o.retvals.directory; return o.retvals.buttonStatus; | try { parent.openDialog("chrome: "", "chrome,modal,resizeable=yes,dependent=yes", o); this.mFile = o.retvals.file; lastDirectory = o.retvals.directory; return o.retvals.buttonStatus; } catch(ex) { dump("unable to open file picker\n" + ex + "\n"); } | show: function() { var o = new Object(); o.title = this.mTitle; o.mode = this.mMode; o.displayDirectory = this.mDisplayDirectory; o.defaultString = this.mDefaultString; o.filters = new Object(); o.filters.titles = this.mFilterTitles; o.filters.types = this.mFilters; o.retvals = new Object(); var parent; try { if (this.mParentWindow) { parent = this.mParentWindow; } else if (window) { parent = window; } else { var appShellService = Components.classes[APPSHELL_SERV_PROGID].getService(nsIAppShellService); parent = appShellService.GetHiddenWindow(); } } catch(ex) { } parent.openDialog("chrome://global/content/filepicker.xul", "", "chrome,modal,resizeable=yes,dependent=yes", o); this.mFile = o.retvals.file; lastDirectory = o.retvals.directory; return o.retvals.buttonStatus; } |
z.custom( 0, z.el.orig[prop] ); | if (prop == "opacity") z.custom(z.el.orig[prop], 1); else z.custom(0, z.el.orig[prop]); | z.show = function( p ){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.custom( 0, z.el.orig[prop] ); // Stupid IE, look what you made me do if ( prop != "opacity" ) y[prop] = "1px"; }; |
y.display = "block"; | z.el["orig"+prop] = this.cur(); | z.show = function(){ y.display = "block"; z.o.auto = true; z.custom(0,z.max()); }; |
y.display = "block"; | z.show = function(){ y.display = "block"; z.o.auto = true; z.custom(0,z.max()); }; |
|
"chrome,modal,resizeable=yes,dependent=yes", | "chrome,modal,titlebar,resizeable=yes,dependent=yes", | show: function() { var o = new Object(); o.title = this.mTitle; o.mode = this.mMode; o.displayDirectory = this.mDisplayDirectory; o.defaultString = this.mDefaultString; o.filters = new Object(); o.filters.titles = this.mFilterTitles; o.filters.types = this.mFilters; o.retvals = new Object(); dump("nsIDOMWindow id value = " + nsIDOMWindow.id + "\n"); var parent; try { if (this.mParentWindow) { parent = this.mParentWindow; } else if (typeof(window) == "object" && window != null) { parent = window; } else { try { var appShellService = Components.classes[APPSHELL_SERV_PROGID].getService(nsIAppShellService); parent = appShellService.getHiddenDOMWindow(); } catch(ex) { dump("Can't get parent. xpconnect hates me so we can't get one from the appShellService.\n"); dump(ex + "\n"); } } } catch(ex) { dump("fuck\n"); } try { parent.openDialog("chrome://global/content/filepicker.xul", "", "chrome,modal,resizeable=yes,dependent=yes", o); this.mFile = o.retvals.file; lastDirectory = o.retvals.directory; return o.retvals.buttonStatus; } catch(ex) { dump("unable to open file picker\n" + ex + "\n"); } } |
"chrome,titlebar", | "chrome,titlebar,dialog=yes", | show: function(aLauncher, aContext) { this.mLauncher = aLauncher; this.mContext = aContext; // Display the dialog using the Window Watcher interface. var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"] .getService( Components.interfaces.nsIWindowWatcher ); this.mDialog = ww.openWindow( null, // no parent "chrome://global/content/nsHelperAppDlg.xul", null, "chrome,titlebar", null ); // Hook this object to the dialog. this.mDialog.dialog = this; }, |
z.show = function( p ){ | z.show = function(){ | z.show = function( p ){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); // Begin the animation if (prop == "opacity") z.custom(z.el.orig[prop], 1); else z.custom(0, z.el.orig[prop]); // Stupid IE, look what you made me do if ( prop != "opacity" ) y[prop] = "1px"; }; |
z.o.show = true; | z.show = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); // Begin the animation z.custom(0, z.el.orig[prop]); // Stupid IE, look what you made me do if ( prop != "opacity" ) y[prop] = "1px"; }; |
|
show: function(a) { return this.each(function(){ this.style.display = this.$$oldblock ? this.$$oldblock : ''; if ( $.getCSS(this,"display") == "none" ) this.style.display = 'block'; }); }, | show: function() { return this.each(function(){ this.style.display = this.oldblock ? this.oldblock : ""; if ( $.css(this,"display") == "none" ) this.style.display = "block"; }); }, | show: function(a) { return this.each(function(){ this.style.display = this.$$oldblock ? this.$$oldblock : ''; if ( $.getCSS(this,"display") == "none" ) this.style.display = 'block'; }); }, |
"modal=yes,chrome,dialog=no,resizable=no", | "modal=yes,chrome,resizable=no", | function showACAdvanced(){ window.openDialog("chrome://communicator/content/pref/pref-smart_browsing-ac.xul", "", "modal=yes,chrome,dialog=no,resizable=no", document.getElementById("browserUrlbarAutoFill").getAttribute("value"), document.getElementById("browserUrlbarShowPopup").getAttribute("value"), document.getElementById("browserUrlbarShowSearch").getAttribute("value"));} |
window.frames["accountCentralPane"].location = acctCentralPage; | window.frames["accountCentralPane"].location.href = acctCentralPage; | function ShowAccountCentral(){ try { var acctCentralPage = pref.getComplexValue("mailnews.account_central_page.url", Components.interfaces.nsIPrefLocalizedString).data; GetUnreadCountElement().hidden = true; GetTotalCountElement().hidden = true; GetMessagePane().collapsed = true; document.getElementById("threadpane-splitter").collapsed = true; gSearchBox.collapsed = true; GetThreadTree().collapsed = true; document.getElementById("accountCentralBox").collapsed = false; window.frames["accountCentralPane"].location = acctCentralPage; if (!IsFolderPaneCollapsed()) GetFolderTree().focus(); gAccountCentralLoaded = true; } catch (ex) { dump("Error loading AccountCentral page -> " + ex + "\n"); return; }} |
}, | } | showAdvancedSound: function() { document.documentElement.openSubDialog("chrome://messenger/content/preferences/notifications.xul", "", null); }, |
function showById(id) | DWRUtil.showById = function(id) | function showById(id){ document.getElementById(id).style.display = 'block';} |
document.getElementById(id).style.display = 'block'; | var ele = document.getElementById(id); if (ele == null) { alert("showById() can't find an element with id: " + id + "."); throw id; } ele.style.display = 'block'; | function showById(id){ document.getElementById(id).style.display = 'block';} |
var calendarViewBox = document.getElementById("calendar-view-box"); var selectedDay; try { var selectedDay = calendarViewBox.selectedPanel.selectedDay; } catch(ex) {} if (!selectedDay) selectedDay = today(); calendarViewBox.selectedPanel = document.getElementById(type+"-view"); var view = calendarViewBox.selectedPanel; if (view.displayCalendar != getCompositeCalendar()) { view.displayCalendar = getCompositeCalendar(); view.timezone = calendarDefaultTimezone(); view.controller = ltnCalendarViewController; } view.goToDay(selectedDay); | switchToView(type); | function showCalendarView(type){ // If we got this call while a mail-view is being shown, we need to // hide all of the mail stuff so we have room to display the calendar var calendarViewBox = document.getElementById("calendar-view-box"); if (calendarViewBox.style.visibility == "collapse") { collapseElement(GetMessagePane()); collapseElement(document.getElementById("threadpane-splitter")); var searchBox = findMailSearchBox(); if (searchBox) { collapseElement(searchBox); } uncollapseElement(calendarViewBox); // Thunderbird is smart. It won't reload the message list if the user // clicks the same folder that's already selected. Therefore, we need // to not only remove the tree selection (so clicking triggers an event) // but also reset some of TB's internal variables. var treeSel = document.getElementById("folderTree").view.selection; treeSel.selectEventsSuppressed = true; treeSel.clearSelection(); treeSel.selectEventsSuppressed = false; gMsgFolderSelected = null; msgWindow.openFolder = null; } document.getElementById("displayDeck").selectedPanel = calendarViewBox; var calendarViewBox = document.getElementById("calendar-view-box"); var selectedDay; try { var selectedDay = calendarViewBox.selectedPanel.selectedDay; } catch(ex) {} // This dies if no view has even been chosen this session if (!selectedDay) selectedDay = today(); calendarViewBox.selectedPanel = document.getElementById(type+"-view"); var view = calendarViewBox.selectedPanel; if (view.displayCalendar != getCompositeCalendar()) { view.displayCalendar = getCompositeCalendar(); view.timezone = calendarDefaultTimezone(); view.controller = ltnCalendarViewController; } view.goToDay(selectedDay); // Set the labels for the context-menu var nextCommand = document.getElementById("context_next"); nextCommand.setAttribute("label", nextCommand.getAttribute("label-"+type)); var previousCommand = document.getElementById("context_previous") previousCommand.setAttribute("label", previousCommand.getAttribute("label-"+type));} |
tableElement.sytle.display="block"; | tableElement.style.display="block"; | function showCategory( id ) { var tableElement = document.getElementById(id + "_panel"); var downArrow = document.getElementById(id + "_expanded_img"); var rightArrow = document.getElementById(id + "_collapsed_img"); tableElement.sytle.display="block"; downArrow.style.display ="inline"; rightArrow.style.display ="none" } |
"width=600,height=400", null); | "", null); | showCertificates: function () { document.documentElement.openWindow("mozilla:certmanager", "chrome://pippki/content/certManager.xul", "width=600,height=400", null); }, |
"width=600,height=400", null); | "", null); | showCRLs: function () { document.documentElement.openWindow("Mozilla:CRLManager", "chrome://pippki/content/crlManager.xul", "width=600,height=400", null); }, |
gBookmarkID = window.arguments[0]; var resource = RDF.GetResource(gBookmarkID); | gResource = RDF.GetResource(window.arguments[0]); | function showDescription(){ initServices(); initBMService(); gBookmarkID = window.arguments[0]; var resource = RDF.GetResource(gBookmarkID); if (BookmarksUtils.isPersonalToolbarFolder(resource)) { var description = BookmarksUtils.getLocaleString("description_PersonalToolbarFolder"); var box = document.getElementById("description-box"); box.hidden = false; var textNode = document.createTextNode(description); document.getElementById("bookmarkDescription").appendChild(textNode); }} |
if (BookmarksUtils.isPersonalToolbarFolder(resource)) { | if (BookmarksUtils.isPersonalToolbarFolder(gResource)) { | function showDescription(){ initServices(); initBMService(); gBookmarkID = window.arguments[0]; var resource = RDF.GetResource(gBookmarkID); if (BookmarksUtils.isPersonalToolbarFolder(resource)) { var description = BookmarksUtils.getLocaleString("description_PersonalToolbarFolder"); var box = document.getElementById("description-box"); box.hidden = false; var textNode = document.createTextNode(description); document.getElementById("bookmarkDescription").appendChild(textNode); }} |
}, | } | showFileTypeActions: function () { document.documentElement.openWindow("Preferences:DownloadActions", "chrome://messenger/content/preferences/downloadactions.xul", "", null); }, |
document.documentElement.openSubDialog("chrome: | document.documentElement.openWindow("chrome: | showFileTypeActions: function () { document.documentElement.openSubDialog("chrome://messenger/content/preferences/downloadactions.xul", "", null); }, |
} | function showHeaderView(headerTable){ var headerEntry; for (index in headerTable) { headerEntry = headerTable[index]; if (headerEntry.valid) headerEntry.enclosingBox.removeAttribute('collapsed'); else // if the entry is invalid, always make sure it's collapsed headerEntry.enclosingBox.setAttribute('collapsed', true); }} |
|
hideButton(prefArray[i],prefBranch.getBoolPref(prefArray[i])); | document.getElementById("button-" + prefArray[i]).hidden = !(prefBranch.getBoolPref(prefArray[i])); | function ShowHideToolBarButtons(){ var prefBase = "mail.toolbars.showbutton."; var prefBranch = prefServices.getBranch(prefBase); var prefCount = {value:0}; var prefArray = prefBranch.getChildList("" , prefCount); if (prefArray && (prefCount.value > 0)) { for (var i=0;i < prefCount.value;i++) { hideButton(prefArray[i],prefBranch.getBoolPref(prefArray[i])); } }} |
window.frames["accountCentralPane"].location = acctCentralPage; | window.frames["accountCentralPane"].location.href = acctCentralPage; | function ShowingAccountCentral(){ try { var acctCentralPage = pref.getComplexValue("mailnews.account_central_page.url", Components.interfaces.nsIPrefLocalizedString).data; GetMessagePane().collapsed = true; document.getElementById("threadpane-splitter").collapsed = true; gSearchBox.collapsed = true; window.frames["accountCentralPane"].location = acctCentralPage; if (!IsFolderPaneCollapsed()) GetFolderTree().focus(); gAccountCentralLoaded = true; } catch (ex) { dump("Error loading AccountCentral page -> " + ex + "\n"); }} |
GetThreadTree().boxObject.height; } | function ShowingThreadPane(){ gSearchBox.collapsed = false; var threadPaneSplitter = document.getElementById("threadpane-splitter"); threadPaneSplitter.collapsed = false; if (!threadPaneSplitter.hidden && threadPaneSplitter.getAttribute("state") != "collapsed") GetMessagePane().collapsed = false; document.getElementById("key_toggleMessagePane").removeAttribute("disabled");} |
|
var history = Components.classes['component: | var history = Components.classes['@mozilla.org/browser/global-history;1']; | function ShowLastPageVisted() { dump("start of ShowLastPageVisted()\n"); var lastpagevisited = "failure...not set"; var history = Components.classes['component://netscape/browser/global-history']; if (history) { history = history.getService(); } if (history) { history = history.QueryInterface(Components.interfaces.nsIGlobalHistory); } if (history) { try { lastpagevisited = history.GetLastPageVisted(); document.getElementById('result').value = lastpagevisited; } catch (ex) { dump(ex + "\n"); document.getElementById('result').value = "Error check console"; } }} |
const prefbase = "mailnews."; | const prefbase = "system.windows.lock_ui."; | function showMailIntegrationDialog() { var mapiRegistry; try { var mapiRegistryProgID = "@mozilla.org/mapiregistry;1" if (mapiRegistryProgID in Components.classes) { mapiRegistry = Components.classes[mapiRegistryProgID].getService(Components.interfaces.nsIMapiRegistry); } else { mapiRegistry = null; } } catch (ex) { mapiRegistry = null; } // showDialog is TRUE only if we did not bring up this dialog already // and we are not the default mail client var prefLocked = false; if (mapiRegistry && mapiRegistry.showDialog) { const prefbase = "mailnews."; try { var prefService = Components.classes["@mozilla.org/preferences-service;1"] .getService() .QueryInterface(Components.interfaces.nsIPrefService); var prefBranch = prefService.getBranch(prefbase); if (prefBranch && prefBranch.prefIsLocked("default_mail_client")) { prefLocked = true; } } catch (ex) {} try { if (!prefLocked && !mapiRegistry.isDefaultMailClient) mapiRegistry.showMailIntegrationDialog(window /* parent window */); } catch (ex) { dump("mapi code failed: " + ex + "\n"); } }} |
if (prefBranch && prefBranch.prefIsLocked("default_mail_client")) { | if (prefBranch && prefBranch.prefIsLocked("defaultMailClient")) { | function showMailIntegrationDialog() { var mapiRegistry; try { var mapiRegistryProgID = "@mozilla.org/mapiregistry;1" if (mapiRegistryProgID in Components.classes) { mapiRegistry = Components.classes[mapiRegistryProgID].getService(Components.interfaces.nsIMapiRegistry); } else { mapiRegistry = null; } } catch (ex) { mapiRegistry = null; } // showDialog is TRUE only if we did not bring up this dialog already // and we are not the default mail client var prefLocked = false; if (mapiRegistry && mapiRegistry.showDialog) { const prefbase = "mailnews."; try { var prefService = Components.classes["@mozilla.org/preferences-service;1"] .getService() .QueryInterface(Components.interfaces.nsIPrefService); var prefBranch = prefService.getBranch(prefbase); if (prefBranch && prefBranch.prefIsLocked("default_mail_client")) { prefLocked = true; } } catch (ex) {} try { if (!prefLocked && !mapiRegistry.isDefaultMailClient) mapiRegistry.showMailIntegrationDialog(window /* parent window */); } catch (ex) { dump("mapi code failed: " + ex + "\n"); } }} |
mapiRegistry.isDefaultMailClient = prefBranch.getBoolPref("defaultMailClient") ; | function showMailIntegrationDialog() { var mapiRegistry; try { var mapiRegistryProgID = "@mozilla.org/mapiregistry;1" if (mapiRegistryProgID in Components.classes) { mapiRegistry = Components.classes[mapiRegistryProgID].getService(Components.interfaces.nsIMapiRegistry); } else { mapiRegistry = null; } } catch (ex) { mapiRegistry = null; } // showDialog is TRUE only if we did not bring up this dialog already // and we are not the default mail client var prefLocked = false; if (mapiRegistry && mapiRegistry.showDialog) { const prefbase = "mailnews."; try { var prefService = Components.classes["@mozilla.org/preferences-service;1"] .getService() .QueryInterface(Components.interfaces.nsIPrefService); var prefBranch = prefService.getBranch(prefbase); if (prefBranch && prefBranch.prefIsLocked("default_mail_client")) { prefLocked = true; } } catch (ex) {} try { if (!prefLocked && !mapiRegistry.isDefaultMailClient) mapiRegistry.showMailIntegrationDialog(window /* parent window */); } catch (ex) { dump("mapi code failed: " + ex + "\n"); } }} |
|
HideMenu(active) | HideMenu(active); | function ShowMenu(id) { if(active != 0) { if (id == active) { HideMenu(active) } else { HideMenu(active) ShowMenu(id) } } else { var elementbutton = FetchElement("menu_"+id) var buttonleft = GetLeft(elementbutton) var buttontop = GetTop(elementbutton) var buttonwidth = elementbutton.offsetWidth var buttonheight = elementbutton.offsetHeight var elementmenu = FetchElement("popup_"+id) var menuwidth = elementmenu.offsetWidth if((buttonleft+menuwidth) >= document.body.clientWidth) { var posx = buttonleft + buttonwidth - menuwidth } else { var posx = buttonleft } var posy = buttontop + buttonheight elementmenu.style.zIndex = 1 elementmenu.style.left = posx+'px' elementmenu.style.top = posy+'px' elementmenu.style.visibility = 'visible' active = id MenuEvent(active) }} |
HideMenu(active) ShowMenu(id) | HideMenu(active); ShowMenu(id); | function ShowMenu(id) { if(active != 0) { if (id == active) { HideMenu(active) } else { HideMenu(active) ShowMenu(id) } } else { var elementbutton = FetchElement("menu_"+id) var buttonleft = GetLeft(elementbutton) var buttontop = GetTop(elementbutton) var buttonwidth = elementbutton.offsetWidth var buttonheight = elementbutton.offsetHeight var elementmenu = FetchElement("popup_"+id) var menuwidth = elementmenu.offsetWidth if((buttonleft+menuwidth) >= document.body.clientWidth) { var posx = buttonleft + buttonwidth - menuwidth } else { var posx = buttonleft } var posy = buttontop + buttonheight elementmenu.style.zIndex = 1 elementmenu.style.left = posx+'px' elementmenu.style.top = posy+'px' elementmenu.style.visibility = 'visible' active = id MenuEvent(active) }} |
var elementbutton = FetchElement("menu_"+id) var buttonleft = GetLeft(elementbutton) var buttontop = GetTop(elementbutton) var buttonwidth = elementbutton.offsetWidth var buttonheight = elementbutton.offsetHeight var elementmenu = FetchElement("popup_"+id) var menuwidth = elementmenu.offsetWidth | var elementbutton = FetchElement("menu_"+id); var buttonleft = GetLeft(elementbutton); var buttontop = GetTop(elementbutton); var buttonwidth = elementbutton.offsetWidth; var buttonheight = elementbutton.offsetHeight; var elementmenu = FetchElement("popup_"+id); var menuwidth = elementmenu.offsetWidth; | function ShowMenu(id) { if(active != 0) { if (id == active) { HideMenu(active) } else { HideMenu(active) ShowMenu(id) } } else { var elementbutton = FetchElement("menu_"+id) var buttonleft = GetLeft(elementbutton) var buttontop = GetTop(elementbutton) var buttonwidth = elementbutton.offsetWidth var buttonheight = elementbutton.offsetHeight var elementmenu = FetchElement("popup_"+id) var menuwidth = elementmenu.offsetWidth if((buttonleft+menuwidth) >= document.body.clientWidth) { var posx = buttonleft + buttonwidth - menuwidth } else { var posx = buttonleft } var posy = buttontop + buttonheight elementmenu.style.zIndex = 1 elementmenu.style.left = posx+'px' elementmenu.style.top = posy+'px' elementmenu.style.visibility = 'visible' active = id MenuEvent(active) }} |
var posx = buttonleft + buttonwidth - menuwidth | var posx = buttonleft + buttonwidth - menuwidth; | function ShowMenu(id) { if(active != 0) { if (id == active) { HideMenu(active) } else { HideMenu(active) ShowMenu(id) } } else { var elementbutton = FetchElement("menu_"+id) var buttonleft = GetLeft(elementbutton) var buttontop = GetTop(elementbutton) var buttonwidth = elementbutton.offsetWidth var buttonheight = elementbutton.offsetHeight var elementmenu = FetchElement("popup_"+id) var menuwidth = elementmenu.offsetWidth if((buttonleft+menuwidth) >= document.body.clientWidth) { var posx = buttonleft + buttonwidth - menuwidth } else { var posx = buttonleft } var posy = buttontop + buttonheight elementmenu.style.zIndex = 1 elementmenu.style.left = posx+'px' elementmenu.style.top = posy+'px' elementmenu.style.visibility = 'visible' active = id MenuEvent(active) }} |
var posx = buttonleft | var posx = buttonleft; | function ShowMenu(id) { if(active != 0) { if (id == active) { HideMenu(active) } else { HideMenu(active) ShowMenu(id) } } else { var elementbutton = FetchElement("menu_"+id) var buttonleft = GetLeft(elementbutton) var buttontop = GetTop(elementbutton) var buttonwidth = elementbutton.offsetWidth var buttonheight = elementbutton.offsetHeight var elementmenu = FetchElement("popup_"+id) var menuwidth = elementmenu.offsetWidth if((buttonleft+menuwidth) >= document.body.clientWidth) { var posx = buttonleft + buttonwidth - menuwidth } else { var posx = buttonleft } var posy = buttontop + buttonheight elementmenu.style.zIndex = 1 elementmenu.style.left = posx+'px' elementmenu.style.top = posy+'px' elementmenu.style.visibility = 'visible' active = id MenuEvent(active) }} |
var posy = buttontop + buttonheight | var posy = buttontop + buttonheight; | function ShowMenu(id) { if(active != 0) { if (id == active) { HideMenu(active) } else { HideMenu(active) ShowMenu(id) } } else { var elementbutton = FetchElement("menu_"+id) var buttonleft = GetLeft(elementbutton) var buttontop = GetTop(elementbutton) var buttonwidth = elementbutton.offsetWidth var buttonheight = elementbutton.offsetHeight var elementmenu = FetchElement("popup_"+id) var menuwidth = elementmenu.offsetWidth if((buttonleft+menuwidth) >= document.body.clientWidth) { var posx = buttonleft + buttonwidth - menuwidth } else { var posx = buttonleft } var posy = buttontop + buttonheight elementmenu.style.zIndex = 1 elementmenu.style.left = posx+'px' elementmenu.style.top = posy+'px' elementmenu.style.visibility = 'visible' active = id MenuEvent(active) }} |
elementmenu.style.zIndex = 1 elementmenu.style.left = posx+'px' elementmenu.style.top = posy+'px' elementmenu.style.visibility = 'visible' active = id MenuEvent(active) | elementmenu.style.zIndex = 1; elementmenu.style.left = posx+'px'; elementmenu.style.top = posy+'px'; elementmenu.style.visibility = 'visible'; active = id; MenuEvent(active); | function ShowMenu(id) { if(active != 0) { if (id == active) { HideMenu(active) } else { HideMenu(active) ShowMenu(id) } } else { var elementbutton = FetchElement("menu_"+id) var buttonleft = GetLeft(elementbutton) var buttontop = GetTop(elementbutton) var buttonwidth = elementbutton.offsetWidth var buttonheight = elementbutton.offsetHeight var elementmenu = FetchElement("popup_"+id) var menuwidth = elementmenu.offsetWidth if((buttonleft+menuwidth) >= document.body.clientWidth) { var posx = buttonleft + buttonwidth - menuwidth } else { var posx = buttonleft } var posy = buttontop + buttonheight elementmenu.style.zIndex = 1 elementmenu.style.left = posx+'px' elementmenu.style.top = posy+'px' elementmenu.style.visibility = 'visible' active = id MenuEvent(active) }} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.