rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
window.opener.gRefresh = true;
function onOK(){ var len = gDeletedDirectories.length; for (var i=0; i< len; i++){ gPrefInt.DeleteBranch(gDeletedDirectories[i]); } window.close();}
kBMS.AddBookmarkToFolder(url, rFolder, gFld_Name.value, gBookmarkCharset);
kBMS.createBookmarkEx(gFld_Name.value, url, gBookmarkCharset, rFolder, -1);
function onOK(){ if (!document.getElementById("folderbox").hasAttribute("hidden")) { var bookmarkView = document.getElementById("bookmarks-view"); var currentIndex = bookmarkView.currentIndex; if (currentIndex != -1) gCreateInFolder = bookmarkView.outlinerBuilder.getResourceAtIndex(currentIndex).Value; ...
dump("New row "+i+": "+newRow+"\n");
function onOK(){ rows = ValidateNumberString(dialog.rowsInput.value, 1, maxRows); if (rows == "") { // Set focus to the offending control dialog.rowsInput.focus(); return; } columns = ValidateNumberString(dialog.columnsInput.value, 1, maxColumns); if (columns == "") { // Set focus to the offending cont...
dump("New cell "+j+": "+newCell+"\n");
function onOK(){ rows = ValidateNumberString(dialog.rowsInput.value, 1, maxRows); if (rows == "") { // Set focus to the offending control dialog.rowsInput.focus(); return; } columns = ValidateNumberString(dialog.columnsInput.value, 1, maxColumns); if (columns == "") { // Set focus to the offending cont...
if(ValidateData()) { editorShell.BeginBatchChanges();
function onOK(){ if(ValidateData()) { editorShell.BeginBatchChanges(); if(titleWasEdited) { try { editorShell.SetDocumentTitle(title); } catch (ex) {} } if(charsetWasChanged) { SetMetaElementContent(contenttypeElement, "text/html; charset=" + charset, insertNewContentType); edit...
if(titleWasEdited) { try { editorShell.SetDocumentTitle(title); } catch (ex) {} }
editorShell.BeginBatchChanges();
function onOK(){ if(ValidateData()) { editorShell.BeginBatchChanges(); if(titleWasEdited) { try { editorShell.SetDocumentTitle(title); } catch (ex) {} } if(charsetWasChanged) { SetMetaElementContent(contenttypeElement, "text/html; charset=" + charset, insertNewContentType); edit...
return false; }
function onOK(){ if(ValidateData()) { editorShell.BeginBatchChanges(); if(titleWasEdited) { try { editorShell.SetDocumentTitle(title); } catch (ex) {} } if(charsetWasChanged) { SetMetaElementContent(contenttypeElement, "text/html; charset=" + charset, insertNewContentType); edit...
window.arguments[0].url = gUrls.join("|");
window.arguments[0].urls = gUrls; window.arguments[0].names = gNames;
function onOK(aEvent){ window.arguments[0].url = gUrls.join("|");}
dialog.findKey.select(); dialog.findKey.focus();
function onOK(){ // Transfer dialog contents to the find service. saveFindData(); // set up the find instance gFindInst.searchString = dialog.findKey.value; gFindInst.matchCase = dialog.caseSensitive.checked; gFindInst.wrapFind = dialog.wrap.checked; gFindInst.findBackwards = dialog.searchBackwards.che...
name = dialog.nameInput.value;
name = nameInput.value;
function onOK(){ name = dialog.nameInput.value; name = TrimString(name); if (name.length == 0) { dump("EMPTY ANCHOR STRING\n"); //TODO: POPUP ERROR DIALOG HERE } else { // Replace spaces with "_" else it causes trouble in URL parsing name = ReplaceWhitespace(name, "_"); anchorElement.setAttribute("na...
var isDir = file.isDirectory(); var isFile = file.isFile();
isDir = file.isDirectory(); isFile = file.isFile();
function onOK(){ var ret = nsIFilePicker.returnCancel; var isDir = false; var isFile = false; var input = textInput.value; if (input[0] == '~') // XXX XP? input = homeDir.path+ input.substring(1); var file = sfile.clone().QueryInterface(nsILocalFile); if (!file) return false; /* XXX we need an XP way to ...
ret = nsIFilePicker.returnOK;
} else { retvals.directory = sfile.path;
function onOK(){ var ret = nsIFilePicker.returnCancel; var isDir = false; var isFile = false; var input = textInput.value; if (input[0] == '~') // XXX XP? input = homeDir.path+ input.substring(1); var file = sfile.clone().QueryInterface(nsILocalFile); if (!file) return false; /* XXX we need an XP way to ...
ret = nsIFilePicker.returnOK;
function onOK(){ var ret = nsIFilePicker.returnCancel; var isDir = false; var isFile = false; var input = textInput.value; if (input[0] == '~') // XXX XP? input = homeDir.path+ input.substring(1); var file = sfile.clone().QueryInterface(nsILocalFile); if (!file) return false; /* XXX we need an XP way to ...
CreateVirtualFolder(name, parentFolder, gSearchFolderURIs, gSearchTermSession.searchTerms);
CreateVirtualFolder(name, parentFolder, gSearchFolderURIs, gSearchTermSession.searchTerms, searchOnline);
function onOK(){ var name = gDialog.nameField.value; var uri = gDialog.picker.getAttribute("uri"); var messengerBundle = document.getElementById("bundle_messenger"); if (!gSearchFolderURIs) { window.alert(messengerBundle.getString('alertNoSearchFoldersSelected')); return false; } if (window.arguments[0]....
window.opener.gNewServerString = gPref_string_desc;
window.opener.gNewServerString = gPref_string_desc; window.opener.gUpdate = true;
function onOK(){ var pref_string_content = ""; var pref_string_title = ""; if (!gPrefInt) { try { gPrefInt = Components.classes["@mozilla.org/preferences;1"]; gPrefInt = gPrefInt.getService(Components.interfaces.nsIPref); } catch (ex) { dump("failed to get prefs service!\n"); gPrefInt = ...
newCell = editorShell.CreateElementWithDefaults("td");
var newCell = editorShell.CreateElementWithDefaults("td");
function onOK(){ if (ValidateData()) { editorShell.CloneAttributes(tableElement, globalElement); // Create necessary rows and cells for the table // AFTER BUG 30378 IS FIXED, DON'T INSERT TBODY! var tableBody = editorShell.CreateElementWithDefaults("tbody"); if (tableBody) { tableElement.append...
dump("CLOSING EdHLineProps\n");
function OnOK(){ if (ValidateData()) { window.close(); } }
const group = kBMS.createGroup(gFld_Name.value, rFolder);
const group = kBMS.createGroupInContainer(gFld_Name.value, rFolder, -1);
function onOK(){ if (!document.getElementById("folderbox").hasAttribute("hidden")) { var bookmarkView = document.getElementById("bookmarks-view"); var currentIndex = bookmarkView.currentIndex; if (currentIndex != -1) gCreateInFolder = bookmarkView.treeBuilder.getResourceAtIndex(currentIndex).Value; } /...
kBMS.createBookmarkWithDetails(groups[i].name, url,
kBMS.createBookmarkInContainer(groups[i].name, url,
function onOK(){ if (!document.getElementById("folderbox").hasAttribute("hidden")) { var bookmarkView = document.getElementById("bookmarks-view"); var currentIndex = bookmarkView.currentIndex; if (currentIndex != -1) gCreateInFolder = bookmarkView.treeBuilder.getResourceAtIndex(currentIndex).Value; } /...
var newBookmark = kBMS.createBookmarkWithDetails(gFld_Name.value, url, gBookmarkCharset, rFolder, -1);
var newBookmark = kBMS.createBookmarkInContainer(gFld_Name.value, url, gBookmarkCharset, rFolder, -1);
function onOK(){ if (!document.getElementById("folderbox").hasAttribute("hidden")) { var bookmarkView = document.getElementById("bookmarks-view"); var currentIndex = bookmarkView.currentIndex; if (currentIndex != -1) gCreateInFolder = bookmarkView.treeBuilder.getResourceAtIndex(currentIndex).Value; } /...
var shell = Components.classes["@mozilla.org/browser/shell-service;1"] .getService(Components.interfaces.nsIShellService); if ("shouldBeDefaultBrowser" in parent && parent.shouldBeDefautBrowser)
var shell = getShellService(); if (shell && "shouldBeDefaultBrowser" in parent && parent.shouldBeDefautBrowser)
function onOK() { if (!('homepage' in parent)) return; // Replace pipes with commas to look nicer. parent.homepage = parent.homepage.replace(/\|/g,', '); var windowManager = Components.classes['@mozilla.org/appshell/window-mediator;1'].getService(); var windowManagerInterface = windowManager.QueryInterface(C...
Bundle.GetStringFromName("cannotHaveDuplicateFilterTitle"), Bundle.GetStringFromName("cannotHaveDuplicateFilterMessage")
gFilterBundle.getString("cannotHaveDuplicateFilterTitle"), gFilterBundle.getString("cannotHaveDuplicateFilterMessage")
function onOk(){ if (isDuplicateFilterNameExists()) { var commonDialogsService = Components.classes["@mozilla.org/appshell/commonDialogs;1"].getService(); commonDialogsService = commonDialogsService.QueryInterface(Components.interfaces.nsICommonDialogs); if (commonDial...
dump("Exception occured in InsertElementAtSelection\n"); } } imageMap = globalMap.cloneNode(true); if (insertNewIMap){ try { editorShell.editorDocument.body.appendChild(imageMap); } catch (e) {
function onOK(){ // handle insertion of new image if (ValidateData()) { // All values are valid - copy to actual element in doc or // element created to insert editorShell.CloneAttributes(imageElement, globalElement); if (insertNew) { try { // 'true' means delete the selection before in...
if (mapiRegistry) { if (document.getElementById("mailnewsEnableMapi").checked) mapiRegistry.setDefaultMailClient(); else mapiRegistry.unsetDefaultMailClient(); }
if (mapiRegistry && ("mapiPref" in parent) && (mapiRegistry.isDefaultMailClient != parent.mapiPref.isDefaultMailClient)) { mapiRegistry.isDefaultMailClient = parent.mapiPref.isDefaultMailClient ; }
function onOK(){ try { var mapiRegistry = Components.classes[ "@mozilla.org/mapiregistry;1" ]. getService( Components.interfaces.nsIMapiRegistry ); } catch(ex){ mapiRegistry = null; } if (mapiRegistry) { if (document.getElementById("mailnewsEnableMapi").checked) ...
promptService.Alert(window,
promptService.alert(window,
function onOk(){ if (isDuplicateFilterNameExists()) { var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(); promptService = promptService.QueryInterface(Components.interfaces.nsIPromptService); if (promptService) { promptService.Aler...
prefs.savePrefFile(null);
prefs.SavePrefFile();
function onOk() { onSave(); // hack hack - save the prefs file NOW in case we crash try { var prefs = Components.classes["@mozilla.org/preferences;1"].getService(Components.interfaces.nsIPref); prefs.savePrefFile(null); } catch (ex) { dump("Error saving prefs!\n"); } return true;}
var i;
function onOkButton( ) // "Acknowledge All Alarms" button{ // Set each alarm's last alarm ack date/time to now for( i = 0; i < gAllEvents.length; i++ ) { gAllEvents[i].lastAlarmAck = new Date(); } // Modify each event to locally save the new last alarm ack date/time for( i = 0; i < gAllEvents.length;...
onOK(); window.close();
if ( onOK() ) window.close();
function onOKClick(){ // Clicking on OK should not use LastPickedColor automatically // as using Enter ("default") key does LastPickedIsDefault = false; onOK(); window.close();}
gToDo.url = getFieldValue( "uri-field" );
function onOKCommand(){ // get values from the form and put them into the event gToDo.title = getFieldValue( "title-field" ); gToDo.description = getFieldValue( "description-field" ); var dueDate = getDateTimeFieldValue( "due-date-text" ); gToDo.due.year = dueDate.getYear()+1900; gToDo.due.month...
gEvent.start.setSeconds( 0 );
function onOKCommand(){ // get values from the form and put them into the event gEvent.title = getFieldValue( "title-field" ); gEvent.description = getFieldValue( "description-field" ); gEvent.location = getFieldValue( "location-field" ); gEvent.category = getFieldValue( "category-field" ); ...
gToDo.due.hour = 23; gToDo.due.minute = 59; var startDate = getDateTimeFieldValue( "start-date-text" ); gToDo.start.year = startDate.getYear()+1900; gToDo.start.month = startDate.getMonth(); gToDo.start.day = startDate.getDate(); gToDo.start.hour = 0; gToDo.start.minute = 0;
function onOKCommand(){ // get values from the form and put them into the event gToDo.title = getFieldValue( "title-field" ); gToDo.description = getFieldValue( "description-field" ); var dueDate = getDateTimeFieldValue( "due-date-text" ); gToDo.due.year = dueDate.getYear()+1900; gToDo.due.month...
gEvent.recurForever = getFieldValue( "repeat-forever-radio", "selected" );
gEvent.recurForever = getFieldValue( "repeat-forever-radio", "checked" );
function onOKCommand(){ // get values from the form and put them into the event gEvent.title = getFieldValue( "title-field" ); gEvent.description = getFieldValue( "description-field" ); gEvent.location = getFieldValue( "location-field" ); gEvent.category = getFieldValue( "category-field" ); ...
debug( "!!!-->in calendarEventDialog.js, alarmUnits is "+gEvent.alarmUnits );
dump( "!!!-->in calendarEventDialog.js, alarmUnits is "+gEvent.alarmUnits );
function onOKCommand(){ // get values from the form and put them into the event gEvent.title = getFieldValue( "title-field" ); gEvent.description = getFieldValue( "description-field" ); gEvent.location = getFieldValue( "location-field" ); gEvent.allDay = getFieldValue( "all-day-event-check...
debug( "!!!-->in calendarEventDialog.js, alarmEmailAddress is "+gEvent.alarmEmailAddress );
dump( "!!!-->in calendarEventDialog.js, alarmEmailAddress is "+gEvent.alarmEmailAddress );
function onOKCommand(){ // get values from the form and put them into the event gEvent.title = getFieldValue( "title-field" ); gEvent.description = getFieldValue( "description-field" ); gEvent.location = getFieldValue( "location-field" ); gEvent.allDay = getFieldValue( "all-day-event-check...
gToDo.status = eval( "gToDo."+getFieldValue( "status-field" ) );
if( getFieldValue( "status-field" ) != "" ) gToDo.status = eval( "gToDo."+getFieldValue( "status-field" ) );
function onOKCommand(){ // get values from the form and put them into the event gToDo.title = getFieldValue( "title-field" ); gToDo.description = getFieldValue( "description-field" ); gToDo.status = eval( "gToDo."+getFieldValue( "status-field" ) ); var dueDate = getDateTimeFieldValue( "due-date-...
event.isPrivate = getFieldValue( "private-checkbox", "checked" );
if (getFieldValue("private-checkbox", "checked")) event.privacy = "PRIVATE"; else event.privacy = "PUBLIC";
function onOKCommand(){ event = gEvent; // if this event isn't mutable, we need to clone it like a sheep var originalEvent = event; if (!event.isMutable) // I will cut vlad for making me do this QI event = originalEvent.clone().QueryInterface(Components.interfaces.calIEvent); // get values ...
onOperationComplete: function(aStatusCode, aResource, aOperation, aClosure) { aClosure.onOperationComplete(this, aStatusCode, 0, null, null);
listener.onOperationComplete = function(aStatusCode, aResource, aOperation, aClosure) {
onOperationComplete: function(aStatusCode, aResource, aOperation, aClosure) { // aClosure is the listener aClosure.onOperationComplete(this, aStatusCode, 0, null, null); LOG("WebDavListener.onOperationComplete() called"); return; },
LOG("WebDavListener.onOperationComplete() called"); return; },
if (aStatusCode == 204 || aStatusCode == 201) { LOG("Item modified successfully."); var retVal = Components.results.NS_OK; } else { if (aStatusCode > 999) { aStatusCode = "0x " + aStatusCode.toString(16); } LOG("Error modifying item: " + aStatusCode); retVal = Components.results.NS_ERROR_FAILURE; } if (aList...
onOperationComplete: function(aStatusCode, aResource, aOperation, aClosure) { // aClosure is the listener aClosure.onOperationComplete(this, aStatusCode, 0, null, null); LOG("WebDavListener.onOperationComplete() called"); return; },
newEvent.parent.modifyItem(newEvent, null);
doTransaction('modify', newEvent, newEvent.parent, calendarEvent, null);
onOperationComplete: function(calendar, status, type, id, detail) { var newStartDate = jsDateToDateTime(gDropzoneStartTime); if (calendarEvent) { // if we got a calendar event from onGetResult, then clone it and modify its // time directly and then cal...
function onP12Load()
function onP12Load(disableOkButton)
function onP12Load(){ document.documentElement.getButton("accept").disabled = true; pw1 = document.getElementById("pw1"); params = window.arguments[0].QueryInterface(nsIDialogParamBlock); // Select first password field document.getElementById('pw1').focus();}
document.documentElement.getButton("accept").disabled = true;
document.documentElement.getButton("accept").disabled = disableOkButton;
function onP12Load(){ document.documentElement.getButton("accept").disabled = true; pw1 = document.getElementById("pw1"); params = window.arguments[0].QueryInterface(nsIDialogParamBlock); // Select first password field document.getElementById('pw1').focus();}
em.update(gUpdateWizard.items, gUpdateWizard.items.length, true, this);
em.update([], 0, 2, this);
onPageShow: function () { gUpdateWizard.setButtonLabels(null, true, "nextButtonText", true, "cancelButtonText", false); var em = Components.classes["@mozilla.org/extensions/manager;1"] .getService(Components.interfaces.ns...
nsIUpdateItem.TYPE_ADDON, { });
nsIUpdateItem.TYPE_ADDON, false, { });
onPageShow: function() { var updateName = gUpdates.strings.getFormattedString("updateName", [gUpdates.brandName, gUpdates.update.version]); var updateNameElement = document.getElementById("updateName"); updateNameElement.value = updateName; var displayType = gUpdates.strings.getString("updateType_" ...
if (gUpdates.update.channel == "nightly") updateName = updateName + " nightly (" + gUpdates.update.buildID + ")";
onPageShow: function() { var updateName = gUpdates.strings.getFormattedString("updateName", [gUpdates.brandName, gUpdates.update.version]); var updateNameElement = document.getElementById("updateName"); updateNameElement.value = updateName; var severity = gUpdates.update.isSecurityUpdate ? "minor" :...
for (i=0; i < menuItems.length; i++)
for (var i=0; i < menuItems.length; i++)
function onParagraphFormatChange(paraMenuList, commandID){ var commandNode = document.getElementById(commandID); var state = commandNode.getAttribute("state"); var menuList = document.getElementById("ParagraphSelect"); if (!menuList) return; //dump("Updating paragraph format with " + state + "\n"); // force mat...
dump("Updating font face with " + state + "\n");
dump("Updating paragraph format with " + state + "\n");
function onParagraphFormatChange(paraMenuList, commandID){ var commandNode = document.getElementById(commandID); var state = commandNode.getAttribute("state"); var menuList = document.getElementById("ParagraphSelect"); if (!menuList) return; dump("Updating font face with " + state + "\n"); // force match with "...
oeDatePicker.gSelectedDate.setDate( 1 );
oeDatePicker.onpopupshowing = function( popup ){ // remember the popup item so we can close it when we are done oeDatePicker.gPopup = popup; // get the start date from the popup value attribute and select it var startDate = popup.getAttribute( "value" ); oeDatePicker.gOriginalDate = new Date( star...
var amPmItem = document.getElementById( "oe-time-picker-am-box" ); var hours12 = hours24;
amPmItem = document.getElementById( "oe-time-picker-am-box" ); hours12 = hours24;
oeTimePicker.onpopupshowing = function( popup ){ // remember the popup oeTimePicker.gPopup = popup; // if there is a Date object in the popup item's value attribute, use it, // otherwise use Now. var inputTime = oeTimePicker.gPopup.getAttribute( "value" ); if( inputTime ) { oeTimePicker....
var amPmItem = document.getElementById( "oe-time-picker-pm-box" ); var hours12 = hours24 - 12;
amPmItem = document.getElementById( "oe-time-picker-pm-box" ); hours12 = hours24 - 12;
oeTimePicker.onpopupshowing = function( popup ){ // remember the popup oeTimePicker.gPopup = popup; // if there is a Date object in the popup item's value attribute, use it, // otherwise use Now. var inputTime = oeTimePicker.gPopup.getAttribute( "value" ); if( inputTime ) { oeTimePicker....
"chrome,centerscreen,resizable=yes", true);
"chrome,centerscreen,dependent", true);
function onPopupWindow(aEvent) { var firstPopup = pref.getBoolPref("privacy.popups.first_popup"); var blockingEnabled = pref.getBoolPref("dom.disable_open_during_load"); if (blockingEnabled) { pref.setBoolPref("privacy.popups.first_popup", false); return; } if (firstPopup) { var showDialog = true; var...
} else if (aName == "inspector.blink.invert") { this.mFlasher.invert = PrefUtils.getPref("inspector.blink.invert");
onPrefChanged: function(aName) { if (aName == "inspector.dom.showAnon") this.setFlashSelected(PrefUtils.getPref("inspector.blink.on")); if (aName == "inspector.blink.on") this.setFlashSelected(PrefUtils.getPref("inspector.blink.on")); if (this.mFlasher) { if (aName == "inspector.blink.border-...
if(!(account.incomingServer.isSecureServer)) document.getElementById("server.isSecure").setAttribute("hidden", "true"); else document.getElementById("server.isSecure").removeAttribute("hidden"); if(!account.incomingServer.canEmptyTrashOnExit) { document.getElementById("server.emptyTrashOnExit").setAttribute("hidden", ...
function onPreInit(account, accountValues){ var type = parent.getAccountValue(account, accountValues, "server", "type", null, false); gRedirectorType = parent.getAccountValue(account, accountValues, "server", "redirectorType", null, false); hideShowControls(type);}
else document.getElementById("server.advancedbutton").removeAttribute("hidden");
function onPreInit(account, accountValues){ // Bug 134238 // Make sure server.isSecure will be saved before server.port preference parent.getAccountValue(account, accountValues, "server", "isSecure", null, false); var type = parent.getAccountValue(account, accountValues, "server", "type", null, false); gRedirector...
enableBiffUI();
function onPreInit(account, accountValues){ var type = parent.getAccountValue(account, accountValues, "server", "type"); hideShowControls(type);}
setupBiffUI();
function onPreInit(account, accountValues){ var type = parent.getAccountValue(account, accountValues, "server", "type"); hideShowControls(type); setupBiffUI();}
onProgress: function(request, position, totalSize) { var pm = document.getElementById("checkingProgress"); checkingProgress.setAttribute("mode", "normal"); checkingProgress.setAttribute("value", Math.floor(100 * (position/totalSize))); },
onProgress: function(request, context, progress, maxProgress) { request.QueryInterface(nsIIncrementalDownload); LOG("UI:DownloadingPage.onProgress", " " + request.URI.spec + ", " + progress + "/" + maxProgress); var name = gUpdates.strings.getFormattedString("downloadingPrefix", [gUpdates.update.name]); var status = t...
onProgress: function(request, position, totalSize) { var pm = document.getElementById("checkingProgress"); checkingProgress.setAttribute("mode", "normal"); checkingProgress.setAttribute("value", Math.floor(100 * (position/totalSize))); },
if (statusMeter.getAttribute("mode") != "normal") statusMeter.setAttribute("mode", "normal");
statusMeter.mode = "normal";
onProgress : function (request, current, max) { if (!this.useRealProgressFlag && request) return; if (!statusMeter) statusMeter = document.getElementById("statusbar-icon"); if (max > 0) { if (statusMeter.getAttribute("mode") != "normal") statusMeter.setAttribute("mode", "normal"); ...
statusMeter.value = percentage; statusMeter.progresstext = Math.round(percentage) + "%";
statusMeter.value = percentage;
onProgress : function (request, current, max) { if (!this.useRealProgressFlag && request) return; if (!statusMeter) statusMeter = document.getElementById("statusbar-icon"); if (max > 0) { if (statusMeter.getAttribute("mode") != "normal") statusMeter.setAttribute("mode", "normal"); ...
if (statusMeter.getAttribute("mode") != "undetermined") statusMeter.setAttribute("mode","undetermined");
statusMeter.mode = "undetermined";
onProgress : function (request, current, max) { if (!this.useRealProgressFlag && request) return; if (!statusMeter) statusMeter = document.getElementById("statusbar-icon"); if (max > 0) { if (statusMeter.getAttribute("mode") != "normal") statusMeter.setAttribute("mode", "normal"); ...
LOG("gDownloadingPage.onProgress: " + request.URI.spec + ", " + progress + "/" + maxProgress);
onProgress: function(request, context, progress, maxProgress) { request.QueryInterface(nsIIncrementalDownload); LOG("gDownloadingPage.onProgress: " + request.URI.spec + ", " + progress + "/" + maxProgress); var active = document.getElementById("activeDownloadItem"); active.setAttribute("progress", Mat...
if (percent > 1 && !(aAddon.xpiURL in this._urls)) {
if (percent > 1 && !(aAddon.xpiURL in this._urls))
onProgress: function (aAddon, aValue, aMaxValue) { var element = this.getElementForAddon(aAddon); if (!element) return; var percent = Math.round((aValue / aMaxValue) * 100); if (percent > 1 && !(aAddon.xpiURL in this._urls)) { this._urls[aAddon.xpiURL] = true; element.setAttribute("state", "dow...
element.setAttribute("state", "downloading"); } element.setAttribute("progress", percent);
onProgress: function (aAddon, aValue, aMaxValue) { var element = this.getElementForAddon(aAddon); if (!element) return; var percent = Math.round((aValue / aMaxValue) * 100); if (percent > 1 && !(aAddon.xpiURL in this._urls)) { this._urls[aAddon.xpiURL] = true; element.setAttribute("state", "dow...
element.setAttribute("status", this._formatKBytes(KBProgress, KBTotal));
var statusPrevious = element.getAttribute("status"); var statusCurrent = this._formatKBytes(KBProgress, KBTotal); if (statusCurrent != statusPrevious) element.setAttribute("status", statusCurrent);
onProgress: function (aAddon, aValue, aMaxValue) { var element = this.getElementForAddon(aAddon); if (!element) return; var percent = Math.round((aValue / aMaxValue) * 100); if (percent > 1 && !(aAddon.xpiURL in this._urls)) { this._urls[aAddon.xpiURL] = true; element.setAttribute("state", "dow...
aMaxTotalProgress ) { var overallProgress = aCurTotalProgress;
aMaxTotalProgress, aDownload ) {
onProgressChange64: function( aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress ) { var overallPr...
if ( now - this.lastUpdate < this.interval && aMaxTotalProgress != "-1" && parseInt( aCurTotalProgress ) < parseInt( aMaxTotalProgress ) ) {
if ( now - this.lastUpdate < this.interval ) {
onProgressChange64: function( aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress ) { var overallPr...
this.percent = Math.floor( ( overallProgress * 100.0 ) / aMaxTotalProgress );
this.percent = Math.floor( ( aCurTotalProgress * 100.0 ) / aMaxTotalProgress );
onProgressChange64: function( aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress ) { var overallPr...
status = this.replaceInsert( status, 1, parseInt( overallProgress/1024 + .5 ) );
status = this.replaceInsert( status, 1, parseInt( aCurTotalProgress/1024 + .5 ) );
onProgressChange64: function( aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress ) { var overallPr...
this.rate = ( aCurTotalProgress * 1000 ) / this.elapsed; status = this.replaceInsert( status, 3, this.rateToKRate( this.rate ) );
if ( aDownload ) { this.rate = aDownload.speed; } else { this.rate = ( aCurTotalProgress * 1000 ) / this.elapsed; } status = this.replaceInsert( status, 3, this.kRate.toFixed(1) );
onProgressChange64: function( aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress ) { var overallPr...
var docURLStr = elipseString(ProgressParams.docURL, true);
var docURLStr = elipseString(progressParams.docURL, true);
onProgressChange: function(aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress) { if (progressParams) { var docTitleStr = elipseString(progressParams.docTitle, false); if (docTitleStr != docTitle) { docTitle = docTitleStr; dia...
aMaxTotalProgress ) { return onProgressChange64(aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress);
aMaxTotalProgress, aDownload ) { return this.onProgressChange64(aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress, aDownload);
onProgressChange: function( aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress ) { return onProgressChange64(a...
{ if (progressParams) { var docTitleStr = elipseString(progressParams.docTitle, false); if (docTitleStr != docTitle) { docTitle = docTitleStr; dialog.title.value = docTitle; } var docURLStr = elipseString(progressParams.docURL, true); if (docURLStr != docURL && dialog.title != null) { docURL = docURLStr; if (docTitle =...
{ if (!progressParams) return; var docTitleStr = elipseString(progressParams.docTitle, false); if (docTitleStr != docTitle) { docTitle = docTitleStr; dialog.title.value = docTitle; } var docURLStr = elipseString(progressParams.docURL, true); if (docURLStr != docURL && dialog.title != null) { docURL = docURLStr; if (doc...
onProgressChange: function(aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress) { if (progressParams) { var docTitleStr = elipseString(progressParams.docTitle, false); if (docTitleStr != docTitle) { docTitle = docTitleStr; dia...
if (!this._userAgreedToPhishingEULA()) {
var pref = document.getElementById("browser.safebrowsing.dataProvider"); if (!this._userAgreedToPhishingEULA(pref.value)) {
onProviderChanged: function () { if (!this._userAgreedToPhishingEULA()) { this._disableOnloadPhishChecks(); } },
if ( (gSearchInput.searchMode == kQuickSearchHighlight || gSearchInput.searchMode == kQuickSearchBody)
if (gSearchInput && (gSearchInput.searchMode == kQuickSearchHighlight || gSearchInput.searchMode == kQuickSearchBody)
function onQuickSearchNewMsgLoaded(){ // if we are in highlighting mode and we have highlight text in the search box then // re-highlight this new message. // Optimization: We'll special case Message Body quick searches and highlight those as well as find in message // searches. if ( (gSearchInput.searchMode == k...
this._formHistoryResult = null;
onReadyStateChange: function() { // xxx use the real const here if (!this._request || this._request.readyState != 4) return; try { var status = this._request.status; } catch (e) { // The XML HttpRequest can throw NS_ERROR_NOT_AVAILABLE. return; } if (this._isBackoffError(status))...
this.onResultsReady(searchString, finalResults, finalComments);
this.onResultsReady(searchString, finalResults, finalComments, this._formHistoryResult);
onReadyStateChange: function() { // xxx use the real const here if (!this._request || this._request.readyState != 4) return; try { var status = this._request.status; } catch (e) { // The XML HttpRequest can throw NS_ERROR_NOT_AVAILABLE. return; } if (this._isBackoffError(status))...
if (this._request && this._request.readyState == 4) { try { var status = this._request.status; } catch (e) { return; } var responseText = this._request.responseText; if (status == 200 && responseText != "") { var searchString, results, queryURLs; var searchService = Components.classes["@mozilla.org/browser/search-serv...
if (!this._request || this._request.readyState != 4) return;
onReadyStateChange: function() { // xxx use the real const here if (this._request && this._request.readyState == 4) { try { var status = this._request.status; } catch (e) { // The XML HttpRequest can throw NS_ERROR_NOT_AVAILABLE. return; } var responseText = this._r...
var parts = responseText.split("\n"); results = parts[1] ? parts[1].split(",") : []; for (var i = 0; i < results.length; ++i) { results[i] = unescape(results[i]); results[i] = results[i].substr(1, results[i].length - 2); } }
try { var status = this._request.status; } catch (e) { return; }
onReadyStateChange: function() { // xxx use the real const here if (this._request && this._request.readyState == 4) { try { var status = this._request.status; } catch (e) { // The XML HttpRequest can throw NS_ERROR_NOT_AVAILABLE. return; } var responseText = this._r...
var comments = []; var historyResults = []; var historyComments = [];
if (this._isBackoffError(status)) { this._noteServerError(); return; }
onReadyStateChange: function() { // xxx use the real const here if (this._request && this._request.readyState == 4) { try { var status = this._request.status; } catch (e) { // The XML HttpRequest can throw NS_ERROR_NOT_AVAILABLE. return; } var responseText = this._r...
if (this._includeFormHistory && this._formHistoryResult && (this._formHistoryResult.searchResult == Components.interfaces.nsIAutoCompleteResult.RESULT_SUCCESS)) { for (var i = 0; i < this._formHistoryResult.matchCount; ++i) { var term = this._formHistoryResult.getValueAt(i);
var responseText = this._request.responseText; if (status != HTTP_OK || responseText == "") return;
onReadyStateChange: function() { // xxx use the real const here if (this._request && this._request.readyState == 4) { try { var status = this._request.status; } catch (e) { // The XML HttpRequest can throw NS_ERROR_NOT_AVAILABLE. return; } var responseText = this._r...
var dupIndex = results.indexOf(term); if (dupIndex != -1) results.splice(dupIndex, 1);
this._clearServerErrors();
onReadyStateChange: function() { // xxx use the real const here if (this._request && this._request.readyState == 4) { try { var status = this._request.status; } catch (e) { // The XML HttpRequest can throw NS_ERROR_NOT_AVAILABLE. return; } var responseText = this._r...
historyResults.push(term); historyComments.push(""); }
var searchString, results, queryURLs; var searchService = Cc["@mozilla.org/browser/search-service;1"]. getService(Ci.nsIBrowserSearchService); var sandboxHost = searchService.currentEngine.suggestionURI.prePath; var sandbox = new Components.utils.Sandbox(sandboxHost); var results2 = Components.utils.evalInSandbox(respo...
onReadyStateChange: function() { // xxx use the real const here if (this._request && this._request.readyState == 4) { try { var status = this._request.status; } catch (e) { // The XML HttpRequest can throw NS_ERROR_NOT_AVAILABLE. return; } var responseText = this._r...
this._formHistoryResult = null; }
if (results2[0]) { searchString = results2[0] ? results2[0] : ""; results = results2[1] ? results2[1] : []; } else {
onReadyStateChange: function() { // xxx use the real const here if (this._request && this._request.readyState == 4) { try { var status = this._request.status; } catch (e) { // The XML HttpRequest can throw NS_ERROR_NOT_AVAILABLE. return; } var responseText = this._r...
for (var i = 0; i < results.length; ++i) comments.push(""); if (comments.length > 0) comments[0] = this._strings.GetStringFromName("suggestion_label"); var finalResults = historyResults.concat(results); var finalComments = historyComments.concat(comments); this.onResultsReady(searchString, finalResults, finalComm...
var parts = responseText.split("\n"); results = parts[1] ? parts[1].split(",") : []; for (var i = 0; i < results.length; ++i) { results[i] = unescape(results[i]); results[i] = results[i].substr(1, results[i].length - 2);
onReadyStateChange: function() { // xxx use the real const here if (this._request && this._request.readyState == 4) { try { var status = this._request.status; } catch (e) { // The XML HttpRequest can throw NS_ERROR_NOT_AVAILABLE. return; } var responseText = this._r...
var comments = []; var historyResults = []; var historyComments = []; if (this._includeFormHistory && this._formHistoryResult && (this._formHistoryResult.searchResult == Ci.nsIAutoCompleteResult.RESULT_SUCCESS)) { for (var i = 0; i < this._formHistoryResult.matchCount; ++i) { var term = this._formHistoryResult.getVal...
onReadyStateChange: function() { // xxx use the real const here if (this._request && this._request.readyState == 4) { try { var status = this._request.status; } catch (e) { // The XML HttpRequest can throw NS_ERROR_NOT_AVAILABLE. return; } var responseText = this._r...
accountArray[result.serverId] = null;
delete accountArray[result.serverId];
function onRemoveAccount(event) { //dump("onRemoveAccount\n"); if (event.target.getAttribute("disabled") == "true") return; var result = getServerIdAndPageIdFromTree(accounttree); if (!result) return; if (result.serverId == "http://home.netscape.com/NC-rdf#PageTitleFakeAccount") { nsPrefBranch.setBoolPref("...
return onFindNext();
return false;
function onReplace(){ if (!gEditor) return false; // Does the current selection match the find string? var selection = gEditor.selection; var selStr = selection.toString(); var specStr = gReplaceDialog.findInput.value; if (!gReplaceDialog.caseSensitive.checked) { selStr = selStr.toLowerCase(); specStr =...
onMore(event, 0);
onMore(null);
function onReset(event){ while (gTotalSearchTerms>0) removeSearchRow(--gTotalSearchTerms); onMore(event, 0);}
gSearchLessButton.setAttribute("disabled", "true");
function onReset(event){ while (gTotalSearchTerms>0) removeSearchRow(--gTotalSearchTerms); onMore(event);}
onResultsReady: function(searchString, results, comments) {
onResultsReady: function(searchString, results, comments, formHistoryResult) {
onResultsReady: function(searchString, results, comments) { if (this._listener) { var result = new SuggestAutoCompleteResult( searchString, Ci.nsIAutoCompleteResult.RESULT_SUCCESS, 0, "", results, comments); this._listener.onSearchResult(this, result)...
comments);
comments, formHistoryResult);
onResultsReady: function(searchString, results, comments) { if (this._listener) { var result = new SuggestAutoCompleteResult( searchString, Ci.nsIAutoCompleteResult.RESULT_SUCCESS, 0, "", results, comments); this._listener.onSearchResult(this, result)...
this._listener = null;
onResultsReady: function(searchString, results, comments) { if (this._listener) { var result = new SuggestAutoCompleteResult( searchString, Ci.nsIAutoCompleteResult.RESULT_SUCCESS, 0, "", results, comments); this._listener.onSearchResult(this, result)...
Components.interfaces.nsIAutoCompleteResult.RESULT_SUCCESS,
Ci.nsIAutoCompleteResult.RESULT_SUCCESS,
onResultsReady: function(searchString, results, comments) { if (this._listener) { var result = new SuggestAutoCompleteResult( searchString, Components.interfaces.nsIAutoCompleteResult.RESULT_SUCCESS, 0, "", results, comments); this._listener.onSearchR...
document.getElementById("overrideGlobalPref").setAttribute("value", ""); if(directoriesList == "") document.getElementById("directoryServer").setAttribute("value", "none"); else document.getElementById("directoryServer").setAttribute("value", "");
function onSave(){ var override = document.getElementById("identity.overrideGlobalPref"); var autocomplete = document.getElementById("ldapAutocomplete"); var directoryServer = document.getElementById("identity.directoryServer"); var directoriesList = document.getElementById("directoriesList").getAttribute('va...
gIncomingServer.limitMessageSize = document.getElementById("offline.notDownload").checked;
gIncomingServer.limitOfflineMessageSize = document.getElementById("offline.notDownload").checked;
function onSave(){ var retentionSettings = new Array; var downloadSettings = new Array; gIncomingServer.limitMessageSize = document.getElementById("offline.notDownload").checked; gIncomingServer.maxMessageSize = document.getElementById("offline.notDownloadMin").value; if(document.getElementById("nntp.kee...
prefs.savePrefFile(null);
prefs.SavePrefFile();
function onSaveDefault(){ // "false" means set attributes on the globalElement, // not the real element being edited if (ValidateData()) { var prefs = GetPrefs(); if (prefs) { dump("Setting HLine prefs\n"); var alignInt; if (align == "left") { alignInt = 0; } else if (align == "rig...
dump("Setting HLine prefs\n");
function onSaveDefault(){ // "false" means set attributes on the globalElement, // not the real element being edited if (ValidateData()) { var prefs = GetPrefs(); if (prefs) { dump("Setting HLine prefs\n"); var alignInt; if (align == "left") { alignInt = 0; } else if (align == "rig...
dump("savePassword changed! (" + target.checked + ")\n");
_dd("savePassword changed! (" + target.checked + ")\n");
function onSavePassword(target) { dump("savePassword changed! (" + target.checked + ")\n"); var passwordField = document.getElementById("server.password"); if (!passwordField) return; if (target.checked) { passwordField.removeAttribute("disabled"); passwordField.value = savedPassword; }...
dump("setting up search..\n");
function onSearch(event){ dump("setting up search..\n"); gSearchSession.clearScopes(); // tell the search session what the new scope is if (!gCurrentFolder.isServer) gSearchSession.addScopeTerm(GetScopeForFolder(gCurrentFolder), gCurrentFolder); var searchSubfolders = documen...
dump("Kicking it off with " + gThreadTree.getAttribute("ref") + "\n");
function onSearch(event){ dump("setting up search..\n"); gSearchSession.clearScopes(); // tell the search session what the new scope is if (!gCurrentFolder.isServer) gSearchSession.addScopeTerm(GetScopeForFolder(gCurrentFolder), gCurrentFolder); var searchSubfolders = documen...
var str = "(";
var attrs;
function onSearch(){ gStatusText.setAttribute("label", ""); gPropertiesButton.setAttribute("disabled","true"); gComposeButton.setAttribute("disabled","true"); gSearchSession.clearScopes(); var currentAbURI = document.getElementById('abPopup').getAttribute('value'); gSearchSession.addDirectoryScopeTer...