rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 15
136k
|
---|---|---|
var prefmigrator = Components.classes['component: | var prefmigrator = Components.classes['@mozilla.org/profile/migration;1'].createInstance(Components.interfaces.nsIPrefMigration); | function onLoad(oldProfilePath, newProfilePath) { //dialog = new Object; //dialog.title = document.getElementByID( "xpi.process" ); //dialog.current = document.getElementByID( "xpi.currentlyprocessing"); //dialog.newWindow = document.getElementById( "dialog.newWindow" ); dump("start of pref migration\n"); var prefmigrator = Components.classes['component://netscape/profile/migration'].createInstance(Components.interfaces.nsIPrefMigration); if (prefmigrator) { try { prefmigrator.ProcessPrefsFromJS(); } catch (ex) { dump("failed to migrate: ex="+ ex + "\n"); } }} |
document.getElementById("tabbox").selectedTab = document.getElementById("imapTab"); document.getElementById("pop3Tab").hidden = true; | document.getElementById("pop3Panel").hidden = true; | function onLoad(){ if (gServerSettings.serverType == "imap") { document.getElementById("tabbox").selectedTab = document.getElementById("imapTab"); document.getElementById("pop3Tab").hidden = true; // don't hide panel - it hides all subsequent panels } else if (gServerSettings.serverType == "pop3") { var radioGroup = document.getElementById("folderStorage"); document.getElementById("tabbox").selectedTab = document.getElementById("pop3Tab"); document.getElementById("imapTab").hidden = true; // just hide the tab, don't hide panel - it hides all subsequent panels gAccountManager = Components.classes["@mozilla.org/messenger/account-manager;1"].getService(Components.interfaces.nsIMsgAccountManager); gFirstDeferredAccount = gServerSettings.deferredToAccount; var localFoldersAccount = getLocalFoldersAccount(); if (gFirstDeferredAccount.length) { var account = gAccountManager.getAccount(gFirstDeferredAccount); if (account) { var thisServer = account.incomingServer; SetFolderPicker(thisServer.serverURI, 'deferedServerFolderPicker'); } if (gFirstDeferredAccount == localFoldersAccount.key) { radioGroup.selectedItem = document.getElementById("globalInbox"); SetFolderPicker(localFoldersAccount.incomingServer.serverURI, 'deferedServerFolderPicker'); updateInboxAccount(false, true); } else { radioGroup.selectedItem = document.getElementById("deferToServer"); SetFolderPicker(account.incomingServer.serverURI, 'deferedServerFolderPicker'); updateInboxAccount(true, true); } } else { radioGroup.selectedItem = document.getElementById("accountDirectory"); // we should find out if there's another pop3/movemail server to defer to, // perhaps by checking the number of elements in the picker. For now, // just use the local folders account SetFolderPicker(localFoldersAccount.incomingServer.serverURI, 'deferedServerFolderPicker'); updateInboxAccount(false, false); } } else { document.getElementById("imapTab").hidden = true; document.getElementById("pop3Tab").hidden = true; } var controls = getControls(); for (var i = 0; i < controls.length; i++) { var slot = controls[i].id; if (slot in gServerSettings) { if (controls[i].localName == "checkbox") controls[i].checked = gServerSettings[slot]; else controls[i].value = gServerSettings[slot]; } }} |
document.getElementById("tabbox").selectedTab = document.getElementById("pop3Tab"); document.getElementById("imapTab").hidden = true; | document.getElementById("imapPanel").hidden = true; | function onLoad(){ if (gServerSettings.serverType == "imap") { document.getElementById("tabbox").selectedTab = document.getElementById("imapTab"); document.getElementById("pop3Tab").hidden = true; // don't hide panel - it hides all subsequent panels } else if (gServerSettings.serverType == "pop3") { var radioGroup = document.getElementById("folderStorage"); document.getElementById("tabbox").selectedTab = document.getElementById("pop3Tab"); document.getElementById("imapTab").hidden = true; // just hide the tab, don't hide panel - it hides all subsequent panels gAccountManager = Components.classes["@mozilla.org/messenger/account-manager;1"].getService(Components.interfaces.nsIMsgAccountManager); gFirstDeferredAccount = gServerSettings.deferredToAccount; var localFoldersAccount = getLocalFoldersAccount(); if (gFirstDeferredAccount.length) { var account = gAccountManager.getAccount(gFirstDeferredAccount); if (account) { var thisServer = account.incomingServer; SetFolderPicker(thisServer.serverURI, 'deferedServerFolderPicker'); } if (gFirstDeferredAccount == localFoldersAccount.key) { radioGroup.selectedItem = document.getElementById("globalInbox"); SetFolderPicker(localFoldersAccount.incomingServer.serverURI, 'deferedServerFolderPicker'); updateInboxAccount(false, true); } else { radioGroup.selectedItem = document.getElementById("deferToServer"); SetFolderPicker(account.incomingServer.serverURI, 'deferedServerFolderPicker'); updateInboxAccount(true, true); } } else { radioGroup.selectedItem = document.getElementById("accountDirectory"); // we should find out if there's another pop3/movemail server to defer to, // perhaps by checking the number of elements in the picker. For now, // just use the local folders account SetFolderPicker(localFoldersAccount.incomingServer.serverURI, 'deferedServerFolderPicker'); updateInboxAccount(false, false); } } else { document.getElementById("imapTab").hidden = true; document.getElementById("pop3Tab").hidden = true; } var controls = getControls(); for (var i = 0; i < controls.length; i++) { var slot = controls[i].id; if (slot in gServerSettings) { if (controls[i].localName == "checkbox") controls[i].checked = gServerSettings[slot]; else controls[i].value = gServerSettings[slot]; } }} |
else { document.getElementById("imapTab").hidden = true; document.getElementById("pop3Tab").hidden = true; } | function onLoad(){ if (gServerSettings.serverType == "imap") { document.getElementById("tabbox").selectedTab = document.getElementById("imapTab"); document.getElementById("pop3Tab").hidden = true; // don't hide panel - it hides all subsequent panels } else if (gServerSettings.serverType == "pop3") { var radioGroup = document.getElementById("folderStorage"); document.getElementById("tabbox").selectedTab = document.getElementById("pop3Tab"); document.getElementById("imapTab").hidden = true; // just hide the tab, don't hide panel - it hides all subsequent panels gAccountManager = Components.classes["@mozilla.org/messenger/account-manager;1"].getService(Components.interfaces.nsIMsgAccountManager); gFirstDeferredAccount = gServerSettings.deferredToAccount; var localFoldersAccount = getLocalFoldersAccount(); if (gFirstDeferredAccount.length) { var account = gAccountManager.getAccount(gFirstDeferredAccount); if (account) { var thisServer = account.incomingServer; SetFolderPicker(thisServer.serverURI, 'deferedServerFolderPicker'); } if (gFirstDeferredAccount == localFoldersAccount.key) { radioGroup.selectedItem = document.getElementById("globalInbox"); SetFolderPicker(localFoldersAccount.incomingServer.serverURI, 'deferedServerFolderPicker'); updateInboxAccount(false, true); } else { radioGroup.selectedItem = document.getElementById("deferToServer"); SetFolderPicker(account.incomingServer.serverURI, 'deferedServerFolderPicker'); updateInboxAccount(true, true); } } else { radioGroup.selectedItem = document.getElementById("accountDirectory"); // we should find out if there's another pop3/movemail server to defer to, // perhaps by checking the number of elements in the picker. For now, // just use the local folders account SetFolderPicker(localFoldersAccount.incomingServer.serverURI, 'deferedServerFolderPicker'); updateInboxAccount(false, false); } } else { document.getElementById("imapTab").hidden = true; document.getElementById("pop3Tab").hidden = true; } var controls = getControls(); for (var i = 0; i < controls.length; i++) { var slot = controls[i].id; if (slot in gServerSettings) { if (controls[i].localName == "checkbox") controls[i].checked = gServerSettings[slot]; else controls[i].value = gServerSettings[slot]; } }} |
|
gOldDefaultSmtpServer = smtpService.defaultServer; | function onLoad(){ gMessengerBundle = document.getElementById("bundle_messenger"); if (!smtpService) smtpService = Components.classes["@mozilla.org/messengercompose/smtp;1"].getService(Components.interfaces.nsISmtpService); serverList = document.getElementById("smtpList"); addButton = document.getElementById("addButton"); editButton = document.getElementById("editButton"); deleteButton = document.getElementById("deleteButton"); setDefaultButton = document.getElementById("setDefaultButton"); refreshServerList();} |
|
var downloadFontDialog = document.getElementById("downloadFontDialog"); downloadFontDialog.setAttribute("title", fontPackageBundle.getString("windowTitleNoDownload")); | document.title = fontPackageBundle.getString("windowTitleNoDownload"); | function onLoad(){ var size = document.getElementById("size"); var downloadButton = document.getElementById("downloadButton"); var install = document.getElementById("install"); var fontPackageBundle = document.getElementById("fontPackageBundle"); // test if win2k (win nt 5.0) or winxp (win nt 5.1) if (navigator.userAgent.toLowerCase().indexOf("windows nt 5") != -1) { downloadButton.setAttribute("hidden", "true"); size.setAttribute("hidden", "true"); // if no download button // set title to "Install Font" // and set cancel button to "OK" var downloadFontDialog = document.getElementById("downloadFontDialog"); downloadFontDialog.setAttribute("title", fontPackageBundle.getString("windowTitleNoDownload")); var cancelButton = document.getElementById("cancelButton"); cancelButton.setAttribute("label", fontPackageBundle.getString("cancelButtonNoDownload")); } else { install.setAttribute("hidden", "true"); } // argument is a lang code of the form xx or xx-yy gLangCode = window.arguments[0]; var titleString = fontPackageBundle.getString("name_" + gLangCode); var languageTitle = document.getElementById("languageTitle"); languageTitle.setAttribute("value", titleString); var sizeString = fontPackageBundle.getString("size_" + gLangCode); var sizeSpecification = document.getElementById("sizeSpecification"); sizeSpecification.setAttribute("value", sizeString);} |
focusInput(); | function onLoad(){ initHost(client); readIRCPrefs(); setClientOutput(); frames[0].document.location.href = "chrome://chatzilla/content/outputwindow.html?" + client.DEFAULT_STYLE; initStatic(); client.userScripts = new Array(); if (client.INITIAL_SCRIPTS) { var urls = client.INITIAL_SCRIPTS.split (";"); for (var i = 0; i < urls.length; ++i) { client.userScripts[i] = new Object(); client.load(stringTrim(urls[i]), client.userScripts[i]); } } focusInput(); mainStep();} |
|
top.addressbook = Components.classes["component: | top.addressbook = Components.classes["@mozilla.org/addressbook;1"].createInstance(); | function OnLoadAddressBook(){ verifyAccounts(); // this will do migration, if we need to. top.addressbook = Components.classes["component://netscape/addressbook"].createInstance(); top.addressbook = top.addressbook.QueryInterface(Components.interfaces.nsIAddressBook); top.gUpdateCardView = UpdateCardView; InitCommonJS(); GetCurrentPrefs(); // FIX ME - later we will be able to use onload from the overlay OnLoadCardView(); try { top.addressbook.setWebShellWindow(window) } catch (ex) { dump("failed to set webshell window\n"); } SetupCommandUpdateHandlers(); //workaround - add setTimeout to make sure dynamic overlays get loaded first setTimeout('SelectFirstAddressBook()',0);} |
try { gAddressBookSession = Components.classes["@mozilla.org/addressbook/services/session;1"].getService(Components.interfaces.nsIAddrBookSession); gAddressBookSession.addAddressBookListener(addressBookListener); } catch (ex) { dump("Error adding to address book session\n"); } | function OnLoadAddressBook(){ gAddressBookBundle = document.getElementById("bundle_addressBook"); verifyAccounts(); // this will do migration, if we need to. top.addressbook = Components.classes["@mozilla.org/addressbook;1"].createInstance(); top.addressbook = top.addressbook.QueryInterface(Components.interfaces.nsIAddressBook); top.gUpdateCardView = UpdateCardView; try { gAddressBookSession = Components.classes["@mozilla.org/addressbook/services/session;1"].getService(Components.interfaces.nsIAddrBookSession); gAddressBookSession.addAddressBookListener(addressBookListener); } catch (ex) { dump("Error adding to address book session\n"); } InitCommonJS(); GetCurrentPrefs(); // FIX ME - later we will be able to use onload from the overlay OnLoadCardView(); try { top.addressbook.setWebShellWindow(window) } catch (ex) { dump("failed to set webshell window\n"); } SetupCommandUpdateHandlers(); //workaround - add setTimeout to make sure dynamic overlays get loaded first setTimeout('SelectFirstAddressBook()',0);} |
|
try { var dataSource = top.rdf.GetDataSource("rdf:addressdirectory"); dataSource.AddObserver (addressBookObserver); } catch (ex) { dump(ex + "\n"); dump("Error adding to RDF datasource\n"); } | function OnLoadAddressBook(){ gAddressBookBundle = document.getElementById("bundle_addressBook"); verifyAccounts(); // this will do migration, if we need to. top.addressbook = Components.classes["@mozilla.org/addressbook;1"].createInstance(); top.addressbook = top.addressbook.QueryInterface(Components.interfaces.nsIAddressBook); top.gUpdateCardView = UpdateCardView; try { gAddressBookSession = Components.classes["@mozilla.org/addressbook/services/session;1"].getService(Components.interfaces.nsIAddrBookSession); gAddressBookSession.addAddressBookListener(addressBookListener); } catch (ex) { dump("Error adding to address book session\n"); } InitCommonJS(); GetCurrentPrefs(); // FIX ME - later we will be able to use onload from the overlay OnLoadCardView(); try { top.addressbook.setWebShellWindow(window) } catch (ex) { dump("failed to set webshell window\n"); } SetupCommandUpdateHandlers(); //workaround - add setTimeout to make sure dynamic overlays get loaded first setTimeout('SelectFirstAddressBook()',0);} |
|
document.commandDispatcher.addCommand(document.getElementById('CommandUpdate_AddressBook')); document.commandDispatcher.addCommand(document.getElementById('cmd_selectAll')); document.commandDispatcher.addCommand(document.getElementById('cmd_delete')); | function OnLoadAddressBook(){ // FIX ME - later we will be able to use onload from the overlay OnLoadCardView(); top.addressbook = Components.classes["component://netscape/addressbook"].createInstance(); top.addressbook = top.addressbook.QueryInterface(Components.interfaces.nsIAddressBook); top.addressbook.editCardCallback = UpdateCardView; try { top.addressbook.SetWebShellWindow(window) } catch (ex) { dump("failed to set webshell window\n"); } // FIX ME! - can remove these as soon as waterson enables auto-registration document.commandDispatcher.addCommand(document.getElementById('CommandUpdate_AddressBook')); document.commandDispatcher.addCommand(document.getElementById('cmd_selectAll')); document.commandDispatcher.addCommand(document.getElementById('cmd_delete')); SetupCommandUpdateHandlers(); SelectFirstAddressBook();} |
|
window.QueryInterface(Components.interfaces.nsIInterfaceRequestor) .getInterface(Components.interfaces.nsIWebNavigation) .QueryInterface(Components.interfaces.nsIDocShell) .useErrorPages = false; | function OnLoadAddressBook(){ gSearchInput = document.getElementById("searchInput"); verifyAccounts(null); // this will do migration, if we need to. top.addressbook = Components.classes["@mozilla.org/addressbook;1"].createInstance(Components.interfaces.nsIAddressBook); InitCommonJS(); UpgradeAddressBookResultsPaneUI("mailnews.ui.addressbook_results.version"); //This migrates the LDAPServer Preferences from 4.x to mozilla format. try { Components.classes["@mozilla.org/ldapprefs-service;1"] .getService(Components.interfaces.nsILDAPPrefsService); } catch (ex) {dump ("ERROR: Cannot get the LDAP service\n" + ex + "\n");} GetCurrentPrefs(); AddPrefObservers(); // FIX ME - later we will be able to use onload from the overlay OnLoadCardView(); SetupAbCommandUpdateHandlers(); //workaround - add setTimeout to make sure dynamic overlays get loaded first setTimeout('OnLoadDirTree()', 0); // if the pref is locked disable the menuitem New->LDAP directory if (gPrefs.prefIsLocked("ldap_2.disable_button_add")) document.getElementById("addLDAP").setAttribute("disabled", "true"); // add a listener, so we can switch directories if // the current directory is deleted var addrbookSession = Components.classes["@mozilla.org/addressbook/services/session;1"] .getService(Components.interfaces.nsIAddrBookSession); // this listener cares when a directory (= address book), or a directory item // is/are removed. In the case of directory items, we are only really // interested in mailing list changes and not cards but we have to have both. addrbookSession.addAddressBookListener( gAddressBookAbListener, Components.interfaces.nsIAddrBookSession.directoryRemoved | Components.interfaces.nsIAddrBookSession.directoryItemRemoved); var dirTree = GetDirTree(); dirTree.addEventListener("click",DirPaneClick,true);} |
|
rdf = Components.classes["component: | rdf = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(); | function OnLoadCardView(){ rdf = Components.classes["component://netscape/rdf/rdf-service"].getService(); rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService); var doc = document; /* data for address book, prefixes: "cvb" = card view box "cvh" = crad view header "cv" = card view (normal fields) */ cvData = new Object; // Card View Box cvData.CardViewBox = doc.getElementById("CardViewInnerBox"); // Title cvData.CardTitle = doc.getElementById("CardTitle"); // Name section cvData.cvbName = doc.getElementById("cvbName"); cvData.cvhName = doc.getElementById("cvhName"); cvData.cvNickname = doc.getElementById("cvNickname"); cvData.cvDisplayName = doc.getElementById("cvDisplayName"); cvData.cvEmail1 = doc.getElementById("cvEmail1"); cvData.cvEmail2 = doc.getElementById("cvEmail2"); // Home section cvData.cvbHome = doc.getElementById("cvbHome"); cvData.cvhHome = doc.getElementById("cvhHome"); cvData.cvHomeAddress = doc.getElementById("cvHomeAddress"); cvData.cvHomeAddress2 = doc.getElementById("cvHomeAddress2"); cvData.cvHomeCityStZip = doc.getElementById("cvHomeCityStZip"); cvData.cvHomeCountry = doc.getElementById("cvHomeCountry"); cvData.cvHomeWebPageBox = doc.getElementById("cvHomeWebPageBox"); cvData.cvHomeWebPage = doc.getElementById("cvHomeWebPage"); // Other section cvData.cvbOther = doc.getElementById("cvbOther"); cvData.cvhOther = doc.getElementById("cvhOther"); cvData.cvCustom1 = doc.getElementById("cvCustom1"); cvData.cvCustom2 = doc.getElementById("cvCustom2"); cvData.cvCustom3 = doc.getElementById("cvCustom3"); cvData.cvCustom4 = doc.getElementById("cvCustom4"); cvData.cvNotes = doc.getElementById("cvNotes"); // Phone section cvData.cvbPhone = doc.getElementById("cvbPhone"); cvData.cvhPhone = doc.getElementById("cvhPhone"); cvData.cvPhWork = doc.getElementById("cvPhWork"); cvData.cvPhHome = doc.getElementById("cvPhHome"); cvData.cvPhFax = doc.getElementById("cvPhFax"); cvData.cvPhCellular = doc.getElementById("cvPhCellular"); cvData.cvPhPager = doc.getElementById("cvPhPager"); // Work section cvData.cvbWork = doc.getElementById("cvbWork"); cvData.cvhWork = doc.getElementById("cvhWork"); cvData.cvJobTitle = doc.getElementById("cvJobTitle"); cvData.cvDepartment = doc.getElementById("cvDepartment"); cvData.cvCompany = doc.getElementById("cvCompany"); cvData.cvWorkAddress = doc.getElementById("cvWorkAddress"); cvData.cvWorkAddress2 = doc.getElementById("cvWorkAddress2"); cvData.cvWorkCityStZip = doc.getElementById("cvWorkCityStZip"); cvData.cvWorkCountry = doc.getElementById("cvWorkCountry"); cvData.cvWorkWebPageBox = doc.getElementById("cvWorkWebPageBox"); cvData.cvWorkWebPage = doc.getElementById("cvWorkWebPage");} |
cvData.cvEmail2Box = doc.getElementById("cvEmail2Box"); | function OnLoadCardView(){ zName = gAddressBookBundle.getString("propertyName") + ": "; zNickname = gAddressBookBundle.getString("propertyNickname") + ": "; zDisplayName = gAddressBookBundle.getString("propertyDisplayName") + ": "; zWork = gAddressBookBundle.getString("propertyWork") + ": "; zHome = gAddressBookBundle.getString("propertyHome") + ": "; zFax = gAddressBookBundle.getString("propertyFax") + ": "; zCellular = gAddressBookBundle.getString("propertyCellular") + ": "; zPager = gAddressBookBundle.getString("propertyPager") + ": "; zCustom1 = gAddressBookBundle.getString("propertyCustom1") + ": "; zCustom2 = gAddressBookBundle.getString("propertyCustom2") + ": "; zCustom3 = gAddressBookBundle.getString("propertyCustom3") + ": "; zCustom4 = gAddressBookBundle.getString("propertyCustom4") + ": "; rdf = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(); rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService); var doc = document; /* data for address book, prefixes: "cvb" = card view box "cvh" = crad view header "cv" = card view (normal fields) */ cvData = new Object; // Card View Box cvData.CardViewBox = doc.getElementById("CardViewInnerBox"); // Title cvData.CardTitle = doc.getElementById("CardTitle"); // Name section cvData.cvbName = doc.getElementById("cvbName"); cvData.cvhName = doc.getElementById("cvhName"); cvData.cvNickname = doc.getElementById("cvNickname"); cvData.cvDisplayName = doc.getElementById("cvDisplayName"); cvData.cvEmail1 = doc.getElementById("cvEmail1"); cvData.cvEmail2 = doc.getElementById("cvEmail2"); // Home section cvData.cvbHome = doc.getElementById("cvbHome"); cvData.cvhHome = doc.getElementById("cvhHome"); cvData.cvHomeAddress = doc.getElementById("cvHomeAddress"); cvData.cvHomeAddress2 = doc.getElementById("cvHomeAddress2"); cvData.cvHomeCityStZip = doc.getElementById("cvHomeCityStZip"); cvData.cvHomeCountry = doc.getElementById("cvHomeCountry"); cvData.cvHomeWebPageBox = doc.getElementById("cvHomeWebPageBox"); cvData.cvHomeWebPage = doc.getElementById("cvHomeWebPage"); // Other section cvData.cvbOther = doc.getElementById("cvbOther"); cvData.cvhOther = doc.getElementById("cvhOther"); cvData.cvCustom1 = doc.getElementById("cvCustom1"); cvData.cvCustom2 = doc.getElementById("cvCustom2"); cvData.cvCustom3 = doc.getElementById("cvCustom3"); cvData.cvCustom4 = doc.getElementById("cvCustom4"); cvData.cvNotes = doc.getElementById("cvNotes"); // Phone section cvData.cvbPhone = doc.getElementById("cvbPhone"); cvData.cvhPhone = doc.getElementById("cvhPhone"); cvData.cvPhWork = doc.getElementById("cvPhWork"); cvData.cvPhHome = doc.getElementById("cvPhHome"); cvData.cvPhFax = doc.getElementById("cvPhFax"); cvData.cvPhCellular = doc.getElementById("cvPhCellular"); cvData.cvPhPager = doc.getElementById("cvPhPager"); // Work section cvData.cvbWork = doc.getElementById("cvbWork"); cvData.cvhWork = doc.getElementById("cvhWork"); cvData.cvJobTitle = doc.getElementById("cvJobTitle"); cvData.cvDepartment = doc.getElementById("cvDepartment"); cvData.cvCompany = doc.getElementById("cvCompany"); cvData.cvWorkAddress = doc.getElementById("cvWorkAddress"); cvData.cvWorkAddress2 = doc.getElementById("cvWorkAddress2"); cvData.cvWorkCityStZip = doc.getElementById("cvWorkCityStZip"); cvData.cvWorkCountry = doc.getElementById("cvWorkCountry"); cvData.cvWorkWebPageBox = doc.getElementById("cvWorkWebPageBox"); cvData.cvWorkWebPage = doc.getElementById("cvWorkWebPage");} |
|
window._content.getSelection() .QueryInterface(nsISelectionPrivate) .addSelectionListener(gSelectionListener); | function onLoadContent(){ // // If the view source was opened with a "go to line" argument. // if (gGoToLine > 0) { goToLine(gGoToLine); gGoToLine = 0; } document.getElementById('cmd_goToLine').removeAttribute('disabled');} |
|
if ("arguments" in window && window.arguments[0]) { if ("abURI" in window.arguments[0]) { var abURI = window.arguments[0].abURI; var directory = GetDirectoryFromURI(abURI); if (!(directory.operations & directory.opWrite)) { var disableElements = document.getElementsByAttribute("disableforreadonly", "true"); for (var i=0; i<disableElements.length; i++) disableElements[i].setAttribute('disabled', 'true'); } } } | function OnLoadEditCard(){ InitEditCard(); editCard.titleProperty = "editCardTitle"; if (window.arguments && window.arguments[0]) { if ( window.arguments[0].card ) editCard.card = window.arguments[0].card; if ( window.arguments[0].okCallback ) gOkCallback = window.arguments[0].okCallback; if ( window.arguments[0].abURI ) editCard.abURI = window.arguments[0].abURI; } // set global state variables // if first or last name entered, disable generateDisplayName if ( editCard.generateDisplayName && (editCard.card.firstName.length + editCard.card.lastName.length + editCard.card.displayName.length > 0) ) { editCard.generateDisplayName = false; } GetCardValues(editCard.card, document); var displayName = editCard.card.displayName; top.window.title = gAddressBookBundle.getFormattedString(editCard.titleProperty, [ displayName ]);} |
|
var disableElements = document.getElementsByAttribute("disableforreadonly", "true"); for (var i = disableElements.length; i-- > 0; ) disableElements[i].disabled = true; | for (var i = kVcardFields.length; i-- > 0; ) document.getElementById(kVcardFields[i][0]).readonly = true; document.getElementById(kPhoneticFields[0]).readonly = true; document.getElementById(kPhoneticFields[3]).readonly = true; document.getElementById("PreferMailFormatPopup").disabled = true; | function OnLoadEditCard(){ InitEditCard(); gEditCard.titleProperty = "editCardTitle"; if (window.arguments && window.arguments[0]) { if ( window.arguments[0].card ) gEditCard.card = window.arguments[0].card; if ( window.arguments[0].okCallback ) gOkCallback = window.arguments[0].okCallback; if ( window.arguments[0].abURI ) gEditCard.abURI = window.arguments[0].abURI; } // set global state variables // if first or last name entered, disable generateDisplayName if (gEditCard.generateDisplayName && (gEditCard.card.firstName.length + gEditCard.card.lastName.length + gEditCard.card.displayName.length > 0)) { gEditCard.generateDisplayName = false; } GetCardValues(gEditCard.card, document); SetCardDialogTitle(gEditCard.card.displayName); // check if selectedAB is a writeable // if not disable all the fields if ("arguments" in window && window.arguments[0]) { if ("abURI" in window.arguments[0]) { var abURI = window.arguments[0].abURI; var directory = GetDirectoryFromURI(abURI); if (!(directory.operations & directory.opWrite)) { var disableElements = document.getElementsByAttribute("disableforreadonly", "true"); for (var i = disableElements.length; i-- > 0; ) disableElements[i].disabled = true; document.documentElement.buttons = "accept"; document.documentElement.removeAttribute("ondialogaccept"); } } }} |
document.getElementById(kVcardFields[i][0]).readonly = true; | document.getElementById(kVcardFields[i][0]).readOnly = true; | function OnLoadEditCard(){ InitEditCard(); gEditCard.titleProperty = "editCardTitle"; if (window.arguments && window.arguments[0]) { if ( window.arguments[0].card ) gEditCard.card = window.arguments[0].card; if ( window.arguments[0].okCallback ) gOkCallback = window.arguments[0].okCallback; if ( window.arguments[0].abURI ) gEditCard.abURI = window.arguments[0].abURI; } // set global state variables // if first or last name entered, disable generateDisplayName if (gEditCard.generateDisplayName && (gEditCard.card.firstName.length + gEditCard.card.lastName.length + gEditCard.card.displayName.length > 0)) { gEditCard.generateDisplayName = false; } GetCardValues(gEditCard.card, document); SetCardDialogTitle(gEditCard.card.displayName); // check if selectedAB is a writeable // if not disable all the fields if ("arguments" in window && window.arguments[0]) { if ("abURI" in window.arguments[0]) { var abURI = window.arguments[0].abURI; var directory = GetDirectoryFromURI(abURI); if (!(directory.operations & directory.opWrite)) { // Set all the editable vcard fields to read only for (var i = kVcardFields.length; i-- > 0; ) document.getElementById(kVcardFields[i][0]).readonly = true; // And the phonetic fields document.getElementById(kPhoneticFields[0]).readonly = true; document.getElementById(kPhoneticFields[3]).readonly = true; // Also disable the mail format popup. document.getElementById("PreferMailFormatPopup").disabled = true; document.documentElement.buttons = "accept"; document.documentElement.removeAttribute("ondialogaccept"); } // hide remote content in HTML field for remote directories if (directory.isRemote) document.getElementById('allowRemoteContent').hidden = true; } }} |
document.getElementById(kPhoneticFields[0]).readonly = true; document.getElementById(kPhoneticFields[3]).readonly = true; | document.getElementById(kPhoneticFields[0]).readOnly = true; document.getElementById(kPhoneticFields[3]).readOnly = true; | function OnLoadEditCard(){ InitEditCard(); gEditCard.titleProperty = "editCardTitle"; if (window.arguments && window.arguments[0]) { if ( window.arguments[0].card ) gEditCard.card = window.arguments[0].card; if ( window.arguments[0].okCallback ) gOkCallback = window.arguments[0].okCallback; if ( window.arguments[0].abURI ) gEditCard.abURI = window.arguments[0].abURI; } // set global state variables // if first or last name entered, disable generateDisplayName if (gEditCard.generateDisplayName && (gEditCard.card.firstName.length + gEditCard.card.lastName.length + gEditCard.card.displayName.length > 0)) { gEditCard.generateDisplayName = false; } GetCardValues(gEditCard.card, document); SetCardDialogTitle(gEditCard.card.displayName); // check if selectedAB is a writeable // if not disable all the fields if ("arguments" in window && window.arguments[0]) { if ("abURI" in window.arguments[0]) { var abURI = window.arguments[0].abURI; var directory = GetDirectoryFromURI(abURI); if (!(directory.operations & directory.opWrite)) { // Set all the editable vcard fields to read only for (var i = kVcardFields.length; i-- > 0; ) document.getElementById(kVcardFields[i][0]).readonly = true; // And the phonetic fields document.getElementById(kPhoneticFields[0]).readonly = true; document.getElementById(kPhoneticFields[3]).readonly = true; // Also disable the mail format popup. document.getElementById("PreferMailFormatPopup").disabled = true; document.documentElement.buttons = "accept"; document.documentElement.removeAttribute("ondialogaccept"); } // hide remote content in HTML field for remote directories if (directory.isRemote) document.getElementById('allowRemoteContent').hidden = true; } }} |
for (var i=0; i<disableElements.length; i++) disableElements[i].setAttribute('disabled', 'true'); | for (var i = disableElements.length; i-- > 0; ) disableElements[i].disabled = 'true'; | function OnLoadEditCard(){ InitEditCard(); gEditCard.titleProperty = "editCardTitle"; if (window.arguments && window.arguments[0]) { if ( window.arguments[0].card ) gEditCard.card = window.arguments[0].card; if ( window.arguments[0].okCallback ) gOkCallback = window.arguments[0].okCallback; if ( window.arguments[0].abURI ) gEditCard.abURI = window.arguments[0].abURI; } // set global state variables // if first or last name entered, disable generateDisplayName if (gEditCard.generateDisplayName && (gEditCard.card.firstName.length + gEditCard.card.lastName.length + gEditCard.card.displayName.length > 0)) { gEditCard.generateDisplayName = false; } GetCardValues(gEditCard.card, document); SetCardDialogTitle(gEditCard.card.displayName); // check if selectedAB is a writeable // if not disable all the fields if ("arguments" in window && window.arguments[0]) { if ("abURI" in window.arguments[0]) { var abURI = window.arguments[0].abURI; var directory = GetDirectoryFromURI(abURI); if (!(directory.operations & directory.opWrite)) { var disableElements = document.getElementsByAttribute("disableforreadonly", "true"); for (var i=0; i<disableElements.length; i++) disableElements[i].setAttribute('disabled', 'true'); document.documentElement.buttons = "accept"; document.documentElement.removeAttribute("ondialogaccept"); } } } } |
oldListName = editList.listName; | function OnLoadEditList(){ doSetOKCancel(EditListOKButton, 0); parentURI = window.arguments[0].abURI; var listUri = window.arguments[0].listURI; var rdf = Components.classes["component://netscape/rdf/rdf-service"].getService(); rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService); editList = rdf.GetResource(listUri); editList = editList.QueryInterface(Components.interfaces.nsIAbDirectory); document.getElementById('ListName').value = editList.listName; document.getElementById('ListNickName').value = editList.listNickName; document.getElementById('ListDescription').value = editList.description; if (editList.addressLists) { var total = editList.addressLists.Count();dump("*** editList.Count = "+total+"\n"); if (total) { var treeChildren = document.getElementById('addressList'); var newTreeChildrenNode = treeChildren.cloneNode(false); var templateNode = treeChildren.firstChild; top.MAX_RECIPIENTS = 0; for ( var i = 0; i < total; i++ ) { var card = editList.addressLists.GetElementAt(i); card = card.QueryInterface(Components.interfaces.nsIAbCard); var address; if (card.name.length) address = card.name + " <" + card.primaryEmail + ">"; else address = card.primaryEmail; SetInputValue(address, newTreeChildrenNode, templateNode); } var parent = treeChildren.parentNode; parent.replaceChild(newTreeChildrenNode, treeChildren); } } AppendnewRowAndSetFocus(); // focus on first name var listName = document.getElementById('ListName'); if ( listName ) listName.focus();} |
|
var treeChildren = document.getElementById('addressList'); | var treeChildren = document.getElementById('addressWidgetBody'); | function OnLoadEditList(){ //XXX: gAddressBookBundle is set in 2 places because of different callers gAddressBookBundle = document.getElementById("bundle_addressBook"); gParentURI = window.arguments[0].abURI; gListCard = window.arguments[0].abCard; var listUri = window.arguments[0].listURI; gOkCallback = window.arguments[0].okCallback; gEditList = GetDirectoryFromURI(listUri); document.getElementById('ListName').value = gEditList.dirName; document.getElementById('ListNickName').value = gEditList.listNickName; document.getElementById('ListDescription').value = gEditList.description; oldListName = gEditList.dirName; if (gEditList.addressLists) { var total = gEditList.addressLists.Count(); if (total) { var treeChildren = document.getElementById('addressList'); var newTreeChildrenNode = treeChildren.cloneNode(false); var templateNode = treeChildren.firstChild; top.MAX_RECIPIENTS = 0; for ( var i = 0; i < total; i++ ) { var card = gEditList.addressLists.GetElementAt(i); card = card.QueryInterface(Components.interfaces.nsIAbCard); var address; if (card.displayName) address = card.displayName + " <" + card.primaryEmail + ">"; else address = card.primaryEmail; SetInputValue(address, newTreeChildrenNode, templateNode); } var parent = treeChildren.parentNode; parent.replaceChild(newTreeChildrenNode, treeChildren); } } AppendnewRowAndSetFocus(); // focus on first name var listName = document.getElementById('ListName'); if ( listName ) listName.focus(); moveToAlertPosition();} |
AppendnewRowAndSetFocus(); | AppendNewRowAndSetFocus(); awFitDummyRows(1); | function OnLoadEditList(){ //XXX: gAddressBookBundle is set in 2 places because of different callers gAddressBookBundle = document.getElementById("bundle_addressBook"); gParentURI = window.arguments[0].abURI; gListCard = window.arguments[0].abCard; var listUri = window.arguments[0].listURI; gOkCallback = window.arguments[0].okCallback; gEditList = GetDirectoryFromURI(listUri); document.getElementById('ListName').value = gEditList.dirName; document.getElementById('ListNickName').value = gEditList.listNickName; document.getElementById('ListDescription').value = gEditList.description; oldListName = gEditList.dirName; if (gEditList.addressLists) { var total = gEditList.addressLists.Count(); if (total) { var treeChildren = document.getElementById('addressList'); var newTreeChildrenNode = treeChildren.cloneNode(false); var templateNode = treeChildren.firstChild; top.MAX_RECIPIENTS = 0; for ( var i = 0; i < total; i++ ) { var card = gEditList.addressLists.GetElementAt(i); card = card.QueryInterface(Components.interfaces.nsIAbCard); var address; if (card.displayName) address = card.displayName + " <" + card.primaryEmail + ">"; else address = card.primaryEmail; SetInputValue(address, newTreeChildrenNode, templateNode); } var parent = treeChildren.parentNode; parent.replaceChild(newTreeChildrenNode, treeChildren); } } AppendnewRowAndSetFocus(); // focus on first name var listName = document.getElementById('ListName'); if ( listName ) listName.focus(); moveToAlertPosition();} |
document.addEventListener("keypress", awDocumentKeyPress, true); | function OnLoadEditList(){ //XXX: gAddressBookBundle is set in 2 places because of different callers gAddressBookBundle = document.getElementById("bundle_addressBook"); gParentURI = window.arguments[0].abURI; gListCard = window.arguments[0].abCard; var listUri = window.arguments[0].listURI; gOkCallback = window.arguments[0].okCallback; gEditList = GetDirectoryFromURI(listUri); document.getElementById('ListName').value = gEditList.dirName; document.getElementById('ListNickName').value = gEditList.listNickName; document.getElementById('ListDescription').value = gEditList.description; oldListName = gEditList.dirName; if (gEditList.addressLists) { var total = gEditList.addressLists.Count(); if (total) { var listbox = document.getElementById('addressingWidget'); var newListBoxNode = listbox.cloneNode(false); var templateNode = listbox.getElementsByTagName("listitem")[0]; top.MAX_RECIPIENTS = 0; for ( var i = 0; i < total; i++ ) { var card = gEditList.addressLists.GetElementAt(i); card = card.QueryInterface(Components.interfaces.nsIAbCard); var address; if (card.displayName) address = card.displayName + " <" + card.primaryEmail + ">"; else address = card.primaryEmail; SetInputValue(address, newListBoxNode, templateNode); } var parent = listbox.parentNode; parent.replaceChild(newListBoxNode, listbox); } } // workaround for bug 118337 - for mailing lists that have more rows than fits inside // the display, the value of the textbox inside the new row isn't inherited into the input - // the first row then appears to be duplicated at the end although it is actually empty. // see awAppendNewRow which copies first row and clears it setTimeout(AppendLastRow, 0);} |
|
var rdf = Components.classes["component: | var rdf = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(); | function OnLoadEditList(){ doSetOKCancel(EditListOKButton, 0); parentURI = window.arguments[0].abURI; var listUri = window.arguments[0].listURI; var rdf = Components.classes["component://netscape/rdf/rdf-service"].getService(); rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService); editList = rdf.GetResource(listUri); editList = editList.QueryInterface(Components.interfaces.nsIAbDirectory); document.getElementById('ListName').value = editList.listName; document.getElementById('ListNickName').value = editList.listNickName; document.getElementById('ListDescription').value = editList.description; oldListName = editList.listName; if (editList.addressLists) { var total = editList.addressLists.Count();dump("*** editList.Count = "+total+"\n"); if (total) { var treeChildren = document.getElementById('addressList'); var newTreeChildrenNode = treeChildren.cloneNode(false); var templateNode = treeChildren.firstChild; top.MAX_RECIPIENTS = 0; for ( var i = 0; i < total; i++ ) { var card = editList.addressLists.GetElementAt(i); card = card.QueryInterface(Components.interfaces.nsIAbCard); var address; if (card.name.length) address = card.name + " <" + card.primaryEmail + ">"; else address = card.primaryEmail; SetInputValue(address, newTreeChildrenNode, templateNode); } var parent = treeChildren.parentNode; parent.replaceChild(newTreeChildrenNode, treeChildren); } } AppendnewRowAndSetFocus(); // focus on first name var listName = document.getElementById('ListName'); if ( listName ) listName.focus(); moveToAlertPosition();} |
top.importService = Components.classes["component: | top.importService = Components.classes["@mozilla.org/import/import-service;1"].getService(); | function OnLoadFieldMapExport(){ // top.bundle = srGetStrBundle("chrome://messenger/locale/importMsgs.properties"); top.importService = Components.classes["component://mozilla/import/import-service"].getService(); top.importService = top.importService.QueryInterface(Components.interfaces.nsIImportService); // We need a field map object... // assume we have one passed in? or just make one? if (window.arguments && window.arguments[0]) top.fieldMap = window.arguments[0].fieldMap; if (!top.fieldMap) { top.fieldMap = top.importService.CreateNewFieldMap(); top.fieldMap.DefaultFieldMap( top.fieldMap.numMozFields); } doSetOKCancel( FieldExportOKButton, 0); ListFields(); } |
top.importService = Components.classes["component: | top.importService = Components.classes["@mozilla.org/import/import-service;1"].getService(); | function OnLoadFieldMapImport(){ // top.bundle = srGetStrBundle("chrome://messenger/locale/importMsgs.properties"); top.importService = Components.classes["component://mozilla/import/import-service"].getService(); top.importService = top.importService.QueryInterface(Components.interfaces.nsIImportService); top.transferType = "moz/fieldmap"; top.recordNum = 0; // We need a field map object... // assume we have one passed in? or just make one? if (window.arguments && window.arguments[0]) { top.fieldMap = window.arguments[0].fieldMap; top.addInterface = window.arguments[0].addInterface; top.dialogResult = window.arguments[0].result; } if (top.fieldMap == null) { top.fieldMap = top.importService.CreateNewFieldMap(); top.fieldMap.DefaultFieldMap( top.fieldMap.numMozFields); } doSetOKCancel( FieldImportOKButton, 0); ListFields(); OnNextRecord();} |
var folderNameCol = document.getElementById("folderNameCol"); var showColumns = pref.getBoolPref("mail.showFolderPaneColumns"); | UpdateFolderColumnVisibility(); | function OnLoadFolderPane(){ var folderNameCol = document.getElementById("folderNameCol"); var showColumns = pref.getBoolPref("mail.showFolderPaneColumns"); var folderUnreadCol = document.getElementById("folderUnreadCol"); if (!showColumns) { var folderTotalCol = document.getElementById("folderTotalCol"); var folderSizeCol = document.getElementById("folderSizeCol"); folderUnreadCol.setAttribute("hidden", "true"); folderTotalCol.setAttribute("hidden", "true"); folderSizeCol.setAttribute("hidden", "true"); } else { var folderColumnLabel = document.getElementById("folderColumnLabel"); folderNameCol.setAttribute("label", folderColumnLabel.value); } folderNameCol.setAttribute("hideheader", showColumns ? "false" : "true"); var folderPaneHeader = document.getElementById("folderPaneHeader"); folderPaneHeader.setAttribute("hidden", showColumns ? "true" : "false"); var folderTree = document.getElementById("folderTree"); folderTree.setAttribute("hidecolumnpicker", showColumns ? "false" : "true"); var hidden = folderUnreadCol.getAttribute("hidden"); if (hidden != "true") { var folderNameCell = document.getElementById("folderNameCell"); folderNameCell.setAttribute("label", "?folderTreeSimpleName"); } folderUnreadCol.addEventListener("DOMAttrModified", OnFolderUnreadColAttrModified, false); //Add folderDataSource and accountManagerDataSource to folderPane accountManagerDataSource = accountManagerDataSource.QueryInterface(Components.interfaces.nsIRDFDataSource); folderDataSource = folderDataSource.QueryInterface(Components.interfaces.nsIRDFDataSource); var database = GetFolderDatasource(); database.AddDataSource(accountManagerDataSource); database.AddDataSource(folderDataSource); var folderTree = GetFolderTree(); folderTree.setAttribute("ref", "msgaccounts:/"); var folderTreeBuilder = folderTree.builder.QueryInterface(Components.interfaces.nsIXULTreeBuilder); folderTreeBuilder.addObserver(folderObserver); folderTree.addEventListener("click",FolderPaneOnClick,true); folderTree.addEventListener("mousedown",TreeOnMouseDown,true);} |
if (!showColumns) { var folderTotalCol = document.getElementById("folderTotalCol"); var folderSizeCol = document.getElementById("folderSizeCol"); folderUnreadCol.setAttribute("hidden", "true"); folderTotalCol.setAttribute("hidden", "true"); folderSizeCol.setAttribute("hidden", "true"); } else { var folderColumnLabel = document.getElementById("folderColumnLabel"); folderNameCol.setAttribute("label", folderColumnLabel.value); } folderNameCol.setAttribute("hideheader", showColumns ? "false" : "true"); var folderPaneHeader = document.getElementById("folderPaneHeader"); folderPaneHeader.setAttribute("hidden", showColumns ? "true" : "false"); var folderTree = document.getElementById("folderTree"); folderTree.setAttribute("hidecolumnpicker", showColumns ? "false" : "true"); var hidden = folderUnreadCol.getAttribute("hidden"); if (hidden != "true") { var folderNameCell = document.getElementById("folderNameCell"); folderNameCell.setAttribute("label", "?folderTreeSimpleName"); } | function OnLoadFolderPane(){ var folderNameCol = document.getElementById("folderNameCol"); var showColumns = pref.getBoolPref("mail.showFolderPaneColumns"); var folderUnreadCol = document.getElementById("folderUnreadCol"); if (!showColumns) { var folderTotalCol = document.getElementById("folderTotalCol"); var folderSizeCol = document.getElementById("folderSizeCol"); folderUnreadCol.setAttribute("hidden", "true"); folderTotalCol.setAttribute("hidden", "true"); folderSizeCol.setAttribute("hidden", "true"); } else { var folderColumnLabel = document.getElementById("folderColumnLabel"); folderNameCol.setAttribute("label", folderColumnLabel.value); } folderNameCol.setAttribute("hideheader", showColumns ? "false" : "true"); var folderPaneHeader = document.getElementById("folderPaneHeader"); folderPaneHeader.setAttribute("hidden", showColumns ? "true" : "false"); var folderTree = document.getElementById("folderTree"); folderTree.setAttribute("hidecolumnpicker", showColumns ? "false" : "true"); var hidden = folderUnreadCol.getAttribute("hidden"); if (hidden != "true") { var folderNameCell = document.getElementById("folderNameCell"); folderNameCell.setAttribute("label", "?folderTreeSimpleName"); } folderUnreadCol.addEventListener("DOMAttrModified", OnFolderUnreadColAttrModified, false); //Add folderDataSource and accountManagerDataSource to folderPane accountManagerDataSource = accountManagerDataSource.QueryInterface(Components.interfaces.nsIRDFDataSource); folderDataSource = folderDataSource.QueryInterface(Components.interfaces.nsIRDFDataSource); var database = GetFolderDatasource(); database.AddDataSource(accountManagerDataSource); database.AddDataSource(folderDataSource); var folderTree = GetFolderTree(); folderTree.setAttribute("ref", "msgaccounts:/"); var folderTreeBuilder = folderTree.builder.QueryInterface(Components.interfaces.nsIXULTreeBuilder); folderTreeBuilder.addObserver(folderObserver); folderTree.addEventListener("click",FolderPaneOnClick,true); folderTree.addEventListener("mousedown",TreeOnMouseDown,true);} |
|
ForceFolderPaneOpen(); | function OnLoadFolderPane(){ UpgradeFolderPaneUI(); var folderUnreadCol = document.getElementById("folderUnreadCol"); var hidden = folderUnreadCol.getAttribute("hidden"); if (hidden != "true") { var folderNameCell = document.getElementById("folderNameCell"); folderNameCell.setAttribute("label", "?folderTreeSimpleName"); } folderUnreadCol.addEventListener("DOMAttrModified", OnFolderUnreadColAttrModified, false); //Add folderDataSource and accountManagerDataSource to folderPane accountManagerDataSource = accountManagerDataSource.QueryInterface(Components.interfaces.nsIRDFDataSource); folderDataSource = folderDataSource.QueryInterface(Components.interfaces.nsIRDFDataSource); var database = GetFolderDatasource(); database.AddDataSource(accountManagerDataSource); database.AddDataSource(folderDataSource); var folderTree = GetFolderTree(); folderTree.setAttribute("ref", "msgaccounts:/"); var folderTreeBuilder = folderTree.builder.QueryInterface(Components.interfaces.nsIXULTreeBuilder); folderTreeBuilder.addObserver(folderObserver); folderTree.addEventListener("click",FolderPaneOnClick,true); folderTree.addEventListener("mousedown",TreeOnMouseDown,true);} |
|
UpgradeFolderPaneUI(); | function OnLoadFolderPane(){ var folderUnreadCol = document.getElementById("folderUnreadCol"); var hidden = folderUnreadCol.getAttribute("hidden"); if (!hidden) { var folderNameCell = document.getElementById("folderNameCell"); folderNameCell.setAttribute("label", "?folderTreeSimpleName"); } folderUnreadCol.addEventListener("DOMAttrModified", OnFolderUnreadColAttrModified, false); SortFolderPane("folderNameCol"); //Add folderDataSource and accountManagerDataSource to folderPane accountManagerDataSource = accountManagerDataSource.QueryInterface(Components.interfaces.nsIRDFDataSource); folderDataSource = folderDataSource.QueryInterface(Components.interfaces.nsIRDFDataSource); var database = GetFolderDatasource(); database.AddDataSource(accountManagerDataSource); database.AddDataSource(folderDataSource); var folderOutliner = GetFolderOutliner(); folderOutliner.outlinerBoxObject.outlinerBody.setAttribute("ref", "msgaccounts:/"); var folderOutlinerBuilder = folderOutliner.outlinerBoxObject.outlinerBody.builder.QueryInterface(Components.interfaces.nsIXULOutlinerBuilder); folderOutlinerBuilder.addObserver(folderObserver); folderOutliner.addEventListener("click",FolderPaneOnClick,true);} |
|
var database = folderTree.database; | var database = GetFolderDatasource(); | function OnLoadFolderPane(folderTree){ gFolderTree = folderTree; SortFolderPane('FolderColumn', 'http://home.netscape.com/NC-rdf#FolderTreeName'); //Add folderDataSource and accountManagerDataSource to folderPane accountManagerDataSource = accountManagerDataSource.QueryInterface(Components.interfaces.nsIRDFDataSource); folderDataSource = folderDataSource.QueryInterface(Components.interfaces.nsIRDFDataSource); var database = folderTree.database; database.AddDataSource(accountManagerDataSource); database.AddDataSource(folderDataSource); folderTree.setAttribute('ref', 'msgaccounts:/');} |
folderOutliner.outlinerBoxObject.outlinerBody.setAttribute("ref", "msgaccounts:/"); | folderOutliner.setAttribute("ref", "msgaccounts:/"); | function OnLoadFolderPane(){ UpgradeFolderPaneUI(); var folderUnreadCol = document.getElementById("folderUnreadCol"); var hidden = folderUnreadCol.getAttribute("hidden"); if (!hidden) { var folderNameCell = document.getElementById("folderNameCell"); folderNameCell.setAttribute("label", "?folderTreeSimpleName"); } folderUnreadCol.addEventListener("DOMAttrModified", OnFolderUnreadColAttrModified, false); SortFolderPane("folderNameCol"); //Add folderDataSource and accountManagerDataSource to folderPane accountManagerDataSource = accountManagerDataSource.QueryInterface(Components.interfaces.nsIRDFDataSource); folderDataSource = folderDataSource.QueryInterface(Components.interfaces.nsIRDFDataSource); var database = GetFolderDatasource(); database.AddDataSource(accountManagerDataSource); database.AddDataSource(folderDataSource); var folderOutliner = GetFolderOutliner(); folderOutliner.outlinerBoxObject.outlinerBody.setAttribute("ref", "msgaccounts:/"); var folderOutlinerBuilder = folderOutliner.outlinerBoxObject.outlinerBody.builder.QueryInterface(Components.interfaces.nsIXULOutlinerBuilder); folderOutlinerBuilder.addObserver(folderObserver); folderOutliner.addEventListener("click",FolderPaneOnClick,true);} |
var folderOutlinerBuilder = folderOutliner.outlinerBoxObject.outlinerBody.builder.QueryInterface(Components.interfaces.nsIXULOutlinerBuilder); | var folderOutlinerBuilder = folderOutliner.builder.QueryInterface(Components.interfaces.nsIXULOutlinerBuilder); | function OnLoadFolderPane(){ UpgradeFolderPaneUI(); var folderUnreadCol = document.getElementById("folderUnreadCol"); var hidden = folderUnreadCol.getAttribute("hidden"); if (!hidden) { var folderNameCell = document.getElementById("folderNameCell"); folderNameCell.setAttribute("label", "?folderTreeSimpleName"); } folderUnreadCol.addEventListener("DOMAttrModified", OnFolderUnreadColAttrModified, false); SortFolderPane("folderNameCol"); //Add folderDataSource and accountManagerDataSource to folderPane accountManagerDataSource = accountManagerDataSource.QueryInterface(Components.interfaces.nsIRDFDataSource); folderDataSource = folderDataSource.QueryInterface(Components.interfaces.nsIRDFDataSource); var database = GetFolderDatasource(); database.AddDataSource(accountManagerDataSource); database.AddDataSource(folderDataSource); var folderOutliner = GetFolderOutliner(); folderOutliner.outlinerBoxObject.outlinerBody.setAttribute("ref", "msgaccounts:/"); var folderOutlinerBuilder = folderOutliner.outlinerBoxObject.outlinerBody.builder.QueryInterface(Components.interfaces.nsIXULOutlinerBuilder); folderOutlinerBuilder.addObserver(folderObserver); folderOutliner.addEventListener("click",FolderPaneOnClick,true);} |
folderOutliner.outlinerBoxObject.outlinerBody.setAttribute("ref", "msgaccounts:/"); | function OnLoadFolderPane(){ UpgradeFolderPaneUI(); var folderUnreadCol = document.getElementById("folderUnreadCol"); var hidden = folderUnreadCol.getAttribute("hidden"); if (!hidden) { var folderNameCell = document.getElementById("folderNameCell"); folderNameCell.setAttribute("label", "?folderTreeSimpleName"); } folderUnreadCol.addEventListener("DOMAttrModified", OnFolderUnreadColAttrModified, false); SortFolderPane("folderNameCol"); var folderOutliner = GetFolderOutliner(); var folderOutlinerBuilder = folderOutliner.outlinerBoxObject.outlinerBody.builder.QueryInterface(Components.interfaces.nsIXULOutlinerBuilder); folderOutlinerBuilder.addObserver(folderObserver); folderOutliner.addEventListener("click",FolderPaneOnClick,true);} |
|
dump('In onLoadfolderPane\n'); | function OnLoadFolderPane(folderTree){ dump('In onLoadfolderPane\n'); gFolderTree = folderTree; SortFolderPane('FolderColumn', 'http://home.netscape.com/NC-rdf#FolderTreeName'); //Add folderDataSource and accountManagerDataSource to folderPane accountManagerDataSource = accountManagerDataSource.QueryInterface(Components.interfaces.nsIRDFDataSource); folderDataSource = folderDataSource.QueryInterface(Components.interfaces.nsIRDFDataSource); var database = folderTree.database; database.AddDataSource(accountManagerDataSource); database.AddDataSource(folderDataSource); folderTree.setAttribute('ref', 'msgaccounts:/');} |
|
loadSMTPServerList(); document.getElementById('identity.smtpServerKey').value = gIdentity ? gIdentity.smtpServerKey : gAccount.defaultIdentity.smtpServerKey; | function onLoadIdentityProperties(){ // extract the account gIdentity = window.arguments[0].identity; gAccount = window.arguments[0].account; initIdentityValues(gIdentity); initCopiesAndFolder(gIdentity); initCompositionAndAddressing(gIdentity);} |
|
top.importService = Components.classes["component: | top.importService = Components.classes["@mozilla.org/import/import-service;1"].getService(); | function OnLoadImportDialog(){ top.bundle = srGetStrBundle("chrome://messenger/locale/importMsgs.properties"); top.importService = Components.classes["component://mozilla/import/import-service"].getService(); top.importService = top.importService.QueryInterface(Components.interfaces.nsIImportService); top.progressInfo = new Object(); top.progressInfo.progressWindow = null; top.progressInfo.importInterface = null; top.progressInfo.mainWindow = top.window; top.progressInfo.intervalState = 0; top.progressInfo.importSuccess = false; top.progressInfo.importType = null; // look in arguments[0] for parameters if (window.arguments && window.arguments[0] && window.arguments.importType) { // keep parameters in global for later top.importType = window.arguments[0].importType; top.progressInfo.importType = top.importType; } else { top.importType = "addressbook"; top.progressInfo.importType = "addressbook"; } SetUpImportType(); } |
doSetOKCancel(ImportDialogOKButton, 0); | function OnLoadImportDialog(){ top.bundle = srGetStrBundle("chrome://messenger/locale/importMsgs.properties"); top.importService = Components.classes["component://mozilla/import/import-service"].getService(); top.importService = top.importService.QueryInterface(Components.interfaces.nsIImportService); top.progressInfo = new Object(); top.progressInfo.progressWindow = null; top.progressInfo.importInterface = null; top.progressInfo.mainWindow = top.window; top.progressInfo.intervalState = 0; top.progressInfo.importSuccess = false; top.progressInfo.importType = null; doSetOKCancel(ImportDialogOKButton, 0); // look in arguments[0] for parameters if (window.arguments && window.arguments[0] && window.arguments.importType) { // keep parameters in global for later top.importType = window.arguments[0].importType; top.progressInfo.importType = top.importType; } else { top.importType = "addressbook"; top.progressInfo.importType = "addressbook"; } SetUpImportType(); } |
|
onLoading:function(request){ Form.disable(checkboxForm); ensureVisibleWithEffectAppear(targetElemId); }, | onLoading:function(request){ Form.disable(checkboxForm); removeFlashNotice(); ensureVisibleWithEffectAppear(targetElemId); }, | onLoading:function(request){ Form.disable(checkboxForm); ensureVisibleWithEffectAppear(targetElemId); }, |
var pref = Components.classes["component: | var pref = Components.classes["@mozilla.org/preferences;1"].getService(); | function onLoadInternetResults(){ // HACK HACK HACK HACK HACK HACK - chrome urls are being stored in sh as file urls! // access to xpconnect is denied! ack! erk! ork! try { var pref = Components.classes["component://netscape/preferences"].getService(); if (pref) pref = pref.QueryInterface(Components.interfaces.nsIPref); } catch(e) { // ok, we're toast. user clicked back, loaded as file url, no xpconnect. abort, // reload. const searchResults = "chrome://communicator/content/search/internetresults.xul" if (top.appCore) top.appCore.loadUrl(searchResults); else top._content.location.href = searchResults; return; // ABORT. } // clear any previous results on load var iSearch = Components.classes["component://netscape/rdf/datasource?name=internetsearch"].getService(); if (iSearch) iSearch = iSearch.QueryInterface(Components.interfaces.nsIInternetSearchService); if (iSearch) iSearch.ClearResultSearchSites(); // the search URI is passed in as a parameter, so get it and them root the results tree var searchURI = top._content.location.href; if (searchURI) { const lastSearchURIPref = "browser.search.lastMultipleSearchURI"; var offset = searchURI.indexOf("?"); if (offset > 0) { nsPreferences.setUnicharPref(lastSearchURIPref, searchURI); // evil searchURI = searchURI.substr(offset+1); loadResultsTree(searchURI); } else { searchURI = nsPreferences.copyUnicharPref(lastSearchURIPref, ""); offset = searchURI.indexOf("?"); if (offset > 0) { nsPreferences.setUnicharPref(lastSearchURIPref, searchURI); // evil searchURI = searchURI.substr(offset+1); loadResultsTree(searchURI); } } } return true;} |
var iSearch = Components.classes["component: | var iSearch = Components.classes["@mozilla.org/rdf/datasource;1?name=internetsearch"].getService(); | function onLoadInternetResults(){ // HACK HACK HACK HACK HACK HACK - chrome urls are being stored in sh as file urls! // access to xpconnect is denied! ack! erk! ork! try { var pref = Components.classes["component://netscape/preferences"].getService(); if (pref) pref = pref.QueryInterface(Components.interfaces.nsIPref); } catch(e) { // ok, we're toast. user clicked back, loaded as file url, no xpconnect. abort, // reload. const searchResults = "chrome://communicator/content/search/internetresults.xul" if (top.appCore) top.appCore.loadUrl(searchResults); else top._content.location.href = searchResults; return; // ABORT. } // clear any previous results on load var iSearch = Components.classes["component://netscape/rdf/datasource?name=internetsearch"].getService(); if (iSearch) iSearch = iSearch.QueryInterface(Components.interfaces.nsIInternetSearchService); if (iSearch) iSearch.ClearResultSearchSites(); // the search URI is passed in as a parameter, so get it and them root the results tree var searchURI = top._content.location.href; if (searchURI) { const lastSearchURIPref = "browser.search.lastMultipleSearchURI"; var offset = searchURI.indexOf("?"); if (offset > 0) { nsPreferences.setUnicharPref(lastSearchURIPref, searchURI); // evil searchURI = searchURI.substr(offset+1); loadResultsTree(searchURI); } else { searchURI = nsPreferences.copyUnicharPref(lastSearchURIPref, ""); offset = searchURI.indexOf("?"); if (offset > 0) { nsPreferences.setUnicharPref(lastSearchURIPref, searchURI); // evil searchURI = searchURI.substr(offset+1); loadResultsTree(searchURI); } } } return true;} |
return true; | function onLoadJSConsole() { try { var cs_class = Components.classes['@mozilla.org/consoleservice;1']; var cs_iface = Components.interfaces.nsIConsoleService; var cs_isupports = cs_class.getService(); var cs = cs_isupports.QueryInterface(cs_iface); } catch(exn) { // Couldn't get the console service for some reason... // pretend it never happened. appendMessage({ message: "Unable to display errors - " + "couldn't get Console Service component. " + "(Missing @mozilla.org/consoleservice;1)" }); return; } var o1 = {}; // Throwaway references to support 'out' parameters. var o2 = {}; var messages; cs.getMessageArray(o1, o2); messages = o1.value; // In case getMessageArray returns 0-length array as null. if (messages == null) messages = []; var i; var cleared=0; //Checks if console ever been cleared for (i = messages.length-1; i >=0 ; i--) { if (messages[i].message == "__CLEAR__") { cleared = i + 1; break; } } //Populates tree with error messages after latest "clear" for(i = cleared; i < messages.length; i++) { appendMessage(messages[i]); } cs.registerListener(consoleListener); bundle = srGetStrBundle("chrome://global/locale/console.properties"); return true;} |
|
var cs_class = Components.classes['consoleservice']; | var cs_class = Components.classes['mozilla.consoleservice.1']; | function onLoadJSConsole() { try { var cs_class = Components.classes['consoleservice']; var cs_iface = Components.interfaces.nsIConsoleService; var cs_isupports = cs_class.getService(); var cs = cs_isupports.QueryInterface(cs_iface); } catch(exn) { // Couldn't get the console service for some reason... // pretend it never happened. // XXX instead should write some message to the console re: // unable to get console service. return; } var o1 = {}; // Throwaway references to support 'out' parameters. var o2 = {}; var messages; cs.getMessageArray(o1, o2); messages = o1.value; // In case getMessageArray returns 0-length array as null. if (messages == null) messages = []; for (i = 0; i < messages.length; i++) { appendMessage(messages[i]); } cs.registerListener(consoleListener);} |
selectedAB = "abmdbdirectory: | selectedAB = "moz-abmdbdirectory: | function OnLoadMailList(){ //XXX: gAddressBookBundle is set in 2 places because of different callers gAddressBookBundle = document.getElementById("bundle_addressBook"); doSetOKCancel(MailListOKButton, 0); var selectedAB; if (window.arguments && window.arguments[0]) { if ( window.arguments[0].selectedAB ) selectedAB = window.arguments[0].selectedAB; else selectedAB = "abmdbdirectory://abook.mab"; } // set popup with address book names var abPopup = document.getElementById('abPopup'); if ( abPopup ) { var menupopup = document.getElementById('abPopup-menupopup'); if ( selectedAB && menupopup && menupopup.childNodes ) { for ( var index = menupopup.childNodes.length - 1; index >= 0; index-- ) { if ( menupopup.childNodes[index].getAttribute('value') == selectedAB ) { abPopup.label = menupopup.childNodes[index].getAttribute('label'); abPopup.value = menupopup.childNodes[index].getAttribute('value'); break; } } } } AppendnewRowAndSetFocus(); // focus on first name var listName = document.getElementById('ListName'); if ( listName ) listName.focus(); moveToAlertPosition();} |
setTimeout("var msgKey = extractMsgKeyFromURI(gCurrentMessageUri); gDBView.loadMessageByMsgKey(msgKey); gNextMessageViewIndexAfterDelete = gDBView.msgToSelectAfterDelete;", 0); | setTimeout("var msgKey = extractMsgKeyFromURI(gCurrentMessageUri); gDBView.loadMessageByMsgKey(msgKey); gNextMessageViewIndexAfterDelete = gDBView.msgToSelectAfterDelete; UpdateStandAloneMessageCounts();", 0); | function OnLoadMessageWindow(){ HideMenus(); AddMailOfflineObserver(); CreateMailWindowGlobals(); CreateMessageWindowGlobals(); verifyAccounts(null); InitMsgWindow(); messenger.SetWindow(window, msgWindow); InitializeDataSources(); // FIX ME - later we will be able to use onload from the overlay OnLoadMsgHeaderPane(); try { var nsIFolderListener = Components.interfaces.nsIFolderListener; var notifyFlags = nsIFolderListener.removed | nsIFolderListener.event; mailSession.AddFolderListener(folderListener, notifyFlags); } catch (ex) { dump("Error adding to session: " +ex + "\n"); } var originalView = null; if(window.arguments) { if(window.arguments[0]) { gCurrentMessageUri = window.arguments[0]; } else { gCurrentMessageUri = null; } if(window.arguments[1]) { gCurrentFolderUri = window.arguments[1]; } else { gCurrentFolderUri = null; } if (window.arguments[2]) originalView = window.arguments[2]; } CreateView(originalView) setTimeout("var msgKey = extractMsgKeyFromURI(gCurrentMessageUri); gDBView.loadMessageByMsgKey(msgKey); gNextMessageViewIndexAfterDelete = gDBView.msgToSelectAfterDelete;", 0); SetupCommandUpdateHandlers(); var messagePaneFrame = top.frames['messagepane']; if(messagePaneFrame) messagePaneFrame.focus();} |
AddToolBarPrefListener(); ShowHideToolBarButtons() | function OnLoadMessageWindow(){ HideMenus(); AddMailOfflineObserver(); CreateMailWindowGlobals(); CreateMessageWindowGlobals(); verifyAccounts(null); InitMsgWindow(); messenger.SetWindow(window, msgWindow); InitializeDataSources(); // FIX ME - later we will be able to use onload from the overlay OnLoadMsgHeaderPane(); try { var nsIFolderListener = Components.interfaces.nsIFolderListener; var notifyFlags = nsIFolderListener.removed | nsIFolderListener.event; mailSession.AddFolderListener(folderListener, notifyFlags); } catch (ex) { dump("Error adding to session: " +ex + "\n"); } var originalView = null; if(window.arguments) { if(window.arguments[0]) { gCurrentMessageUri = window.arguments[0]; } else { gCurrentMessageUri = null; } if(window.arguments[1]) { gCurrentFolderUri = window.arguments[1]; } else { gCurrentFolderUri = null; } if (window.arguments[2]) originalView = window.arguments[2]; } CreateView(originalView) setTimeout("var msgKey = extractMsgKeyFromURI(gCurrentMessageUri); gDBView.loadMessageByMsgKey(msgKey); gNextMessageViewIndexAfterDelete = gDBView.msgToSelectAfterDelete; UpdateStandAloneMessageCounts();", 0); SetupCommandUpdateHandlers(); var messagePaneFrame = top.frames['messagepane']; if(messagePaneFrame) messagePaneFrame.focus();} |
|
gCurrentFolderUri = folder ? folder.folderURL : null; | gCurrentFolderUri = folder ? folder.URI : null; | function OnLoadMessageWindow(){ HideMenus(); AddMailOfflineObserver(); CreateMailWindowGlobals(); CreateMessageWindowGlobals(); AddToolBarPrefListener(); ShowHideToolBarButtons() verifyAccounts(null); InitMsgWindow(); messenger.SetWindow(window, msgWindow); InitializeDataSources(); // FIX ME - later we will be able to use onload from the overlay OnLoadMsgHeaderPane(); try { var nsIFolderListener = Components.interfaces.nsIFolderListener; var notifyFlags = nsIFolderListener.removed | nsIFolderListener.event | nsIFolderListener.intPropertyChanged; mailSession.AddFolderListener(folderListener, notifyFlags); } catch (ex) { dump("Error adding to session: " +ex + "\n"); } var originalView = null; var folder = null; var messageUri; var loadCustomMessage = false; //set to true when either loading a message/rfc822 attachment or a .eml file if (window.arguments) { if (window.arguments[0]) { try { messageUri = window.arguments[0]; if (messageUri instanceof Components.interfaces.nsIURI) { loadCustomMessage = /type=x-message-display/.test(messageUri.spec); gCurrentMessageUri = messageUri.spec; if (messageUri instanceof Components.interfaces.nsIMsgMailNewsUrl) folder = messageUri.folder; } } catch(ex) { folder = null; dump("## ex=" + ex + "\n"); } if (!gCurrentMessageUri) gCurrentMessageUri = window.arguments[0]; } else gCurrentMessageUri = null; if (window.arguments[1]) gCurrentFolderUri = window.arguments[1]; else gCurrentFolderUri = folder ? folder.folderURL : null; if (window.arguments[2]) originalView = window.arguments[2]; } CreateView(originalView); setTimeout(OnLoadMessageWindowDelayed, 0, loadCustomMessage); SetupCommandUpdateHandlers();} |
accountManager.addIncomingServerListener(gThreePaneIncomingServerListener); | function OnLoadMessenger(){ showPerformance = pref.GetBoolPref('mail.showMessengerPerformance'); var beforeLoadMessenger; if(showPerformance) { beforeLoadMessenger = new Date(); } AddMailOfflineObserver(); CreateMailWindowGlobals(); Create3PaneGlobals(); verifyAccounts(null); HideAccountCentral(); loadStartPage(); InitMsgWindow(); messenger.SetWindow(window, msgWindow); InitializeDataSources(); InitPanes(); accountManager.SetSpecialFoldersForIdentities(); AddToSession(); //need to add to session before trying to load start folder otherwise listeners aren't //set up correctly. if ("arguments" in window && window.arguments[0]) { gStartFolderUri = window.arguments[0]; } else { gStartFolderUri = null; } setTimeout("loadStartFolder(gStartFolderUri);", 0); // FIX ME - later we will be able to use onload from the overlay OnLoadMsgHeaderPane(); var id = null; var headerchoice = null; try { headerchoice = pref.GetIntPref("mail.show_headers"); } catch (ex) { dump("failed to get the header pref\n"); } switch (headerchoice) { case 2: id = "viewallheaders"; break; case 0: id = "viewbriefheaders"; break; case 1: id = "viewnormalheaders"; break; default: id = "viewnormalheaders"; break; } var menuitem = document.getElementById(id); try { // not working right yet. see bug #?????? // menuitem.setAttribute("checked", "true"); } catch (ex) { dump("failed to set the view headers menu item\n"); } gHaveLoadedMessage = false; //Set focus to the Thread Pane the first time the window is opened. SetFocusThreadPane(); if(showPerformance) { var afterLoadMessenger = new Date(); var timeToLoad = (afterLoadMessenger.getTime() - beforeLoadMessenger.getTime())/1000; dump("Time in OnLoadMessger is " + timeToLoad + " seconds\n"); }} |
|
AddToolBarPrefListener(); ShowHideToolBarButtons(); | function OnLoadMessenger(){ AddMailOfflineObserver(); CreateMailWindowGlobals(); Create3PaneGlobals(); verifyAccounts(null); HideAccountCentral(); loadStartPage(); InitMsgWindow(); messenger.SetWindow(window, msgWindow); InitializeDataSources(); InitPanes(); accountManager.SetSpecialFoldersForIdentities(); accountManager.addIncomingServerListener(gThreePaneIncomingServerListener); AddToSession(); //need to add to session before trying to load start folder otherwise listeners aren't //set up correctly. // argument[0] --> folder uri // argument[1] --> optional message key // argument[2] --> optional email address; //will come from aim; needs to show msgs from buddy's email address if ("arguments" in window && window.arguments[0]) { gStartFolderUri = window.arguments[0]; gStartMsgKey = window.arguments[1]; gSearchEmailAddress = window.arguments[2]; } else { gStartFolderUri = null; gStartMsgKey = -1; gSearchEmailAddress = null; } setTimeout("loadStartFolder(gStartFolderUri);", 0); // FIX ME - later we will be able to use onload from the overlay OnLoadMsgHeaderPane(); gHaveLoadedMessage = false; gNotifyDefaultInboxLoadedOnStartup = true; // fix for #168937. now that we don't have a sidebar // users who haven't moved the splitter will // see it jump around var messengerBox = document.getElementById("messengerBox"); if (!messengerBox.getAttribute("width")) { messengerBox.setAttribute("width","500px"); } //Set focus to the Thread Pane the first time the window is opened. SetFocusThreadPane();} |
|
goSetDefaultController(DefaultController); | function OnLoadMessenger(){ verifyAccounts(); loadStartPage(); InitMsgWindow(); messenger.SetWindow(window, msgWindow); AddDataSources(); InitPanes(); loadStartFolder(); AddToSession(); goSetDefaultController(DefaultController);} |
|
dump('Before load start folder\n'); setTimeout("loadStartFolder();", 0); | if(window.arguments && window.arguments[0]) { gStartFolderUri = window.arguments[0]; } else { gStartFolderUri = null; } setTimeout("loadStartFolder(gStartFolderUri);", 0); | function OnLoadMessenger(){ var beforeLoadMessenger = new Date(); CreateGlobals(); verifyAccounts(); loadStartPage(); InitMsgWindow(); messenger.SetWindow(window, msgWindow); AddDataSources(); InitPanes(); AddToSession(); //need to add to session before trying to load start folder otherwise listeners aren't //set up correctly. dump('Before load start folder\n'); setTimeout("loadStartFolder();", 0); // FIX ME - later we will be able to use onload from the overlay OnLoadMsgHeaderPane(); var id = null; var headerchoice = null; try { headerchoice = pref.GetIntPref("mail.show_headers"); } catch (ex) { dump("failed to get the header pref\n"); } switch (headerchoice) { case 2: id = "viewallheaders"; break; case 0: id = "viewbriefheaders"; break; case 1: id = "viewnormalheaders"; break; default: id = "viewnormalheaders"; break; } var menuitem = document.getElementById(id); try { // not working right yet. see bug #?????? // menuitem.setAttribute("checked", "true"); } catch (ex) { dump("failed to set the view headers menu item\n"); } var afterLoadMessenger = new Date(); var timeToLoad = (afterLoadMessenger.getTime() - beforeLoadMessenger.getTime())/1000; if(showPerformance) { dump("Time in OnLoadMessger is " + timeToLoad + " seconds\n"); }} |
gCollectIncoming = pref.GetBoolPref("mail.collect_email_address_incoming"); gCollectNewsgroup = pref.GetBoolPref("mail.collect_email_address_newsgroup"); | function OnLoadMsgHeaderPane(){ // build a document object for the header pane so we can cache fetches for elements // in a local variable // if you add more document elements with ids to msgHeaderPane.xul, you should add // to this object... msgPaneData = new Object; // HACK...force our XBL bindings file to be load before we try to create our first xbl widget.... // otherwise we have problems. document.loadBindingDocument('chrome://messenger/content/mailWidgets.xml'); if (msgPaneData) { // First group of headers msgPaneData.SubjectBox = document.getElementById("SubjectBox"); msgPaneData.SubjectValue = document.getElementById("SubjectValue"); msgPaneData.FromBox = document.getElementById("FromBox"); msgPaneData.FromValue = document.getElementById("FromValue"); msgPaneData.ReplyToBox = document.getElementById("ReplyToBox"); msgPaneData.ReplyToValue = document.getElementById("ReplyToValue"); msgPaneData.DateBox = document.getElementById("DateBox"); msgPaneData.DateValue = document.getElementById("DateValue"); // Attachment related elements msgPaneData.AttachmentPopup = document.getElementById("attachmentPopup"); msgPaneData.AttachmentButton = document.getElementById("attachmentButton"); // Second toolbar msgPaneData.ToBox = document.getElementById("ToBox"); // ToValueShort is the div which shows a shortened number of addresses // on the to line...ToValueLong is a div which shows all of the // addresses on the to line. The same rule applies for ccValueShort/Long msgPaneData.ToValueShort = document.getElementById("ToValueShort"); msgPaneData.ToValueLong = document.getElementById("ToValueLong"); msgPaneData.ToValueToggleIcon = document.getElementById("ToValueToggleIcon"); msgPaneData.CcBox = document.getElementById("CcBox"); msgPaneData.CcValueShort = document.getElementById("CcValueShort"); msgPaneData.CcValueLong = document.getElementById("CcValueLong"); msgPaneData.CcValueToggleIcon = document.getElementById("CcValueToggleIcon"); msgPaneData.NewsgroupBox = document.getElementById("NewsgroupBox"); msgPaneData.NewsgroupValue = document.getElementById("NewsgroupValue"); msgPaneData.FollowupToBox = document.getElementById("FollowupToBox"); msgPaneData.FollowupToValue = document.getElementById("FollowupToValue"); msgPaneData.UserAgentBox = document.getElementById("UserAgentBox"); msgPaneData.UserAgentToolbar = document.getElementById("headerPart3"); msgPaneData.UserAgentValue = document.getElementById("UserAgentValue"); msgPaneData.ViewAllHeadersToolbar = document.getElementById("viewAllHeadersToolbar"); msgPaneData.ViewAllHeadersBox = document.getElementById("viewAllHeadersBox"); } // load any preferences that at are global with regards to // displaying a message... gNumAddressesToShow = pref.GetIntPref("mailnews.max_header_display_length"); gShowUserAgent = pref.GetBoolPref("mailnews.headers.showUserAgent");} |
|
msgPaneData.UserAgentBox = document.getElementById("UserAgentBox"); | msgPaneData.UserAgentBox = document.getElementById("headerPart3"); | function OnLoadMsgHeaderPane(){ // build a document object for the header pane so we can cache fetches for elements // in a local variable // if you add more document elements with ids to msgHeaderPane.xul, you should add // to this object... msgPaneData = new Object; if (msgPaneData) { // First group of headers msgPaneData.SubjectBox = document.getElementById("SubjectBox"); msgPaneData.SubjectValue = document.getElementById("SubjectValue"); msgPaneData.FromBox = document.getElementById("FromBox"); msgPaneData.FromValue = document.getElementById("FromValue"); msgPaneData.DateBox = document.getElementById("DateBox"); msgPaneData.DateValue = document.getElementById("DateValue"); // Attachment related elements msgPaneData.AttachmentPopup = document.getElementById("attachmentPopup"); msgPaneData.AttachmentButton = document.getElementById("attachmentButton"); // Second toolbar msgPaneData.ToBox = document.getElementById("ToBox"); // ToValueShort is the div which shows a shortened number of addresses // on the to line...ToValueLong is a div which shows all of the // addresses on the to line. The same rule applies for ccValueShort/Long msgPaneData.ToValueShort = document.getElementById("ToValueShort"); msgPaneData.ToValueLong = document.getElementById("ToValueLong"); msgPaneData.ToValueToggleIcon = document.getElementById("ToValueToggleIcon"); msgPaneData.CcBox = document.getElementById("CcBox"); msgPaneData.CcValueShort = document.getElementById("CcValueShort"); msgPaneData.CcValueLong = document.getElementById("CcValueLong"); msgPaneData.CcValueToggleIcon = document.getElementById("CcValueToggleIcon"); msgPaneData.NewsgroupBox = document.getElementById("NewsgroupBox"); msgPaneData.NewsgroupValue = document.getElementById("NewsgroupValue"); msgPaneData.UserAgentBox = document.getElementById("UserAgentBox"); msgPaneData.UserAgentValue = document.getElementById("UserAgentValue"); } // load any preferences that at are global with regards to // displaying a message... gNumAddressesToShow = pref.GetIntPref("mailnews.max_header_display_length"); gShowUserAgent = pref.GetBoolPref("mailnews.headers.showUserAgent");} |
var cardproperty = Components.classes["component: | var cardproperty = Components.classes["@mozilla.org/addressbook/cardproperty;1"].createInstance(); | function OnLoadNewCard(){ InitEditCard(); doSetOKCancel(NewCardOKButton, 0); var cardproperty = Components.classes["component://netscape/addressbook/cardproperty"].createInstance(); cardproperty = cardproperty.QueryInterface(Components.interfaces.nsIAbCard); editCard.card = cardproperty; editCard.okCallback = 0; editCard.titleProperty = "newCardTitle" if (window.arguments && window.arguments[0]) { if ( window.arguments[0].selectedAB ) editCard.selectedAB = window.arguments[0].selectedAB; else editCard.selectedAB = "abdirectory://abook.mab"; // we may have been given properties to pre-initialize the window with.... // we'll fill these in here... if (window.arguments[0].primaryEmail) editCard.card.primaryEmail = window.arguments[0].primaryEmail; if (window.arguments[0].displayName) editCard.card.displayName = window.arguments[0].displayName; } // set popup with address book names var abPopup = document.getElementById('abPopup'); if ( abPopup ) { var menupopup = document.getElementById('abPopup-menupopup'); if ( editCard.selectedAB && menupopup && menupopup.childNodes ) { for ( var index = menupopup.childNodes.length - 1; index >= 0; index-- ) { if ( menupopup.childNodes[index].getAttribute('data') == editCard.selectedAB ) { abPopup.value = menupopup.childNodes[index].getAttribute('value'); abPopup.data = menupopup.childNodes[index].getAttribute('data'); break; } } } } GetCardValues(editCard.card, document); //// FIX ME - looks like we need to focus on both the text field and the tab widget //// probably need to do the same in the addressing widget // focus on first name var firstName = document.getElementById('FirstName'); if ( firstName ) firstName.focus(); moveToAlertPosition();} |
editCard.selectedAB = "abmdbdirectory: | editCard.selectedAB = "moz-abmdbdirectory: | function OnLoadNewCard(){ InitEditCard(); doSetOKCancel(NewCardOKButton, 0); var cardproperty = Components.classes["@mozilla.org/addressbook/cardproperty;1"].createInstance(); cardproperty = cardproperty.QueryInterface(Components.interfaces.nsIAbCard); editCard.card = cardproperty; editCard.okCallback = 0; editCard.titleProperty = "newCardTitle" if ("arguments" in window && window.arguments[0]) { if ("selectedAB" in window.arguments[0]) editCard.selectedAB = window.arguments[0].selectedAB; else editCard.selectedAB = "abmdbdirectory://abook.mab"; // we may have been given properties to pre-initialize the window with.... // we'll fill these in here... if ("primaryEmail" in window.arguments[0]) editCard.card.primaryEmail = window.arguments[0].primaryEmail; if ("displayName" in window.arguments[0]) editCard.card.displayName = window.arguments[0].displayName; } // set popup with address book names var abPopup = document.getElementById('abPopup'); if ( abPopup ) { var menupopup = document.getElementById('abPopup-menupopup'); if ( editCard.selectedAB && menupopup && menupopup.childNodes ) { for ( var index = menupopup.childNodes.length - 1; index >= 0; index-- ) { if ( menupopup.childNodes[index].getAttribute('value') == editCard.selectedAB ) { abPopup.label = menupopup.childNodes[index].getAttribute('label'); abPopup.value = menupopup.childNodes[index].getAttribute('value'); break; } } } else { // Default to the first valid addressbook when none is // selected. (the 0th is an empty/invalid entry) abPopup.label = menupopup.childNodes[1].getAttribute('label'); abPopup.value = menupopup.childNodes[1].getAttribute('value'); } } GetCardValues(editCard.card, document); //// FIX ME - looks like we need to focus on both the text field and the tab widget //// probably need to do the same in the addressing widget // focus on first name var firstName = document.getElementById('FirstName'); if ( firstName ) firstName.focus(); moveToAlertPosition();} |
editCard.titleProperty = "newCardTitle" | editCard.titleProperty = "newCardTitle"; editCard.selectedAB = ""; | function OnLoadNewCard(){ InitEditCard(); doSetOKCancel(NewCardOKButton, 0); var cardproperty = Components.classes["@mozilla.org/addressbook/cardproperty;1"].createInstance(Components.interfaces.nsIAbCard); editCard.card = cardproperty; editCard.titleProperty = "newCardTitle" if ("arguments" in window && window.arguments[0]) { if ("selectedAB" in window.arguments[0]) { // check if selected ab is a mailing list var abURI = window.arguments[0].selectedAB; var directory = GetDirectoryFromURI(abURI); if (directory.isMailList) { var parentURI = GetParentDirectoryFromMailingListURI(abURI); if (parentURI) { editCard.selectedAB = parentURI; } else { // it's a mailing list, but we failed to determine the parent directory // use the personal addressbook editCard.selectedAB = kPersonalAddressbookURI; } } else { editCard.selectedAB = window.arguments[0].selectedAB; } } else { editCard.selectedAB = kPersonalAddressbookURI; } // we may have been given properties to pre-initialize the window with.... // we'll fill these in here... if ("primaryEmail" in window.arguments[0]) editCard.card.primaryEmail = window.arguments[0].primaryEmail; if ("displayName" in window.arguments[0]) { editCard.card.displayName = window.arguments[0].displayName; // if we've got a display name, don't generate // a display name (and stomp on the existing display name) // when the user types a first or last name if (editCard.card.displayName.length) editCard.generateDisplayName = false; } } // set popup with address book names var abPopup = document.getElementById('abPopup'); if ( abPopup ) { var menupopup = document.getElementById('abPopup-menupopup'); if ( editCard.selectedAB && menupopup && menupopup.childNodes ) { for ( var index = menupopup.childNodes.length - 1; index >= 0; index-- ) { if ( menupopup.childNodes[index].getAttribute('value') == editCard.selectedAB ) { abPopup.label = menupopup.childNodes[index].getAttribute('label'); abPopup.value = menupopup.childNodes[index].getAttribute('value'); break; } } } else { // Default to the first valid addressbook when none is // selected. (the 0th is an empty/invalid entry) abPopup.label = menupopup.childNodes[1].getAttribute('label'); abPopup.value = menupopup.childNodes[1].getAttribute('value'); } } GetCardValues(editCard.card, document); // FIX ME - looks like we need to focus on both the text field and the tab widget // probably need to do the same in the addressing widget // focus on first name var firstName = document.getElementById('FirstName'); if ( firstName ) firstName.focus(); moveToAlertPosition();} |
} else if (!(directory.operations & directory.opWrite)) { editCard.selectedAB = kPersonalAddressbookURI; | function OnLoadNewCard(){ InitEditCard(); doSetOKCancel(NewCardOKButton, 0); var cardproperty = Components.classes["@mozilla.org/addressbook/cardproperty;1"].createInstance(Components.interfaces.nsIAbCard); editCard.card = cardproperty; editCard.titleProperty = "newCardTitle" if ("arguments" in window && window.arguments[0]) { if ("selectedAB" in window.arguments[0]) { // check if selected ab is a mailing list var abURI = window.arguments[0].selectedAB; var directory = GetDirectoryFromURI(abURI); if (directory.isMailList) { var parentURI = GetParentDirectoryFromMailingListURI(abURI); if (parentURI) { editCard.selectedAB = parentURI; } else { // it's a mailing list, but we failed to determine the parent directory // use the personal addressbook editCard.selectedAB = kPersonalAddressbookURI; } } else { editCard.selectedAB = window.arguments[0].selectedAB; } } else { editCard.selectedAB = kPersonalAddressbookURI; } // we may have been given properties to pre-initialize the window with.... // we'll fill these in here... if ("primaryEmail" in window.arguments[0]) editCard.card.primaryEmail = window.arguments[0].primaryEmail; if ("displayName" in window.arguments[0]) { editCard.card.displayName = window.arguments[0].displayName; // if we've got a display name, don't generate // a display name (and stomp on the existing display name) // when the user types a first or last name if (editCard.card.displayName.length) editCard.generateDisplayName = false; } } // set popup with address book names var abPopup = document.getElementById('abPopup'); if ( abPopup ) { var menupopup = document.getElementById('abPopup-menupopup'); if ( editCard.selectedAB && menupopup && menupopup.childNodes ) { for ( var index = menupopup.childNodes.length - 1; index >= 0; index-- ) { if ( menupopup.childNodes[index].getAttribute('value') == editCard.selectedAB ) { abPopup.label = menupopup.childNodes[index].getAttribute('label'); abPopup.value = menupopup.childNodes[index].getAttribute('value'); break; } } } else { // Default to the first valid addressbook when none is // selected. (the 0th is an empty/invalid entry) abPopup.label = menupopup.childNodes[1].getAttribute('label'); abPopup.value = menupopup.childNodes[1].getAttribute('value'); } } GetCardValues(editCard.card, document); // FIX ME - looks like we need to focus on both the text field and the tab widget // probably need to do the same in the addressing widget // focus on first name var firstName = document.getElementById('FirstName'); if ( firstName ) firstName.focus(); moveToAlertPosition();} |
|
var addressbook = Components.classes["@mozilla.org/addressbook;1"].createInstance(Components.interfaces.nsIAddressBook); | function OnLoadNewCard(){ InitEditCard(); gEditCard.card = (("arguments" in window) && (window.arguments.length > 0) && (window.arguments[0] instanceof Components.interfaces.nsIAbCard)) ? window.arguments[0] : Components.classes["@mozilla.org/addressbook/cardproperty;1"] .createInstance(Components.interfaces.nsIAbCard); gEditCard.titleProperty = "newCardTitle"; gEditCard.selectedAB = ""; if ("arguments" in window && window.arguments[0]) { gEditCard.selectedAB = kPersonalAddressbookURI; if ("selectedAB" in window.arguments[0]) { // check if selected ab is a mailing list var abURI = window.arguments[0].selectedAB; var directory = GetDirectoryFromURI(abURI); if (directory.isMailList) { var parentURI = GetParentDirectoryFromMailingListURI(abURI); if (parentURI) gEditCard.selectedAB = parentURI; } else if (directory.operations & directory.opWrite) gEditCard.selectedAB = window.arguments[0].selectedAB; } // we may have been given properties to pre-initialize the window with.... // we'll fill these in here... if ("primaryEmail" in window.arguments[0]) gEditCard.card.primaryEmail = window.arguments[0].primaryEmail; if ("displayName" in window.arguments[0]) { gEditCard.card.displayName = window.arguments[0].displayName; // if we've got a display name, don't generate // a display name (and stomp on the existing display name) // when the user types a first or last name if (gEditCard.card.displayName.length) gEditCard.generateDisplayName = false; } if ("aimScreenName" in window.arguments[0]) gEditCard.card.aimScreenName = window.arguments[0].aimScreenName; if ("okCallback" in window.arguments[0]) gOkCallback = window.arguments[0].okCallback; if ("escapedVCardStr" in window.arguments[0]) { // hide non vcard values HideNonVcardFields(); var addressbook = Components.classes["@mozilla.org/addressbook;1"].createInstance(Components.interfaces.nsIAddressBook); gEditCard.card = addressbook.escapedVCardToAbCard(window.arguments[0].escapedVCardStr); } if ("titleProperty" in window.arguments[0]) gEditCard.titleProperty = window.arguments[0].titleProperty; if ("hideABPicker" in window.arguments[0]) gHideABPicker = window.arguments[0].hideABPicker; } // set popup with address book names var abPopup = document.getElementById('abPopup'); abPopup.value = gEditCard.selectedAB || kPersonalAddressbookURI; if (gHideABPicker && abPopup) { abPopup.hidden = true; var abPopupLabel = document.getElementById("abPopupLabel"); abPopupLabel.hidden = true; } SetCardDialogTitle(gEditCard.card.displayName); GetCardValues(gEditCard.card, document); // FIX ME - looks like we need to focus on both the text field and the tab widget // probably need to do the same in the addressing widget // focus on first or last name based on the pref var focus = document.getElementById(gEditCard.displayLastNameFirst ? "LastName" : "FirstName"); if ( focus ) { // XXX Using the setTimeout hack until bug 103197 is fixed setTimeout( function(firstTextBox) { firstTextBox.focus(); }, 0, focus ); } moveToAlertPosition();} |
|
addressbook.escapedVCardToAbCard(window.arguments[0].escapedVCardStr); | Components.classes["@mozilla.org/addressbook;1"] .createInstance(Components.interfaces.nsIAddressBook) .escapedVCardToAbCard(window.arguments[0].escapedVCardStr); | function OnLoadNewCard(){ InitEditCard(); gEditCard.card = (("arguments" in window) && (window.arguments.length > 0) && (window.arguments[0] instanceof Components.interfaces.nsIAbCard)) ? window.arguments[0] : Components.classes["@mozilla.org/addressbook/cardproperty;1"] .createInstance(Components.interfaces.nsIAbCard); gEditCard.titleProperty = "newCardTitle"; gEditCard.selectedAB = ""; if ("arguments" in window && window.arguments[0]) { gEditCard.selectedAB = kPersonalAddressbookURI; if ("selectedAB" in window.arguments[0]) { // check if selected ab is a mailing list var abURI = window.arguments[0].selectedAB; var directory = GetDirectoryFromURI(abURI); if (directory.isMailList) { var parentURI = GetParentDirectoryFromMailingListURI(abURI); if (parentURI) gEditCard.selectedAB = parentURI; } else if (directory.operations & directory.opWrite) gEditCard.selectedAB = window.arguments[0].selectedAB; } // we may have been given properties to pre-initialize the window with.... // we'll fill these in here... if ("primaryEmail" in window.arguments[0]) gEditCard.card.primaryEmail = window.arguments[0].primaryEmail; if ("displayName" in window.arguments[0]) { gEditCard.card.displayName = window.arguments[0].displayName; // if we've got a display name, don't generate // a display name (and stomp on the existing display name) // when the user types a first or last name if (gEditCard.card.displayName.length) gEditCard.generateDisplayName = false; } if ("aimScreenName" in window.arguments[0]) gEditCard.card.aimScreenName = window.arguments[0].aimScreenName; if ("okCallback" in window.arguments[0]) gOkCallback = window.arguments[0].okCallback; if ("escapedVCardStr" in window.arguments[0]) { // hide non vcard values HideNonVcardFields(); var addressbook = Components.classes["@mozilla.org/addressbook;1"].createInstance(Components.interfaces.nsIAddressBook); gEditCard.card = addressbook.escapedVCardToAbCard(window.arguments[0].escapedVCardStr); } if ("titleProperty" in window.arguments[0]) gEditCard.titleProperty = window.arguments[0].titleProperty; if ("hideABPicker" in window.arguments[0]) gHideABPicker = window.arguments[0].hideABPicker; } // set popup with address book names var abPopup = document.getElementById('abPopup'); abPopup.value = gEditCard.selectedAB || kPersonalAddressbookURI; if (gHideABPicker && abPopup) { abPopup.hidden = true; var abPopupLabel = document.getElementById("abPopupLabel"); abPopupLabel.hidden = true; } SetCardDialogTitle(gEditCard.card.displayName); GetCardValues(gEditCard.card, document); // FIX ME - looks like we need to focus on both the text field and the tab widget // probably need to do the same in the addressing widget // focus on first or last name based on the pref var focus = document.getElementById(gEditCard.displayLastNameFirst ? "LastName" : "FirstName"); if ( focus ) { // XXX Using the setTimeout hack until bug 103197 is fixed setTimeout( function(firstTextBox) { firstTextBox.focus(); }, 0, focus ); } moveToAlertPosition();} |
var abPopupLabel = document.getElementById("abPopupLabel"); abPopupLabel.hidden = true; | document.getElementById("abPopupLabel").hidden = true; | function OnLoadNewCard(){ InitEditCard(); gEditCard.card = (("arguments" in window) && (window.arguments.length > 0) && (window.arguments[0] instanceof Components.interfaces.nsIAbCard)) ? window.arguments[0] : Components.classes["@mozilla.org/addressbook/cardproperty;1"] .createInstance(Components.interfaces.nsIAbCard); gEditCard.titleProperty = "newCardTitle"; gEditCard.selectedAB = ""; if ("arguments" in window && window.arguments[0]) { gEditCard.selectedAB = kPersonalAddressbookURI; if ("selectedAB" in window.arguments[0]) { // check if selected ab is a mailing list var abURI = window.arguments[0].selectedAB; var directory = GetDirectoryFromURI(abURI); if (directory.isMailList) { var parentURI = GetParentDirectoryFromMailingListURI(abURI); if (parentURI) gEditCard.selectedAB = parentURI; } else if (directory.operations & directory.opWrite) gEditCard.selectedAB = window.arguments[0].selectedAB; } // we may have been given properties to pre-initialize the window with.... // we'll fill these in here... if ("primaryEmail" in window.arguments[0]) gEditCard.card.primaryEmail = window.arguments[0].primaryEmail; if ("displayName" in window.arguments[0]) { gEditCard.card.displayName = window.arguments[0].displayName; // if we've got a display name, don't generate // a display name (and stomp on the existing display name) // when the user types a first or last name if (gEditCard.card.displayName.length) gEditCard.generateDisplayName = false; } if ("aimScreenName" in window.arguments[0]) gEditCard.card.aimScreenName = window.arguments[0].aimScreenName; if ("okCallback" in window.arguments[0]) gOkCallback = window.arguments[0].okCallback; if ("escapedVCardStr" in window.arguments[0]) { // hide non vcard values HideNonVcardFields(); var addressbook = Components.classes["@mozilla.org/addressbook;1"].createInstance(Components.interfaces.nsIAddressBook); gEditCard.card = addressbook.escapedVCardToAbCard(window.arguments[0].escapedVCardStr); } if ("titleProperty" in window.arguments[0]) gEditCard.titleProperty = window.arguments[0].titleProperty; if ("hideABPicker" in window.arguments[0]) gHideABPicker = window.arguments[0].hideABPicker; } // set popup with address book names var abPopup = document.getElementById('abPopup'); abPopup.value = gEditCard.selectedAB || kPersonalAddressbookURI; if (gHideABPicker && abPopup) { abPopup.hidden = true; var abPopupLabel = document.getElementById("abPopupLabel"); abPopupLabel.hidden = true; } SetCardDialogTitle(gEditCard.card.displayName); GetCardValues(gEditCard.card, document); // FIX ME - looks like we need to focus on both the text field and the tab widget // probably need to do the same in the addressing widget // focus on first or last name based on the pref var focus = document.getElementById(gEditCard.displayLastNameFirst ? "LastName" : "FirstName"); if ( focus ) { // XXX Using the setTimeout hack until bug 103197 is fixed setTimeout( function(firstTextBox) { firstTextBox.focus(); }, 0, focus ); } moveToAlertPosition();} |
if ("allowRemoteContent" in window.arguments[0]) document.getElementById('allowRemoteContent').checked = window.arguments[0].allowRemoteContent == 'true'; | if ("allowRemoteContent" in window.arguments[0]) { gEditCard.card.allowRemoteContent = window.arguments[0].allowRemoteContent; window.arguments[0].allowRemoteContent = false; } | function OnLoadNewCard(){ InitEditCard(); gEditCard.card = (("arguments" in window) && (window.arguments.length > 0) && (window.arguments[0] instanceof Components.interfaces.nsIAbCard)) ? window.arguments[0] : Components.classes["@mozilla.org/addressbook/cardproperty;1"] .createInstance(Components.interfaces.nsIAbCard); gEditCard.titleProperty = "newCardTitle"; gEditCard.selectedAB = ""; if ("arguments" in window && window.arguments[0]) { gEditCard.selectedAB = kPersonalAddressbookURI; if ("selectedAB" in window.arguments[0]) { // check if selected ab is a mailing list var abURI = window.arguments[0].selectedAB; var directory = GetDirectoryFromURI(abURI); if (directory.isMailList) { var parentURI = GetParentDirectoryFromMailingListURI(abURI); if (parentURI) gEditCard.selectedAB = parentURI; } else if (directory.operations & directory.opWrite) gEditCard.selectedAB = window.arguments[0].selectedAB; } // we may have been given properties to pre-initialize the window with.... // we'll fill these in here... if ("primaryEmail" in window.arguments[0]) gEditCard.card.primaryEmail = window.arguments[0].primaryEmail; if ("displayName" in window.arguments[0]) { gEditCard.card.displayName = window.arguments[0].displayName; // if we've got a display name, don't generate // a display name (and stomp on the existing display name) // when the user types a first or last name if (gEditCard.card.displayName.length) gEditCard.generateDisplayName = false; } if ("aimScreenName" in window.arguments[0]) gEditCard.card.aimScreenName = window.arguments[0].aimScreenName; if ("allowRemoteContent" in window.arguments[0]) document.getElementById('allowRemoteContent').checked = window.arguments[0].allowRemoteContent == 'true'; if ("okCallback" in window.arguments[0]) gOkCallback = window.arguments[0].okCallback; if ("escapedVCardStr" in window.arguments[0]) { // hide non vcard values HideNonVcardFields(); gEditCard.card = Components.classes["@mozilla.org/addressbook;1"] .createInstance(Components.interfaces.nsIAddressBook) .escapedVCardToAbCard(window.arguments[0].escapedVCardStr); } if ("titleProperty" in window.arguments[0]) gEditCard.titleProperty = window.arguments[0].titleProperty; if ("hideABPicker" in window.arguments[0]) gHideABPicker = window.arguments[0].hideABPicker; } // set popup with address book names var abPopup = document.getElementById('abPopup'); abPopup.value = gEditCard.selectedAB || kPersonalAddressbookURI; if (gHideABPicker && abPopup) { abPopup.hidden = true; document.getElementById("abPopupLabel").hidden = true; } SetCardDialogTitle(gEditCard.card.displayName); GetCardValues(gEditCard.card, document); // FIX ME - looks like we need to focus on both the text field and the tab widget // probably need to do the same in the addressing widget // focus on first or last name based on the pref var focus = document.getElementById(gEditCard.displayLastNameFirst ? "LastName" : "FirstName"); if ( focus ) { // XXX Using the setTimeout hack until bug 103197 is fixed setTimeout( function(firstTextBox) { firstTextBox.focus(); }, 0, focus ); } moveToAlertPosition();} |
if ( editCard.selectedAB ) abPopup.value = editCard.selectedAB; else { abPopup.value = "abdirectory: | var menupopup = document.getElementById('abPopup-menupopup'); if ( editCard.selectedAB && menupopup && menupopup.childNodes ) { for ( var index = menupopup.childNodes.length - 1; index >= 0; index-- ) { if ( menupopup.childNodes[index].getAttribute('data') == editCard.selectedAB ) { abPopup.value = menupopup.childNodes[index].getAttribute('value'); break; } } | function OnLoadNewCard(){ InitEditCard(); doSetOKCancel(NewCardOKButton, 0); var cardproperty = Components.classes["component://netscape/addressbook/cardproperty"].createInstance(); cardproperty = cardproperty.QueryInterface(Components.interfaces.nsIAbCard); editCard.card = cardproperty; editCard.okCallback = 0; editCard.titlePrefix = editCard.newCardTitlePrefix; if (window.arguments && window.arguments[0]) { if ( window.arguments[0].selectedAB ) editCard.selectedAB = window.arguments[0].selectedAB; } // set popup with address book names var abPopup = document.getElementById('abPopup'); if ( abPopup ) { if ( editCard.selectedAB ) abPopup.value = editCard.selectedAB; else { // this should not be hardcoded. abPopup.value = "abdirectory://abook.mab"; } } GetCardValues(editCard.card, document); //// FIX ME - looks like we need to focus on both the text field and the tab widget //// probably need to do the same in the addressing widget // focus on first name var firstName = document.getElementById('FirstName'); if ( firstName ) firstName.focus();} |
else if (!(directory.operations & directory.opWrite)) { selectedAB = kPersonalAddressbookURI; } | function OnLoadNewMailList(){ //XXX: gAddressBookBundle is set in 2 places because of different callers gAddressBookBundle = document.getElementById("bundle_addressBook"); var selectedAB = null; if (window.arguments && window.arguments[0]) { var abURI = window.arguments[0].selectedAB; if (abURI) { var directory = GetDirectoryFromURI(abURI); if (directory.isMailList) { var parentURI = GetParentDirectoryFromMailingListURI(abURI); if (parentURI) { selectedAB = parentURI; } } else { selectedAB = abURI; } } } if (!selectedAB) selectedAB = kPersonalAddressbookURI; // set popup with address book names var abPopup = document.getElementById('abPopup'); if ( abPopup ) { var menupopup = document.getElementById('abPopup-menupopup'); if ( selectedAB && menupopup && menupopup.childNodes ) { for ( var index = menupopup.childNodes.length - 1; index >= 0; index-- ) { if ( menupopup.childNodes[index].getAttribute('value') == selectedAB ) { abPopup.label = menupopup.childNodes[index].getAttribute('label'); abPopup.value = menupopup.childNodes[index].getAttribute('value'); break; } } } } AppendnewRowAndSetFocus(); // focus on first name var listName = document.getElementById('ListName'); if ( listName ) listName.focus(); moveToAlertPosition();} |
|
AppendnewRowAndSetFocus(); | AppendNewRowAndSetFocus(); awFitDummyRows(1); | function OnLoadNewMailList(){ //XXX: gAddressBookBundle is set in 2 places because of different callers gAddressBookBundle = document.getElementById("bundle_addressBook"); var selectedAB = null; if (window.arguments && window.arguments[0]) { var abURI = window.arguments[0].selectedAB; if (abURI) { var directory = GetDirectoryFromURI(abURI); if (directory.isMailList) { var parentURI = GetParentDirectoryFromMailingListURI(abURI); if (parentURI) { selectedAB = parentURI; } } else if (!(directory.operations & directory.opWrite)) { selectedAB = kPersonalAddressbookURI; } else { selectedAB = abURI; } } } if (!selectedAB) selectedAB = kPersonalAddressbookURI; // set popup with address book names var abPopup = document.getElementById('abPopup'); if ( abPopup ) { var menupopup = document.getElementById('abPopup-menupopup'); if ( selectedAB && menupopup && menupopup.childNodes ) { for ( var index = menupopup.childNodes.length - 1; index >= 0; index-- ) { if ( menupopup.childNodes[index].getAttribute('value') == selectedAB ) { abPopup.label = menupopup.childNodes[index].getAttribute('label'); abPopup.value = menupopup.childNodes[index].getAttribute('value'); break; } } } } AppendnewRowAndSetFocus(); // focus on first name var listName = document.getElementById('ListName'); if ( listName ) listName.focus(); moveToAlertPosition();} |
document.addEventListener("keypress", awDocumentKeyPress, true); | function OnLoadNewMailList(){ //XXX: gAddressBookBundle is set in 2 places because of different callers gAddressBookBundle = document.getElementById("bundle_addressBook"); var selectedAB = null; if (window.arguments && window.arguments[0]) { var abURI = window.arguments[0].selectedAB; if (abURI) { var directory = GetDirectoryFromURI(abURI); if (directory.isMailList) { var parentURI = GetParentDirectoryFromMailingListURI(abURI); if (parentURI) { selectedAB = parentURI; } } else if (!(directory.operations & directory.opWrite)) { selectedAB = kPersonalAddressbookURI; } else { selectedAB = abURI; } } } if (!selectedAB) selectedAB = kPersonalAddressbookURI; // set popup with address book names var abPopup = document.getElementById('abPopup'); if ( abPopup ) { var menupopup = document.getElementById('abPopup-menupopup'); if ( selectedAB && menupopup && menupopup.childNodes ) { for ( var index = menupopup.childNodes.length - 1; index >= 0; index-- ) { if ( menupopup.childNodes[index].getAttribute('value') == selectedAB ) { abPopup.label = menupopup.childNodes[index].getAttribute('label'); abPopup.value = menupopup.childNodes[index].getAttribute('value'); break; } } } } AppendNewRowAndSetFocus(); awFitDummyRows(1); // focus on first name var listName = document.getElementById('ListName'); if ( listName ) listName.focus(); moveToAlertPosition();} |
|
if ("arguments" in window && window.arguments.length >= 1 && window.arguments[0]) | if ("arguments" in window && window.arguments.length >= 1 && window.arguments[0] && window.arguments[0].doc) | function onLoadPageInfo(){ //dump("===============================================================================\n"); theBundle = document.getElementById("pageinfobundle"); gStrings.unknown = theBundle.getString("unknown"); gStrings.notSet = theBundle.getString("notset"); gStrings.emptyString = theBundle.getString("emptystring"); gStrings.noExpiration = theBundle.getString("generalNoExpiration"); gStrings.linkAnchor = theBundle.getString("linkAnchor"); gStrings.linkArea = theBundle.getString("linkArea"); gStrings.linkSubmit = theBundle.getString("linkSubmit"); gStrings.linkSubmission = theBundle.getString("linkSubmission"); gStrings.linkRel = theBundle.getString("linkRel"); gStrings.linkStylesheet = theBundle.getString("linkStylesheet"); gStrings.linkRev = theBundle.getString("linkRev"); gStrings.linkX = theBundle.getString("linkX"); gStrings.mediaImg = theBundle.getString("mediaImg"); gStrings.mediaBGImg = theBundle.getString("mediaBGImg"); gStrings.mediaApplet = theBundle.getString("mediaApplet"); gStrings.mediaObject = theBundle.getString("mediaObject"); gStrings.mediaEmbed = theBundle.getString("mediaEmbed"); gStrings.mediaLink = theBundle.getString("mediaLink"); gStrings.mediaInput = theBundle.getString("mediaInput"); var docTitle = ""; if ("arguments" in window && window.arguments.length >= 1 && window.arguments[0]) { theWindow = null; theDocument = window.arguments[0]; docTitle = theBundle.getString("frameInfo.title"); } else { if ("gBrowser" in window.opener) theWindow = window.opener.gBrowser.contentWindow; else theWindow = window.opener.frames[0]; theDocument = theWindow.document; docTitle = theBundle.getString("pageInfo.title"); } document.title = docTitle; // do the easy stuff first makeGeneralTab(); // and then the hard stuff makeTabs(theDocument, theWindow); /* Call registered overlay init functions */ for (x in onLoadRegistry) { onLoadRegistry[x](); } /* Select the requested tab, if the name is specified */ if ("arguments" in window && window.arguments.length > 1) { var tabName = window.arguments[1]; if (tabName) { var tabControl = document.getElementById("tabbox"); var tab = document.getElementById(tabName); if (tabControl && tab) { tabControl.selectedTab = tab; } } }} |
theDocument = window.arguments[0]; | theDocument = window.arguments[0].doc; | function onLoadPageInfo(){ //dump("===============================================================================\n"); theBundle = document.getElementById("pageinfobundle"); gStrings.unknown = theBundle.getString("unknown"); gStrings.notSet = theBundle.getString("notset"); gStrings.emptyString = theBundle.getString("emptystring"); gStrings.noExpiration = theBundle.getString("generalNoExpiration"); gStrings.linkAnchor = theBundle.getString("linkAnchor"); gStrings.linkArea = theBundle.getString("linkArea"); gStrings.linkSubmit = theBundle.getString("linkSubmit"); gStrings.linkSubmission = theBundle.getString("linkSubmission"); gStrings.linkRel = theBundle.getString("linkRel"); gStrings.linkStylesheet = theBundle.getString("linkStylesheet"); gStrings.linkRev = theBundle.getString("linkRev"); gStrings.linkX = theBundle.getString("linkX"); gStrings.mediaImg = theBundle.getString("mediaImg"); gStrings.mediaBGImg = theBundle.getString("mediaBGImg"); gStrings.mediaApplet = theBundle.getString("mediaApplet"); gStrings.mediaObject = theBundle.getString("mediaObject"); gStrings.mediaEmbed = theBundle.getString("mediaEmbed"); gStrings.mediaLink = theBundle.getString("mediaLink"); gStrings.mediaInput = theBundle.getString("mediaInput"); var docTitle = ""; if ("arguments" in window && window.arguments.length >= 1 && window.arguments[0]) { theWindow = null; theDocument = window.arguments[0]; docTitle = theBundle.getString("frameInfo.title"); } else { if ("gBrowser" in window.opener) theWindow = window.opener.gBrowser.contentWindow; else theWindow = window.opener.frames[0]; theDocument = theWindow.document; docTitle = theBundle.getString("pageInfo.title"); } document.title = docTitle; // do the easy stuff first makeGeneralTab(); // and then the hard stuff makeTabs(theDocument, theWindow); /* Call registered overlay init functions */ for (x in onLoadRegistry) { onLoadRegistry[x](); } /* Select the requested tab, if the name is specified */ if ("arguments" in window && window.arguments.length > 1) { var tabName = window.arguments[1]; if (tabName) { var tabControl = document.getElementById("tabbox"); var tab = document.getElementById(tabName); if (tabControl && tab) { tabControl.selectedTab = tab; } } }} |
if ("arguments" in window && window.arguments.length > 1) | var tabControl = document.getElementById("tabbox"); if (tabControl) | function onLoadPageInfo(){ //dump("===============================================================================\n"); theBundle = document.getElementById("pageinfobundle"); gStrings.unknown = theBundle.getString("unknown"); gStrings.notSet = theBundle.getString("notset"); gStrings.emptyString = theBundle.getString("emptystring"); gStrings.noExpiration = theBundle.getString("generalNoExpiration"); gStrings.linkAnchor = theBundle.getString("linkAnchor"); gStrings.linkArea = theBundle.getString("linkArea"); gStrings.linkSubmit = theBundle.getString("linkSubmit"); gStrings.linkSubmission = theBundle.getString("linkSubmission"); gStrings.linkRel = theBundle.getString("linkRel"); gStrings.linkStylesheet = theBundle.getString("linkStylesheet"); gStrings.linkRev = theBundle.getString("linkRev"); gStrings.linkX = theBundle.getString("linkX"); gStrings.mediaImg = theBundle.getString("mediaImg"); gStrings.mediaBGImg = theBundle.getString("mediaBGImg"); gStrings.mediaApplet = theBundle.getString("mediaApplet"); gStrings.mediaObject = theBundle.getString("mediaObject"); gStrings.mediaEmbed = theBundle.getString("mediaEmbed"); gStrings.mediaLink = theBundle.getString("mediaLink"); gStrings.mediaInput = theBundle.getString("mediaInput"); var docTitle = ""; if ("arguments" in window && window.arguments.length >= 1 && window.arguments[0]) { theWindow = null; theDocument = window.arguments[0]; docTitle = theBundle.getString("frameInfo.title"); } else { if ("gBrowser" in window.opener) theWindow = window.opener.gBrowser.contentWindow; else theWindow = window.opener.frames[0]; theDocument = theWindow.document; docTitle = theBundle.getString("pageInfo.title"); } document.title = docTitle; // do the easy stuff first makeGeneralTab(); // and then the hard stuff makeTabs(theDocument, theWindow); /* Call registered overlay init functions */ for (x in onLoadRegistry) { onLoadRegistry[x](); } /* Select the requested tab, if the name is specified */ if ("arguments" in window && window.arguments.length > 1) { var tabName = window.arguments[1]; if (tabName) { var tabControl = document.getElementById("tabbox"); var tab = document.getElementById(tabName); if (tabControl && tab) { tabControl.selectedTab = tab; } } }} |
var tabName = window.arguments[1]; if (tabName) | if ("arguments" in window && window.arguments.length >= 1 && window.arguments[0] && window.arguments[0].initialTab) | function onLoadPageInfo(){ //dump("===============================================================================\n"); theBundle = document.getElementById("pageinfobundle"); gStrings.unknown = theBundle.getString("unknown"); gStrings.notSet = theBundle.getString("notset"); gStrings.emptyString = theBundle.getString("emptystring"); gStrings.noExpiration = theBundle.getString("generalNoExpiration"); gStrings.linkAnchor = theBundle.getString("linkAnchor"); gStrings.linkArea = theBundle.getString("linkArea"); gStrings.linkSubmit = theBundle.getString("linkSubmit"); gStrings.linkSubmission = theBundle.getString("linkSubmission"); gStrings.linkRel = theBundle.getString("linkRel"); gStrings.linkStylesheet = theBundle.getString("linkStylesheet"); gStrings.linkRev = theBundle.getString("linkRev"); gStrings.linkX = theBundle.getString("linkX"); gStrings.mediaImg = theBundle.getString("mediaImg"); gStrings.mediaBGImg = theBundle.getString("mediaBGImg"); gStrings.mediaApplet = theBundle.getString("mediaApplet"); gStrings.mediaObject = theBundle.getString("mediaObject"); gStrings.mediaEmbed = theBundle.getString("mediaEmbed"); gStrings.mediaLink = theBundle.getString("mediaLink"); gStrings.mediaInput = theBundle.getString("mediaInput"); var docTitle = ""; if ("arguments" in window && window.arguments.length >= 1 && window.arguments[0]) { theWindow = null; theDocument = window.arguments[0]; docTitle = theBundle.getString("frameInfo.title"); } else { if ("gBrowser" in window.opener) theWindow = window.opener.gBrowser.contentWindow; else theWindow = window.opener.frames[0]; theDocument = theWindow.document; docTitle = theBundle.getString("pageInfo.title"); } document.title = docTitle; // do the easy stuff first makeGeneralTab(); // and then the hard stuff makeTabs(theDocument, theWindow); /* Call registered overlay init functions */ for (x in onLoadRegistry) { onLoadRegistry[x](); } /* Select the requested tab, if the name is specified */ if ("arguments" in window && window.arguments.length > 1) { var tabName = window.arguments[1]; if (tabName) { var tabControl = document.getElementById("tabbox"); var tab = document.getElementById(tabName); if (tabControl && tab) { tabControl.selectedTab = tab; } } }} |
var tabControl = document.getElementById("tabbox"); var tab = document.getElementById(tabName); if (tabControl && tab) { | var tab = document.getElementById(window.arguments[0].initialTab); if (tab) | function onLoadPageInfo(){ //dump("===============================================================================\n"); theBundle = document.getElementById("pageinfobundle"); gStrings.unknown = theBundle.getString("unknown"); gStrings.notSet = theBundle.getString("notset"); gStrings.emptyString = theBundle.getString("emptystring"); gStrings.noExpiration = theBundle.getString("generalNoExpiration"); gStrings.linkAnchor = theBundle.getString("linkAnchor"); gStrings.linkArea = theBundle.getString("linkArea"); gStrings.linkSubmit = theBundle.getString("linkSubmit"); gStrings.linkSubmission = theBundle.getString("linkSubmission"); gStrings.linkRel = theBundle.getString("linkRel"); gStrings.linkStylesheet = theBundle.getString("linkStylesheet"); gStrings.linkRev = theBundle.getString("linkRev"); gStrings.linkX = theBundle.getString("linkX"); gStrings.mediaImg = theBundle.getString("mediaImg"); gStrings.mediaBGImg = theBundle.getString("mediaBGImg"); gStrings.mediaApplet = theBundle.getString("mediaApplet"); gStrings.mediaObject = theBundle.getString("mediaObject"); gStrings.mediaEmbed = theBundle.getString("mediaEmbed"); gStrings.mediaLink = theBundle.getString("mediaLink"); gStrings.mediaInput = theBundle.getString("mediaInput"); var docTitle = ""; if ("arguments" in window && window.arguments.length >= 1 && window.arguments[0]) { theWindow = null; theDocument = window.arguments[0]; docTitle = theBundle.getString("frameInfo.title"); } else { if ("gBrowser" in window.opener) theWindow = window.opener.gBrowser.contentWindow; else theWindow = window.opener.frames[0]; theDocument = theWindow.document; docTitle = theBundle.getString("pageInfo.title"); } document.title = docTitle; // do the easy stuff first makeGeneralTab(); // and then the hard stuff makeTabs(theDocument, theWindow); /* Call registered overlay init functions */ for (x in onLoadRegistry) { onLoadRegistry[x](); } /* Select the requested tab, if the name is specified */ if ("arguments" in window && window.arguments.length > 1) { var tabName = window.arguments[1]; if (tabName) { var tabControl = document.getElementById("tabbox"); var tab = document.getElementById(tabName); if (tabControl && tab) { tabControl.selectedTab = tab; } } }} |
} | function onLoadPageInfo(){ //dump("===============================================================================\n"); theBundle = document.getElementById("pageinfobundle"); gStrings.unknown = theBundle.getString("unknown"); gStrings.notSet = theBundle.getString("notset"); gStrings.emptyString = theBundle.getString("emptystring"); gStrings.noExpiration = theBundle.getString("generalNoExpiration"); gStrings.linkAnchor = theBundle.getString("linkAnchor"); gStrings.linkArea = theBundle.getString("linkArea"); gStrings.linkSubmit = theBundle.getString("linkSubmit"); gStrings.linkSubmission = theBundle.getString("linkSubmission"); gStrings.linkRel = theBundle.getString("linkRel"); gStrings.linkStylesheet = theBundle.getString("linkStylesheet"); gStrings.linkRev = theBundle.getString("linkRev"); gStrings.linkX = theBundle.getString("linkX"); gStrings.mediaImg = theBundle.getString("mediaImg"); gStrings.mediaBGImg = theBundle.getString("mediaBGImg"); gStrings.mediaApplet = theBundle.getString("mediaApplet"); gStrings.mediaObject = theBundle.getString("mediaObject"); gStrings.mediaEmbed = theBundle.getString("mediaEmbed"); gStrings.mediaLink = theBundle.getString("mediaLink"); gStrings.mediaInput = theBundle.getString("mediaInput"); var docTitle = ""; if ("arguments" in window && window.arguments.length >= 1 && window.arguments[0]) { theWindow = null; theDocument = window.arguments[0]; docTitle = theBundle.getString("frameInfo.title"); } else { if ("gBrowser" in window.opener) theWindow = window.opener.gBrowser.contentWindow; else theWindow = window.opener.frames[0]; theDocument = theWindow.document; docTitle = theBundle.getString("pageInfo.title"); } document.title = docTitle; // do the easy stuff first makeGeneralTab(); // and then the hard stuff makeTabs(theDocument, theWindow); /* Call registered overlay init functions */ for (x in onLoadRegistry) { onLoadRegistry[x](); } /* Select the requested tab, if the name is specified */ if ("arguments" in window && window.arguments.length > 1) { var tabName = window.arguments[1]; if (tabName) { var tabControl = document.getElementById("tabbox"); var tab = document.getElementById(tabName); if (tabControl && tab) { tabControl.selectedTab = tab; } } }} |
|
tabControl.selectedTab.focus(); | function onLoadPageInfo(){ //dump("===============================================================================\n"); theBundle = document.getElementById("pageinfobundle"); gStrings.unknown = theBundle.getString("unknown"); gStrings.notSet = theBundle.getString("notset"); gStrings.emptyString = theBundle.getString("emptystring"); gStrings.noExpiration = theBundle.getString("generalNoExpiration"); gStrings.linkAnchor = theBundle.getString("linkAnchor"); gStrings.linkArea = theBundle.getString("linkArea"); gStrings.linkSubmit = theBundle.getString("linkSubmit"); gStrings.linkSubmission = theBundle.getString("linkSubmission"); gStrings.linkRel = theBundle.getString("linkRel"); gStrings.linkStylesheet = theBundle.getString("linkStylesheet"); gStrings.linkRev = theBundle.getString("linkRev"); gStrings.linkX = theBundle.getString("linkX"); gStrings.mediaImg = theBundle.getString("mediaImg"); gStrings.mediaBGImg = theBundle.getString("mediaBGImg"); gStrings.mediaApplet = theBundle.getString("mediaApplet"); gStrings.mediaObject = theBundle.getString("mediaObject"); gStrings.mediaEmbed = theBundle.getString("mediaEmbed"); gStrings.mediaLink = theBundle.getString("mediaLink"); gStrings.mediaInput = theBundle.getString("mediaInput"); var docTitle = ""; if ("arguments" in window && window.arguments.length >= 1 && window.arguments[0]) { theWindow = null; theDocument = window.arguments[0]; docTitle = theBundle.getString("frameInfo.title"); } else { if ("gBrowser" in window.opener) theWindow = window.opener.gBrowser.contentWindow; else theWindow = window.opener.frames[0]; theDocument = theWindow.document; docTitle = theBundle.getString("pageInfo.title"); } document.title = docTitle; // do the easy stuff first makeGeneralTab(); // and then the hard stuff makeTabs(theDocument, theWindow); /* Call registered overlay init functions */ for (x in onLoadRegistry) { onLoadRegistry[x](); } /* Select the requested tab, if the name is specified */ if ("arguments" in window && window.arguments.length > 1) { var tabName = window.arguments[1]; if (tabName) { var tabControl = document.getElementById("tabbox"); var tab = document.getElementById(tabName); if (tabControl && tab) { tabControl.selectedTab = tab; } } }} |
|
docTitle = strbundle.getString("pageInfo.title"); } window.document.title = docTitle; | function onLoadPageInfo(){ var page; if ((window.arguments.length >= 1) && window.arguments[0]) page = window.arguments[0]; else page = window.opener.frames[0].document; var root = document.getElementById("cont"); makeDocument(page, root); var formTreeHolder = document.getElementById("formTreeContainer"); var hasForm = makeFormTree(page, formTreeHolder); if (hasForm) { var formsTab = document.getElementById("formsTab"); formsTab.removeAttribute("hidden"); formTreeHolder.removeAttribute("collapsed"); } var imageTreeHolder = document.getElementById("imageTreeContainer"); var hasImages = makeImageTree(page, imageTreeHolder); if (hasImages) { var imagesTab = document.getElementById("imagesTab"); imagesTab.removeAttribute("hidden"); imageTreeHolder.removeAttribute("collapsed"); } /* Call registered overlay init functions */ for (x in onLoadRegistry) { onLoadRegistry[x](); } /* Selected the requested tab, if the name is specified */ /* if (window.arguments != null) { */ if ("arguments" in window && window.arguments.length > 1) { var tabName = window.arguments[1]; if (tabName) { var tabbox = document.getElementById("tabbox"); var tab = document.getElementById(tabName); if (tabbox && tab) { tabbox.selectedTab = tab; } } }} |
|
printEngine.StartPrintOperation(); | printEngine.StartPrintOperation(printSettings); | function OnLoadPrintEngine(){ PrintEngineCreateGlobals(); InitPrintEngineWindow(); printEngine.StartPrintOperation(); } |
printEngine.StartPrintOperation(); | function OnLoadPrintEngine(){ PrintEngineCreateGlobals(); InitPrintEngineWindow();} |
|
var sbs = Components.classes["@mozilla.org/intl/stringbundle;1"] .getService(Components.interfaces.nsIStringBundleService); var props = sbs.createBundle("chrome: var windowTitle = props.formatStringFromName("PrintPreviewWindowTitle", [args.title], 1); document.title = windowTitle; | function OnLoadPrintEngine(){ var args = window.arguments[0]; gContent = document.getElementById("content"); var htmlexporter = Components.classes["@mozilla.org/calendar/export;1?type=html"].createInstance(Components.interfaces.calIExporter); // Fail-safe check to not init twice, to prevent leaking files if (!gTempFile) { const nsIFile = Components.interfaces.nsIFile; var dirService = Components.classes["@mozilla.org/file/directory_service;1"] .getService(Components.interfaces.nsIProperties); gTempFile = dirService.get("TmpD", nsIFile); gTempFile.append("calendarPrint.html"); gTempFile.createUnique(nsIFile.NORMAL_FILE_TYPE, 0600); dump("tf: "+gTempFile.path+"\n"); var ioService = Components.classes["@mozilla.org/network/io-service;1"] .getService(Components.interfaces.nsIIOService); var gTempUri = ioService.newFileURI(gTempFile); } const nsIFileOutputStream = Components.interfaces.nsIFileOutputStream; var outputStream; var stream = Components.classes["@mozilla.org/network/file-output-stream;1"] .createInstance(Components.interfaces.nsIFileOutputStream); try { stream.init(gTempFile, 0x2A, 0600, 0); htmlexporter.exportToStream(stream, args.eventList.length, args.eventList); stream.close(); } catch(ex) { dump('print failed to export:'+ ex); } gHtmlDocument = window.content.document; gHtmlDocument.location.href = gTempUri.spec; BrowserPrintPreview();} |
|
gTcButton = document.getElementById("ccButton"); | gCcButton = document.getElementById("ccButton"); | function OnLoadSelectAddress(){ gAddressBookBundle = document.getElementById("bundle_addressBook"); prefixTo = gAddressBookBundle.getString("prefixTo") + ": "; prefixCc = gAddressBookBundle.getString("prefixCc") + ": "; prefixBcc = gAddressBookBundle.getString("prefixBcc") + ": "; InitCommonJS(); UpgradeAddressBookResultsPaneUI("mailnews.ui.select_addresses_results.version"); var toAddress="", ccAddress="", bccAddress=""; doSetOKCancel(SelectAddressOKButton, 0); top.addressbook = Components.classes["@mozilla.org/addressbook;1"].createInstance(Components.interfaces.nsIAddressBook); // look in arguments[0] for parameters if (window.arguments && window.arguments[0]) { // keep parameters in global for later if ( window.arguments[0].composeWindow ) top.composeWindow = window.arguments[0].composeWindow; if ( window.arguments[0].msgCompFields ) top.msgCompFields = window.arguments[0].msgCompFields; if ( window.arguments[0].toAddress ) toAddress = window.arguments[0].toAddress; if ( window.arguments[0].ccAddress ) ccAddress = window.arguments[0].ccAddress; if ( window.arguments[0].bccAddress ) bccAddress = window.arguments[0].bccAddress; // put the addresses into the bucket AddAddressFromComposeWindow(toAddress, prefixTo); AddAddressFromComposeWindow(ccAddress, prefixCc); AddAddressFromComposeWindow(bccAddress, prefixBcc); } gSearchInput = document.getElementById("searchInput"); SearchInputChanged(); SelectFirstAddressBookMenulist(); DialogBucketPaneSelectionChanged(); var workPhoneCol = document.getElementById("WorkPhone"); workPhoneCol.setAttribute("hidden", "true"); var companyCol = document.getElementById("Company"); companyCol.setAttribute("hidden", "true"); gToButton = document.getElementById("toButton"); gTcButton = document.getElementById("ccButton"); gBccButton = document.getElementById("bccButton"); var abResultsTree = document.getElementById("abResultsTree"); abResultsTree.focus(); gActivatedButton = gToButton; document.documentElement.addEventListener("keypress", OnReturnHit, true);} |
top.addressbook = Components.classes["component: | top.addressbook = Components.classes["@mozilla.org/addressbook;1"].createInstance(); | function OnLoadSelectAddress(){ InitCommonJS(); var toAddress="", ccAddress="", bccAddress=""; doSetOKCancel(SelectAddressOKButton, 0); top.addressbook = Components.classes["component://netscape/addressbook"].createInstance(); top.addressbook = top.addressbook.QueryInterface(Components.interfaces.nsIAddressBook); top.gDialogResultsPaneSelectionChanged = DialogResultsPaneSelectionChanged; // look in arguments[0] for parameters if (window.arguments && window.arguments[0]) { // keep parameters in global for later if ( window.arguments[0].composeWindow ) top.composeWindow = window.arguments[0].composeWindow; if ( window.arguments[0].msgCompFields ) top.msgCompFields = window.arguments[0].msgCompFields; if ( window.arguments[0].toAddress ) toAddress = window.arguments[0].toAddress; if ( window.arguments[0].ccAddress ) ccAddress = window.arguments[0].ccAddress; if ( window.arguments[0].bccAddress ) bccAddress = window.arguments[0].bccAddress; dump("onload top.composeWindow: " + top.composeWindow + "\n"); dump("onload toAddress: " + toAddress + "\n"); // put the addresses into the bucket AddAddressFromComposeWindow(toAddress, prefixTo); AddAddressFromComposeWindow(ccAddress, prefixCc); AddAddressFromComposeWindow(bccAddress, prefixBcc); } SelectFirstAddressBook(); DialogResultsPaneSelectionChanged(); DialogBucketPaneSelectionChanged();} |
UpdateAttachmentCol(true); | function OnLoadThreadPane(){ UpgradeThreadPaneUI();} |
|
try { document.getElementById("menu_highlightSyntax").setAttribute("checked", gPrefs.getBoolPref("view_source.syntax_highlight")); } catch (e) { } } else { document.getElementById("menu_highlightSyntax").setAttribute("hidden", "true"); | function onLoadViewPartialSource(){ // check the view_source.wrap_long_lines pref and set the menuitem's checked attribute accordingly if (gPrefs) { try { var wraplonglinesPrefValue = gPrefs.getBoolPref('view_source.wrap_long_lines'); if (wraplonglinesPrefValue) { document.getElementById('menu_wrapLongLines').setAttribute('checked', 'true'); gWrapLongLines = true; } } catch (e) { } } // disable menu items that don't work since the selection is munged and // the editor doesn't work for MathML document.getElementById('cmd_savePage').setAttribute('disabled', 'true'); document.getElementById('cmd_editPage').setAttribute('disabled', 'true'); if (window.arguments[3] == 'selection') viewPartialSourceForSelection(window.arguments[2]); else viewPartialSourceForFragment(window.arguments[2], window.arguments[3]); window._content.focus();} |
|
document.getElementById('cmd_savePage').setAttribute('disabled', 'true'); | function onLoadViewPartialSource(){ // check the view_source.wrap_long_lines pref and set the menuitem's checked attribute accordingly if (gPrefs) { try { var wraplonglinesPrefValue = gPrefs.getBoolPref('view_source.wrap_long_lines'); if (wraplonglinesPrefValue) { document.getElementById('menu_wrapLongLines').setAttribute('checked', 'true'); gWrapLongLines = true; } } catch (e) { } try { document.getElementById("menu_highlightSyntax").setAttribute("checked", gPrefs.getBoolPref("view_source.syntax_highlight")); } catch (e) { } } else { document.getElementById("menu_highlightSyntax").setAttribute("hidden", "true"); } initFindBar(); // disable menu items that don't work since the selection is munged and // the editor doesn't work for MathML document.getElementById('cmd_savePage').setAttribute('disabled', 'true'); // we don't support external editors //document.getElementById('cmd_editPage').setAttribute('disabled', 'true'); if (window.arguments[3] == 'selection') viewPartialSourceForSelection(window.arguments[2]); else viewPartialSourceForFragment(window.arguments[2], window.arguments[3]); window._content.focus();} |
|
#ifdef MOZ_PHOENIX | function onLoadViewSource() { viewSource(window.arguments[0]); document.commandDispatcher.focusedWindow = content;#ifdef MOZ_PHOENIX gFindBar.initFindBar();#endif} |
|
#endif | function onLoadViewSource() { viewSource(window.arguments[0]); document.commandDispatcher.focusedWindow = content;#ifdef MOZ_PHOENIX gFindBar.initFindBar();#endif} |
|
if ( window.content ) { | if ( window._content ) { | function onLoadViewSource() { try { createBrowserInstance(); if (appCore == null) { // Give up. dump("Giving up...\n"); window.close(); } // Initialize browser instance.. appCore.setWebShellWindow(window); if ( window.content ) { dump("Setting content window\n"); appCore.setContentWindow( window.content ); } } catch(ex) { dump("Failed to create and initialiaze the AppCore...\n"); } var docShellElement = document.getElementById("content-frame"); var docShell = docShellElement.docShell; docShell.viewMode = Components.interfaces.nsIDocShell.viewSource; var webNav = docShell.QueryInterface(Components.interfaces.nsIWebNavigation); try { if ( window.arguments && window.arguments[1] ) { if (window.arguments[1].indexOf('charset=') != -1) { arrayArgComponents = window.arguments[1].split('='); if (arrayArgComponents) { if (appCore != null) { dump("*** SetDocumentCharset(" + arrayArgComponents[1] + ")\n"); appCore.SetDocumentCharset(arrayArgComponents[1]); } } } } } catch(ex) { dump("*** Failed to SetDocumentCharset...\n"); } webNav.loadURI(window.arguments[0]);} |
appCore.setContentWindow( window.content ); | appCore.setContentWindow( window._content ); | function onLoadViewSource() { try { createBrowserInstance(); if (appCore == null) { // Give up. dump("Giving up...\n"); window.close(); } // Initialize browser instance.. appCore.setWebShellWindow(window); if ( window.content ) { dump("Setting content window\n"); appCore.setContentWindow( window.content ); } } catch(ex) { dump("Failed to create and initialiaze the AppCore...\n"); } var docShellElement = document.getElementById("content-frame"); var docShell = docShellElement.docShell; docShell.viewMode = Components.interfaces.nsIDocShell.viewSource; var webNav = docShell.QueryInterface(Components.interfaces.nsIWebNavigation); try { if ( window.arguments && window.arguments[1] ) { if (window.arguments[1].indexOf('charset=') != -1) { arrayArgComponents = window.arguments[1].split('='); if (arrayArgComponents) { if (appCore != null) { dump("*** SetDocumentCharset(" + arrayArgComponents[1] + ")\n"); appCore.SetDocumentCharset(arrayArgComponents[1]); } } } } } catch(ex) { dump("*** Failed to SetDocumentCharset...\n"); } webNav.loadURI(window.arguments[0]);} |
if (!this.userTyped.value) { | if (this.urlBar && !this.userTyped.value) { | onLocationChange : function(aWebProgress, aRequest, aLocation) { this.setOverLink("", null); var location = aLocation.spec; if (this.hideAboutBlank) { this.hideAboutBlank = false; if (location == "about:blank") location = ""; } // Disable menu entries for images, enable otherwise if (content.document && this.mimeTypeIsTextBased(content.document.contentType)) this.isImage.removeAttribute('disabled'); else this.isImage.setAttribute('disabled', 'true'); // We should probably not do this if the value has changed since the user // searched // Update urlbar only if a new page was loaded on the primary content area // Do not update urlbar if there was a subframe navigation if (aWebProgress.DOMWindow == content) { if (!this.userTyped.value) { // If the url has "wyciwyg://" as the protocol, strip it off. // Nobody wants to see it on the urlbar for dynamically generated // pages. if (/^\s*wyciwyg:\/\/\d+\//.test(location)) location = RegExp.rightContext; this.urlBar.value = location; // the above causes userTyped.value to become true, reset it this.userTyped.value = false; } SetPageProxyState("valid", aLocation); } UpdateBackForwardButtons(); }, |
if (browser.userTypedClear) | if (browser.userTypedClear > 0) | onLocationChange : function(aWebProgress, aRequest, aLocation) { // XXX temporary hack for bug 104532. // Depends heavily on setOverLink implementation if (!aRequest) this.status = this.jsStatus = this.jsDefaultStatus = ""; this.setOverLink(""); var locationURI = null; var location = ""; if (aLocation) { try { if (!gURIFixup) gURIFixup = Components.classes["@mozilla.org/docshell/urifixup;1"] .getService(Components.interfaces.nsIURIFixup); // If the url has "wyciwyg://" as the protocol, strip it off. // Nobody wants to see it on the urlbar for dynamically generated // pages. locationURI = gURIFixup.createExposableURI(aLocation); location = locationURI.spec; } catch(ex) { location = aLocation.spec; } } if (!getWebNavigation().canGoBack && location == "about:blank") location = ""; // Disable menu entries for images, enable otherwise if (content.document && this.mimeTypeIsTextBased(content.document.contentType)) this.isImage.removeAttribute('disabled'); else this.isImage.setAttribute('disabled', 'true'); // We should probably not do this if the value has changed since the user // searched // Update urlbar only if a new page was loaded on the primary content area // Do not update urlbar if there was a subframe navigation var browser = getBrowser().selectedBrowser; if (aWebProgress.DOMWindow == content) { // The document loaded correctly, clear the value if we should if (browser.userTypedClear) browser.userTypedValue = null; var userTypedValue = browser.userTypedValue; if (userTypedValue === null) { this.urlBar.value = location; SetPageProxyState("valid", aLocation); // Setting the urlBar value in some cases causes userTypedValue to // become set because of oninput, so reset it to null browser.userTypedValue = null; } else { this.urlBar.value = userTypedValue; SetPageProxyState("invalid", null); } } UpdateBackForwardButtons(); var blank = (location == "about:blank") || (location == ""); //clear popupDomain accordingly so that icon will go away when visiting //an unblocked site after a blocked site. note: if a popup is blocked //the icon will stay as long as we are in the same domain. if (blank || !("popupDomain" in browser)) { browser.popupDomain = null; } else { var hostPort = ""; try { hostPort = locationURI.hostPort; } catch(ex) { } if (hostPort != browser.popupDomain) browser.popupDomain = null; } var popupIcon = document.getElementById("popupIcon"); popupIcon.hidden = !browser.popupDomain; }, |
domWindow = aWebProgress.DOMWindow; if (domWindow == domWindow.top) { this.urlBar.value = aLocation.spec; } this.refTab.setAttribute("lastLocation",aLocation.spec); }, | const rsschromemask = "chrome: if(aLocation.spec.substr(0, rsschromemask.length) == rsschromemask) { this.urlBar.value=" rss view "; } else { domWindow = aWebProgress.DOMWindow; if (domWindow == domWindow.top) { this.urlBar.value = aLocation.spec; } } }, | onLocationChange : function(aWebProgress, aRequest, aLocation) { domWindow = aWebProgress.DOMWindow; // Update urlbar only if there was a load on the root docshell if (domWindow == domWindow.top) { this.urlBar.value = aLocation.spec; } this.refTab.setAttribute("lastLocation",aLocation.spec); }, |
var domWindow = aWebProgress.DOMWindow; if (domWindow == this.getFrom(domWindow, "top")) { | if (aWebProgress.DOMWindow == content) { | onLocationChange : function(aWebProgress, aRequest, aLocation) { this.setOverLink("", null); var location = aLocation.spec; if (this.hideAboutBlank) { this.hideAboutBlank = false; if (location == "about:blank") location = ""; } // We should probably not do this if the value has changed since the user // searched // Update urlbar only if a new page was loaded on the primary content area // Do not update urlbar if there was a subframe navigation var domWindow = aWebProgress.DOMWindow; if (domWindow == this.getFrom(domWindow, "top")) { if (!this.userTyped.value) { this.urlBar.value = location; // the above causes userTyped.value to become true, reset it this.userTyped.value = false; } SetPageProxyState("valid", aLocation); } UpdateBackForwardButtons(); }, |
if (this.hideAboutBlank) { this.hideAboutBlank = false; if (location == "about:blank") location = ""; } | if (location == "about:blank") location = ""; | onLocationChange : function(aWebProgress, aRequest, aLocation) { this.setOverLink("", null); var location = aLocation.spec; if (this.hideAboutBlank) { this.hideAboutBlank = false; if (location == "about:blank") location = ""; } // We should probably not do this if the value has changed since the user // searched // Update urlbar only if a new page was loaded on the primary content area // Do not update urlbar if there was a subframe navigation if (aWebProgress.DOMWindow == content) { //XXXBlake don't we have to reinit this.urlBar, etc. // when the toolbar changes? if (gURLBar && !this.userTyped.value) { // If the url has "wyciwyg://" as the protocol, strip it off. // Nobody wants to see it on the urlbar for dynamically generated // pages. if (/^\s*wyciwyg:\/\/\d+\//.test(location)) location = RegExp.rightContext; setTimeout(function(loc, aloc) { gURLBar.value = loc; SetPageProxyState("valid", aloc);}, 0, location, aLocation); // the above causes userTyped.value to become true, reset it this.userTyped.value = false; } } UpdateBackForwardButtons(); setTimeout("updatePageTheme();", 0); }, |
if (gURLBar && !this.userTyped.value) { | var userTypedValue = browser.userTypedValue; if (gURLBar && !userTypedValue) { | onLocationChange : function(aWebProgress, aRequest, aLocation) { this.setOverLink("", null); var location = aLocation.spec; if (this.hideAboutBlank) { this.hideAboutBlank = false; if (location == "about:blank") location = ""; } // We should probably not do this if the value has changed since the user // searched // Update urlbar only if a new page was loaded on the primary content area // Do not update urlbar if there was a subframe navigation if (aWebProgress.DOMWindow == content) { //XXXBlake don't we have to reinit this.urlBar, etc. // when the toolbar changes? if (gURLBar && !this.userTyped.value) { // If the url has "wyciwyg://" as the protocol, strip it off. // Nobody wants to see it on the urlbar for dynamically generated // pages. if (/^\s*wyciwyg:\/\/\d+\//.test(location)) location = RegExp.rightContext; setTimeout(function(loc, aloc) { gURLBar.value = loc; SetPageProxyState("valid", aloc);}, 0, location, aLocation); // the above causes userTyped.value to become true, reset it this.userTyped.value = false; } } UpdateBackForwardButtons(); setTimeout("updatePageTheme();", 0); }, |
this.userTyped.value = false; | browser.userTypedValue = userTypedValue; } else { gURLBar.value = userTypedValue; SetPageProxyState("invalid", null); | onLocationChange : function(aWebProgress, aRequest, aLocation) { this.setOverLink("", null); var location = aLocation.spec; if (this.hideAboutBlank) { this.hideAboutBlank = false; if (location == "about:blank") location = ""; } // We should probably not do this if the value has changed since the user // searched // Update urlbar only if a new page was loaded on the primary content area // Do not update urlbar if there was a subframe navigation if (aWebProgress.DOMWindow == content) { //XXXBlake don't we have to reinit this.urlBar, etc. // when the toolbar changes? if (gURLBar && !this.userTyped.value) { // If the url has "wyciwyg://" as the protocol, strip it off. // Nobody wants to see it on the urlbar for dynamically generated // pages. if (/^\s*wyciwyg:\/\/\d+\//.test(location)) location = RegExp.rightContext; setTimeout(function(loc, aloc) { gURLBar.value = loc; SetPageProxyState("valid", aloc);}, 0, location, aLocation); // the above causes userTyped.value to become true, reset it this.userTyped.value = false; } } UpdateBackForwardButtons(); setTimeout("updatePageTheme();", 0); }, |
if (hostPort != browser.popupDomain) | if (hostPort != browser.popupDomain) { | onLocationChange : function(aWebProgress, aRequest, aLocation) { // XXX temporary hack for bug 104532. // Depends heavily on setOverLink implementation if (!aRequest) this.status = this.jsStatus = this.jsDefaultStatus = ""; this.setOverLink(""); var locationURI = null; var location = ""; if (aLocation) { try { if (!gURIFixup) gURIFixup = Components.classes["@mozilla.org/docshell/urifixup;1"] .getService(Components.interfaces.nsIURIFixup); // If the url has "wyciwyg://" as the protocol, strip it off. // Nobody wants to see it on the urlbar for dynamically generated // pages. locationURI = gURIFixup.createExposableURI(aLocation); location = locationURI.spec; } catch(ex) { location = aLocation.spec; } } if (!getWebNavigation().canGoBack && location == "about:blank") location = ""; // Disable menu entries for images, enable otherwise if (content.document && this.mimeTypeIsTextBased(content.document.contentType)) this.isImage.removeAttribute('disabled'); else this.isImage.setAttribute('disabled', 'true'); // We should probably not do this if the value has changed since the user // searched // Update urlbar only if a new page was loaded on the primary content area // Do not update urlbar if there was a subframe navigation var browser = getBrowser().selectedBrowser; if (aWebProgress.DOMWindow == content) { // The document loaded correctly, clear the value if we should if (browser.userTypedClear > 0) browser.userTypedValue = null; var userTypedValue = browser.userTypedValue; if (userTypedValue === null) { this.urlBar.value = location; SetPageProxyState("valid", aLocation); // Setting the urlBar value in some cases causes userTypedValue to // become set because of oninput, so reset it to null browser.userTypedValue = null; } else { this.urlBar.value = userTypedValue; SetPageProxyState("invalid", null); } } UpdateBackForwardButtons(); var blank = (location == "about:blank") || (location == ""); //clear popupDomain accordingly so that icon will go away when visiting //an unblocked site after a blocked site. note: if a popup is blocked //the icon will stay as long as we are in the same domain. if (blank || !("popupDomain" in browser)) { browser.popupDomain = null; } else { var hostPort = ""; try { hostPort = locationURI.hostPort; } catch(ex) { } if (hostPort != browser.popupDomain) browser.popupDomain = null; } var popupIcon = document.getElementById("popupIcon"); popupIcon.hidden = !browser.popupDomain; }, |
browser.popupUrls = null; browser.popupFeatures = null; } | onLocationChange : function(aWebProgress, aRequest, aLocation) { // XXX temporary hack for bug 104532. // Depends heavily on setOverLink implementation if (!aRequest) this.status = this.jsStatus = this.jsDefaultStatus = ""; this.setOverLink(""); var locationURI = null; var location = ""; if (aLocation) { try { if (!gURIFixup) gURIFixup = Components.classes["@mozilla.org/docshell/urifixup;1"] .getService(Components.interfaces.nsIURIFixup); // If the url has "wyciwyg://" as the protocol, strip it off. // Nobody wants to see it on the urlbar for dynamically generated // pages. locationURI = gURIFixup.createExposableURI(aLocation); location = locationURI.spec; } catch(ex) { location = aLocation.spec; } } if (!getWebNavigation().canGoBack && location == "about:blank") location = ""; // Disable menu entries for images, enable otherwise if (content.document && this.mimeTypeIsTextBased(content.document.contentType)) this.isImage.removeAttribute('disabled'); else this.isImage.setAttribute('disabled', 'true'); // We should probably not do this if the value has changed since the user // searched // Update urlbar only if a new page was loaded on the primary content area // Do not update urlbar if there was a subframe navigation var browser = getBrowser().selectedBrowser; if (aWebProgress.DOMWindow == content) { // The document loaded correctly, clear the value if we should if (browser.userTypedClear > 0) browser.userTypedValue = null; var userTypedValue = browser.userTypedValue; if (userTypedValue === null) { this.urlBar.value = location; SetPageProxyState("valid", aLocation); // Setting the urlBar value in some cases causes userTypedValue to // become set because of oninput, so reset it to null browser.userTypedValue = null; } else { this.urlBar.value = userTypedValue; SetPageProxyState("invalid", null); } } UpdateBackForwardButtons(); var blank = (location == "about:blank") || (location == ""); //clear popupDomain accordingly so that icon will go away when visiting //an unblocked site after a blocked site. note: if a popup is blocked //the icon will stay as long as we are in the same domain. if (blank || !("popupDomain" in browser)) { browser.popupDomain = null; } else { var hostPort = ""; try { hostPort = locationURI.hostPort; } catch(ex) { } if (hostPort != browser.popupDomain) browser.popupDomain = null; } var popupIcon = document.getElementById("popupIcon"); popupIcon.hidden = !browser.popupDomain; }, |
|
if (!aRequest) this.status = this.jsStatus = this.jsDefaultStatus = ""; | onLocationChange : function(aWebProgress, aRequest, aLocation) { this.setOverLink(""); var locationURI = null; var location = ""; if (aLocation) { try { if (!gURIFixup) gURIFixup = Components.classes["@mozilla.org/docshell/urifixup;1"] .getService(Components.interfaces.nsIURIFixup); // If the url has "wyciwyg://" as the protocol, strip it off. // Nobody wants to see it on the urlbar for dynamically generated // pages. locationURI = gURIFixup.createExposableURI(aLocation); location = locationURI.spec; } catch(ex) { location = aLocation.spec; } } if (!getWebNavigation().canGoBack && location == "about:blank") location = ""; // Disable menu entries for images, enable otherwise if (content.document && this.mimeTypeIsTextBased(content.document.contentType)) this.isImage.removeAttribute('disabled'); else this.isImage.setAttribute('disabled', 'true'); // We should probably not do this if the value has changed since the user // searched // Update urlbar only if a new page was loaded on the primary content area // Do not update urlbar if there was a subframe navigation if (aWebProgress.DOMWindow == content) { if (!this.userTyped.value) { this.urlBar.value = location; // the above causes userTyped.value to become true, reset it this.userTyped.value = false; } SetPageProxyState("valid", aLocation); } UpdateBackForwardButtons(); var blank = (location == "about:blank") || (location == ""); var browser = getBrowser().mCurrentBrowser; //clear popupDomain accordingly so that icon will go away when visiting //an unblocked site after a blocked site. note: if a popup is blocked //the icon will stay as long as we are in the same domain. if (blank || !("popupDomain" in browser)) { browser.popupDomain = null; } else { var hostPort = ""; try { hostPort = locationURI.hostPort; } catch(ex) { } if (hostPort != browser.popupDomain) browser.popupDomain = null; } var popupIcon = document.getElementById("popupIcon"); popupIcon.hidden = !browser.popupDomain; }, |
|
if (document.tooltipNode) { if (aWebProgress.DOMWindow == content) { document.getElementById("aHTMLTooltip").hidePopup(); document.tooltipNode = null; } else { for (var tooltipWindow = document.tooltipNode.target.ownerDocument.defaultView; tooltipWindow != tooltipWindow.parent; tooltipWindow = tooltipWindow.parent) { if (tooltipWindow == aWebProgress.DOMWindow) { document.getElementById("aHTMLTooltip").hidePopup(); document.tooltipNode = null; break; } } } } | onLocationChange : function(aWebProgress, aRequest, aLocation) { if (gContextMenu) { // Optimise for the common case if (aWebProgress.DOMWindow == content) gContextMenu.menu.hidePopup(); else { for (var contextWindow = gContextMenu.target.ownerDocument.defaultView; contextWindow != contextWindow.parent; contextWindow = contextWindow.parent) { if (contextWindow == aWebProgress.DOMWindow) { gContextMenu.menu.hidePopup(); break; } } } } // XXX temporary hack for bug 104532. // Depends heavily on setOverLink implementation if (!aRequest) this.status = this.jsStatus = this.jsDefaultStatus = ""; this.setOverLink(""); var locationURI = null; var location = ""; if (aLocation) { try { if (!gURIFixup) gURIFixup = Components.classes["@mozilla.org/docshell/urifixup;1"] .getService(Components.interfaces.nsIURIFixup); // If the url has "wyciwyg://" as the protocol, strip it off. // Nobody wants to see it on the urlbar for dynamically generated // pages. locationURI = gURIFixup.createExposableURI(aLocation); location = locationURI.spec; } catch(ex) { location = aLocation.spec; } } if (!getWebNavigation().canGoBack && location == "about:blank") location = ""; // Disable menu entries for images, enable otherwise if (content.document && this.mimeTypeIsTextBased(content.document.contentType)) this.isImage.removeAttribute('disabled'); else this.isImage.setAttribute('disabled', 'true'); // We should probably not do this if the value has changed since the user // searched // Update urlbar only if a new page was loaded on the primary content area // Do not update urlbar if there was a subframe navigation var browser = getBrowser().selectedBrowser; if (aWebProgress.DOMWindow == content) { // The document loaded correctly, clear the value if we should if (browser.userTypedClear > 0) browser.userTypedValue = null; var userTypedValue = browser.userTypedValue; if (userTypedValue === null) { this.urlBar.value = location; SetPageProxyState("valid", aLocation); // Setting the urlBar value in some cases causes userTypedValue to // become set because of oninput, so reset it to null browser.userTypedValue = null; } else { this.urlBar.value = userTypedValue; SetPageProxyState("invalid", null); } } UpdateBackForwardButtons(); var blank = (location == "about:blank") || (location == ""); //clear popupDomain accordingly so that icon will go away when visiting //an unblocked site after a blocked site. note: if a popup is blocked //the icon will stay as long as we are in the same domain. if (blank || !("popupDomain" in browser)) { browser.popupDomain = null; browser.popupUrls = []; browser.popupFeatures = []; } else { var hostPort = ""; try { hostPort = locationURI.hostPort; } catch(ex) { } if (hostPort != browser.popupDomain) { browser.popupDomain = null; browser.popupUrls = []; browser.popupFeatures = []; } } var popupIcon = document.getElementById("popupIcon"); popupIcon.hidden = !browser.popupDomain; }, |
|
setTimeout("updatePageTheme();", 0); | setTimeout(updatePageTheme, 0); | onLocationChange : function(aWebProgress, aRequest, aLocation) { this.setOverLink("", null); var location = aLocation.spec; if (location == "about:blank") location = ""; // We should probably not do this if the value has changed since the user // searched // Update urlbar only if a new page was loaded on the primary content area // Do not update urlbar if there was a subframe navigation var browser = getBrowser().selectedBrowser; if (aWebProgress.DOMWindow == content) { //XXXBlake don't we have to reinit this.urlBar, etc. // when the toolbar changes? var userTypedValue = browser.userTypedValue; if (gURLBar && !userTypedValue) { // If the url has "wyciwyg://" as the protocol, strip it off. // Nobody wants to see it on the urlbar for dynamically generated // pages. if (/^\s*wyciwyg:\/\/\d+\//.test(location)) location = RegExp.rightContext; setTimeout(function(loc, aloc) { gURLBar.value = loc; SetPageProxyState("valid", aloc);}, 0, location, aLocation); // Setting the urlBar value in some cases causes userTypedValue to // become set because of oninput, so reset it to its old value. browser.userTypedValue = userTypedValue; } else { gURLBar.value = userTypedValue; SetPageProxyState("invalid", null); } } UpdateBackForwardButtons(); setTimeout("updatePageTheme();", 0); }, |
this.setOverLink("", null); | onLocationChange : function(aWebProgress, aRequest, aLocation) { var location = aLocation.spec; if (this.hideAboutBlank) { this.hideAboutBlank = false; if (location == "about:blank") location = ""; } // We should probably not do this if the value has changed since the user // searched // Update urlbar only if a new page was loaded on the primary content area // Do not update urlbar if there was a subframe navigation var domWindow = aWebProgress.DOMWindow; if (domWindow == domWindow.top) { if (!this.userTyped.value) this.urlBar.value = location; SetPageProxyState("valid", aLocation); } UpdateBackForwardButtons(); }, |
|
if(aWebProgress.canGoBack) { document.getElementById("back-button").disabled=false; } else { document.getElementById("back-button").disabled=true; } if(aWebProgress.canGoForward) { document.getElementById("forward-button").disabled=false; } else { document.getElementById("forward-button").disabled=true; } | onLocationChange : function(aWebProgress, aRequest, aLocation) { /* Ideally we dont want to check this here. Better to have some other protocol view-rss in the chrome */ const rssmask = "chrome://minimo/content/rssview/rssload.xhtml?url="; const sbmask = "chrome://minimo/content/rssview/rssload.xhtml?url=http://del.icio.us/rss/tag/"; if(aLocation.spec.substr(0, rssmask .length) == rssmask ) { if(aLocation.spec.substr(0, sbmask .length) == sbmask ) { /* We trap the URL */ this.urlBar.value="sb:"+gRSSTag; } else { /* We trap the URL */ this.urlBar.value="rss:"+gRSSTag; } } else { domWindow = aWebProgress.DOMWindow; // Update urlbar only if there was a load on the root docshell if (domWindow == domWindow.top) { this.urlBar.value = aLocation.spec; } if(aWebProgress.canGoBack) { document.getElementById("back-button").disabled=false; } else { document.getElementById("back-button").disabled=true; } if(aWebProgress.canGoForward) { document.getElementById("forward-button").disabled=false; } else { document.getElementById("forward-button").disabled=true; } } BrowserUpdateFeeds();}, |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.