--HG--
branch : add-protovis
This commit is contained in:
Andrew Sutherland 2009-09-09 18:05:00 -07:00
Родитель 95eb404324 7de6718c52
Коммит 518879cacf
62 изменённых файлов: 3262 добавлений и 1100 удалений

Просмотреть файл

@ -1 +1 @@
9b7f6edb75fa33f6ebdb8bbddca9251126fc6a26
8931dc00216426154eaac28708ab54752175a85c

Просмотреть файл

@ -187,7 +187,7 @@ function openSnoozeWindow(event, aContainerItem) {
var pos = ",left=" + (event.target.boxObject.screenX - 3) +
",top=" + (event.target.boxObject.screenY + event.target.boxObject.height - 3);
window.openDialog(uri,
"Calendar:AlarmSnoozePopup",
"CalendarAlarmSnoozePopup",
"chrome,dependent=yes,titlebar=no" + pos,
aContainerItem);
}

Просмотреть файл

@ -188,7 +188,7 @@ var TodayPane = {
newdatetime = newdatetime.getInTimezone(calendarDefaultTimezone());
// XXX this doesn't really fit into this function
document.getElementById("aMinimonthPopupset").hidePopup();
document.getElementById("miniday-month-panel").hidePopup();
return this.setDay(newdatetime, true);
},

Просмотреть файл

@ -177,14 +177,12 @@
</vbox>
<toolbarbutton id="miniday-dropdown-button"
tooltiptext="&showselectedday.tooltip;"
popup="aMinimonthPopupset"
class="toolbarbutton-menubutton-dropmarker"/>
<popupset>
<popup id="aMinimonthPopupset" position="after_start">
type="menu">
<panel id="miniday-month-panel" position="after_start">
<minimonth id="todayMinimonth" flex="1"
onchange="TodayPane.setDaywithjsDate(this.value);"/>
</popup>
</popupset>
</panel>
</toolbarbutton>
</hbox>
</stack>
</modebox>

Просмотреть файл

@ -302,12 +302,12 @@ calCalendarManager.prototype = {
let win = wm.getMostRecentWindow("Extension:Manager") ||
cal.getCalendarWindow();
if (win) {
win.openDialog(uri, "Calendar:ProviderUninstallDialog", features, args);
win.openDialog(uri, "CalendarProviderUninstallDialog", features, args);
} else {
// Use the window watcher to open a parentless window.
let ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
.getService(Components.interfaces.nsIWindowWatcher);
ww.openWindow(null, uri, "Calendar:ProviderUninstallWindow", features, args);
ww.openWindow(null, uri, "CalendarProviderUninstallWindow", features, args);
}

Просмотреть файл

@ -305,7 +305,7 @@ function openCalendarWizard(aCallback) {
*/
function openCalendarProperties(aCalendar) {
openDialog("chrome://calendar/content/calendar-properties-dialog.xul",
"Calendar:PropertiesDialog",
"CalendarPropertiesDialog",
"chrome,titlebar,modal,resizable",
{calendar: aCalendar});
}

Просмотреть файл

@ -71,11 +71,6 @@
font-size: 18px;
}
#miniday-dropdown-button {
margin: 2px;
-moz-user-focus: normal;
}
.monthlabel {
-moz-margin-end: 0px;
}
@ -143,16 +138,25 @@
-moz-user-focus: normal;
}
#miniday-dropdown-button > .toolbarbutton-icon,
.miniday-nav-buttons > .toolbarbutton-icon {
margin: 1px;
}
#miniday-dropdown-button {
margin: 2px;
-moz-user-focus: normal;
}
#miniday-dropdown-button > .toolbarbutton-icon,
#miniday-dropdown-button > .toolbarbutton-text,
.miniday-nav-buttons > .toolbarbutton-text {
display: none;
}
#miniday-dropdown-button > .toolbarbutton-menu-dropmarker {
-moz-padding-start: 0;
}
.today-closebutton {
list-style-image: url("chrome://global/skin/icons/closetab.png") !important;
}

Просмотреть файл

@ -70,12 +70,6 @@
font-size: 18px;
}
#miniday-dropdown-button {
margin: 2px;
max-width: 15px;
-moz-user-focus: normal;
}
.monthlabel {
-moz-margin-end: 0px;
}
@ -143,16 +137,26 @@
-moz-image-region: rect(26px 21px 39px 16px);
}
#miniday-dropdown-button > .toolbarbutton-icon,
.miniday-nav-buttons > .toolbarbutton-icon {
margin: 1px;
}
#miniday-dropdown-button {
margin: 2px;
max-width: 18px;
-moz-user-focus: normal;
}
#miniday-dropdown-button > .toolbarbutton-icon,
#miniday-dropdown-button > .toolbarbutton-text,
.miniday-nav-buttons > .toolbarbutton-text {
display: none;
}
#miniday-dropdown-button > .toolbarbutton-menu-dropmarker {
-moz-padding-start: 0;
}
.today-closebutton {
list-style-image: url("chrome://global/skin/icons/close.png");
-moz-image-region: rect(0 14px 14px 0);

Просмотреть файл

@ -50,10 +50,8 @@ function calGoogleRequest(aSession) {
calGoogleRequest.prototype = {
/* Members */
uri: null,
mUploadContent: null,
mUploadData: null,
responseListener: null,
mSession: null,
mExtraData: null,
mQueryParameters: null,

Просмотреть файл

@ -362,8 +362,11 @@ function ItemToXMLEntry(aItem, aAuthorEmail, aAuthorName) {
// gd:when
var duration = aItem.endDate.subtractDate(aItem.startDate);
if (!aItem.recurrenceInfo) {
// gd:when isn't allowed for recurring items where gd:recurrence is set
entry.gd::when.@startTime = cal.toRFC3339(aItem.startDate);
entry.gd::when.@endTime = cal.toRFC3339(aItem.endDate);
}
// gd:reminder
let alarms = aItem.getAlarms({});

Просмотреть файл

@ -124,7 +124,7 @@ function gdata_migration_loader() {
// view specific, so there is no good non-hacked way to do this.
setTimeout(function() {
window.openDialog("chrome://gdata-provider/content/gdata-migration-wizard.xul",
"Gdata:MigrationWizard",
"GdataMigrationWizard",
"chrome,titlebar,modal,alwaysRaised");
}, 1000);
}

Просмотреть файл

@ -230,7 +230,7 @@ function pickAndGoToDate() {
getMinimonth().value = pickedDate;
};
openDialog("chrome://sunbird/content/calendar-gotodate-dialog.xul",
"Calendar:GoToDateDialog",
"CalendarGoToDateDialog",
"chrome,modal",
{callback: callback, date: initialDate});
}

Просмотреть файл

@ -164,15 +164,9 @@
<!-- mail-toggle-headerfield: Non-email addrs headers which have a toggle
associated with them (i.e. the subject).
Use label to set the header name.
Use headerValue to set the header value. -->
<binding id="mail-toggle-headerfield">
<content>
<xul:hbox class="headerNameBox" align="baseline">
<xul:image class="expandHeaderViewButton" xbl:inherits="onclick=ontwistyclick"/>
<xul:spacer flex="1"/>
<xul:label class="headerName" xbl:inherits="value=label" control="headerValue"/>
</xul:hbox>
<xul:textbox class="headerValue" anonid="headerValue" flex="1" readonly="true"/>
</content>
@ -182,13 +176,9 @@
</binding>
<!-- mail-headerfield: presents standard text header name & value pairs. Don't use this for email addresses.
use label to set the header name.
use headerValue to set the header value. -->
<binding id="mail-headerfield">
<content>
<xul:hbox class="headerNameBox" align="baseline">
<xul:label class="headerName" xbl:inherits="value=label" control="headerValue" flex="1"/>
</xul:hbox>
<xul:textbox class="headerValue" anonid="headerValue" flex="1" readonly="true"/>
</content>
@ -199,9 +189,6 @@
<binding id="mail-urlfield" extends="chrome://messenger/content/mailWidgets.xml#mail-headerfield">
<content>
<xul:hbox class="headerNameBox" align="start">
<xul:label class="headerName" xbl:inherits="value=label" flex="1"/>
</xul:hbox>
<xul:label onclick="if (event.button != 2) openUILink(event.target.value, event);"
class="headerValue text-link headerValueUrl"
anonid="headerValue" flex="1" readonly="true" context="copyUrlPopup"/>
@ -210,9 +197,6 @@
<binding id="mail-emailheaderfield">
<content>
<xul:hbox class="headerNameBox" align="start">
<xul:label class="headerName" xbl:inherits="value=label" flex="1"/>
</xul:hbox>
<xul:mail-emailaddress class="headerValue" containsEmail="true"
anonid="emailAddressNode"/>
</content>
@ -226,10 +210,6 @@
<!-- multi-emailHeaderField: presents multiple emailheaderfields with a toggle -->
<binding id="mail-multi-emailHeaderField">
<content>
<xul:hbox class="headerNameBox" align="baseline" pack="end">
<xul:label class="headerName" xbl:inherits="value=label"/>
</xul:hbox>
<xul:hbox class="headerValueBox" anonid="longEmailAddresses" flex="1"
singleline="true"
align="baseline"
@ -535,7 +515,6 @@
<xul:hbox class="headerNameBox" align="start" pack="end">
<xul:image class="addresstwisty" anonid="toggleIcon"
onclick="toggleWrap();"/>
<xul:label class="headerName" xbl:inherits="value=label"/>
</xul:hbox>
<xul:hbox class="headerValueBox" flex="1">
<xul:label class="headerValue" anonid="headerValue" flex="1"/>
@ -697,9 +676,6 @@
<!-- Header field for showing the tags associated with a message -->
<binding id="mail-headerfield-tags">
<content>
<xul:hbox class="headerNameBox" align="start">
<xul:label class="headerName" xbl:inherits="value=label" flex="1"/>
</xul:hbox>
<xul:label class="headerValue" anonid="headerValue" flex="1"/>
</content>

Просмотреть файл

@ -150,9 +150,10 @@ function createHeaderEntry(prefix, headerListInfo)
var useShortView = false;
var partialIDName = prefix + headerListInfo.name;
this.enclosingBox = document.getElementById(partialIDName + 'Box');
this.enclosingRow = document.getElementById(partialIDName + 'Row');
this.textNode = document.getElementById(partialIDName + 'Value');
this.isNewHeader = false;
this.isValid = false;
this.valid = false;
if ("useShortView" in headerListInfo)
{
@ -674,8 +675,8 @@ function OnTagsChange()
if (headerEntry.valid)
headerEntry.outputFunction(headerEntry, currentHeaderData.tags.headerValue);
// we may need to collapse or show the tag header box...
headerEntry.enclosingBox.collapsed = !headerEntry.valid;
// we may need to collapse or show the tag header row...
headerEntry.enclosingRow.collapsed = !headerEntry.valid;
}
}
}
@ -701,7 +702,7 @@ function hideHeaderView(headerTable)
{
for (index in headerTable)
{
headerTable[index].enclosingBox.collapsed = true;
headerTable[index].enclosingRow.collapsed = true;
}
}
@ -715,10 +716,10 @@ function showHeaderView(headerTable)
headerEntry = headerTable[index];
if (headerEntry.valid)
{
headerEntry.enclosingBox.collapsed = false;
headerEntry.enclosingRow.collapsed = false;
}
else // if the entry is invalid, always make sure it's collapsed
headerEntry.enclosingBox.collapsed = true;
headerEntry.enclosingRow.collapsed = true;
}
}
@ -777,35 +778,84 @@ function updateExpandedView()
EnsureMinimumNumberOfHeaders(gExpandedHeaderView);
showHeaderView(gExpandedHeaderView);
// Now that we have all the headers, ensure that the name columns of both
// grids are the same size so that they don't look weird.
syncGridColumnWidths();
UpdateJunkButton();
UpdateReplyButtons();
displayAttachmentsForExpandedView();
}
/**
* Ensure that the name columns in both grids are the same size, since the only
* reason that we're using two grids at all is to workaround the XUL box
* model's inability to float elements.
*/
function syncGridColumnWidths()
{
let nameColumn = document.getElementById('expandedHeadersNameColumn');
let nameColumn2 = document.getElementById('expandedHeaders2NameColumn');
// reset the minimum widths to 0 so that clientWidth will return the
// preferred intrinsic width of each column
nameColumn.minWidth = nameColumn2.minWidth = 0;
// set minWidth on the smaller of the two columns to be the width of the
// larger of the two
if (nameColumn.clientWidth > nameColumn2.clientWidth) {
nameColumn2.minWidth = nameColumn.clientWidth;
} else if (nameColumn.clientWidth < nameColumn2.clientWidth) {
nameColumn.minWidth = nameColumn2.clientWidth;
}
}
// default method for updating a header value into a header entry
function updateHeaderValue(headerEntry, headerValue)
{
headerEntry.enclosingBox.headerValue = headerValue;
}
/**
* Create the DOM nodes (aka "View") for a non-standard header and insert them
* into the grid. Create and return the corresponding headerEntry object.
*
* @param {String} headerName name of the header we're adding, all lower-case;
* used to construct element ids
* @param {String} label name of the header as displayed in the UI
*/
function createNewHeaderView(headerName, label)
{
var idName = 'expanded' + headerName + 'Box';
var newHeader = document.createElement("mail-headerfield");
newHeader.setAttribute('id', idName);
newHeader.setAttribute('label', label);
newHeader.setAttribute('flex', '1');
newHeader.collapsed = true;
// create new collapsed row
let newRowNode = document.createElement("row");
newRowNode.setAttribute("id", 'expanded' + headerName + 'Row');
newRowNode.collapsed = true;
// create and append the label which contains the header name
let newLabelNode = document.createElement("label");
newLabelNode.setAttribute("id", 'expanded' + headerName + 'Label');
newLabelNode.setAttribute("value", label);
newLabelNode.setAttribute("class", "headerName");
newLabelNode.setAttribute("control", idName);
newRowNode.appendChild(newLabelNode);
// create and append the new header value
var newHeaderNode = document.createElement("mail-headerfield");
newHeaderNode.setAttribute('id', idName);
newHeaderNode.setAttribute('flex', '1');
newRowNode.appendChild(newHeaderNode);
// this new element needs to be inserted into the view...
var topViewNode = document.getElementById('variousHeadersBox');
let topViewNode = document.getElementById('expandedHeader2Rows');
topViewNode.appendChild(newRowNode);
topViewNode.appendChild(newHeader);
this.enclosingBox = newHeader;
this.enclosingBox = newHeaderNode;
this.enclosingRow = newRowNode;
this.isNewHeader = true;
this.isValid = false;
this.valid = false;
this.useToggle = false;
this.outputFunction = updateHeaderValue;
}
@ -821,8 +871,7 @@ function RemoveNewHeaderViews(aHeaderTable)
{
var headerEntry = aHeaderTable[index];
if (headerEntry.isNewHeader)
headerEntry.enclosingBox.parentNode
.removeChild(headerEntry.enclosingBox);
headerEntry.enclosingRow.parentNode.removeChild(headerEntry.enclosingRow);
}
}
@ -1185,7 +1234,6 @@ function hideEmailAddressPopup(emailAddressNode)
function setupEmailAddressPopup(emailAddressNode)
{
dump("emailAddressNode.tagName = " + emailAddressNode.tagName + '\n');
var emailAddressPlaceHolder = document.getElementById('emailAddressPlaceHolder');
var emailAddress = emailAddressNode.getPart('emaillabel').value;
emailAddressNode.setAttribute('selected', 'true');

Просмотреть файл

@ -101,85 +101,143 @@
persist="selectedIndex" flex="1">
<!-- the message pane consists of 3 'boxes'. Box #2 is the expanded headers view (the default view) -->
<hbox id="expandedHeaderView" flex="1">
<!-- XXX this should switch to using <grid> for expandedHeaders to get
away from gross historical CSS pseudo-boxery used for header
name positioning -->
<vbox id="expandedHeaders" flex="1">
<vbox id="expandedHeaderView" flex="1">
<hbox id="expandedHeadersTopBox" flex="1">
<hbox flex="1" align="center">
<mail-multi-emailHeaderField id="expandedfromBox"
label="&fromField2.label;"
align="baseline"
collapsed="false"
flex="1"/>
</hbox>
<!-- Theoretically, we should be able to replace this grid with just
an hbox. Unfortunately, doing that makes it very hard to sync
the column sizes between the name columns, because for currently
unclear reasons, the .clientWidth of a column is wider than the
.clientWidth of its largest contained child by an unspecified
amount. -->
<grid id="expandedHeaders" flex="1">
<columns id="expandedHeadersColumns">
<column id="expandedHeadersNameColumn"/>
<column id="expandedHeadersValueColumn" flex="1"/>
</columns>
<rows id="expandedHeaderRows">
<row id="expandedfromRow">
<label id="expandedfromLabel" class="headerName"
value="&fromField2.label;" control="expandedfromBox"/>
<mail-multi-emailHeaderField id="expandedfromBox" flex="1"/>
</row>
</rows>
</grid>
<header-view-button-box id="expandedButtonBox"/>
</hbox>
<hbox id="otherHeadersAndButtonsBox" flex="1">
<vbox id="variousHeadersBox" flex="1">
<mail-headerfield id="expandedsubjectBox" label="&subjectField2.label;"
align="baseline"
collapsed="false"/>
<hbox id="expandedHeadersBottomBox">
<!-- The grid that contains all headers except the first one,
including any headers created dynamically from JavaScript -->
<grid id="expandedHeaders2" flex="1">
<columns id="expandedHeaders2Columns">
<column id="expandedHeaders2NameColumn"/>
<column id="expandedHeaders2ValueColumn" flex="1"/>
</columns>
<rows id="expandedHeader2Rows">
<!-- Commonly used rows are pre-specified in the XUL to avoid the
performance hit of creating them dynamically. -->
<row id="expandedsubjectRow">
<label id="expandedsubjectLabel" class="headerName"
value="&subjectField2.label;"
control="expandedsubjectBox"/>
<mail-headerfield id="expandedsubjectBox" flex="1"/>
</row>
<row id="expandedorganizationRow" collapsed="true">
<label id="expandedorganizationLabel" class="headerName"
value="&organizationField2.label;"
control="expandedorganizationBox"/>
<mail-headerfield id="expandedorganizationBox"
label="&organizationField2.label;"
align="baseline"
collapsed="true"/>
<mail-emailheaderfield id="expandedsenderBox"
align="baseline"
label="&senderField2.label;"
collapsed="true"/>
<mail-multi-emailHeaderField id="expandedreply-toBox"
label="&replyToField2.label;"
align="baseline"
collapsed="true"/>
<mail-multi-emailHeaderField id="expandedtoBox"
label="&toField2.label;"
align="baseline"
collapsed="true"/>
<mail-multi-emailHeaderField id="expandedccBox"
label="&ccField2.label;"
align="baseline"
collapsed="true"/>
<mail-multi-emailHeaderField id="expandedbccBox"
label="&bccField2.label;"
align="baseline"
collapsed="true"/>
<mail-headerfield id="expandednewsgroupsBox"
label="&newsgroupsField2.label;"
align="baseline"
collapsed="true"/>
<mail-headerfield id="expandedfollowup-toBox"
label="&followupToField2.label;"
align="baseline"
collapsed="true"/>
<mail-headerfield id="expandeddateBox" label="&dateField2.label;"
align="baseline"
collapsed="true"/>
<mail-messageids-headerfield id="expandedmessage-idBox"
align="baseline"
label="&messageIdField2.label;"
collapsed="true"/>
<mail-messageids-headerfield id="expandedin-reply-toBox"
align="baseline"
label="&inReplyToField2.label;"
collapsed="true"/>
label="&organizationField2.label;"/>
</row>
<row id="expandedsenderRow" collapsed="true">
<label id="expandedsenderLabel" class="headerName"
value="&senderField2.label;" control="expandedsenderBox"/>
<mail-emailheaderfield id="expandedsenderBox"/>
</row>
<row id="expandedreply-toRow" collapsed="true">
<label id="expandedreply-toLabel" class="headerName"
value="&replyToField2.label;"
control="expandedreply-toBox"/>
<mail-multi-emailHeaderField id="expandedreply-toBox"/>
</row>
<row id="expandedtoRow" collapsed="true">
<label id="expandedtoLabel" class="headerName"
value="&toField2.label;" control="expandedtoBox"/>
<mail-multi-emailHeaderField id="expandedtoBox" flex="1"/>
</row>
<row id="expandedccRow" collapsed="true">
<label id="expandedccLabel" class="headerName"
value="&ccField2.label;" control="expandedccBox"/>
<mail-multi-emailHeaderField id="expandedccBox" flex="1"/>
</row>
<row id="expandedbccRow" collapsed="true">
<label id="expandedbccLabel" class="headerName"
value="&bccField2.label;" control="expandedbccBox"/>
<mail-multi-emailHeaderField id="expandedbccBox"/>
</row>
<row id="expandednewsgroupsRow" collapsed="true">
<label id="expandednewsgroupsLabel" class="headerName"
value="&newsgroupsField2.label;"
control="expandednewsgroupsBox"/>
<mail-headerfield id="expandednewsgroupsBox"/>
</row>
<row id="expandedfollowup-toRow" collapsed="true">
<label id="expandedfollowup-toLabel" class="headerName"
value="&followupToField2.label;"
control="expandedfollowup-toBox"/>
<mail-headerfield id="expandedfollowup-toBox"/>
</row>
<row id="expandeddateRow" collapsed="true">
<label id="expandeddateLabel" class="headerName"
value="&dateField2.label;" control="expandeddateBox"/>
<mail-headerfield id="expandeddateBox" flex="1"/>
</row>
<row id="expandedmessage-idRow" collapsed="true">
<label id="expandedmessage-idLabel" class="headerName"
value="&messageIdField2.label;"
control="expandedmessage-idBox"/>
<mail-messageids-headerfield id="expandedmessage-idBox"/>
</row>
<row id="expandedin-reply-toRow" collapsed="true">
<label id="expandedin-reply-toLabel" class="headerName"
value="&inReplyToField2.label;"
control="expandedin-reply-toBox"/>
<mail-messageids-headerfield id="expandedin-reply-toBox"/>
</row>
<row id="expandedreferencesRow" collapsed="true">
<label id="expandedreferencesLabel" class="headerName"
value="&referencesField2.label;"
control="expandedReferencesBox"/>
<mail-messageids-headerfield id="expandedreferencesBox"
align="baseline"
label="&referencesField2.label;"
collapsed="true"/>
<mail-tagfield id="expandedtagsBox" label="&tagsHdr2.label;"
collapsed="true"/>
<mail-urlfield id="expandedcontent-baseBox"
label="&originalWebsite2.label;" collapsed="true"/>
<mail-headerfield id="expandeduser-agentBox"
label="&userAgentField2.label;"
collapsed="true"/>
</vbox>
flex="1"/>
</row>
<row id="expandedtagsRow" collapsed="true">
<label id="expandedtagsLabel" class="headerName"
value="&tagsHdr2.label;" control="expandedtagsBox"/>
<mail-tagfield id="expandedtagsBox"/>
</row>
<row id="expandedcontent-baseRow" collapsed="true">
<label id="expandedcontent-baseLabel" class="headerName"
value="&originalWebsite2.label;"
control="expandedcontent-baseBox"/>
<mail-urlfield id="expandedcontent-baseBox"/>
</row>
<row id="expandeduser-agentRow" collapsed="true">
<label id="expandeduser-agentLabel" class="headerName"
value="&userAgentField2.label;"
control="expandeduser-agentBox"/>
<mail-headerfield id="expandeduser-agentBox" flex="1"/>
</row>
</rows>
</grid>
<!-- perhaps this should be a customizable toolbar too -->
<vbox id="otherActionsBox" align="end">
@ -213,7 +271,6 @@
</vbox>
</hbox>
</vbox>
</hbox>
</deck>
</hbox>

Просмотреть файл

@ -233,6 +233,11 @@ const MailPrefObserver = {
}
};
function AutoConfigWizard(okCallback)
{
NewMailAccount(msgWindow, okCallback);
}
/**
* Called on startup to initialize various parts of the main window
*/
@ -287,7 +292,7 @@ function OnLoadMessenger()
// verifyAccounts returns true if the callback won't be called
// We also don't want the account wizard to open if any sort of account exists
if (verifyAccounts(LoadPostAccountWizard, false))
if (verifyAccounts(LoadPostAccountWizard, false, AutoConfigWizard))
LoadPostAccountWizard();
// This also registers the contentTabType ("contentTab")

Просмотреть файл

@ -0,0 +1,941 @@
# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is the Firefox Preferences System.
#
# The Initial Developer of the Original Code is
# Ben Goodger.
# Portions created by the Initial Developer are Copyright (C) 2005
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Ben Goodger <ben@mozilla.org>
# Ehsan Akhgari <ehsan.akhgari@gmail.com>
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
const nsICookie = Components.interfaces.nsICookie;
var gCookiesWindow = {
_cm : Components.classes["@mozilla.org/cookiemanager;1"]
.getService(Components.interfaces.nsICookieManager),
_ds : Components.classes["@mozilla.org/intl/scriptabledateformat;1"]
.getService(Components.interfaces.nsIScriptableDateFormat),
_hosts : {},
_hostOrder : [],
_tree : null,
_bundle : null,
init: function ()
{
var os = Components.classes["@mozilla.org/observer-service;1"]
.getService(Components.interfaces.nsIObserverService);
os.addObserver(this, "cookie-changed", false);
os.addObserver(this, "perm-changed", false);
this._bundle = document.getElementById("bundlePreferences");
this._tree = document.getElementById("cookiesList");
this._populateList(true);
document.getElementById("filter").focus();
},
uninit: function ()
{
var os = Components.classes["@mozilla.org/observer-service;1"]
.getService(Components.interfaces.nsIObserverService);
os.removeObserver(this, "cookie-changed");
os.removeObserver(this, "perm-changed");
},
_populateList: function (aInitialLoad)
{
this._loadCookies();
this._tree.treeBoxObject.view = this._view;
if (aInitialLoad)
this.sort("rawHost");
if (this._view.rowCount > 0)
this._tree.view.selection.select(0);
if (aInitialLoad) {
if ("arguments" in window && window.arguments[0] &&
window.arguments[0].filterString)
{
this.setFilter(window.arguments[0].filterString);
}
}
else {
if (document.getElementById("filter").value != "")
this.filter();
}
this._saveState();
},
_cookieEquals: function (aCookieA, aCookieB, aStrippedHost)
{
return aCookieA.rawHost == aStrippedHost &&
aCookieA.name == aCookieB.name &&
aCookieA.path == aCookieB.path;
},
observe: function (aCookie, aTopic, aData)
{
if (aTopic != "cookie-changed")
return;
if (aCookie instanceof Components.interfaces.nsICookie) {
var strippedHost = this._makeStrippedHost(aCookie.host);
if (aData == "changed")
this._handleCookieChanged(aCookie, strippedHost);
else if (aData == "added")
this._handleCookieAdded(aCookie, strippedHost);
}
else if (aData == "cleared") {
this._hosts = {};
this._hostOrder = [];
var oldRowCount = this._view._rowCount;
this._view._rowCount = 0;
this._tree.treeBoxObject.rowCountChanged(0, -oldRowCount);
this._view.selection.clearSelection();
}
else if (aData == "reload") {
// first, clear any existing entries
this.observe(aCookie, aTopic, "cleared");
// then, reload the list
this._populateList(false);
}
// We don't yet handle aData == "deleted" - it's a less common case
// and is rather complicated as selection tracking is difficult
},
_handleCookieChanged: function (changedCookie, strippedHost)
{
var rowIndex = 0;
var cookieItem = null;
if (!this._view._filtered) {
for (var i = 0; i < this._hostOrder.length; ++i) { // (var host in this._hosts) {
++rowIndex;
var hostItem = this._hosts[this._hostOrder[i]]; // var hostItem = this._hosts[host];
if (this._hostOrder[i] == strippedHost) { // host == strippedHost) {
// Host matches, look for the cookie within this Host collection
// and update its data
for (var j = 0; j < hostItem.cookies.length; ++j) {
++rowIndex;
var currCookie = hostItem.cookies[j];
if (this._cookieEquals(currCookie, changedCookie, strippedHost)) {
currCookie.value = changedCookie.value;
currCookie.isSecure = changedCookie.isSecure;
currCookie.isDomain = changedCookie.isDomain;
currCookie.expires = changedCookie.expires;
cookieItem = currCookie;
break;
}
}
}
else if (hostItem.open)
rowIndex += hostItem.cookies.length;
}
}
else {
// Just walk the filter list to find the item. It doesn't matter that
// we don't update the main Host collection when we do this, because
// when the filter is reset the Host collection is rebuilt anyway.
for (rowIndex = 0; rowIndex < this._view._filterSet.length; ++rowIndex) {
currCookie = this._view._filterSet[rowIndex];
if (this._cookieEquals(currCookie, changedCookie, strippedHost)) {
currCookie.value = changedCookie.value;
currCookie.isSecure = changedCookie.isSecure;
currCookie.isDomain = changedCookie.isDomain;
currCookie.expires = changedCookie.expires;
cookieItem = currCookie;
break;
}
}
}
// Make sure the tree display is up to date...
this._tree.treeBoxObject.invalidateRow(rowIndex);
// ... and if the cookie is selected, update the displayed metadata too
if (cookieItem != null && this._view.selection.currentIndex == rowIndex)
this._updateCookieData(cookieItem);
},
_handleCookieAdded: function (changedCookie, strippedHost)
{
var rowCountImpact = 0;
var addedHost = { value: 0 };
this._addCookie(strippedHost, changedCookie, addedHost);
if (!this._view._filtered) {
// The Host collection for this cookie already exists, and it's not open,
// so don't increment the rowCountImpact becaues the user is not going to
// see the additional rows as they're hidden.
if (addedHost.value || this._hosts[strippedHost].open)
++rowCountImpact;
}
else {
// We're in search mode, and the cookie being added matches
// the search condition, so add it to the list.
var c = this._makeCookieObject(strippedHost, changedCookie);
if (this._cookieMatchesFilter(c)) {
this._view._filterSet.push(this._makeCookieObject(strippedHost, changedCookie));
++rowCountImpact;
}
}
// Now update the tree display at the end (we could/should re run the sort
// if any to get the position correct.)
var oldRowCount = this._rowCount;
this._view._rowCount += rowCountImpact;
this._tree.treeBoxObject.rowCountChanged(oldRowCount - 1, rowCountImpact);
document.getElementById("removeAllCookies").disabled = this._view._filtered;
},
_view: {
_filtered : false,
_filterSet : [],
_filterValue: "",
_rowCount : 0,
_cacheValid : 0,
_cacheItems : [],
get rowCount()
{
return this._rowCount;
},
_getItemAtIndex: function (aIndex)
{
if (this._filtered)
return this._filterSet[aIndex];
var start = 0;
var count = 0, hostIndex = 0;
var cacheIndex = Math.min(this._cacheValid, aIndex);
if (cacheIndex > 0) {
var cacheItem = this._cacheItems[cacheIndex];
start = cacheItem['start'];
count = hostIndex = cacheItem['count'];
}
for (var i = start; i < gCookiesWindow._hostOrder.length; ++i) { // var host in gCookiesWindow._hosts) {
var currHost = gCookiesWindow._hosts[gCookiesWindow._hostOrder[i]]; // gCookiesWindow._hosts[host];
if (!currHost) continue;
if (count == aIndex)
return currHost;
hostIndex = count;
var cacheEntry = { 'start' : i, 'count' : count };
var cacheStart = count;
if (currHost.open) {
if (count < aIndex && aIndex <= (count + currHost.cookies.length)) {
// We are looking for an entry within this host's children,
// enumerate them looking for the index.
++count;
for (var i = 0; i < currHost.cookies.length; ++i) {
if (count == aIndex) {
var cookie = currHost.cookies[i];
cookie.parentIndex = hostIndex;
return cookie;
}
++count;
}
}
else {
// A host entry was open, but we weren't looking for an index
// within that host entry's children, so skip forward over the
// entry's children. We need to add one to increment for the
// host value too.
count += currHost.cookies.length + 1;
}
}
else
++count;
for (var j = cacheStart; j < count; j++)
this._cacheItems[j] = cacheEntry;
this._cacheValid = count - 1;
}
return null;
},
_removeItemAtIndex: function (aIndex, aCount)
{
var removeCount = aCount === undefined ? 1 : aCount;
if (this._filtered) {
// remove the cookies from the unfiltered set so that they
// don't reappear when the filter is changed. See bug 410863.
for (var i = aIndex; i < aIndex + removeCount; ++i) {
var item = this._filterSet[i];
var parent = gCookiesWindow._hosts[item.rawHost];
for (var j = 0; j < parent.cookies.length; ++j) {
if (item == parent.cookies[j]) {
parent.cookies.splice(j, 1);
break;
}
}
}
this._filterSet.splice(aIndex, removeCount);
return;
}
var item = this._getItemAtIndex(aIndex);
if (!item) return;
this._invalidateCache(aIndex - 1);
if (item.container)
gCookiesWindow._hosts[item.rawHost] = null;
else {
var parent = this._getItemAtIndex(item.parentIndex);
for (var i = 0; i < parent.cookies.length; ++i) {
var cookie = parent.cookies[i];
if (item.rawHost == cookie.rawHost &&
item.name == cookie.name && item.path == cookie.path)
parent.cookies.splice(i, removeCount);
}
}
},
_invalidateCache: function (aIndex)
{
this._cacheValid = Math.min(this._cacheValid, aIndex);
},
getCellText: function (aIndex, aColumn)
{
if (!this._filtered) {
var item = this._getItemAtIndex(aIndex);
if (!item)
return "";
if (aColumn.id == "domainCol")
return item.rawHost;
else if (aColumn.id == "nameCol")
return item.name;
}
else {
if (aColumn.id == "domainCol")
return this._filterSet[aIndex].rawHost;
else if (aColumn.id == "nameCol")
return this._filterSet[aIndex].name;
}
return "";
},
_selection: null,
get selection () { return this._selection; },
set selection (val) { this._selection = val; return val; },
getRowProperties: function (aIndex, aProperties) {},
getCellProperties: function (aIndex, aColumn, aProperties) {},
getColumnProperties: function (aColumn, aProperties) {},
isContainer: function (aIndex)
{
if (!this._filtered) {
var item = this._getItemAtIndex(aIndex);
if (!item) return false;
return item.container;
}
return false;
},
isContainerOpen: function (aIndex)
{
if (!this._filtered) {
var item = this._getItemAtIndex(aIndex);
if (!item) return false;
return item.open;
}
return false;
},
isContainerEmpty: function (aIndex)
{
if (!this._filtered) {
var item = this._getItemAtIndex(aIndex);
if (!item) return false;
return item.cookies.length == 0;
}
return false;
},
isSeparator: function (aIndex) { return false; },
isSorted: function (aIndex) { return false; },
canDrop: function (aIndex, aOrientation) { return false; },
drop: function (aIndex, aOrientation) {},
getParentIndex: function (aIndex)
{
if (!this._filtered) {
var item = this._getItemAtIndex(aIndex);
// If an item has no parent index (i.e. it is at the top level) this
// function MUST return -1 otherwise we will go into an infinite loop.
// Containers are always top level items in the cookies tree, so make
// sure to return the appropriate value here.
if (!item || item.container) return -1;
return item.parentIndex;
}
return -1;
},
hasNextSibling: function (aParentIndex, aIndex)
{
if (!this._filtered) {
// |aParentIndex| appears to be bogus, but we can get the real
// parent index by getting the entry for |aIndex| and reading the
// parentIndex field.
// The index of the last item in this host collection is the
// index of the parent + the size of the host collection, and
// aIndex has a next sibling if it is less than this value.
var item = this._getItemAtIndex(aIndex);
if (item) {
if (item.container) {
for (var i = aIndex + 1; i < this.rowCount; ++i) {
var subsequent = this._getItemAtIndex(i);
if (subsequent.container)
return true;
}
return false;
}
else {
var parent = this._getItemAtIndex(item.parentIndex);
if (parent && parent.container)
return aIndex < item.parentIndex + parent.cookies.length;
}
}
}
return aIndex < this.rowCount - 1;
},
hasPreviousSibling: function (aIndex)
{
if (!this._filtered) {
var item = this._getItemAtIndex(aIndex);
if (!item) return false;
var parent = this._getItemAtIndex(item.parentIndex);
if (parent && parent.container)
return aIndex > item.parentIndex + 1;
}
return aIndex > 0;
},
getLevel: function (aIndex)
{
if (!this._filtered) {
var item = this._getItemAtIndex(aIndex);
if (!item) return 0;
return item.level;
}
return 0;
},
getImageSrc: function (aIndex, aColumn) {},
getProgressMode: function (aIndex, aColumn) {},
getCellValue: function (aIndex, aColumn) {},
setTree: function (aTree) {},
toggleOpenState: function (aIndex)
{
if (!this._filtered) {
var item = this._getItemAtIndex(aIndex);
if (!item) return;
this._invalidateCache(aIndex);
var multiplier = item.open ? -1 : 1;
var delta = multiplier * item.cookies.length;
this._rowCount += delta;
item.open = !item.open;
gCookiesWindow._tree.treeBoxObject.rowCountChanged(aIndex + 1, delta);
gCookiesWindow._tree.treeBoxObject.invalidateRow(aIndex);
}
},
cycleHeader: function (aColumn) {},
selectionChanged: function () {},
cycleCell: function (aIndex, aColumn) {},
isEditable: function (aIndex, aColumn)
{
return false;
},
isSelectable: function (aIndex, aColumn)
{
return false;
},
setCellValue: function (aIndex, aColumn, aValue) {},
setCellText: function (aIndex, aColumn, aValue) {},
performAction: function (aAction) {},
performActionOnRow: function (aAction, aIndex) {},
performActionOnCell: function (aAction, aindex, aColumn) {}
},
_makeStrippedHost: function (aHost)
{
var formattedHost = aHost.charAt(0) == "." ? aHost.substring(1, aHost.length) : aHost;
return formattedHost.substring(0, 4) == "www." ? formattedHost.substring(4, formattedHost.length) : formattedHost;
},
_addCookie: function (aStrippedHost, aCookie, aHostCount)
{
if (!(aStrippedHost in this._hosts) || !this._hosts[aStrippedHost]) {
this._hosts[aStrippedHost] = { cookies : [],
rawHost : aStrippedHost,
level : 0,
open : false,
container : true };
this._hostOrder.push(aStrippedHost);
++aHostCount.value;
}
var c = this._makeCookieObject(aStrippedHost, aCookie);
this._hosts[aStrippedHost].cookies.push(c);
},
_makeCookieObject: function (aStrippedHost, aCookie)
{
var host = aCookie.host;
var formattedHost = host.charAt(0) == "." ? host.substring(1, host.length) : host;
var c = { name : aCookie.name,
value : aCookie.value,
isDomain : aCookie.isDomain,
host : aCookie.host,
rawHost : aStrippedHost,
path : aCookie.path,
isSecure : aCookie.isSecure,
expires : aCookie.expires,
level : 1,
container : false };
return c;
},
_loadCookies: function ()
{
var e = this._cm.enumerator;
var hostCount = { value: 0 };
this._hosts = {};
this._hostOrder = [];
while (e.hasMoreElements()) {
var cookie = e.getNext();
if (cookie && cookie instanceof Components.interfaces.nsICookie) {
var strippedHost = this._makeStrippedHost(cookie.host);
this._addCookie(strippedHost, cookie, hostCount);
}
else
break;
}
this._view._rowCount = hostCount.value;
},
formatExpiresString: function (aExpires)
{
if (aExpires) {
var date = new Date(1000 * aExpires);
return this._ds.FormatDateTime("", this._ds.dateFormatLong,
this._ds.timeFormatSeconds,
date.getFullYear(),
date.getMonth() + 1,
date.getDate(),
date.getHours(),
date.getMinutes(),
date.getSeconds());
}
return this._bundle.getString("AtEndOfSession");
},
_updateCookieData: function (aItem)
{
var seln = this._view.selection;
var ids = ["name", "value", "host", "path", "isSecure", "expires"];
var properties;
if (aItem && !aItem.container && seln.count > 0) {
properties = { name: aItem.name, value: aItem.value, host: aItem.host,
path: aItem.path, expires: this.formatExpiresString(aItem.expires),
isDomain: aItem.isDomain ? this._bundle.getString("domainColon")
: this._bundle.getString("hostColon"),
isSecure: aItem.isSecure ? this._bundle.getString("forSecureOnly")
: this._bundle.getString("forAnyConnection") };
for (var i = 0; i < ids.length; ++i)
document.getElementById(ids[i]).disabled = false;
}
else {
var noneSelected = this._bundle.getString("noCookieSelected");
properties = { name: noneSelected, value: noneSelected, host: noneSelected,
path: noneSelected, expires: noneSelected,
isSecure: noneSelected };
for (i = 0; i < ids.length; ++i)
document.getElementById(ids[i]).disabled = true;
}
for (var property in properties)
document.getElementById(property).value = properties[property];
},
onCookieSelected: function ()
{
var properties, item;
var seln = this._tree.view.selection;
if (!this._view._filtered)
item = this._view._getItemAtIndex(seln.currentIndex);
else
item = this._view._filterSet[seln.currentIndex];
this._updateCookieData(item);
var rangeCount = seln.getRangeCount();
var selectedCookieCount = 0;
for (var i = 0; i < rangeCount; ++i) {
var min = {}; var max = {};
seln.getRangeAt(i, min, max);
for (var j = min.value; j <= max.value; ++j) {
item = this._view._getItemAtIndex(j);
if (!item) continue;
if (item.container && !item.open)
selectedCookieCount += item.cookies.length;
else if (!item.container)
++selectedCookieCount;
}
}
var item = this._view._getItemAtIndex(seln.currentIndex);
if (item && seln.count == 1 && item.container && item.open)
selectedCookieCount += 2;
var stringKey = selectedCookieCount == 1 ? "removeCookie" : "removeCookies";
document.getElementById("removeCookie").label = this._bundle.getString(stringKey);
document.getElementById("removeAllCookies").disabled = this._view._filtered;
document.getElementById("removeCookie").disabled = !(seln.count > 0);
},
deleteCookie: function ()
{
# // Selection Notes
# // - Selection always moves to *NEXT* adjacent item unless item
# // is last child at a given level in which case it moves to *PREVIOUS*
# // item
# //
# // Selection Cases (Somewhat Complicated)
# //
# // 1) Single cookie selected, host has single child
# // v cnn.com
# // //// cnn.com ///////////// goksdjf@ ////
# // > atwola.com
# //
# // Before SelectedIndex: 1 Before RowCount: 3
# // After SelectedIndex: 0 After RowCount: 1
# //
# // 2) Host selected, host open
# // v goats.com ////////////////////////////
# // goats.com sldkkfjl
# // goat.scom flksj133
# // > atwola.com
# //
# // Before SelectedIndex: 0 Before RowCount: 4
# // After SelectedIndex: 0 After RowCount: 1
# //
# // 3) Host selected, host closed
# // > goats.com ////////////////////////////
# // > atwola.com
# //
# // Before SelectedIndex: 0 Before RowCount: 2
# // After SelectedIndex: 0 After RowCount: 1
# //
# // 4) Single cookie selected, host has many children
# // v goats.com
# // goats.com sldkkfjl
# // //// goats.com /////////// flksjl33 ////
# // > atwola.com
# //
# // Before SelectedIndex: 2 Before RowCount: 4
# // After SelectedIndex: 1 After RowCount: 3
# //
# // 5) Single cookie selected, host has many children
# // v goats.com
# // //// goats.com /////////// flksjl33 ////
# // goats.com sldkkfjl
# // > atwola.com
# //
# // Before SelectedIndex: 1 Before RowCount: 4
# // After SelectedIndex: 1 After RowCount: 3
var seln = this._view.selection;
var tbo = this._tree.treeBoxObject;
if (seln.count < 1) return;
var nextSelected = 0;
var rowCountImpact = 0;
var deleteItems = [];
if (!this._view._filtered) {
var ci = seln.currentIndex;
nextSelected = ci;
var invalidateRow = -1;
var item = this._view._getItemAtIndex(ci);
if (item.container) {
rowCountImpact -= (item.open ? item.cookies.length : 0) + 1;
deleteItems = deleteItems.concat(item.cookies);
if (!this._view.hasNextSibling(-1, ci))
--nextSelected;
this._view._removeItemAtIndex(ci);
}
else {
var parent = this._view._getItemAtIndex(item.parentIndex);
--rowCountImpact;
if (parent.cookies.length == 1) {
--rowCountImpact;
deleteItems.push(item);
if (!this._view.hasNextSibling(-1, ci))
--nextSelected;
if (!this._view.hasNextSibling(-1, item.parentIndex))
--nextSelected;
this._view._removeItemAtIndex(item.parentIndex);
invalidateRow = item.parentIndex;
}
else {
deleteItems.push(item);
if (!this._view.hasNextSibling(-1, ci))
--nextSelected;
this._view._removeItemAtIndex(ci);
}
}
this._view._rowCount += rowCountImpact;
tbo.rowCountChanged(ci, rowCountImpact);
if (invalidateRow != -1)
tbo.invalidateRow(invalidateRow);
}
else {
var rangeCount = seln.getRangeCount();
for (var i = 0; i < rangeCount; ++i) {
var min = {}; var max = {};
seln.getRangeAt(i, min, max);
nextSelected = min.value;
for (var j = min.value; j <= max.value; ++j) {
deleteItems.push(this._view._getItemAtIndex(j));
if (!this._view.hasNextSibling(-1, max.value))
--nextSelected;
}
var delta = max.value - min.value + 1;
this._view._removeItemAtIndex(min.value, delta);
rowCountImpact = -1 * delta;
this._view._rowCount += rowCountImpact;
tbo.rowCountChanged(min.value, rowCountImpact);
}
}
var psvc = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch);
var blockFutureCookies = false;
if (psvc.prefHasUserValue("network.cookie.blockFutureCookies"))
blockFutureCookies = psvc.getBoolPref("network.cookie.blockFutureCookies");
for (i = 0; i < deleteItems.length; ++i) {
var item = deleteItems[i];
this._cm.remove(item.host, item.name, item.path, blockFutureCookies);
}
if (nextSelected < 0)
seln.clearSelection();
else {
seln.select(nextSelected);
this._tree.focus();
}
},
deleteAllCookies: function ()
{
this._cm.removeAll();
this._tree.focus();
},
onCookieKeyPress: function (aEvent)
{
if (aEvent.keyCode == 46)
this.deleteCookie();
},
_lastSortProperty : "",
_lastSortAscending: false,
sort: function (aProperty)
{
var ascending = (aProperty == this._lastSortProperty) ? !this._lastSortAscending : true;
// Sort the Non-Filtered Host Collections
if (aProperty == "rawHost") {
function sortByHost(a, b)
{
return a.toLowerCase().localeCompare(b.toLowerCase());
}
this._hostOrder.sort(sortByHost);
if (!ascending)
this._hostOrder.reverse();
}
function sortByProperty(a, b)
{
return a[aProperty].toLowerCase().localeCompare(b[aProperty].toLowerCase());
}
for (var host in this._hosts) {
var cookies = this._hosts[host].cookies;
cookies.sort(sortByProperty);
if (!ascending)
cookies.reverse();
}
// Sort the Filtered List, if in Filtered mode
if (this._view._filtered) {
this._view._filterSet.sort(sortByProperty);
if (!ascending)
this._view._filterSet.reverse();
}
this._view._invalidateCache(0);
this._view.selection.clearSelection();
this._view.selection.select(0);
this._tree.treeBoxObject.invalidate();
this._tree.treeBoxObject.ensureRowIsVisible(0);
this._lastSortAscending = ascending;
this._lastSortProperty = aProperty;
},
clearFilter: function ()
{
// Revert to single-select in the tree
this._tree.setAttribute("seltype", "single");
// Clear the Tree Display
this._view._filtered = false;
this._view._rowCount = 0;
this._tree.treeBoxObject.rowCountChanged(0, -this._view._filterSet.length);
this._view._filterSet = [];
// Just reload the list to make sure deletions are respected
this._loadCookies();
this._tree.treeBoxObject.view = this._view;
// Restore sort order
var sortby = this._lastSortProperty;
if (sortby == "") {
this._lastSortAscending = false;
this.sort("rawHost");
}
else {
this._lastSortAscending = !this._lastSortAscending;
this.sort(sortby);
}
// Restore open state
for (var i = 0; i < this._openIndices.length; ++i)
this._view.toggleOpenState(this._openIndices[i]);
this._openIndices = [];
// Restore selection
this._view.selection.clearSelection();
for (i = 0; i < this._lastSelectedRanges.length; ++i) {
var range = this._lastSelectedRanges[i];
this._view.selection.rangedSelect(range.min, range.max, true);
}
this._lastSelectedRanges = [];
document.getElementById("cookiesIntro").value = this._bundle.getString("cookiesAll");
},
_cookieMatchesFilter: function (aCookie)
{
return aCookie.rawHost.indexOf(this._view._filterValue) != -1 ||
aCookie.name.indexOf(this._view._filterValue) != -1 ||
aCookie.value.indexOf(this._view._filterValue) != -1;
},
_filterCookies: function (aFilterValue)
{
this._view._filterValue = aFilterValue;
var cookies = [];
for (var i = 0; i < gCookiesWindow._hostOrder.length; ++i) { //var host in gCookiesWindow._hosts) {
var currHost = gCookiesWindow._hosts[gCookiesWindow._hostOrder[i]]; // gCookiesWindow._hosts[host];
if (!currHost) continue;
for (var j = 0; j < currHost.cookies.length; ++j) {
var cookie = currHost.cookies[j];
if (this._cookieMatchesFilter(cookie))
cookies.push(cookie);
}
}
return cookies;
},
_lastSelectedRanges: [],
_openIndices: [],
_saveState: function ()
{
// Save selection
var seln = this._view.selection;
this._lastSelectedRanges = [];
var rangeCount = seln.getRangeCount();
for (var i = 0; i < rangeCount; ++i) {
var min = {}; var max = {};
seln.getRangeAt(i, min, max);
this._lastSelectedRanges.push({ min: min.value, max: max.value });
}
// Save open states
this._openIndices = [];
for (i = 0; i < this._view.rowCount; ++i) {
var item = this._view._getItemAtIndex(i);
if (item && item.container && item.open)
this._openIndices.push(i);
}
},
filter: function ()
{
var filter = document.getElementById("filter").value;
if (filter == "") {
gCookiesWindow.clearFilter();
return;
}
var view = gCookiesWindow._view;
view._filterSet = gCookiesWindow._filterCookies(filter);
if (!view._filtered) {
// Save Display Info for the Non-Filtered mode when we first
// enter Filtered mode.
gCookiesWindow._saveState();
view._filtered = true;
}
// Move to multi-select in the tree
gCookiesWindow._tree.setAttribute("seltype", "multiple");
// Clear the display
var oldCount = view._rowCount;
view._rowCount = 0;
gCookiesWindow._tree.treeBoxObject.rowCountChanged(0, -oldCount);
// Set up the filtered display
view._rowCount = view._filterSet.length;
gCookiesWindow._tree.treeBoxObject.rowCountChanged(0, view.rowCount);
// if the view is not empty then select the first item
if (view.rowCount > 0)
view.selection.select(0);
document.getElementById("cookiesIntro").value = gCookiesWindow._bundle.getString("cookiesFiltered");
},
setFilter: function (aFilterString) {
document.getElementById("filter").value = aFilterString;
this.filter();
},
focusFilterBox: function ()
{
var filter = document.getElementById("filter");
filter.focus();
filter.select();
}
};

Просмотреть файл

@ -0,0 +1,141 @@
<?xml version="1.0"?>
# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is the Firefox Preferences System.
#
# The Initial Developer of the Original Code is
# Ben Goodger.
# Portions created by the Initial Developer are Copyright (C) 2005
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Ben Goodger <ben@mozilla.org>
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://messenger/skin/preferences/preferences.css" type="text/css"?>
<!DOCTYPE dialog SYSTEM "chrome://messenger/locale/preferences/cookies.dtd" >
<window id="CookiesDialog" windowtype="mailnews:cookies"
class="windowDialog" title="&window.title;"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
style="width: &window.width;;"
onload="gCookiesWindow.init();"
onunload="gCookiesWindow.uninit();"
persist="screenX screenY width height">
<script src="chrome://messenger/content/preferences/permissionsutils.js"/>
<script src="chrome://messenger/content/preferences/cookies.js"/>
<stringbundle id="bundlePreferences"
src="chrome://messenger/locale/preferences/preferences.properties"/>
<keyset>
<key key="&windowClose.key;" modifiers="accel" oncommand="window.close();"/>
<key key="&focusSearch1.key;" modifiers="accel" oncommand="gCookiesWindow.focusFilterBox();"/>
<key key="&focusSearch2.key;" modifiers="accel" oncommand="gCookiesWindow.focusFilterBox();"/>
</keyset>
<vbox flex="1" class="contentPane">
<hbox align="center">
<label accesskey="&filter.accesskey;" control="filter">&filter.label;</label>
<textbox type="search" id="filter" flex="1"
aria-controls="cookiesList"
oncommand="gCookiesWindow.filter();"/>
</hbox>
<separator class="thin"/>
<label control="cookiesList" id="cookiesIntro" value="&cookiesonsystem.label;"/>
<separator class="thin"/>
<tree id="cookiesList" flex="1" style="height: 10em;"
onkeypress="gCookiesWindow.onCookieKeyPress(event)"
onselect="gCookiesWindow.onCookieSelected();"
hidecolumnpicker="true" seltype="single">
<treecols>
<treecol id="domainCol" label="&cookiedomain.label;" flex="2" primary="true"
class="sortDirectionIndicator" persist="width" onclick="gCookiesWindow.sort('rawHost');" />
<splitter class="tree-splitter"/>
<treecol id="nameCol" label="&cookiename.label;" flex="1"
class="sortDirectionIndicator" persist="width"
onclick="gCookiesWindow.sort('name');"/>
</treecols>
<treechildren id="cookiesChildren"/>
</tree>
<hbox id="cookieInfoBox">
<grid flex="1" id="cookieInfoGrid">
<columns>
<column/>
<column flex="1"/>
</columns>
<rows>
<row align="center">
<hbox pack="end"><label id="nameLabel" control="name" value="&props.name.label;"/></hbox>
<textbox id="name" readonly="true" class="plain"/>
</row>
<row align="center">
<hbox pack="end"><label id="valueLabel" control="value" value="&props.value.label;"/></hbox>
<textbox id="value" readonly="true" class="plain"/>
</row>
<row align="center">
<hbox pack="end"><label id="isDomain" control="host" value="&props.domain.label;"/></hbox>
<textbox id="host" readonly="true" class="plain"/>
</row>
<row align="center">
<hbox pack="end"><label id="pathLabel" control="path" value="&props.path.label;"/></hbox>
<textbox id="path" readonly="true" class="plain"/>
</row>
<row align="center">
<hbox pack="end"><label id="isSecureLabel" control="isSecure" value="&props.secure.label;"/></hbox>
<textbox id="isSecure" readonly="true" class="plain"/>
</row>
<row align="center">
<hbox pack="end"><label id="expiresLabel" control="expires" value="&props.expires.label;"/></hbox>
<textbox id="expires" readonly="true" class="plain"/>
</row>
</rows>
</grid>
</hbox>
</vbox>
<hbox align="end">
<hbox class="actionButtons" flex="1">
<button id="removeCookie" disabled="true" icon="remove"
label="&button.removecookie.label;" accesskey="&button.removecookie.accesskey;"
oncommand="gCookiesWindow.deleteCookie();"/>
<button id="removeAllCookies" disabled="true" icon="clear"
label="&button.removeallcookies.label;" accesskey="&button.removeallcookies.accesskey;"
oncommand="gCookiesWindow.deleteAllCookies();"/>
<spacer flex="1"/>
#ifndef XP_MACOSX
<button oncommand="close();" icon="close"
label="&button.close.label;" accesskey="&button.close.accesskey;"/>
#endif
</hbox>
<resizer dir="bottomend"/>
</hbox>
</window>

Просмотреть файл

@ -31,3 +31,8 @@ messenger.jar:
* content/messenger/preferences/fonts.xul
* content/messenger/preferences/notifications.xul
* content/messenger/preferences/offline.xul
* content/messenger/preferences/cookies.js
* content/messenger/preferences/cookies.xul
* content/messenger/preferences/permissions.js
* content/messenger/preferences/permissions.xul
* content/messenger/preferences/permissionsutils.js

Просмотреть файл

@ -0,0 +1,418 @@
# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is the Firefox Preferences System.
#
# The Initial Developer of the Original Code is
# Ben Goodger.
# Portions created by the Initial Developer are Copyright (C) 2005
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Ben Goodger <ben@mozilla.org>
# Blake Ross <firefox@blakeross.com>
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
const nsIPermissionManager = Components.interfaces.nsIPermissionManager;
const nsICookiePermission = Components.interfaces.nsICookiePermission;
function Permission(host, rawHost, type, capability, perm)
{
this.host = host;
this.rawHost = rawHost;
this.type = type;
this.capability = capability;
this.perm = perm;
}
var gPermissionManager = {
_type : "",
_permissions : [],
_pm : Components.classes["@mozilla.org/permissionmanager;1"]
.getService(Components.interfaces.nsIPermissionManager),
_bundle : null,
_tree : null,
_view: {
_rowCount: 0,
get rowCount()
{
return this._rowCount;
},
getCellText: function (aRow, aColumn)
{
if (aColumn.id == "siteCol")
return gPermissionManager._permissions[aRow].rawHost;
else if (aColumn.id == "statusCol")
return gPermissionManager._permissions[aRow].capability;
return "";
},
isSeparator: function(aIndex) { return false; },
isSorted: function() { return false; },
isContainer: function(aIndex) { return false; },
setTree: function(aTree){},
getImageSrc: function(aRow, aColumn) {},
getProgressMode: function(aRow, aColumn) {},
getCellValue: function(aRow, aColumn) {},
cycleHeader: function(column) {},
getRowProperties: function(row,prop){},
getColumnProperties: function(column,prop){},
getCellProperties: function(row,column,prop){
if (column.element.getAttribute("id") == "siteCol")
prop.AppendElement(this._ltrAtom);
}
},
_getCapabilityString: function (aCapability)
{
var stringKey = null;
switch (aCapability) {
case nsIPermissionManager.ALLOW_ACTION:
stringKey = "can";
break;
case nsIPermissionManager.DENY_ACTION:
stringKey = "cannot";
break;
case nsICookiePermission.ACCESS_SESSION:
stringKey = "canSession";
break;
}
return this._bundle.getString(stringKey);
},
addPermission: function (aCapability)
{
var textbox = document.getElementById("url");
var host = textbox.value.replace(/^\s*([-\w]*:\/+)?/, ""); // trim any leading space and scheme
try {
var ioService = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService);
var uri = ioService.newURI("http://"+host, null, null);
host = uri.host;
} catch(ex) {
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
.getService(Components.interfaces.nsIPromptService);
var message = this._bundle.getString("invalidURI");
var title = this._bundle.getString("invalidURITitle");
promptService.alert(window, title, message);
return;
}
var capabilityString = this._getCapabilityString(aCapability);
// check whether the permission already exists, if not, add it
var exists = false;
for (var i = 0; i < this._permissions.length; ++i) {
if (this._permissions[i].rawHost == host) {
// Avoid calling the permission manager if the capability settings are
// the same. Otherwise allow the call to the permissions manager to
// update the listbox for us.
exists = this._permissions[i].perm == aCapability;
break;
}
}
if (!exists) {
host = (host.charAt(0) == ".") ? host.substring(1,host.length) : host;
var uri = ioService.newURI("http://" + host, null, null);
this._pm.add(uri, this._type, aCapability);
}
textbox.value = "";
textbox.focus();
// covers a case where the site exists already, so the buttons don't disable
this.onHostInput(textbox);
// enable "remove all" button as needed
document.getElementById("removeAllPermissions").disabled = this._permissions.length == 0;
},
onHostInput: function (aSiteField)
{
document.getElementById("btnSession").disabled = !aSiteField.value;
document.getElementById("btnBlock").disabled = !aSiteField.value;
document.getElementById("btnAllow").disabled = !aSiteField.value;
},
onHostKeyPress: function (aEvent)
{
if (aEvent.keyCode == KeyEvent.DOM_VK_RETURN)
document.getElementById("btnAllow").click();
},
onLoad: function ()
{
this._bundle = document.getElementById("bundlePreferences");
var params = window.arguments[0];
this.init(params);
},
init: function (aParams)
{
if (this._type) {
// reusing an open dialog, clear the old observer
this.uninit();
}
this._type = aParams.permissionType;
this._manageCapability = aParams.manageCapability;
var permissionsText = document.getElementById("permissionsText");
while (permissionsText.hasChildNodes())
permissionsText.removeChild(permissionsText.firstChild);
permissionsText.appendChild(document.createTextNode(aParams.introText));
document.title = aParams.windowTitle;
document.getElementById("btnBlock").hidden = !aParams.blockVisible;
document.getElementById("btnSession").hidden = !aParams.sessionVisible;
document.getElementById("btnAllow").hidden = !aParams.allowVisible;
var urlFieldVisible = (aParams.blockVisible || aParams.sessionVisible || aParams.allowVisible);
var urlField = document.getElementById("url");
urlField.value = aParams.prefilledHost;
urlField.hidden = !urlFieldVisible;
this.onHostInput(urlField);
var urlLabel = document.getElementById("urlLabel");
urlLabel.hidden = !urlFieldVisible;
var os = Components.classes["@mozilla.org/observer-service;1"]
.getService(Components.interfaces.nsIObserverService);
os.addObserver(this, "perm-changed", false);
if (this._type == "install") {
var enumerator = this._pm.enumerator;
if (!enumerator.hasMoreElements())
this._updatePermissions();
}
this._loadPermissions();
urlField.focus();
this._ltrAtom = Components.classes["@mozilla.org/atom-service;1"]
.getService(Components.interfaces.nsIAtomService)
.getAtom("ltr");
},
uninit: function ()
{
var os = Components.classes["@mozilla.org/observer-service;1"]
.getService(Components.interfaces.nsIObserverService);
os.removeObserver(this, "perm-changed");
},
observe: function (aSubject, aTopic, aData)
{
if (aTopic == "perm-changed") {
var permission = aSubject.QueryInterface(Components.interfaces.nsIPermission);
if (aData == "added") {
this._addPermissionToList(permission);
++this._view._rowCount;
this._tree.treeBoxObject.rowCountChanged(this._view.rowCount - 1, 1);
// Re-do the sort, since we inserted this new item at the end.
gTreeUtils.sort(this._tree, this._view, this._permissions,
this._lastPermissionSortColumn,
this._lastPermissionSortAscending);
}
else if (aData == "changed") {
for (var i = 0; i < this._permissions.length; ++i) {
if (this._permissions[i].host == permission.host) {
this._permissions[i].capability = this._getCapabilityString(permission.capability);
break;
}
}
// Re-do the sort, if the status changed from Block to Allow
// or vice versa, since if we're sorted on status, we may no
// longer be in order.
if (this._lastPermissionSortColumn.id == "statusCol") {
gTreeUtils.sort(this._tree, this._view, this._permissions,
this._lastPermissionSortColumn,
this._lastPermissionSortAscending);
}
this._tree.treeBoxObject.invalidate();
}
// No UI other than this window causes this method to be sent a "deleted"
// notification, so we don't need to implement it since Delete is handled
// directly by the Permission Removal handlers. If that ever changes, those
// implementations will have to move into here.
}
},
onPermissionSelected: function ()
{
var hasSelection = this._tree.view.selection.count > 0;
var hasRows = this._tree.view.rowCount > 0;
document.getElementById("removePermission").disabled = !hasRows || !hasSelection;
document.getElementById("removeAllPermissions").disabled = !hasRows;
},
onPermissionDeleted: function ()
{
if (!this._view.rowCount)
return;
var removedPermissions = [];
gTreeUtils.deleteSelectedItems(this._tree, this._view, this._permissions, removedPermissions);
for (var i = 0; i < removedPermissions.length; ++i) {
var p = removedPermissions[i];
this._pm.remove(p.host, p.type);
}
document.getElementById("removePermission").disabled = !this._permissions.length;
document.getElementById("removeAllPermissions").disabled = !this._permissions.length;
},
onAllPermissionsDeleted: function ()
{
if (!this._view.rowCount)
return;
var removedPermissions = [];
gTreeUtils.deleteAll(this._tree, this._view, this._permissions, removedPermissions);
for (var i = 0; i < removedPermissions.length; ++i) {
var p = removedPermissions[i];
this._pm.remove(p.host, p.type);
}
document.getElementById("removePermission").disabled = true;
document.getElementById("removeAllPermissions").disabled = true;
},
onPermissionKeyPress: function (aEvent)
{
if (aEvent.keyCode == 46)
this.onPermissionDeleted();
},
_lastPermissionSortColumn: "",
_lastPermissionSortAscending: false,
onPermissionSort: function (aColumn)
{
this._lastPermissionSortAscending = gTreeUtils.sort(this._tree,
this._view,
this._permissions,
aColumn,
this._lastPermissionSortColumn,
this._lastPermissionSortAscending);
this._lastPermissionSortColumn = aColumn;
},
_loadPermissions: function ()
{
this._tree = document.getElementById("permissionsTree");
this._permissions = [];
// load permissions into a table
var count = 0;
var enumerator = this._pm.enumerator;
while (enumerator.hasMoreElements()) {
var nextPermission = enumerator.getNext().QueryInterface(Components.interfaces.nsIPermission);
this._addPermissionToList(nextPermission);
}
this._view._rowCount = this._permissions.length;
// sort and display the table
this._tree.treeBoxObject.view = this._view;
this.onPermissionSort("rawHost", false);
// disable "remove all" button if there are none
document.getElementById("removeAllPermissions").disabled = this._permissions.length == 0;
},
_addPermissionToList: function (aPermission)
{
if (aPermission.type == this._type &&
(!this._manageCapability ||
(aPermission.capability == this._manageCapability))) {
var host = aPermission.host;
var capabilityString = this._getCapabilityString(aPermission.capability);
var p = new Permission(host,
(host.charAt(0) == ".") ? host.substring(1,host.length) : host,
aPermission.type,
capabilityString,
aPermission.capability);
this._permissions.push(p);
}
},
_updatePermissions: function ()
{
try {
var ioService = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService);
var pbi = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch2);
var prefList = [["xpinstall.whitelist.add", nsIPermissionManager.ALLOW_ACTION],
["xpinstall.whitelist.add.103", nsIPermissionManager.ALLOW_ACTION],
["xpinstall.blacklist.add", nsIPermissionManager.DENY_ACTION]];
for (var i = 0; i < prefList.length; ++i) {
try {
// this pref is a comma-delimited list of hosts
var hosts = pbi.getCharPref(prefList[i][0]);
} catch(ex) {
continue;
}
if (!hosts)
continue;
hostList = hosts.split(",");
var capability = prefList[i][1];
for (var j = 0; j < hostList.length; ++j) {
// trim leading and trailing spaces
var host = hostList[j].replace(/^\s*/,"").replace(/\s*$/,"");
try {
var uri = ioService.newURI("http://" + host, null, null);
this._pm.add(uri, this._type, capability);
} catch(ex) { }
}
pbi.setCharPref(prefList[i][0], "");
}
} catch(ex) { }
},
setHost: function (aHost)
{
document.getElementById("url").value = aHost;
}
};
function setHost(aHost)
{
gPermissionManager.setHost(aHost);
}
function initWithParams(aParams)
{
gPermissionManager.init(aParams);
}

Просмотреть файл

@ -0,0 +1,116 @@
<?xml version="1.0"?>
# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Blake Ross.
# Portions created by the Initial Developer are Copyright (C) 2003
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Blake Ross <firefox@blakeross.com>
# Ben Goodger <ben@mozilla.org>
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://messenger/skin/preferences/preferences.css" type="text/css"?>
<!DOCTYPE dialog SYSTEM "chrome://messenger/locale/preferences/permissions.dtd" >
<window id="PermissionsDialog" class="windowDialog"
windowtype="mailnews:permissions"
title="&window.title;"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
style="width: &window.width;;"
onload="gPermissionManager.onLoad();"
onunload="gPermissionManager.uninit();"
persist="screenX screenY width height">
<script src="chrome://messenger/content/preferences/permissionsutils.js"/>
<script src="chrome://messenger/content/preferences/permissions.js"/>
<stringbundle id="bundlePreferences"
src="chrome://messenger/locale/preferences/preferences.properties"/>
<keyset>
<key key="&windowClose.key;" modifiers="accel" oncommand="window.close();"/>
</keyset>
<vbox class="contentPane" flex="1">
<description id="permissionsText" control="url"/>
<separator class="thin"/>
<label id="urlLabel" control="url" value="&address.label;" accesskey="&address.accesskey;"/>
<hbox align="start">
<textbox id="url" flex="1"
oninput="gPermissionManager.onHostInput(event.target);"
onkeypress="gPermissionManager.onHostKeyPress(event);"/>
</hbox>
<hbox pack="end">
<button id="btnBlock" disabled="true" label="&block.label;" accesskey="&block.accesskey;"
oncommand="gPermissionManager.addPermission(nsIPermissionManager.DENY_ACTION);"/>
<button id="btnSession" disabled="true" label="&session.label;" accesskey="&session.accesskey;"
oncommand="gPermissionManager.addPermission(nsICookiePermission.ACCESS_SESSION);"/>
<button id="btnAllow" disabled="true" label="&allow.label;" default="true" accesskey="&allow.accesskey;"
oncommand="gPermissionManager.addPermission(nsIPermissionManager.ALLOW_ACTION);"/>
</hbox>
<separator class="thin"/>
<tree id="permissionsTree" flex="1" style="height: 18em;"
hidecolumnpicker="true"
onkeypress="gPermissionManager.onPermissionKeyPress(event)"
onselect="gPermissionManager.onPermissionSelected();">
<treecols>
<treecol id="siteCol" label="&treehead.sitename.label;" flex="3"
onclick="gPermissionManager.onPermissionSort('rawHost');" persist="width"/>
<splitter class="tree-splitter"/>
<treecol id="statusCol" label="&treehead.status.label;" flex="1"
onclick="gPermissionManager.onPermissionSort('capability');" persist="width"/>
</treecols>
<treechildren/>
</tree>
</vbox>
<hbox align="end">
<hbox class="actionButtons" flex="1">
<button id="removePermission" disabled="true"
accesskey="&removepermission.accesskey;"
icon="remove" label="&removepermission.label;"
oncommand="gPermissionManager.onPermissionDeleted();"/>
<button id="removeAllPermissions"
icon="clear" label="&removeallpermissions.label;"
accesskey="&removeallpermissions.accesskey;"
oncommand="gPermissionManager.onAllPermissionsDeleted();"/>
<spacer flex="1"/>
#ifndef XP_MACOSX
<button oncommand="close();" icon="close"
label="&button.close.label;" accesskey="&button.close.accesskey;"/>
#endif
</hbox>
<resizer dir="bottomend"/>
</hbox>
</window>

Просмотреть файл

@ -0,0 +1,102 @@
# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is the Firefox Preferences System.
#
# The Initial Developer of the Original Code is
# Ben Goodger.
# Portions created by the Initial Developer are Copyright (C) 2005
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Ben Goodger <ben@mozilla.org>
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
var gTreeUtils = {
deleteAll: function (aTree, aView, aItems, aDeletedItems)
{
for (var i = 0; i < aItems.length; ++i)
aDeletedItems.push(aItems[i]);
aItems.splice(0);
var oldCount = aView.rowCount;
aView._rowCount = 0;
aTree.treeBoxObject.rowCountChanged(0, -oldCount);
},
deleteSelectedItems: function (aTree, aView, aItems, aDeletedItems)
{
var selection = aTree.view.selection;
selection.selectEventsSuppressed = true;
var rc = selection.getRangeCount();
for (var i = 0; i < rc; ++i) {
var min = { }; var max = { };
selection.getRangeAt(i, min, max);
for (var j = min.value; j <= max.value; ++j) {
aDeletedItems.push(aItems[j]);
aItems[j] = null;
}
}
var nextSelection = 0;
for (i = 0; i < aItems.length; ++i) {
if (!aItems[i]) {
var j = i;
while (j < aItems.length && !aItems[j])
++j;
aItems.splice(i, j - i);
nextSelection = j < aView.rowCount ? j - 1 : j - 2;
aView._rowCount -= j - i;
aTree.treeBoxObject.rowCountChanged(i, i - j);
}
}
if (aItems.length) {
selection.select(nextSelection);
aTree.treeBoxObject.ensureRowIsVisible(nextSelection);
aTree.focus();
}
selection.selectEventsSuppressed = false;
},
sort: function (aTree, aView, aDataSet, aColumn,
aLastSortColumn, aLastSortAscending)
{
var ascending = (aColumn == aLastSortColumn) ? !aLastSortAscending : true;
aDataSet.sort(function (a, b) { return a[aColumn].toLowerCase().localeCompare(b[aColumn].toLowerCase()); });
if (!ascending)
aDataSet.reverse();
aTree.view.selection.select(-1);
aTree.view.selection.select(0);
aTree.treeBoxObject.invalidate();
aTree.treeBoxObject.ensureRowIsVisible(0);
return ascending;
}
};

Просмотреть файл

@ -213,5 +213,64 @@ var gSecurityPane = {
updateDownloadedPhishingListState: function()
{
document.getElementById('useDownloadedList').disabled = !document.getElementById('enablePhishingDetector').checked;
},
/**
* Reads the network.cookie.cookieBehavior preference value and
* enables/disables the rest of the cookie UI accordingly, returning true
* if cookies are enabled.
*/
readAcceptCookies: function ()
{
var pref = document.getElementById("network.cookie.cookieBehavior");
var keepUntil = document.getElementById("keepUntil");
var menu = document.getElementById("keepCookiesUntil");
// enable the rest of the UI for anything other than "disable all cookies"
var acceptCookies = (pref.value != 2);
keepUntil.disabled = menu.disabled = this._autoStartPrivateBrowsing || !acceptCookies;
return acceptCookies;
},
/**
* Enables/disables the "keep until" label and menulist in response to the
* "accept cookies" checkbox being checked or unchecked.
*/
writeAcceptCookies: function ()
{
var accept = document.getElementById("acceptCookies");
return accept.checked ? 0 : 2;
},
/**
* Displays fine-grained, per-site preferences for cookies.
*/
showCookieExceptions: function ()
{
var bundle = document.getElementById("bundlePreferences");
var params = { blockVisible : true,
sessionVisible : true,
allowVisible : true,
prefilledHost : "",
permissionType : "cookie",
windowTitle : bundle.getString("cookiepermissionstitle"),
introText : bundle.getString("cookiepermissionstext") };
document.documentElement.openWindow("mailnews:permissions",
"chrome://messenger/content/preferences/permissions.xul",
"", params);
},
/**
* Displays all the user's cookies in a dialog.
*/
showCookies: function (aCategory)
{
document.documentElement.openWindow("mailnews:cookies",
"chrome://messenger/content/preferences/cookies.xul",
"", null);
}
};

Просмотреть файл

@ -79,6 +79,22 @@
<preference id="pref.privacy.disable_button.view_passwords"
name="pref.privacy.disable_button.view_passwords"
type="bool"/>
<!-- Cookies -->
<preference id="pref.privacy.disable_button.cookie_exceptions"
name="pref.privacy.disable_button.cookie_exceptions"
type="bool"/>
<preference id="pref.privacy.disable_button.view_cookies"
name="pref.privacy.disable_button.view_cookies"
type="bool"/>
<preference id="network.cookie.cookieBehavior"
name="network.cookie.cookieBehavior"
type="int"/>
<preference id="network.cookie.lifetimePolicy"
name="network.cookie.lifetimePolicy"
type="int"/>
<preference id="network.cookie.blockFutureCookies"
name="network.cookie.blockFutureCookies"
type="bool"/>
</preferences>
<tabbox id="securityPrefs" flex="1" onselect="gSecurityPane.tabSelectionChanged();">
@ -87,6 +103,7 @@
<tab label="&itemPhishing.label;"/>
<tab label="&itemAntiVirus.label;"/>
<tab label="&itemPasswords.label;"/>
<tab label="&itemCookies.label;"/>
</tabs>
<tabpanels flex="1">
@ -175,6 +192,43 @@
</hbox>
<separator flex="1"/>
</tabpanel>
<!-- Cookies -->
<tabpanel orient="vertical">
<description>&cookies.intro;</description>
<separator class="thin"/>
<hbox id="cookiesBox">
<checkbox id="acceptCookies" label="&acceptCookies.label;" flex="1"
preference="network.cookie.cookieBehavior"
accesskey="&acceptCookies.accesskey;"
onsyncfrompreference="return gSecurityPane.readAcceptCookies();"
onsynctopreference="return gSecurityPane.writeAcceptCookies();"/>
<button id="cookieExceptions" oncommand="gSecurityPane.showCookieExceptions();"
label="&cookieExceptions.label;" accesskey="&cookieExceptions.accesskey;"
preference="pref.privacy.disable_button.cookie_exceptions"/>
</hbox>
<hbox id="keepRow" class="indent">
<hbox id="keepBox" align="center">
<label id="keepUntil"
control="keepCookiesUntil"
accesskey="&keepUntil.accesskey;">&keepUntil.label;</label>
<menulist id="keepCookiesUntil"
preference="network.cookie.lifetimePolicy">
<menupopup>
<menuitem label="&expire.label;" value="0"/>
<menuitem label="&close.label;" value="2"/>
<menuitem label="&askEachTime.label;" value="1"/>
</menupopup>
</menulist>
</hbox>
<hbox flex="1"/>
<button id="showCookiesButton" label="&showCookies.label;"
accesskey="&showCookies.accesskey;"
oncommand="gSecurityPane.showCookies();"
preference="pref.privacy.disable_button.view_cookies"/>
</hbox>
</tabpanel>
</tabpanels>
</tabbox>

Просмотреть файл

@ -1,18 +1,20 @@
<!ENTITY welcome.description "Quick Account Setup">
<!ENTITY autoconfigWizard.style "width: 640px; height: 480px;">
<!ENTITY name.description "Your name">
<!ENTITY email.description "Email">
<!ENTITY password.description "Password">
<!ENTITY next.label "Next &#187;">
<!ENTITY next.accesskey "N">
<!ENTITY back.label "&#171; Back">
<!ENTITY back.accesskey "B">
<!ENTITY autoconfigWizard.title "Mail Account Setup">
<!ENTITY name.label "Your name:">
<!ENTITY name.accesskey "n">
<!ENTITY name.emptytext "First Last">
<!ENTITY name.text "Your name, as shown to others">
<!ENTITY email.label "Email address:">
<!ENTITY email.accesskey "l">
<!ENTITY email.emptytext "email@example.com">
<!ENTITY password.label "Password:">
<!ENTITY password.accesskey "P">
<!ENTITY password.emptytext "Password">
<!ENTITY password.text "Optional, will only be used to validate the username">
<!ENTITY accountInformation.label "Account Information">
<!ENTITY username.label "username">
<!ENTITY receivingServer.label "receiving">
<!ENTITY sendingServer.label "sending">
<!ENTITY username2.label "Username:">
<!ENTITY incoming.label "Incoming:">
<!ENTITY outgoing.label "Outgoing:">
<!ENTITY noEncryption.label "None">
<!ENTITY starttls.label "STARTTLS">
<!ENTITY sslTls.label "SSL/TLS">
@ -21,11 +23,14 @@
<!ENTITY pop.label "POP">
<!ENTITY smtp.label "SMTP">
<!-- LOCALIZATION NOTE (createAndEditSettings.label): This label is a link
which will create the account and take the user to the account
configuration screen. -->
<!ENTITY createAndEditSettings.label "Create and Edit Account Settings">
<!ENTITY manualSetup.label "Manual Setup…">
<!ENTITY manualSetup.accesskey "S">
<!ENTITY cancel.label "Cancel">
<!ENTITY cancel.accesskey "a">
<!ENTITY continue.label "Continue">
<!ENTITY continue.accesskey "C">
<!ENTITY startOver.label "Start over">
<!ENTITY startOver.accesskey "o">
<!ENTITY stop.label "Stop">
<!ENTITY stop.accesskey "S">
<!-- LOCALIZATION NOTE (retest.label): This is the text that is
@ -65,6 +70,6 @@
<!ENTITY insecureServer.tooltip.title "Warning! This is an insecure server.">
<!ENTITY insecureServer.tooltip.details "Click circle for more details.">
<!ENTITY insecureClearText.description "Email is sent in clear-text, so your email could be read by attackers, etc. &brandShortName; will let you get to your mail, but you should really get your email provider to configure the server with a secure connection.">
<!ENTITY insecureCleartext.description "Email is sent in clear-text, so your email could be read by other people on the internet. &brandShortName; will let you get to your mail, but you should really get your email provider to configure the server with a secure connection.">
<!ENTITY insecureSelfSigned.description "The server uses a certificate that we can't trust, so we can't be sure that someone isn't intercepting the traffic between &brandShortName; and your server. &brandShortName; will let you get to your mail, but you should really get your email provider to configure the server with a trusted certificate.">
<!ENTITY secureServer.description "Congratulations! This is a secure server.">

Просмотреть файл

@ -1,7 +1,8 @@
# accountCreation.properties
# LOCALIZATION NOTE: %1$S will be the hostname of the server the user was trying to connect to.
# LOCALIZATION NOTE(cleartext_warning): %1$S will be the hostname of the server the user was trying to connect to.
cleartext_warning=%1$S does not use encryption.
# LOCALIZATION NOTE(selfsigned_warning): %1$S will be the hostname of the server the user was trying to connect to.
selfsigned_warning=%1$S does not use a trusted certificate.
selfsigned_details=Normally, a secure mail server will present a trusted certificate to prove that it is really the server it claims to be. The connection to the mail server will be encrypted but cannot be validated as being the correct server.
cleartext_details=Insecure mail servers do not use encrypted connections to protect your passwords and private information. By connecting to this server you could expose your password and private information.
@ -10,10 +11,13 @@ cleartext_details=Insecure mail servers do not use encrypted connections to prot
default_server_tag= (default)
# config titles
searching_for_configs=Searching…
# LOCALIZATION NOTE(looking_up_settings): %1$S will be the brandShortName.
looking_up_settings=%1$S is looking up the settings for your email account.
manually_edit_config=Editing Config
finished_with_success=Finished
finished_with_error=Error
# LOCALIZATION NOTE(found_settings): %1$S will be the brandShortName.
found_settings=%1$S has found the settings for your email account.
# LOCALIZATION NOTE(failed_to_find_settings): %1$S will be the brandShortName.
failed_to_find_settings=%1$S failed to find the settings for your email account.
# config subtitles
check_preconfig=checking for pre-configuration…
@ -45,6 +49,5 @@ no_encryption=No encryption
ssl_tls=SSL/TLS
starttls=STARTTLS
name.error=Please enter your name, as it should be shown to your correspondents.
email.error=Double check this email address!
password.error=Login did not succeed. Please double-check username and password.
please_enter_name=Please enter your name.
double_check_email=Double check this email address!

Просмотреть файл

@ -0,0 +1,28 @@
<!ENTITY window.width "36em">
<!ENTITY cookiesonsystem.label "The following cookies are stored on your computer:">
<!ENTITY cookiename.label "Cookie Name">
<!ENTITY cookiedomain.label "Site">
<!ENTITY button.removecookie.label "Remove Cookie">
<!ENTITY button.removecookie.accesskey "R">
<!ENTITY button.removeallcookies.label "Remove All Cookies">
<!ENTITY button.removeallcookies.accesskey "A">
<!ENTITY props.name.label "Name:">
<!ENTITY props.value.label "Content:">
<!ENTITY props.domain.label "Host:">
<!ENTITY props.path.label "Path:">
<!ENTITY props.secure.label "Send For:">
<!ENTITY props.expires.label "Expires:">
<!ENTITY window.title "Cookies">
<!ENTITY windowClose.key "w">
<!ENTITY focusSearch1.key "f">
<!ENTITY focusSearch2.key "k">
<!ENTITY filter.label "Search:">
<!ENTITY filter.accesskey "S">
<!ENTITY button.close.label "Close">
<!ENTITY button.close.accesskey "C">

Просмотреть файл

@ -0,0 +1,22 @@
<!ENTITY window.title "Exceptions">
<!ENTITY window.width "36em">
<!ENTITY treehead.sitename.label "Site">
<!ENTITY treehead.status.label "Status">
<!ENTITY removepermission.label "Remove Site">
<!ENTITY removepermission.accesskey "R">
<!ENTITY removeallpermissions.label "Remove All Sites">
<!ENTITY removeallpermissions.accesskey "e">
<!ENTITY address.label "Address of web site:">
<!ENTITY address.accesskey "d">
<!ENTITY block.label "Block">
<!ENTITY block.accesskey "B">
<!ENTITY session.label "Allow for Session">
<!ENTITY session.accesskey "S">
<!ENTITY allow.label "Allow">
<!ENTITY allow.accesskey "A">
<!ENTITY windowClose.key "w">
<!ENTITY button.close.label "Close">
<!ENTITY button.close.accesskey "C">

Просмотреть файл

@ -65,3 +65,25 @@ attachmentReminderAddDialogTitle=Add Keyword
attachmentReminderAddText=Keyword:
attachmentReminderEditDialogTitle=Edit Keyword
attachmentReminderEditText=Keyword:
#### Cookies
cookiepermissionstitle=Exceptions - Cookies
cookiepermissionstext=You can specify which web sites are always or never allowed to use cookies. Type the exact address of the site you want to manage and then click Block, Allow for Session, or Allow.
invalidURI=Please enter a valid hostname
invalidURITitle=Invalid Hostname Entered
#### Cookie Viewer
hostColon=Host:
domainColon=Domain:
forSecureOnly=Encrypted connections only
forAnyConnection=Any type of connection
AtEndOfSession=at end of session
can=Allow
canSession=Allow for Session
cannot=Block
noCookieSelected=<no cookie selected>
cookiesAll=The following cookies are stored on your computer:
cookiesFiltered=The following cookies match your search:
removeCookies=Remove Cookies
removeCookie=Remove Cookie

Просмотреть файл

@ -2,6 +2,7 @@
<!ENTITY itemPhishing.label "E-mail Scams">
<!ENTITY itemPasswords.label "Passwords">
<!ENTITY itemAntiVirus.label "Anti-Virus">
<!ENTITY itemCookies.label "Web Content">
<!-- Junk Mail Controls -->
<!ENTITY junkMail.intro "Set your default junk mail settings. Account-specific junk mail settings can be configured in Account Settings.">
@ -41,3 +42,18 @@
<!ENTITY antiVirus.intro "&brandShortName; can make it easy for anti-virus software to analyze incoming mail messages for viruses before they are stored locally.">
<!ENTITY antiVirus.label "Allow anti-virus clients to quarantine individual incoming messages">
<!ENTITY antiVirus.accesskey "A">
<!-- Cookies -->
<!ENTITY cookies.intro "&brandShortName; lets you specify which blogs, news feeds, and other web sites are allowed to set cookies.">
<!ENTITY acceptCookies.label "Accept cookies from sites">
<!ENTITY acceptCookies.accesskey "c">
<!ENTITY keepUntil.label "Keep until:">
<!ENTITY keepUntil.accesskey "K">
<!ENTITY expire.label "they expire">
<!ENTITY close.label "I close &brandShortName;">
<!ENTITY askEachTime.label "ask me every time">
<!ENTITY cookieExceptions.label "Exceptions…">
<!ENTITY cookieExceptions.accesskey "E">
<!ENTITY showCookies.label "Show Cookies…">
<!ENTITY showCookies.accesskey "S">

Просмотреть файл

@ -135,6 +135,8 @@
locale/@AB_CD@/messenger/preferences/offline.dtd (%chrome/messenger/preferences/offline.dtd)
locale/@AB_CD@/messenger/preferences/notifications.dtd (%chrome/messenger/preferences/notifications.dtd)
locale/@AB_CD@/messenger/preferences/preferences.properties (%chrome/messenger/preferences/preferences.properties)
locale/@AB_CD@/messenger/preferences/cookies.dtd (%chrome/messenger/preferences/cookies.dtd)
locale/@AB_CD@/messenger/preferences/permissions.dtd (%chrome/messenger/preferences/permissions.dtd)
locale/@AB_CD@/messenger/migration/migration.dtd (%chrome/messenger/migration/migration.dtd)
locale/@AB_CD@/messenger/migration/migration.properties (%chrome/messenger/migration/migration.properties)
locale/@AB_CD@/messenger/searchIntegrationWin.dtd (%chrome/messenger/searchIntegrationWin.dtd)

Просмотреть файл

@ -108,7 +108,6 @@ classic.jar:
skin/classic/messenger/icons/cancel.png (mail/icons/cancel.png)
skin/classic/messenger/icons/mail-toolbar.png (mail/icons/mail-toolbar.png)
skin/classic/messenger/icons/mail-toolbar-small.png (mail/icons/mail-toolbar-small.png)
skin/classic/messenger/icons/folder.png (mail/icons/folder.png)
skin/classic/messenger/icons/folder-pane.png (mail/icons/folder-pane.png)
skin/classic/messenger/icons/folder-blank.png (mail/icons/folder-blank.png)
skin/classic/messenger/icons/folder-new-star.png (mail/icons/folder-new-star.png)

Просмотреть файл

@ -8,6 +8,15 @@
font-size: 0.85em;
}
#back_button {
border: none;
-moz-appearance: none;
color: -moz-nativehyperlinktext;
text-decoration: underline;
background-color: inherit;
cursor: pointer;
}
.clickable_label:hover {
text-decoration: underline;
cursor: pointer;
@ -40,10 +49,15 @@
}
.errordescription {
padding: 2px 1ex;
color: InfoText;
background-color: InfoBackground;
-moz-border-radius: 4px;
margin-top: 3px;
-moz-padding-start: 3px;
}
.initialDesc {
margin-top: 2px;
color: GrayText;
}
.edited_label {
@ -109,7 +123,6 @@ description.explanation {
}
#config_status_title {
font-size: larger;
font-weight: bold;
}
@ -119,10 +132,6 @@ description.explanation {
font-style: italic;
}
vbox.statusimage {
padding-top: 6px;
}
/* Missing:
* label.bignumber
* hbox.stepheading
@ -176,18 +185,19 @@ image.insecureLarry {
height: 64px;
width: 64px;
padding: 0;
list-style-image: url("chrome://global/skin/icons/sslWarning.png");
background: url("chrome://global/skin/icons/sslWarning.png") no-repeat;
}
image.secureLarry {
height: 64px;
width: 64px;
padding: 0;
list-style-image: url("chrome://messenger/skin/icons/identity.png");
background: url("chrome://messenger/skin/icons/identity.png") no-repeat;
}
vbox.mastervbox {
padding: 14px;
background: #F4F4F4;
}
vbox.icon[state='strong'] {
@ -206,10 +216,11 @@ vbox.icon[state='weak'] {
background-image: url("chrome://messenger/skin/icons/insecure.png");
}
.warningbox {
#warningbox {
width: 800px;
height: 485px;
background: #333333 none repeat scroll 0% 0%;
padding: 1em;
overflow: auto;
}
.warning {
@ -268,7 +279,6 @@ vbox.settings {
}
.title {
font-weight: bold;
padding: 0px 3px;
}
@ -289,13 +299,26 @@ label.textbox-label {
border-bottom: 1px dotted InactiveBorder;
}
.protocol,
textbox.security {
.protocol {
width: 8em;
}
.protocol > label {
-moz-padding-start: 6px;
}
.security {
width: 10em;
}
textbox.port {
width: 5em;
width: 4em;
}
textbox.username {
width: 12em;
margin-bottom: 4px !important;
margin-top: 4px !important;
}
textbox.host {
@ -355,3 +378,17 @@ row.heading {
.technical_details[expanded] {
background-image: url("chrome://messenger/skin/section_expanded.png");
}
label.autoconfigLabel {
width: 100px;
text-align: right;
}
label.textbox-label {
width: 58px;
text-align: right;
}
vbox.initialSettings textbox {
width: 280px;
}

Просмотреть файл

@ -20,6 +20,7 @@
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Magnus Melin <mkmelin+mozilla@iki.fi>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
@ -41,95 +42,96 @@
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
/* ::::: folder icons for menus ::::: */
/* ::::: Folder icons for menus ::::: */
/* Folders */
.folderMenuItem {
list-style-image: url("chrome://messenger/skin/icons/folder.png");
-moz-image-region: rect(0 16px 16px 0);
}
.folderMenuItem[open="true"] {
-moz-image-region: rect(0 32px 16px 16px);
list-style-image: url("moz-icon://stock/gtk-directory?size=menu");
}
/* Newsgroup */
.folderMenuItem[ServerType="nntp"] {
-moz-image-region: rect(0 160px 16px 144px);
list-style-image: url("chrome://messenger/skin/icons/folder-pane.png");
-moz-image-region: rect(208px 16px 224px 0px);
}
/* Feed */
.folderMenuItem[ServerType="rss"] {
list-style-image: url("chrome://messenger-newsblog/skin/icons/rss-feed.png");
-moz-image-region: rect(0 16px 16px 0);
list-style-image: url("chrome://messenger/skin/icons/folder-pane.png");
-moz-image-region: rect(112px 16px 128px 0px);
}
/* Resets list-style-image for Feed Trash and Virtual folders */
.folderMenuItem[ServerType="rss"][SpecialFolder="Trash"],
.folderMenuItem[ServerType="rss"][SpecialFolder="Virtual"] {
list-style-image: url("chrome://messenger/skin/icons/folder.png");
}
/* ..... special folders ..... */
.folderMenuItem[SpecialFolder="Inbox"] {
-moz-image-region: rect(0 48px 16px 32px);
list-style-image: url("chrome://messenger/skin/icons/folder-pane.png");
-moz-image-region: rect(64px 16px 80px 0px);
}
.folderMenuItem[SpecialFolder="Sent"] {
-moz-image-region: rect(0 64px 16px 48px);
list-style-image: url("chrome://messenger/skin/icons/folder-pane.png");
-moz-image-region: rect(144px 16px 160px 0px);
}
.folderMenuItem[SpecialFolder="Outbox"] {
-moz-image-region: rect(0 80px 16px 64px);
list-style-image: url("chrome://messenger/skin/icons/folder-pane.png");
-moz-image-region: rect(96px 16px 112px 0px);
}
.folderMenuItem[SpecialFolder="Drafts"] {
-moz-image-region: rect(0 96px 16px 80px);
list-style-image: url("chrome://messenger/skin/icons/folder-pane.png");
-moz-image-region: rect(48px 16px 64px 0px);
}
.folderMenuItem[SpecialFolder="Templates"] {
-moz-image-region: rect(0 112px 16px 96px);
list-style-image: url("chrome://messenger/skin/icons/folder-pane.png");
-moz-image-region: rect(160px 16px 176px 0px);
}
.folderMenuItem[SpecialFolder="Junk"] {
-moz-image-region: rect(0 128px 16px 112px);
list-style-image: url("chrome://messenger/skin/icons/folder-pane.png");
-moz-image-region: rect(80px 16px 96px 0px);
}
.folderMenuItem[SpecialFolder="Trash"] {
-moz-image-region: rect(0 144px 16px 128px);
list-style-image: url("chrome://messenger/skin/icons/folder-pane.png");
-moz-image-region: rect(176px 16px 192px 0px);
}
.folderMenuItem[SpecialFolder="Archive"] {
list-style-image: url("chrome://messenger/skin/icons/folder-pane.png");
-moz-image-region: rect(192px 16px 208px 0px);
}
.folderMenuItem[SpecialFolder="Virtual"] {
-moz-image-region: rect(0 176px 16px 160px);
list-style-image: url("chrome://messenger/skin/icons/folder-pane.png");
-moz-image-region: rect(128px 16px 144px 0px);
}
/* ..... servers ..... */
/** IMAP/POP/movemail account nodes */
.folderMenuItem[IsServer="true"] {
list-style-image: url("chrome://messenger/skin/icons/server.png");
-moz-image-region: rect(0 16px 16px 0);
list-style-image: url("chrome://messenger/skin/icons/folder-pane.png");
-moz-image-region: rect(16px 16px 32px 0px);
}
.folderMenuItem[IsServer="true"][ServerType="imap"][IsSecure="true"],
.folderMenuItem[IsServer="true"][ServerType="pop3"][IsSecure="true"] {
-moz-image-region: rect(0 32px 16px 16px);
}
/* Local folders */
/* Local folders account node */
.folderMenuItem[IsServer="true"][ServerType="none"] {
-moz-image-region: rect(0 48px 16px 32px);
-moz-image-region: rect(0px 16px 16px 0px);
}
/* News server */
.folderMenuItem[IsServer="true"][ServerType="nntp"] {
-moz-image-region: rect(0 64px 16px 48px);
list-style-image: url("chrome://messenger/skin/icons/server.png");
-moz-image-region: rect(0px 64px 16px 48px);
}
/** Secure news server */
.folderMenuItem[IsServer="true"][ServerType="nntp"][IsSecure="true"] {
-moz-image-region: rect(0 80px 16px 64px) !important;
list-style-image: url("chrome://messenger/skin/icons/server.png");
-moz-image-region: rect(0px 80px 16px 64px);
}
/* Feed server */
/* Feed account node */
.folderMenuItem[IsServer="true"][ServerType="rss"] {
list-style-image: url("chrome://messenger-newsblog/skin/icons/server-rss.png");
list-style-image: url("chrome://messenger/skin/icons/folder-pane.png");
-moz-image-region: rect(32px 16px 48px 0px);
}

Просмотреть файл

@ -11,9 +11,7 @@ treechildren::-moz-tree-image(folderNameCol) {
-moz-background-origin: border;
background-image: url("moz-icon://stock/gtk-directory?size=menu");
list-style-image: url("chrome://messenger/skin/icons/folder-blank.png");
}
treechildren::-moz-tree-image(folderNameCol) {
-moz-margin-end: 2px;
}
@ -27,24 +25,6 @@ treechildren::-moz-tree-image(folderNameCol, selected, open, newMessages-true) {
list-style-image: url("chrome://messenger/skin/icons/folder-new-star.png");
}
/* ..... Newsgroup ..... */
.tabmail-tab[type="folder"][ServerType="nntp"] > .tab-image-middle > .tab-icon-image,
treechildren::-moz-tree-image(folderNameCol, serverType-nntp) {
background-image: none;
list-style-image: url("chrome://messenger/skin/icons/folder.png");
-moz-image-region: rect(0 160px 16px 144px);
}
/* ..... Feed ..... */
.tabmail-tab[type="folder"][ServerType="rss"] > .tab-image-middle > .tab-icon-image,
treechildren::-moz-tree-image(folderNameCol, serverType-rss) {
background-image: url("chrome://messenger/skin/icons/folder-pane.png");
background-position: left -112px;
list-style-image: url("chrome://messenger/skin/icons/folder-blank.png");
}
treechildren::-moz-tree-image(folderNameCol, serverType-rss, newMessages-true) {
background-image: url("chrome://messenger/skin/icons/folder-pane.png");
background-position: left -112px;
@ -158,12 +138,23 @@ treechildren::-moz-tree-image(folderNameCol, specialFolder-Virtual) {
}
/* ..... Newsgroup ..... */
.tabmail-tab[type="folder"][ServerType="nntp"] > .tab-image-middle > .tab-icon-image {
.tabmail-tab[type="folder"][ServerType="nntp"] > .tab-image-middle > .tab-icon-image,
treechildren::-moz-tree-image(folderNameCol, serverType-nntp) {
background-image: url("chrome://messenger/skin/icons/folder-pane.png");
background-position: left -208px;
list-style-image: url("chrome://messenger/skin/icons/folder-blank.png");
}
/* ..... Feed ..... */
.tabmail-tab[type="folder"][ServerType="rss"] > .tab-image-middle > .tab-icon-image,
treechildren::-moz-tree-image(folderNameCol, serverType-rss) {
background-image: url("chrome://messenger/skin/icons/folder-pane.png");
background-position: left -112px;
list-style-image: url("chrome://messenger/skin/icons/folder-blank.png");
}
/* ..... Account nodes ..... */
.tabmail-tab[type="folder"][IsServer="true"] > .tab-image-middle > .tab-icon-image {
-moz-margin-start: 0px;
@ -199,16 +190,20 @@ treechildren::-moz-tree-image(folderNameCol, specialFolder-Virtual) {
-moz-image-region: rect(0 80px 16px 64px);
}
treechildren::-moz-tree-image(folderNameCol, specialFolder-Virtual, newMessages-true) {
list-style-image: url("chrome://messenger/skin/icons/folder.png");
-moz-image-region: rect(16px 176px 32px 160px);
}
treechildren::-moz-tree-cell-text(folderNameCol, newMessages-true),
treechildren::-moz-tree-cell-text(folderNameCol, specialFolder-Inbox, newMessages-true) {
font-weight: bold;
}
treechildren::-moz-tree-image(folderNameCol, biffState-NewMail, isServer-true) {
background-position: left -16px;
list-style-image: url("chrome://messenger/skin/icons/folder-new-star.png");
}
treechildren::-moz-tree-image(folderNameCol, specialFolder-Virtual, newMessages-true) {
list-style-image: url("chrome://messenger/skin/icons/folder-new-star.png");
}
/* ..... Mail server ..... */
treechildren::-moz-tree-image(folderNameCol, isServer-true) {
@ -217,11 +212,6 @@ treechildren::-moz-tree-image(folderNameCol, isServer-true) {
list-style-image: url("chrome://messenger/skin/icons/folder-blank.png");
}
treechildren::-moz-tree-image(folderNameCol, biffState-NewMail, isServer-true) {
background-position: left -16px;
list-style-image: url("chrome://messenger/skin/icons/folder-new-star.png");
}
/* ..... Secure mail server ..... */
treechildren::-moz-tree-image(folderNameCol, isServer-true, serverType-pop3, isSecure-true),

Двоичные данные
mail/themes/gnomestripe/mail/icons/folder.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 6.9 KiB

Просмотреть файл

@ -63,6 +63,18 @@
min-width: 1px;
}
#expandedHeaderRows > row,
#expandedHeader2Rows > row {
/* Ensure that the header names and values are aligned with each other. */
-moz-box-align: baseline;
}
#expandedHeadersTopBox {
/* Ensure that the space between the from row and the one after is
identical to the spacing between the subsequent header lines. */
-moz-box-align: end;
}
#otherActionsButton {
margin-bottom: .1em;
padding-top: 0px;
@ -74,10 +86,6 @@ header-view-button-box {
padding: 0px;
}
#expandedfromBox {
padding-top: 0.5em;
}
#expandedsubjectBox > .headerValue {
font-weight: bold;
}
@ -276,11 +284,6 @@ description[selectable="true"]:focus > descriptionitem[selected="true"]
-moz-border-left-colors: transparent threedhighlight threedlightshadow;
}
.headerNameBox {
width: 7.7em;
background-color: transparent;
}
.headerName {
color: #888a85; /* lower contrast */
text-align: right;
@ -303,7 +306,6 @@ description[selectable="true"]:focus > descriptionitem[selected="true"]
line-height: 1.4em;
-moz-appearance: none !important;
-moz-appearance: none;
padding: 0px !important;
margin: 0px !important;
@ -492,4 +494,5 @@ mail-multi-emailHeaderField,
mail-headerfield {
margin: 0;
padding: 0;
-moz-box-align: baseline;
}

Просмотреть файл

@ -20,9 +20,10 @@
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Joe Hewitt (hewitt@netscape.com)
* Håkan Waara (hwaara@chello.se)
* Jan Varga (varga@nixcorp.com)
* Joe Hewitt <hewitt@netscape.com>
* Håkan Waara <hwaara@chello.se>
* Jan Varga <varga@nixcorp.com>
* Magnus Melin <mkmelin+mozilla@iki.fi>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
@ -39,150 +40,14 @@
* ***** END LICENSE BLOCK ***** */
/* ===== msgSelectOffline.css =================================================
== Styles for the Offline Use dialog.
======================================================================= */
== The dialog where you select which folders to enable for offline use.
========================================================================== */
@import url("chrome://messenger/skin/");
@import url("chrome://messenger/skin/folderPane.css");
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
/* ::::: Mail Folders ::::: */
treechildren::-moz-tree-image(folderNameCol) {
-moz-margin-end: 2px;
list-style-image: url("chrome://messenger/skin/icons/folder.png");
-moz-image-region: rect(0 16px 16px 0);
}
treechildren::-moz-tree-image(folderNameCol, newMessages-true) {
-moz-image-region: rect(16px 16px 32px 0);
}
/* ..... Inbox ..... */
treechildren::-moz-tree-image(folderNameCol, specialFolder-Inbox) {
-moz-image-region: rect(0 48px 16px 32px);
}
treechildren::-moz-tree-image(folderNameCol, specialFolder-Inbox, newMessages-true) {
-moz-image-region: rect(16px 48px 32px 32px);
}
/* ..... Sent ..... */
treechildren::-moz-tree-image(folderNameCol, specialFolder-Sent) {
-moz-image-region: rect(0 64px 16px 48px);
}
/* ..... Unsent ..... */
treechildren::-moz-tree-image(folderNameCol, specialFolder-Outbox) {
-moz-image-region: rect(0 80px 16px 64px);
}
/* ..... Drafts ..... */
treechildren::-moz-tree-image(folderNameCol, specialFolder-Drafts) {
-moz-image-region: rect(0 96px 16px 80px);
}
/* ..... Templates ..... */
treechildren::-moz-tree-image(folderNameCol, specialFolder-Templates) {
-moz-image-region: rect(0 112px 16px 96px);
}
/* ..... Junk ..... */
treechildren::-moz-tree-image(folderNameCol, specialFolder-Junk) {
-moz-image-region: rect(0 128px 16px 112px);
}
/* ..... Trash ..... */
treechildren::-moz-tree-image(folderNameCol, specialFolder-Trash) {
-moz-image-region: rect(0 144px 16px 128px);
}
/* ..... Shared folders .....
treechildren::-moz-tree-image(folderNameCol, imapShared-true) {
-moz-image-region: rect(0 192px 16px 176px);
}
*/
/* ..... Mail server ..... */
treechildren::-moz-tree-image(folderNameCol, isServer-true) {
list-style-image: url("chrome://messenger/skin/icons/server.png");
-moz-image-region: rect(0 16px 16px 0);
}
treechildren::-moz-tree-image(folderNameCol, biffState-NewMail, isServer-true) {
-moz-image-region: rect(16px 16px 32px 0);
}
treechildren::-moz-tree-cell-text(folderNameCol, newMessages-true),
treechildren::-moz-tree-cell-text(folderNameCol, specialFolder-Inbox, newMessages-true) {
font-weight: bold;
}
/* ..... Secure mail server ..... */
treechildren::-moz-tree-image(folderNameCol, isServer-true, serverType-pop3, isSecure-true),
treechildren::-moz-tree-image(folderNameCol, isServer-true, serverType-imap, isSecure-true) {
-moz-image-region: rect(0 32px 16px 16px);
}
treechildren::-moz-tree-image(folderNameCol, biffState-NewMail, isServer-true, isSecure-true) {
-moz-image-region: rect(16px 32px 32px 16px);
}
/* ..... Local folders ..... */
treechildren::-moz-tree-image(folderNameCol, isServer-true, serverType-none) {
-moz-image-region: rect(0 48px 16px 32px);
}
treechildren::-moz-tree-image(folderNameCol, isServer-true, serverType-none, biffState-NewMail) {
-moz-image-region: rect(16px 48px 32px 32px);
}
/* ..... News server ..... */
treechildren::-moz-tree-image(folderNameCol, isServer-true, serverType-nntp) {
-moz-image-region: rect(0 64px 16px 48px) !important;
}
treechildren::-moz-tree-image(folderNameCol, isServer-true, serverType-nntp, isSecure-true) {
-moz-image-region: rect(0 80px 16px 64px) !important;
}
/* ..... Newsgroup ..... */
treechildren::-moz-tree-image(folderNameCol, serverType-nntp) {
-moz-image-region: rect(0 160px 16px 144px);
}
/* ::::: All Servers ::::: */
treechildren::-moz-tree-cell-text(closed, subfoldersHaveUnreadMessages-true) {
font-weight: bold;
}
treechildren::-moz-tree-cell-text(folderNameCol, isServer-true),
treechildren::-moz-tree-cell-text(hasUnreadMessages-true) {
font-weight: bold;
}
treechildren::-moz-tree-cell-text(folderNameCol, noSelect-true) {
color: gray;
font-style: italic;
}
/* ::::: Download Icons ::::: */
treechildren::-moz-tree-image(syncCol) {
list-style-image: url("chrome://messenger/skin/icons/notchecked.gif");
}

Просмотреть файл

@ -36,7 +36,7 @@
*
* ***** END LICENSE BLOCK ****** */
/* ::::: Feed Subscription UI icons :::::: */
/* ::::: Feed Subscription styling :::::: */
#subscriptionsDialog {
padding: 0px;
@ -47,18 +47,22 @@
}
#subscriptionChildren::-moz-tree-image(folderNameCol) {
-moz-margin-end: 2px;
list-style-image: url("chrome://messenger-newsblog/skin/icons/rss-feed.png");
-moz-image-region: rect(0 16px 16px 0);
list-style-image: url("chrome://messenger/skin/icons/folder-pane.png");
-moz-image-region: rect(128px 16px 144px 0px);
}
#subscriptionChildren::-moz-tree-image(folderNameCol, container) {
list-style-image: url("chrome://messenger/skin/icons/folder.png");
-moz-image-region: rect(0 16px 16px 0);
}
background-position: center center;
background-repeat: no-repeat;
background-color: transparent;
background-attachment: scroll;
-moz-background-clip: border;
-moz-background-inline-policy: continuous;
-moz-background-origin: border;
background-image: url("moz-icon://stock/gtk-directory?size=menu");
list-style-image: url("chrome://messenger/skin/icons/folder-blank.png");
#subscriptionChildren::-moz-tree-image(folderNameCol, container, open) {
-moz-image-region: rect(0 32px 16px 16px);
-moz-margin-end: 2px;
}
#rssFeedInfoBox {

Просмотреть файл

@ -3,6 +3,7 @@
======================================================================= */
@import url("chrome://messenger/skin/");
@import url("chrome://messenger/skin/folderMenus.css");
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@ -28,35 +29,28 @@ treechildren::-moz-tree-cell-text(nameColumn, Subscribable-false) {
font-style: italic;
}
/* ::::: Folders :::::: */
/* IMAP Folders*/
treechildren::-moz-tree-image(nameColumn) {
background-position: center center;
background-repeat: no-repeat;
background-color: transparent;
background-attachment: scroll;
-moz-background-clip: border;
-moz-background-inline-policy: continuous;
-moz-background-origin: border;
background-image: url("moz-icon://stock/gtk-directory?size=menu");
list-style-image: url("chrome://messenger/skin/icons/folder-blank.png");
-moz-margin-end: 2px;
list-style-image: url("chrome://messenger/skin/icons/folder.png");
-moz-image-region: rect(0 16px 16px 0);
}
/* Newsgroups */
treechildren::-moz-tree-image(nameColumn, ServerType-nntp),
treechildren::-moz-tree-image(nameColumn2, nntp) {
background-image: url("chrome://messenger/skin/icons/folder-pane.png");
background-position: left -208px;
list-style-image: url("chrome://messenger/skin/icons/folder-blank.png");
-moz-margin-end: 2px;
-moz-image-region: rect(0 160px 16px 144px);
}
/* ::::: Servers :::::: */
.subscribeMenuItem {
list-style-image: url("chrome://messenger/skin/icons/server.png");
-moz-image-region: rect(0 16px 16px 0);
}
.subscribeMenuItem[ServerType="imap"][IsSecure="true"] {
-moz-image-region: rect(0 32px 16px 16px);
}
.subscribeMenuItem[ServerType="nntp"] {
-moz-image-region: rect(0 64px 16px 48px);
}
.subscribeMenuItem[ServerType="nntp"][IsSecure="true"] {
-moz-image-region: rect(0 80px 16px 64px);
}

Просмотреть файл

@ -3,6 +3,15 @@
* .smaller-button
*/
#back_button {
border: none;
-moz-appearance: none;
color: -moz-nativehyperlinktext;
text-decoration: underline;
background-color: inherit;
cursor: pointer;
}
.clickable_label:hover {
text-decoration: underline;
cursor: pointer;
@ -35,9 +44,13 @@
}
.errordescription {
-moz-padding-start: 4px;
padding-top: 4px;
color: rgb(244,50,50);
-moz-padding-start: 3px;
margin-top: 3px;
}
.initialDesc {
margin-top: 2px;
color: GrayText;
}
.edited_label {
@ -92,10 +105,6 @@ description.explanation {
* #config_status_subtitle
*/
vbox.statusimage {
padding-top: 6px;
}
label.bignumber {
font-size: larger;
font-weight: bolder;
@ -156,18 +165,19 @@ image.insecureLarry {
height: 64px;
width: 64px;
padding: 0;
list-style-image: url("chrome://global/skin/icons/sslWarning.png");
background: url("chrome://global/skin/icons/sslWarning.png") no-repeat;
}
image.secureLarry {
height: 64px;
width: 64px;
padding: 0;
list-style-image: url("chrome://messenger/skin/icons/identity.png");
background: url("chrome://messenger/skin/icons/identity.png") no-repeat;
}
vbox.mastervbox {
padding: 14px;
background: #F4F4F4;
}
vbox.icon[state='strong'] {
@ -186,7 +196,9 @@ vbox.icon[state='weak'] {
background-image: url("chrome://messenger/skin/icons/insecure.png");
}
.warningbox {
#warningbox {
width: 650px;
height: 400px;
background: #333333 none repeat scroll 0% 0%;
padding: 1em;
overflow: auto;
@ -271,12 +283,22 @@ vbox.settings {
width: 8em;
}
textbox.security {
width: 8em;
.protocol > label {
-moz-padding-start: 6px;
}
.security {
width: 10em;
}
textbox.port {
width: 5em;
width: 4em;
}
textbox.username {
width: 14em;
margin-bottom: 4px !important;
margin-top: 4px !important;
}
textbox.host {
@ -375,3 +397,17 @@ menulist[editable="true"].clickable > .menulist-dropmarker{
.technical_details[expanded] {
background-image: url("chrome://messenger/skin/section_expanded.png");
}
label.autoconfigLabel {
width: 80px;
text-align: right;
}
label.textbox-label {
width: 58px;
text-align: right;
}
vbox.initialSettings textbox {
width: 280px;
}

Просмотреть файл

@ -62,6 +62,18 @@
min-width: 1px;
}
#expandedHeaderRows > row,
#expandedHeader2Rows > row {
/* Ensure that the header names and values are aligned with each other. */
-moz-box-align: baseline;
}
#expandedHeadersTopBox {
/* Ensure that the space between the from row and the one after is
identical to the spacing between the subsequent header lines. */
-moz-box-align: end;
}
#otherActionsButton {
margin-bottom: 0.1em;
background: none;
@ -105,10 +117,6 @@ header-view-button-box {
padding: 0px;
}
#expandedfromBox {
padding-top: 0.5em;
}
#expandedsubjectBox > .headerValue {
font-weight: bold;
}
@ -323,12 +331,6 @@ description[selectable="true"]:focus > descriptionitem[selected="true"]
color: inherit;
}
.headerNameBox {
width: 7em;
background-color: transparent;
}
.headerName {
color: #888a85; /* lower contrast */
text-align: right;
@ -338,12 +340,8 @@ description[selectable="true"]:focus > descriptionitem[selected="true"]
-moz-margin-end: 0;
}
.headerValueBox {
overflow: visible;
}
.headerValueBox {
margin-bottom: 0 !important;
padding-bottom: 0 !important;
}
@ -355,7 +353,6 @@ description[selectable="true"]:focus > descriptionitem[selected="true"]
line-height: 1.4em;
-moz-appearance: none !important;
-moz-appearance: none;
padding: 0px !important;
margin: 0px !important;
@ -553,4 +550,5 @@ mail-multi-emailHeaderField,
mail-headerfield {
margin: 0;
padding: 0;
-moz-box-align: baseline;
}

Просмотреть файл

@ -39,6 +39,18 @@
# ***** END LICENSE BLOCK *****
*/
.windowDialog {
padding: 12px;
font: -moz-dialog;
}
#permissionsText {
font: small-caption;
font-weight: normal;
line-height: 1.3em;
margin-bottom: 4px !important;
}
#MailPreferences:not([active="true"]) > .paneSelector > radio {
opacity: 0.7;
}

Просмотреть файл

@ -328,8 +328,8 @@ classic.jar:
skin/classic/aero/messenger/smime/icons/sbSignUnknown.png (mail/smime/sbSignUnknown.png)
skin/classic/aero/messenger/icons/new-mail-alert.png (mail/icons/new-mail-alert.png)
skin/classic/aero/messenger/icons/readmail.png (mail/icons/readmail.png)
skin/classic/aero/messenger/icons/mail-toolbar.png (mail/icons/mail-toolbar.png)
skin/classic/aero/messenger/icons/mail-toolbar-small.png (mail/icons/mail-toolbar-small.png)
skin/classic/aero/messenger/icons/mail-toolbar.png (mail/icons/mail-toolbar-aero.png)
skin/classic/aero/messenger/icons/mail-toolbar-small.png (mail/icons/mail-toolbar-small-aero.png)
skin/classic/aero/messenger/icons/folder.png (mail/icons/folder-aero.png)
skin/classic/aero/messenger/icons/message.png (mail/icons/message-aero.png)
skin/classic/aero/messenger/icons/attachment-deleted.png (mail/icons/attachment-deleted.png)

Просмотреть файл

@ -8,6 +8,15 @@
font-size: 0.85em;
}
#back_button {
border: none;
-moz-appearance: none;
color: -moz-nativehyperlinktext;
text-decoration: underline;
background-color: inherit;
cursor: pointer;
}
.clickable_label:hover {
text-decoration: underline;
cursor: pointer;
@ -28,9 +37,13 @@
*/
.errordescription {
-moz-padding-start: 4px;
padding-top: 4px;
color: rgb(244,50,50);
-moz-padding-start: 3px;
margin-top: 3px;
}
.initialDesc {
margin-top: 2px;
color: GrayText;
}
.edited_label {
@ -68,9 +81,8 @@ menulist[disabled="true"] > .menulist-dropmarker {
}
#outgoing_protocol {
width: 73px;
width: 63px;
padding-top: 5px;
-moz-padding-start: 6px;
}
#outgoing_config {
@ -102,7 +114,6 @@ description.explanation {
}
#config_status_title {
font-size: larger;
font-weight: bold;
}
@ -112,10 +123,6 @@ description.explanation {
font-style: italic;
}
vbox.statusimage {
padding-top: 6px;
}
label.bignumber {
font-size: larger;
font-weight: bolder;
@ -177,18 +184,19 @@ image.insecureLarry {
height: 64px;
width: 64px;
padding: 0;
list-style-image: url("chrome://global/skin/icons/sslWarning.png");
background: url("chrome://global/skin/icons/sslWarning.png") no-repeat;
}
image.secureLarry {
height: 64px;
width: 64px;
padding: 0;
list-style-image: url("chrome://messenger/skin/icons/identity.png");
background: url("chrome://messenger/skin/icons/identity.png") no-repeat;
}
vbox.mastervbox {
padding: 14px;
background: #F4F4F4;
}
vbox.icon[state='strong'] {
@ -207,7 +215,9 @@ vbox.icon[state='weak'] {
background-image: url("chrome://messenger/skin/icons/insecure.png");
}
.warningbox {
#warningbox {
width: 650px;
height: 400px;
background: #333333 none repeat scroll 0% 0%;
padding: 1em;
overflow: auto;
@ -287,10 +297,39 @@ vbox.settings {
/* Missing:
* label.textbox-label
* .protocol
* textbox.security
* textbox.port
* textbox.host
* menulist.host
*/
.protocol > label {
-moz-padding-start: 6px;
}
.security {
width: 10em;
}
textbox.port {
width: 4em;
}
textbox.username {
width: 12em;
margin-bottom: 4px !important;
margin-top: 4px !important;
}
textbox.host {
width: 12em;
margin-bottom: 4px !important;
margin-top: 4px !important;
}
menulist.host {
width: 12em;
margin-bottom: 4px !important;
margin-top: 4px !important;
}
/* Missing:
* textbox[disabled="true"]
* label.heading
* row.heading
@ -321,3 +360,17 @@ vbox.settings {
.technical_details[expanded] {
background-image: url("chrome://messenger/skin/section_expanded.png");
}
label.autoconfigLabel {
width: 80px;
text-align: right;
}
label.textbox-label {
width: 58px;
text-align: right;
}
vbox.initialSettings textbox {
width: 280px;
}

Двоичные данные
mail/themes/qute/mail/icons/mail-toolbar-aero.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 45 KiB

Двоичные данные
mail/themes/qute/mail/icons/mail-toolbar-small-aero.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 19 KiB

Просмотреть файл

@ -63,21 +63,28 @@
min-width: 1px;
}
#expandedHeaderRows > row,
#expandedHeader2Rows > row {
/* Ensure that the header names and values are aligned with each other. */
-moz-box-align: baseline;
}
#expandedHeadersTopBox {
/* Ensure that the space between the from row and the one after is
identical to the spacing between the subsequent header lines. */
-moz-box-align: end;
}
#otherActionsButton {
margin-bottom: .1em;
padding-top: 0px;
}
/* ::::: expanded header pane ::::: */
header-view-button-box {
padding: 0px;
}
#expandedfromBox {
padding-top: 0.5em;
}
#expandedsubjectBox > .headerValue {
font-weight: bold;
}
@ -279,11 +286,6 @@ description[selectable="true"]:focus > descriptionitem[selected="true"]
color: -moz-buttonhovertext;
}
.headerNameBox {
width: 7.7em;
background-color: transparent;
}
.headerName {
color: #888a85; /* lower contrast */
text-align: right;
@ -492,4 +494,5 @@ mail-multi-emailHeaderField,
mail-headerfield {
margin: 0;
padding: 0;
-moz-box-align: baseline;
}

Просмотреть файл

@ -112,18 +112,6 @@
-moz-image-region: rect(48px 120px 72px 96px) !important;
}
#button-replylist {
-moz-image-region: rect(0px 120px 24px 96px);
}
#button-replylist:hover {
-moz-image-region: rect(24px 120px 48px 96px);
}
#button-replylist[disabled] {
-moz-image-region: rect(48px 120px 72px 96px) !important;
}
#button-forward {
-moz-image-region: rect(0px 144px 24px 120px);
}
@ -136,151 +124,175 @@
-moz-image-region: rect(48px 144px 72px 120px) !important;
}
.delete-button {
#button-replylist {
-moz-image-region: rect(0px 168px 24px 144px);
}
.delete-button:hover {
#button-replylist:hover {
-moz-image-region: rect(24px 168px 48px 144px);
}
.delete-button[disabled] {
#button-replylist[disabled] {
-moz-image-region: rect(48px 168px 72px 144px) !important;
}
#button-compact {
-moz-image-region: rect(0px 432px 24px 408px);
}
#button-compact:hover {
-moz-image-region: rect(24px 432px 48px 408px);
}
#button-compact[disabled] {
-moz-image-region: rect(48px 432px 72px 408px) !important;
}
.junk-button {
.delete-button {
-moz-image-region: rect(0px 192px 24px 168px);
}
.junk-button:hover {
.delete-button:hover {
-moz-image-region: rect(24px 192px 48px 168px);
}
.junk-button[disabled="true"] {
.delete-button[disabled] {
-moz-image-region: rect(48px 192px 72px 168px) !important;
}
#button-print {
#button-compact {
-moz-image-region: rect(0px 456px 24px 432px);
}
#button-compact:hover {
-moz-image-region: rect(24px 456px 48px 432px);
}
#button-compact[disabled] {
-moz-image-region: rect(48px 456px 72px 432px) !important;
}
.junk-button {
-moz-image-region: rect(0px 216px 24px 192px);
}
#button-print:hover {
.junk-button:hover {
-moz-image-region: rect(24px 216px 48px 192px);
}
#button-print[disabled] {
.junk-button[disabled="true"] {
-moz-image-region: rect(48px 216px 72px 192px) !important;
}
#button-stop {
#button-print {
-moz-image-region: rect(0px 240px 24px 216px);
}
#button-stop:hover {
#button-print:hover {
-moz-image-region: rect(24px 240px 48px 216px);
}
#button-stop[disabled="true"] {
#button-print[disabled] {
-moz-image-region: rect(48px 240px 72px 216px) !important;
}
#button-file {
#button-stop {
-moz-image-region: rect(0px 264px 24px 240px);
}
#button-stop:hover {
-moz-image-region: rect(24px 264px 48px 240px);
}
#button-stop[disabled="true"] {
-moz-image-region: rect(48px 264px 72px 240px) !important;
}
#button-file {
-moz-image-region: rect(0px 288px 24px 264px);
}
#button-file:hover,
#button-file[open] {
-moz-image-region: rect(24px 264px 48px 240px);
}
#button-file[disabled] {
-moz-image-region: rect(48px 264px 72px 240px) !important;
}
#button-next, #button-previous[chromedir="rtl"] {
-moz-image-region: rect(0px 288px 24px 264px);
}
#button-next:hover, #button-previous:hover[chromedir="rtl"]{
-moz-image-region: rect(24px 288px 48px 264px);
}
#button-next[disabled], #button-previous[chromedir="rtl"][disabled] {
#button-file[disabled] {
-moz-image-region: rect(48px 288px 72px 264px) !important;
}
#button-previous, #button-next[chromedir="rtl"] {
#button-next, #button-previous[chromedir="rtl"] {
-moz-image-region: rect(0px 312px 24px 288px);
}
#button-previous:hover, #button-next:hover[chromedir="rtl"]{
#button-next:hover, #button-previous:hover[chromedir="rtl"]{
-moz-image-region: rect(24px 312px 48px 288px);
}
#button-previous[disabled], #button-next[chromedir="rtl"][disabled] {
#button-next[disabled], #button-previous[chromedir="rtl"][disabled] {
-moz-image-region: rect(48px 312px 72px 288px) !important;
}
#button-mark {
#button-previous, #button-next[chromedir="rtl"] {
-moz-image-region: rect(0px 336px 24px 312px);
}
#button-mark:hover {
#button-previous:hover, #button-next:hover[chromedir="rtl"]{
-moz-image-region: rect(24px 336px 48px 312px);
}
#button-mark[disabled] {
#button-previous[disabled], #button-next[chromedir="rtl"][disabled] {
-moz-image-region: rect(48px 336px 72px 312px) !important;
}
#button-tag {
#button-mark {
-moz-image-region: rect(0px 360px 24px 336px);
}
#button-tag:hover {
#button-mark:hover {
-moz-image-region: rect(24px 360px 48px 336px);
}
#button-tag[disabled] {
#button-mark[disabled] {
-moz-image-region: rect(48px 360px 72px 336px) !important;
}
#button-goback, #button-goforward[chromedir="rtl"] {
#button-tag {
-moz-image-region: rect(0px 384px 24px 360px);
}
#button-goback:hover, #button-goforward:hover[chromedir="rtl"]{
#button-tag:hover {
-moz-image-region: rect(24px 384px 48px 360px);
}
#button-goback[disabled], #button-goforward[chromedir="rtl"][disabled] {
#button-tag[disabled] {
-moz-image-region: rect(48px 384px 72px 360px) !important;
}
#button-goforward, #button-goback[chromedir="rtl"] {
#button-goback, #button-goforward[chromedir="rtl"] {
-moz-image-region: rect(0px 408px 24px 384px);
}
#button-goforward:hover, #button-goback:hover[chromedir="rtl"]{
#button-goback:hover, #button-goforward:hover[chromedir="rtl"]{
-moz-image-region: rect(24px 408px 48px 384px);
}
#button-goforward[disabled], #button-goback[chromedir="rtl"][disabled] {
#button-goback[disabled], #button-goforward[chromedir="rtl"][disabled] {
-moz-image-region: rect(48px 408px 72px 384px) !important;
}
#button-goforward, #button-goback[chromedir="rtl"] {
-moz-image-region: rect(0px 432px 24px 408px);
}
#button-goforward:hover, #button-goback:hover[chromedir="rtl"]{
-moz-image-region: rect(24px 432px 48px 408px);
}
#button-goforward[disabled], #button-goback[chromedir="rtl"][disabled] {
-moz-image-region: rect(48px 432px 72px 408px) !important;
}
#button-archive {
-moz-image-region: rect(0px 480px 24px 456px);
}
#button-archive:hover {
-moz-image-region: rect(24px 480px 48px 456px);
}
#button-archive[disabled] {
-moz-image-region: rect(48px 480px 72px 456px) !important;
}
/* ::::: small primary toolbar buttons ::::: */
toolbar[iconsize="small"] .toolbarbutton-1 {
@ -347,18 +359,6 @@ toolbar[iconsize="small"] #button-replyall[disabled] {
-moz-image-region: rect(32px 80px 48px 64px) !important;
}
toolbar[iconsize="small"] #button-replylist {
-moz-image-region: rect(0px 80px 16px 64px);
}
toolbar[iconsize="small"] #button-replylist:hover {
-moz-image-region: rect(16px 80px 32px 64px);
}
toolbar[iconsize="small"] #button-replylist[disabled] {
-moz-image-region: rect(32px 80px 48px 64px) !important;
}
toolbar[iconsize="small"] #button-forward {
-moz-image-region: rect(0px 96px 16px 80px);
}
@ -371,175 +371,199 @@ toolbar[iconsize="small"] #button-forward[disabled] {
-moz-image-region: rect(32px 96px 48px 80px) !important;
}
toolbar[iconsize="small"] .delete-button {
toolbar[iconsize="small"] #button-replylist {
-moz-image-region: rect(0px 112px 16px 96px);
}
toolbar[iconsize="small"] .delete-button:hover {
toolbar[iconsize="small"] #button-replylist:hover {
-moz-image-region: rect(16px 112px 32px 96px);
}
toolbar[iconsize="small"] .delete-button[disabled] {
toolbar[iconsize="small"] #button-replylist[disabled] {
-moz-image-region: rect(32px 112px 48px 96px) !important;
}
toolbar[iconsize="small"] .junk-button{
toolbar[iconsize="small"] .delete-button {
-moz-image-region: rect(0px 128px 16px 112px);
}
toolbar[iconsize="small"] .junk-button:hover {
toolbar[iconsize="small"] .delete-button:hover {
-moz-image-region: rect(16px 128px 32px 112px);
}
toolbar[iconsize="small"] .junk-button[disabled="true"] {
toolbar[iconsize="small"] .delete-button[disabled] {
-moz-image-region: rect(32px 128px 48px 112px) !important;
}
toolbar[iconsize="small"] #button-print {
toolbar[iconsize="small"] .junk-button{
-moz-image-region: rect(0px 144px 16px 128px);
}
toolbar[iconsize="small"] #button-print:hover {
toolbar[iconsize="small"] .junk-button:hover {
-moz-image-region: rect(16px 144px 32px 128px);
}
toolbar[iconsize="small"] #button-print[disabled] {
toolbar[iconsize="small"] .junk-button[disabled="true"] {
-moz-image-region: rect(32px 144px 48px 128px) !important;
}
toolbar[iconsize="small"] #button-stop {
toolbar[iconsize="small"] #button-print {
-moz-image-region: rect(0px 160px 16px 144px);
}
toolbar[iconsize="small"] #button-stop:hover {
toolbar[iconsize="small"] #button-print:hover {
-moz-image-region: rect(16px 160px 32px 144px);
}
toolbar[iconsize="small"] #button-stop[disabled="true"] {
toolbar[iconsize="small"] #button-print[disabled] {
-moz-image-region: rect(32px 160px 48px 144px) !important;
}
toolbar[iconsize="small"] #button-file {
toolbar[iconsize="small"] #button-stop {
-moz-image-region: rect(0px 176px 16px 160px);
}
toolbar[iconsize="small"] #button-stop:hover {
-moz-image-region: rect(16px 176px 32px 160px);
}
toolbar[iconsize="small"] #button-stop[disabled="true"] {
-moz-image-region: rect(32px 176px 48px 160px) !important;
}
toolbar[iconsize="small"] #button-file {
-moz-image-region: rect(0px 192px 16px 176px);
}
toolbar[iconsize="small"] #button-file:hover,
toolbar[iconsize="small"] #button-file[open] {
-moz-image-region: rect(16px 176px 32px 160px);
-moz-image-region: rect(16px 192px 32px 176px);
}
toolbar[iconsize="small"] #button-file[disabled] {
-moz-image-region: rect(32px 176px 48px 160px) !important;
-moz-image-region: rect(32px 192px 48px 176px) !important;
}
toolbar[iconsize="small"] #button-next {
-moz-image-region: rect(0px 192px 16px 176px);
-moz-image-region: rect(0px 208px 16px 192px);
}
toolbar[iconsize="small"] #button-next:hover {
-moz-image-region: rect(16px 192px 32px 176px);
-moz-image-region: rect(16px 208px 32px 192px);
}
toolbar[iconsize="small"] #button-next[disabled] {
-moz-image-region: rect(32px 192px 48px 176px) !important;
-moz-image-region: rect(32px 208px 48px 192px) !important;
}
toolbar[iconsize="small"] #button-next[chromedir="rtl"] {
-moz-image-region: rect(0px 208px 16px 192px);
}
toolbar[iconsize="small"] #button-next:hover[chromedir="rtl"] {
-moz-image-region: rect(16px 208px 32px 192px);
}
toolbar[iconsize="small"] #button-next[chromedir="rtl"][disabled] {
-moz-image-region: rect(32px 208px 48px 192px) !important;
}
toolbar[iconsize="small"] #button-previous {
-moz-image-region: rect(0px 208px 16px 192px);
}
toolbar[iconsize="small"] #button-previous:hover {
-moz-image-region: rect(16px 208px 32px 192px);
}
toolbar[iconsize="small"] #button-previous[disabled] {
-moz-image-region: rect(32px 208px 48px 192px) !important;
}
toolbar[iconsize="small"] #button-previous[chromedir="rtl"] {
-moz-image-region: rect(0px 192px 16px 176px);
}
toolbar[iconsize="small"] #button-previous:hover[chromedir="rtl"] {
-moz-image-region: rect(16px 192px 32px 176px);
}
toolbar[iconsize="small"] #button-previous[chromedir="rtl"][disabled] {
-moz-image-region: rect(32px 192px 48px 176px) !important;
}
toolbar[iconsize="small"] #button-mark {
-moz-image-region: rect(0px 224px 16px 208px);
}
toolbar[iconsize="small"] #button-mark:hover {
toolbar[iconsize="small"] #button-next:hover[chromedir="rtl"] {
-moz-image-region: rect(16px 224px 32px 208px);
}
toolbar[iconsize="small"] #button-mark[disabled] {
toolbar[iconsize="small"] #button-next[chromedir="rtl"][disabled] {
-moz-image-region: rect(32px 224px 48px 208px) !important;
}
toolbar[iconsize="small"] #button-tag {
toolbar[iconsize="small"] #button-previous {
-moz-image-region: rect(0px 224px 16px 208px);
}
toolbar[iconsize="small"] #button-previous:hover {
-moz-image-region: rect(16px 224px 32px 208px);
}
toolbar[iconsize="small"] #button-previous[disabled] {
-moz-image-region: rect(32px 224px 48px 208px) !important;
}
toolbar[iconsize="small"] #button-previous[chromedir="rtl"] {
-moz-image-region: rect(0px 208px 16px 192px);
}
toolbar[iconsize="small"] #button-previous:hover[chromedir="rtl"] {
-moz-image-region: rect(16px 208px 32px 192px);
}
toolbar[iconsize="small"] #button-previous[chromedir="rtl"][disabled] {
-moz-image-region: rect(32px 208px 48px 192px) !important;
}
toolbar[iconsize="small"] #button-mark {
-moz-image-region: rect(0px 240px 16px 224px);
}
toolbar[iconsize="small"] #button-tag:hover {
toolbar[iconsize="small"] #button-mark:hover {
-moz-image-region: rect(16px 240px 32px 224px);
}
toolbar[iconsize="small"] #button-tag[disabled] {
toolbar[iconsize="small"] #button-mark[disabled] {
-moz-image-region: rect(32px 240px 48px 224px) !important;
}
toolbar[iconsize="small"] #button-goback {
toolbar[iconsize="small"] #button-tag {
-moz-image-region: rect(0px 256px 16px 240px);
}
toolbar[iconsize="small"] #button-goback:hover {
toolbar[iconsize="small"] #button-tag:hover {
-moz-image-region: rect(16px 256px 32px 240px);
}
toolbar[iconsize="small"] #button-goback[disabled] {
toolbar[iconsize="small"] #button-tag[disabled] {
-moz-image-region: rect(32px 256px 48px 240px) !important;
}
toolbar[iconsize="small"] #button-goforward {
toolbar[iconsize="small"] #button-goback {
-moz-image-region: rect(0px 272px 16px 256px);
}
toolbar[iconsize="small"] #button-goforward:hover {
toolbar[iconsize="small"] #button-goback:hover {
-moz-image-region: rect(16px 272px 32px 256px);
}
toolbar[iconsize="small"] #button-goforward[disabled] {
toolbar[iconsize="small"] #button-goback[disabled] {
-moz-image-region: rect(32px 272px 48px 256px) !important;
}
toolbar[iconsize="small"] #button-compact {
toolbar[iconsize="small"] #button-goforward {
-moz-image-region: rect(0px 288px 16px 272px);
}
toolbar[iconsize="small"] #button-compact:hover {
toolbar[iconsize="small"] #button-goforward:hover {
-moz-image-region: rect(16px 288px 32px 272px);
}
toolbar[iconsize="small"] #button-compact[disabled] {
toolbar[iconsize="small"] #button-goforward[disabled] {
-moz-image-region: rect(32px 288px 48px 272px) !important;
}
toolbar[iconsize="small"] #button-compact {
-moz-image-region: rect(0px 304px 16px 288px);
}
toolbar[iconsize="small"] #button-compact:hover {
-moz-image-region: rect(16px 304px 32px 288px);
}
toolbar[iconsize="small"] #button-compact[disabled] {
-moz-image-region: rect(32px 304px 48px 288px) !important;
}
toolbar[iconsize="small"] #button-archive {
-moz-image-region: rect(0px 320px 16px 304px);
}
toolbar[iconsize="small"] #button-archive:hover {
-moz-image-region: rect(16px 320px 32px 304px);
}
toolbar[iconsize="small"] #button-archive[disabled] {
-moz-image-region: rect(32px 320px 48px 304px) !important;
}
/* ::::: end small primary toolbar buttons ::::: */
/* ::::: message notification bar style rules ::::: */

Просмотреть файл

@ -97,7 +97,20 @@ function showMailIntegrationDialog() {
} catch (ex) {}
}
function verifyAccounts(wizardCallback, needsIdentity)
/**
* Verify that there is at least one account. If not, open a new account wizard.
*
* @param wizardCallback if the wizard is run, callback when it is done.
* @param needsIdentity True only when verifyAccounts is called from the
* compose window. This last condition is so that we open
* the account wizard if the user does not have any
* identities defined and tries to compose mail.
* @param wizardOpen optional param that allows the caller to specify a
* different method to open a wizard. The wizardOpen method
* takes wizardCallback as an argument. The wizardCallback
* doesn't take any arguments.
*/
function verifyAccounts(wizardCallback, needsIdentity, wizardOpen)
{
var openWizard = false;
var prefillAccount;
@ -154,6 +167,9 @@ function verifyAccounts(wizardCallback, needsIdentity)
if (openWizard || prefillAccount || ((!gAnyValidIdentity) && needsIdentity))
{
if (wizardOpen != undefined)
wizardOpen(wizardCallback)
else
MsgAccountWizard(wizardCallback);
ret = false;
}
@ -299,12 +315,12 @@ function migrateGlobalQuotingPrefs(allIdentities)
// we do this from a timer because if this is called from the onload=
// handler, then the parent window doesn't appear until after the wizard
// has closed, and this is confusing to the user
function NewMailAccount(msgWindow)
function NewMailAccount(msgWindow, okCallback)
{
setTimeout(msgNewMailAccount, 0, msgWindow);
setTimeout(msgNewMailAccount, 0, msgWindow, okCallback);
}
function msgNewMailAccount(msgWindow)
function msgNewMailAccount(msgWindow, okCallback)
{
let wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
.getService()
@ -314,5 +330,5 @@ function msgNewMailAccount(msgWindow)
existingWindow.focus();
else
window.openDialog("chrome://messenger/content/accountcreation/emailWizard.xul",
"AccountSetup", "chrome,titlebar,centerscreen",{msgWindow:msgWindow});
"AccountSetup", "chrome,titlebar,centerscreen",{msgWindow:msgWindow, okCallback:okCallback});
}

Просмотреть файл

@ -113,10 +113,14 @@ EmailConfigWizard.prototype =
this._incomingWarning = 'cleartext';
this._outgoingWarning = 'cleartext';
this._userPickedOutgoingServer = false;
this._okCallback = null;
if (window.arguments && window.arguments[0] &&
window.arguments[0].msgWindow)
if (window.arguments && window.arguments[0]) {
if (window.arguments[0].msgWindow)
this._parentMsgWindow = window.arguments[0].msgWindow;
if (window.arguments[0].okCallback)
this._okCallback = window.arguments[0].okCallback;
}
gStringsBundle = document.getElementById("strings");
gBrandBundle = document.getElementById("bundle_brand");
@ -145,6 +149,13 @@ EmailConfigWizard.prototype =
var menulist = document.getElementById("outgoing_server");
menulist.addEventListener("command",
function(event) { gEmailConfigWizard.userChangedOutgoing(event); }, true);
// Store the size of the bottom half of the window in the fullspacer
// element, so that we don't resize wildly when we show and hide it.
window.sizeToContent();
document.getElementById("settingsbox").hidden = true;
document.getElementById("fullspacer").width = document.width;
window.sizeToContent();
},
/* When the next button is clicked we've moved from the initial account
@ -170,6 +181,8 @@ EmailConfigWizard.prototype =
_show("stop_button");
_hide("edit_button");
_hide("go_button");
window.sizeToContent();
},
/* The back button can be clicked at anytime and should stop all probing of
@ -181,6 +194,7 @@ EmailConfigWizard.prototype =
*/
onBack : function()
{
this._disableConfigDetails(true);
this.hideConfigDetails();
this.clearConfigDetails();
@ -190,18 +204,15 @@ EmailConfigWizard.prototype =
// swap buttons back
_show("next_button");
_hide("back_button");
document.getElementById("advanced_settings").disabled = true;
_hide("advanced_settings");
},
/* Helper method that enables or disabled all the account information inputs
*
* NOTE: The remember password input was skipped purposefully, people should
* continue to be able to change that setting even as account details
* are determined.
*/
_accountInfoInputs : function(disabled)
{
let ids = ["realname","email","password"];
let ids = ["realname", "email", "password", "remember_password"];
if (disabled && document.getElementById("password").getAttribute("empty")) {
document.getElementById("password").value = " ";
document.getElementById("password").setAttribute("empty", true);
@ -264,10 +275,17 @@ EmailConfigWizard.prototype =
*/
validateRealname : function()
{
if (document.getElementById('realname').value.length > 0)
this.clearError('nameerror');
else
this.setError("nameerror", "name.error");
let realname = document.getElementById("realname");
if (realname.value.length > 0) {
this.clearError("nameerror");
_show("nametext");
realname.removeAttribute("error");
}
else {
_hide("nametext");
this.setError("nameerror", "please_enter_name");
realname.setAttribute("error", "true");
}
},
/*
@ -288,20 +306,20 @@ EmailConfigWizard.prototype =
*/
onEmailInput : function()
{
if (document.getElementById('realname').value.length > 0 &&
if (document.getElementById("realname").value.length > 0 &&
this.emailAddrValidish())
_show("next_button");
document.getElementById("next_button").disabled = false;
else
_hide("next_button");
document.getElementById("next_button").disabled = true;
},
onRealnameInput : function()
{
if (document.getElementById('realname').value.length > 0 &&
this.emailAddrValidish())
_show("next_button");
document.getElementById("next_button").disabled = false;
else
_hide("next_button");
document.getElementById("next_button").disabled = true;
},
/* This check is done on blur and is only done as an informative warning
@ -310,13 +328,18 @@ EmailConfigWizard.prototype =
*/
validateEmail : function()
{
if (document.getElementById('email').value.length <= 0)
let email = document.getElementById("email");
if (email.value.length <= 0)
return;
if (emailRE.test(document.getElementById('email').value))
this.clearError('emailerror');
else
this.setError("emailerror", "email.error");
if (emailRE.test(email.value)) {
this.clearError("emailerror");
email.removeAttribute("error");
}
else {
this.setError("emailerror", "double_check_email");
email.setAttribute("error", "true");
}
},
// We use this to prevent probing from forgetting the user's choice.
@ -364,12 +387,14 @@ EmailConfigWizard.prototype =
{
let passwordElt = document.getElementById("password");
let rememberPasswordElt = document.getElementById("remember_password");
rememberPasswordElt.disabled = false;
if (passwordElt.value.length < 1) {
document.getElementById("remember_password").checked = false;
rememberPasswordElt.disabled = true;
rememberPasswordElt.checked = false;
this._userChangedPassword = false;
}
else if (!this._userChangedPassword)
document.getElementById("remember_password").checked = true;
rememberPasswordElt.checked = true;
},
/* If the user just tabbed through the password input without entering
@ -379,15 +404,19 @@ EmailConfigWizard.prototype =
onblurPassword : function()
{
let passwordElt = document.getElementById("password");
if (passwordElt.value.length < 1)
let rememberPasswordElt = document.getElementById("remember_password");
if (passwordElt.value.length < 1) {
rememberPasswordElt.disabled = true;
passwordElt.type = "text";
}
else
rememberPasswordElt.disabled = false;
},
findConfig : function(domain, email)
{
gEmailWizardLogger.info("findConfig()");
this.startSpinner("searching_for_configs");
this.setSpinnerStatus("check_preconfig");
this.startSpinner("all", "looking_up_settings");
if (this._probeAbortable)
{
gEmailWizardLogger.info("aborting existing config search");
@ -400,34 +429,29 @@ EmailConfigWizard.prototype =
function(config) // success
{
me.foundConfig(config);
me.stopSpinner("finished_with_success");
me.setSpinnerStatus("found_preconfig");
me.stopSpinner("found_settings");
me._probeAbortable = null;
},
function(e) // fetchConfigFromDisk failed
{
gEmailWizardLogger.info("fetchConfigFromDisk failed: " + e);
me.startSpinner("searching_for_configs");
me.setSpinnerStatus("checking_mozilla_config");
me.startSpinner("all", "looking_up_settings");
me._probeAbortable =
fetchConfigFromDB(
domain,
function(config) // success
{
me.foundConfig(config);
me.stopSpinner("finished_with_success");
me.setSpinnerStatus("found_isp_config");
me.stopSpinner("found_settings");
me.showEditButton();
me._probeAbortable = null;
},
function(e) // fetchConfigFromDB failed
{
gEmailWizardLogger.info("fetchConfigFromDB failed: " + e);
me.setSpinnerStatus("probing_config");
var initialConfig = new AccountConfig();
me._prefillConfig(initialConfig);
me.startSpinner("searching_for_configs")
me.setSpinnerStatus("guessing_from_email");
me.startSpinner("all", "looking_up_settings")
me._guessConfig(domain, initialConfig, 'both');
});
});
@ -467,21 +491,24 @@ EmailConfigWizard.prototype =
me._outgoingState);
if (me._incomingState == 'done' && me._outgoingState == 'done')
{
me.stopSpinner("finished_with_success");
me.setSpinnerStatus("config_details_found");
me.stopSpinner("found_settings");
_hide("stop_button");
_show("edit_button");
}
else if (me._incomingState == 'done' && me._outgoingState != 'probing')
{
me.stopSpinner("finished_with_success");
me.setSpinnerStatus("incoming_found_specify_outgoing");
if (me._outgoingState == "failed")
me.stopSpinner("failed_to_find_settings");
else
me.stopSpinner("found_settings");
me.editConfigDetails();
}
else if (me._outgoingState == 'done' && me._incomingState != 'probing')
{
me.stopSpinner("finished_with_success");
me.setSpinnerStatus("outgoing_found_specify_incoming");
if (me._incomingState == "failed")
me.stopSpinner("failed_to_find_settings");
else
me.stopSpinner("found_settings");
me.editConfigDetails();
}
if (me._outgoingState != 'probing' &&
@ -493,22 +520,23 @@ EmailConfigWizard.prototype =
{
gEmailWizardLogger.info("guessConfig failed: " + e);
me.updateConfig(config);
me.stopSpinner("finished_with_error");
me.setSpinnerStatus("please_enter_missing_hostnames");
me.stopSpinner("failed_to_find_settings");
me._probeAbortable = null;
me.editConfigDetails();
},
function(e, config) // guessconfig failed for incoming
{
gEmailWizardLogger.info("guessConfig failed for incoming: " + e);
me.setSpinnerStatus("incoming_failed_trying_outgoing");
me._setIconAndTooltip("incoming", "failed", "");
me._incomingState = "failed";
config.incoming.hostname = -1;
me.updateConfig(config);
},
function(e, config) // guessconfig failed for outgoing
{
gEmailWizardLogger.info("guessConfig failed for outgoing: " + e);
me.setSpinnerStatus("outgoing_failed_trying_incoming");
me._setIconAndTooltip("outgoing", "failed", "");
me._outgoingState = "failed";
if (!me._userPickedOutgoingServer)
config.outgoing.hostname = -1;
@ -538,6 +566,7 @@ EmailConfigWizard.prototype =
{
this._currentConfigFilledIn = config.copy();
_show("advanced_settings");
document.getElementById("advanced_settings").disabled = false;
replaceVariables(this._currentConfigFilledIn, this._realname, this._email,
this._password);
@ -545,7 +574,6 @@ EmailConfigWizard.prototype =
document.getElementById('create_button').disabled = false;
document.getElementById('create_button').hidden = false;
},
/*
@ -686,13 +714,13 @@ EmailConfigWizard.prototype =
if (this._incomingWarning == '')
_hide('acknowledge_warning');
}
window.sizeToContent();
}
else
{
// no certificate or cleartext issues
this.validateAndFinish();
}
} catch (ex) { alertPrompt(gStringsBundle.getString("error_creating_account"), ex); }
},
@ -701,8 +729,13 @@ EmailConfigWizard.prototype =
// If we're going backwards, we should reset the acknowledge_warning.
document.getElementById('acknowledge_warning').checked = false;
this.toggleAcknowledgeWarning();
document.getElementById("incoming_technical").removeAttribute("expanded");;
document.getElementById("incoming_details").setAttribute("collapsed", true);;
document.getElementById("outgoing_technical").removeAttribute("expanded");;
document.getElementById("outgoing_details").setAttribute("collapsed", true);;
_hide('warningbox');
_show('mastervbox');
window.sizeToContent();
},
validateAndFinish : function()
@ -710,6 +743,7 @@ EmailConfigWizard.prototype =
// if we're coming from the cert warning dialog
_show('mastervbox');
_hide('warningbox');
window.sizeToContent();
if (!this.checkIncomingAccountIsNew())
{
@ -746,7 +780,7 @@ EmailConfigWizard.prototype =
verifyConfig : function(successCallback, errorCallback)
{
var me = this;
this.startSpinner("checking_password");
this.startSpinner("username", "checking_password");
// logic function defined in verifyConfig.js
verifyConfig(
this._currentConfigFilledIn,
@ -878,7 +912,7 @@ EmailConfigWizard.prototype =
if (state == 'weak')
this._incomingState = 'done';
this._setIconAndTooltip('incoming_status', state, details);
this._setIconAndTooltip('incoming', state, details);
},
_setOutgoingStatus: function(state, details)
@ -907,26 +941,36 @@ EmailConfigWizard.prototype =
if (state == 'weak')
this._outgoingState = 'done';
this._setIconAndTooltip('outgoing_status', state, details);
this._setIconAndTooltip('outgoing', state, details);
},
_setIconAndTooltip : function(id, state, details)
{
let icon = document.getElementById(id);
gEmailWizardLogger.warn(id + " setting icon and tooltip " +
state + ":" + details);
let icon = document.getElementById(id + "_status");
icon.setAttribute("state", state);
switch (state)
{
case "weak":
icon.setAttribute("tooltip", "insecureserver-" + details);
icon.setAttribute("popup", "insecureserver-" + details + "-panel");
this._updateSpinner(id, true);
break;
case "hidden":
icon.removeAttribute("tooltip");
icon.removeAttribute("popup");
this._updateSpinner(id, false);
break;
case "strong":
icon.setAttribute("tooltip", "secureservertooltip");
icon.setAttribute("popup", "secureserver-panel");
this._updateSpinner(id, true);
break;
case "failed":
icon.removeAttribute("tooltip");
icon.removeAttribute("popup");
this._updateSpinner(id, true);
break;
}
},
@ -942,7 +986,9 @@ EmailConfigWizard.prototype =
hideConfigDetails : function()
{
_hide("settingsbox");
document.getElementById("create_button").disabled = true;
_hide("create_button");
window.sizeToContent();
},
/* Clears out the config details information, this is really only meant to be
@ -967,6 +1013,7 @@ EmailConfigWizard.prototype =
*/
editConfigDetails : function()
{
gEmailWizardLogger.info("onEdit");
// Add the custom entry to the menulist, if it's not already there.
let menulist = document.getElementById("outgoing_server");
if (this._smtpServerCount == menulist.itemCount) {
@ -976,10 +1023,10 @@ EmailConfigWizard.prototype =
}
this._disableConfigDetails(false);
this._setIncomingStatus('hidden');
this._setOutgoingStatus('hidden');
document.getElementById('create_button').disabled = true;
_hide("create_button");
this._setIncomingStatus("failed");
this._setOutgoingStatus("failed");
document.getElementById("advanced_settings").disabled = false;
document.getElementById("create_button").disabled = true;
_hide("stop_button");
_hide("edit_button");
_show("go_button");
@ -997,13 +1044,13 @@ EmailConfigWizard.prototype =
},
// IDs of <textbox> inputs that can have a .value attr set
_configDetailTextInputs : ["username", "incoming_server",
_configDetailTextInputs : ["password", "username", "incoming_server",
"incoming_port", "incoming_protocol",
"outgoing_port"],
// IDs of the <menulist> elements that don't accept a .value attr but can
// be disabled
_configDetailMenulists : ["incoming_security",
_configDetailMenulists : ["remember_password", "incoming_security",
"outgoing_server", "outgoing_security"],
/* Helper function to loop through all config details form elements and
@ -1033,6 +1080,7 @@ EmailConfigWizard.prototype =
if (config.incoming.username)
{
document.getElementById("username").value = config.incoming.username;
this._setIconAndTooltip("username", "strong", "");
}
else
{
@ -1060,6 +1108,8 @@ EmailConfigWizard.prototype =
}
else
{
// We got an incoming server, so we can enable the advanced settings.
document.getElementById("advanced_settings").disabled = false;
switch (config.incoming.socketType)
{
case 2: // SSL / TLS
@ -1178,6 +1228,7 @@ EmailConfigWizard.prototype =
// the stop is naturally not hidden so has no place in the code where it is
// told to be shown
_show("stop_button");
this._password = document.getElementById("password").value;
this.goWithConfigDetails();
var newConfig = this.getUserConfig();
if (this._incomingState != "done") {
@ -1198,39 +1249,46 @@ EmailConfigWizard.prototype =
// UI helper functions
startSpinner: function(actionStrName)
startSpinner: function(which, actionStrName)
{
this._showStatusTitle(false, actionStrName);
gEmailWizardLogger.warn("spinner start\n");
},
setSpinnerStatus : function(actionStrName)
{
this._showStatus(actionStrName);
if (which == "all") {
this._setIconAndTooltip("username", "hidden", "");
this._setIconAndTooltip("incoming", "hidden", "");
this._setIconAndTooltip("outgoing", "hidden", "");
}
else
this._setIconAndTooltip(which, "hidden", "");
gEmailWizardLogger.warn(which + "spinner start " + actionStrName);
},
stopSpinner: function(actionStrName)
{
this._showStatusTitle(true, actionStrName);
gEmailWizardLogger.warn("spinner stop\n");
this._updateSpinner("username", true);
this._updateSpinner("incoming", true);
this._updateSpinner("outgoing", true);
gEmailWizardLogger.warn("all spinner stop " + actionStrName);
},
// thought this would be needed other places, not likely though
_hideSpinner : function(hidden)
_updateSpinner: function(which, stop)
{
document.getElementById("config_spinner").hidden = hidden;
document.getElementById(which + "_spinner").hidden = stop;
},
_showStatusTitle: function(success, msgName)
{
let brandShortName = document.getElementById("bundle_brand")
.getString("brandShortName");
let msg;
try {
msg = msgName ? gStringsBundle.getString(msgName) : "";
msg = msgName
? gStringsBundle.getFormattedString(msgName, [brandShortName])
: "";
} catch(ex) {
gEmailWizardLogger.error("missing string for " + msgName);
}
this._hideSpinner(success);
let title = document.getElementById("config_status_title");
title.hidden = false;
title.textContent = msg;
@ -1238,26 +1296,11 @@ EmailConfigWizard.prototype =
", msg: " + msg);
},
_showStatus: function(msgName)
{
let msg;
try {
msg = msgName ? gStringsBundle.getString(msgName) : "";
} catch(ex) {
gEmailWizardLogger.error("missing string for " + msgName);
}
let subtitle = document.getElementById("config_status_subtitle");
subtitle.hidden = false;
subtitle.textContent = msg;
gEmailWizardLogger.info("show status subtitle: " + msg);
},
_prefillConfig: function(initialConfig)
{
var emailsplit = this._email.split("@");
if (emailsplit.length != 2)
throw new Exception(gStringsBundle.getString("email.error"));
throw new Exception(gStringsBundle.getString("double_check_email"));
var emaillocal = sanitize.nonemptystring(emailsplit[0]);
initialConfig.incoming.username = emaillocal;
@ -1270,9 +1313,7 @@ EmailConfigWizard.prototype =
{
gEmailWizardLogger.info("_startProbingIncoming: " + config.incoming.hostname +
" probe = " + this._probeAbortable);
this.startSpinner("searching_for_configs");
this.setSpinnerStatus(this._outgoingState == "probing" ?
"check_server_details" : "check_in_server_details");
this.startSpinner("incoming", "looking_up_settings");
config.incoming._inprogress = true;
// User entered hostname, we may want to probe port and protocol and socketType
@ -1306,9 +1347,7 @@ EmailConfigWizard.prototype =
{
gEmailWizardLogger.info("_startProbingOutgoing: " + config.outgoing.hostname +
" probe = " + this._probeAbortable);
this.startSpinner("searching_for_configs");
this.setSpinnerStatus(this._incomingState == "probing" ?
"check_server_details" : "check_out_server_details");
this.startSpinner("outgoing", "looking_up_settings");
config.outgoing._inprogress = true;
// User entered hostname, we want to probe port and protocol and socketType
@ -1331,12 +1370,14 @@ EmailConfigWizard.prototype =
clearError: function(which) {
_hide(which);
_hide(which+"icon");
document.getElementById(which).textContent = "";
},
setError: function(which, msg_name) {
try {
_show(which);
_show(which+"icon");
document.getElementById(which).textContent =
gStringsBundle.getString(msg_name);
}
@ -1367,6 +1408,8 @@ EmailConfigWizard.prototype =
if (this._probeAbortable)
this._probeAbortable.cancel();
if (this._okCallback)
this._okCallback();
gEmailWizardLogger.info("Shutting down email config dialog");
}
};

Просмотреть файл

@ -48,8 +48,7 @@
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
id="autoconfigWizard"
windowtype="mail:autoconfig"
title="&welcome.description;"
style="&autoconfigWizard.style;"
title="&autoconfigWizard.title;"
onload="gEmailConfigWizard.onLoad();"
onkeypress="gEmailConfigWizard.onKeyDown(event)"
onclose="gEmailConfigWizard.onWizardShutdown();"
@ -93,7 +92,7 @@
<image class="insecureLarry"/>
<vbox flex="1">
<description class="title">&insecureServer.tooltip.title;</description>
<description class="details">&insecureClearText.description;</description>
<description class="details">&insecureCleartext.description;</description>
</vbox>
</hbox>
</panel>
@ -109,7 +108,9 @@
<panel id="secureserver-panel" class="popup-panel">
<hbox>
<image class="secureLarry"/>
<vbox flex="1">
<description class="title">&secureServer.description;</description>
</vbox>
</hbox>
</panel>
@ -137,156 +138,157 @@
<description class="title">&secureServer.description;</description>
</hbox>
</tooltip>
<tooltip id="optional-password">
<description>&password.text;</description>
</tooltip>
<vbox class="mastervbox"
id="mastervbox"
flex="1">
<grid>
<columns>
<column/>
<column flex="1"/>
</columns>
<rows>
<row class="heading">
<vbox id="mastervbox" class="mastervbox" flex="1">
<groupbox class="initialSettings">
<hbox align="center">
<label class="heading">&accountInformation.label;</label>
</hbox>
<hbox><spacer/></hbox>
</row>
<row>
<grid>
<rows>
<row align="center">
<description id="nameerror" class="errordescription"
hidden="true"/>
</row>
<row align="center">
<label accesskey="&name.accesskey;"
class="autoconfigLabel"
value="&name.label;"
control="realname"/>
<textbox id="realname"
class="padded"
value="" emptytext="&name.description;"
value=""
emptytext="&name.emptytext;"
oninput="gEmailConfigWizard.onRealnameInput()"
onblur="gEmailConfigWizard.validateRealname();"/>
</row>
<spacer/>
<row align="center">
<description id="emailerror" class="errordescription"
hidden="true"/>
</row>
<row align="center">
<description id="nametext" class="initialDesc">&name.text;</description>
<image id="nameerroricon"
hidden="true"
src="chrome://global/skin/icons/warning-16.png"/>
<description id="nameerror" class="errordescription" hidden="true"/>
</hbox>
<hbox align="center">
<label accesskey="&email.accesskey;"
class="autoconfigLabel"
value="&email.label;"
control="email"/>
<textbox id="email"
class="padded uri-element"
emptytext="&email.description;"
emptytext="&email.emptytext;"
oninput="gEmailConfigWizard.onEmailInput()"
onblur="gEmailConfigWizard.validateEmail();"/>
</row>
<spacer/>
<row align="center">
<description id="passworderror" class="errordescription"
hidden="true"/>
</row>
<row align="center">
<image id="emailerroricon"
hidden="true"
src="chrome://global/skin/icons/warning-16.png"/>
<description id="emailerror" class="errordescription" hidden="true"/>
</hbox>
<hbox align="center">
<!-- this starts out as text so the emptytext shows, but then
changes to type=password once it's not empty -->
<label accesskey="&password.accesskey;"
class="autoconfigLabel"
value="&password.label;"
control="password"
tooltip="optional-password"/>
<textbox id="password"
class="padded"
emptytext="&password.description;"
emptytext="&password.emptytext;"
type="text"
oninput="gEmailConfigWizard.oninputPassword();"
onfocus="this.type='password';"
onblur="gEmailConfigWizard.onblurPassword();"/>
</row>
<row align="center">
<checkbox id="remember_password"
accesskey="&rememberPassword.accesskey;"
onclick="gEmailConfigWizard._userChangedPassword=true;"
label="&rememberPassword.label;" checked="false"/>
</row>
<row>
<hbox pack="end">
<button id="next_button"
<image id="passworderroricon"
hidden="true"
oncommand="gEmailConfigWizard.onNext();"
accesskey="&next.accesskey;"
label="&next.label;" class="larger-button"/>
<button id="back_button" class="smaller-button"
oncommand="gEmailConfigWizard.onBack();"
accesskey="&back.accesskey;"
label="&back.label;" hidden="true"/>
src="chrome://global/skin/icons/warning-16.png"/>
<description id="passworderror" class="errordescription" hidden="true"/>
</hbox>
</row>
</rows>
</grid>
<hbox align="center">
<label class="autoconfigLabel"/>
<checkbox id="remember_password"
label="&rememberPassword.label;"
accesskey="&rememberPassword.accesskey;"
disabled="true"
checked="false"
onclick="gEmailConfigWizard._userChangedPassword=true;"/>
<spacer flex="1"/>
<hbox>
<button id="back_button"
label="&startOver.label;"
accesskey="&startOver.accesskey;"
class="larger-button"
hidden="true"
oncommand="gEmailConfigWizard.onBack();"/>
</hbox>
</hbox>
<hbox id="fullspacer"/>
</groupbox>
<vbox>
<groupbox id="settingsbox" class="settings" hidden="true">
<groupbox id="settingsbox" class="settings">
<vbox>
<vbox id="configarea">
<hbox>
<hbox flex="1">
<description id="config_status_title" flex="1"/>
</hbox>
<hbox pack="end">
<button id="stop_button"
oncommand="gEmailConfigWizard.onStop();"
accesskey="&stop.accesskey;"
label="&stop.label;" class="smaller-button"/>
<button id="edit_button"
oncommand="gEmailConfigWizard.onEdit();"
accesskey="&edit.accesskey;"
label="&edit.label;" class="smaller-button"
hidden="true"/>
<button id="go_button"
oncommand="gEmailConfigWizard.onGo();"
accesskey="&retest.accesskey;"
label="&retest.label;" class="smaller-button"
hidden="true"/>
<description id="config_status_title" flex="1" class="title"/>
</hbox>
</hbox>
<hbox>
<hbox flex="1">
<description id="config_status_subtitle" flex="1"/>
</hbox>
<hbox pack="end">
<vbox class="statusimage" width="16">
<image id="config_spinner"
</vbox>
<hbox id="usernamearea" align="center">
<vbox id="username_status"
class="icon"
align="center"
pack="center">
<image id="username_spinner"
src="chrome://global/skin/icons/loading_16.png"
hidden="true"/>
</vbox>
</hbox>
</hbox>
</vbox>
<vbox id="usernamearea">
<label class="textbox-label" value="&username.label;"
<label class="textbox-label"
value="&username2.label;"
control="username"/>
<hbox>
<vbox class="statusimage" width="22"/>
<textbox id="username"
value=""
disabled="true"
class="username"/>
<hbox flex="1" pack="end">
<button id="stop_button"
label="&stop.label;"
accesskey="&stop.accesskey;"
class="smaller-button"
oncommand="gEmailConfigWizard.onStop();"/>
<button id="edit_button"
label="&edit.label;"
accesskey="&edit.accesskey;"
class="smaller-button"
hidden="true"
oncommand="gEmailConfigWizard.onEdit();"/>
<button id="go_button"
label="&retest.label;"
accesskey="&retest.accesskey;"
class="smaller-button"
hidden="true"
oncommand="gEmailConfigWizard.onGo();"/>
</hbox>
</hbox>
<hbox id="incomingarea" align="center">
<vbox id="incoming_status"
class="icon"
align="center"
pack="center">
<image id="incoming_spinner"
src="chrome://global/skin/icons/loading_16.png"
hidden="true"/>
</vbox>
<vbox id="incomingarea">
<label class="textbox-label" value="&receivingServer.label;"
<label class="textbox-label"
value="&incoming.label;"
control="incoming_server"/>
<hbox>
<vbox id="incoming_status" class="icon" width="22"/>
<hbox>
<textbox id="incoming_server"
class="host uri-element"
value=""
disabled="true"
oninput="gEmailConfigWizard.setIncomingServer()"
class="host uri-element"/>
</hbox>
oninput="gEmailConfigWizard.setIncomingServer()"/>
</hbox>
<hbox>
<spacer height="30" width="22"/>
<hbox>
<spacer height="30" width="12"/>
<hbox class="protocol">
<menulist id="incoming_protocol"
value=""
disabled="true"
sizetopopup="none"
class="protocol">
sizetopopup="always">
<menupopup onpopuphidden="gEmailConfigWizard.setIncomingProtocol()">
<menuitem label="&imap.label;" value="1"/>
<menuitem label="&pop.label;" value="2"/>
@ -295,17 +297,17 @@
</hbox>
<hbox>
<textbox id="incoming_port"
class="port"
value=""
disabled="true"
oninput="gEmailConfigWizard.setPort('incoming_port')"
class="port"/>
oninput="gEmailConfigWizard.setPort('incoming_port')"/>
</hbox>
<hbox>
<menulist id="incoming_security"
class="security"
value=""
disabled="true"
sizetopopup="none"
class="security">
sizetopopup="always">
<menupopup onpopuphidden="gEmailConfigWizard.setSecurity('incoming_security')">
<menuitem label="&noEncryption.label;" value="1"/>
<menuitem label="&starttls.label;" value="3"/>
@ -314,42 +316,49 @@
</menulist>
</hbox>
</hbox>
</hbox>
<hbox id="outgoingarea" align="center">
<vbox id="outgoing_status"
class="icon"
align="center"
pack="center">
<image id="outgoing_spinner"
src="chrome://global/skin/icons/loading_16.png"
hidden="true"/>
</vbox>
<vbox id="outgoingarea">
<label class="textbox-label" value="&sendingServer.label;"
<label class="textbox-label"
value="&outgoing.label;"
control="outgoing_server"/>
<hbox>
<vbox id="outgoing_status" class="icon" width="22"/>
<hbox>
<!-- oncommand, and onchange and onmousedown of menulist's
inputfield, set in constructor -->
<menulist id="outgoing_server"
class="host uri-element"
disabled="true"
sizetopopup="none"
editable="true" >
<!-- oncommand, and onchange and onmousedown of menulist's inputfield, set in ctor -->
<menupopup id="smtp_menupopup"/>
</menulist>
</hbox>
</hbox>
<hbox>
<spacer height="30" width="22"/>
<hbox align="center">
<spacer height="30" width="12"/>
<hbox class="protocol" align="center">
<label id="outgoing_protocol"
class="protocol" value="&smtp.label;"/>
value="&smtp.label;"/>
</hbox>
<hbox>
<textbox id="outgoing_port"
class="port"
value=""
disabled="true"
oninput="gEmailConfigWizard.setPort('outgoing_port')"
class="port"/>
oninput="gEmailConfigWizard.setPort('outgoing_port')"/>
</hbox>
<hbox>
<menulist id="outgoing_security"
class="security"
value=""
disabled="true"
sizetopopup="none"
class="security">
sizetopopup="always">
<menupopup onpopuphidden="gEmailConfigWizard.setSecurity('outgoing_security')">
<menuitem label="&noEncryption.label;" value="1"/>
<menuitem label="&starttls.label;" value="3"/>
@ -358,34 +367,47 @@
</menulist>
</hbox>
</hbox>
</vbox>
</hbox>
</vbox>
</groupbox>
</vbox>
</row>
</rows>
</grid>
<spacer flex="1"/>
<hbox>
<hbox align="center">
<button id="cancel_button" label="&cancel.label;"
onmousedown="gEmailConfigWizard.onCancel();"/>
<label id="advanced_settings" value="&createAndEditSettings.label;"
onmousedown="gEmailConfigWizard.advancedSettings()"
hidden="true" class="clickable_label"/>
</hbox>
<button id="advanced_settings"
label="&manualSetup.label;"
accesskey="&manualSetup.accesskey;"
class="larger-button"
disabled="true"
hidden="true"
oncommand="gEmailConfigWizard.advancedSettings();"/>
<spacer flex="1"/>
<hbox align="center">
<button id="create_button" label="&createAccount.label;"
<button id="cancel_button"
label="&cancel.label;"
accesskey="&cancel.accesskey;"
oncommand="gEmailConfigWizard.onCancel();"/>
</hbox>
<button id="create_button"
label="&createAccount.label;"
accesskey="&createAccount.accesskey;"
onmousedown="gEmailConfigWizard.onOK();"
hidden="true" class="larger-button"/>
class="larger-button"
hidden="true"
disabled="true"
oncommand="gEmailConfigWizard.onOK();"/>
<hbox pack="end">
<button id="next_button"
label="&continue.label;"
accesskey="&continue.accesskey;"
class="larger-button"
hidden="false"
disabled="true"
oncommand="gEmailConfigWizard.onNext();"/>
</hbox>
</hbox>
</vbox>
<vbox id="warningbox" class="warningbox" hidden="true" flex="1">
<vbox id="warningbox" hidden="true" flex="1">
<hbox class="warning" flex="1">
<vbox class="larrybox">
<image id="insecure_larry" class="insecureLarry"/>
@ -397,8 +419,9 @@
<label class="warning_settings" value="&incomingSettings.label;"/>
<description id="warning_incoming"/>
</hbox>
<label id="incoming_technical" value="&technicaldetails.label;"
<label id="incoming_technical"
class="technical_details"
value="&technicaldetails.label;"
onclick="gEmailConfigWizard.toggleDetails('incoming');"/>
<description id="incoming_details" collapsed="true"/>
</vbox>
@ -407,26 +430,30 @@
<label class="warning_settings" value="&outgoingSettings.label;"/>
<description id="warning_outgoing"/>
</hbox>
<label id="outgoing_technical" value="&technicaldetails.label;"
<label id="outgoing_technical"
class="technical_details"
value="&technicaldetails.label;"
onclick="gEmailConfigWizard.toggleDetails('outgoing');"/>
<description id="outgoing_details" collapsed="true"/>
</vbox>
<spacer flex="10"/>
<description id="findoutmore">&contactYourProvider.description;</description>
<spacer flex="100"/>
<checkbox id="acknowledge_warning"
class="acknowledge_checkbox"
label="&confirmWarning.label;"
accesskey="&confirmWarning.accesskey;"
class="acknowledge_checkbox"
oncommand="gEmailConfigWizard.toggleAcknowledgeWarning()"/>
<spacer flex="100"/>
<hbox>
<button id="getmeoutofhere" label="&changeSettings.label;"
<button id="getmeoutofhere"
label="&changeSettings.label;"
accesskey="&changeSettings.accesskey;"
oncommand="gEmailConfigWizard.getMeOutOfHere()"/>
<spacer flex="1"/>
<button id="iknow" label="&createAccount.label;" disabled="true"
<button id="iknow"
label="&createAccount.label;"
accesskey="&createAccount.accesskey;"
disabled="true"
oncommand="gEmailConfigWizard.validateAndFinish()"/>
</hbox>
</vbox>

Просмотреть файл

@ -96,8 +96,14 @@ function verifyConfig(config, alter, msgWindow, successCallback, errorCallback)
inServer.useSecAuth = true;
try {
inServer.password = config.incoming.password;
verifyLogon(config, inServer, alter, msgWindow, successCallback, errorCallback);
if (inServer.password)
verifyLogon(config, inServer, alter, msgWindow,
successCallback, errorCallback);
else {
// Avoid pref pollution, clear out server prefs.
accountManager.removeIncomingServer(inServer, true);
successCallback();
}
} catch (e) {
ddump("ERROR: verify logon shouldn't have failed");
errorCallback(e);
@ -117,13 +123,17 @@ function verifyLogon(config, inServer, alter, msgWindow, successCallback,
// our listener listens both for the url and cert errors.
msgWindow.notificationCallbacks = listener;
// try to work around bug where backend is clearing password.
try {
inServer.password = config.incoming.password;
let uri = inServer.verifyLogon(listener, msgWindow);
// clear msgWindow so url won't prompt for passwords.
uri.QueryInterface(Ci.nsIMsgMailNewsUrl).msgWindow = null;
}
finally {
// restore them
msgWindow.notificationCallbacks = saveCallbacks;
}
}
/**
* The url listener also implements nsIBadCertListener2. Its job is to prevent

Просмотреть файл

@ -38,6 +38,7 @@
***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://messenger/skin/filterDialog.css" type="text/css"?>
<?xml-stylesheet href="chrome://messenger/skin/folderPane.css" type="text/css"?>
<?xml-stylesheet href="chrome://messenger/skin/folderMenus.css" type="text/css"?>
<?xul-overlay href="chrome://messenger/content/searchTermOverlay.xul"?>

Просмотреть файл

@ -400,8 +400,8 @@ NS_IMETHODIMP nsSpamSettings::Initialize(nsIMsgIncomingServer *aServer)
NS_ENSURE_SUCCESS(rv, rv);
nsCAutoString accountKey;
rv = account->GetKey(accountKey);
NS_ENSURE_SUCCESS(rv, rv);
if (account)
account->GetKey(accountKey);
// Loop through all accounts, adding emails from this account, as well as
// from any accounts that defer to this account.
@ -409,7 +409,8 @@ NS_IMETHODIMP nsSpamSettings::Initialize(nsIMsgIncomingServer *aServer)
nsCOMPtr<nsISupportsArray> accounts;
rv = accountManager->GetAccounts(getter_AddRefs(accounts));
NS_ENSURE_SUCCESS(rv, rv);
PRUint32 accountCount;
PRUint32 accountCount = 0;
if (account && accounts) // no sense scanning accounts if we've nothing to match
accounts->Count(&accountCount);
for (PRUint32 i = 0; i < accountCount; i++)

Просмотреть файл

@ -850,13 +850,13 @@ pref("mailnews.auto_config_url", "https://live.mozillamessaging.com/autoconfig/"
// copied to the new nsIMsgHdr when a message is copied.
// Allows extensions to control preservation of properties.
pref("mailnews.database.summary.dontPreserveOnCopy",
"account msgOffset threadParent msgThreadId statusOfset flag size numLines ProtoThreadFlags label gloda-id gloda-dirty");
"account msgOffset threadParent msgThreadId statusOfset flags size numLines ProtoThreadFlags label gloda-id gloda-dirty");
// dontPreserveOnMove: a space separated list of properties that are not
// copied to the new nsIMsgHdr when a message is moved.
// Allows extensions to control preservation of properties.
pref("mailnews.database.summary.dontPreserveOnMove",
"account msgOffset threadParent msgThreadId statusOfset flag size numLines ProtoThreadFlags label");
"account msgOffset threadParent msgThreadId statusOfset flags size numLines ProtoThreadFlags label");
// -- Global Database (gloda) options
// Should the indexer be enabled?

Просмотреть файл

@ -466,8 +466,6 @@ function Startup()
.getService(Components.interfaces.nsIPrefService);
pref = prefService.getBranch(null);
window.tryToClose = WindowIsClosing;
webNavigation = getWebNavigation();
if (!webNavigation)
throw "no XBL binding for browser";
@ -1432,8 +1430,7 @@ function BrowserCloseTabOrWindow()
function BrowserTryToCloseWindow()
{
//give tryToClose a chance to veto if it is defined
if (typeof(window.tryToClose) != "function" || window.tryToClose())
if (WindowIsClosing())
BrowserCloseWindow();
}

Просмотреть файл

@ -471,7 +471,7 @@ protected:
nsresult setFolderHint(nsIRDFResource *newSource, nsIRDFResource *objType);
nsresult Unescape(nsString &text);
static nsresult Unescape(nsString &text);
nsresult ParseMetaTag(const nsString &aLine, nsIUnicodeDecoder **decoder);
@ -1345,6 +1345,7 @@ BookmarkParser::ParseLiteral(nsIRDFResource *arc, nsString& aValue, nsIRDFNode**
if (arc == kNC_ShortcutURL)
{
Unescape(aValue);
// lowercase the shortcut URL before storing internally
ToLowerCase(aValue);
}
@ -1470,6 +1471,8 @@ BookmarkParser::ParseBookmarkSeparator(const nsString &aLine, const nsCOMPtr<nsI
termQuote - attrStart));
attrStart = termQuote + 1;
if (!name.IsEmpty()) {
Unescape(name);
nsCOMPtr<nsIRDFLiteral> nameLiteral;
rv = gRDF->GetLiteral(name.get(), getter_AddRefs(nameLiteral));
if (NS_FAILED(rv))
@ -5911,6 +5914,11 @@ nsBookmarksService::WriteBookmarkProperties(nsIRDFDataSource *ds,
}
else
{
if (property == kNC_Name || property == kNC_ShortcutURL)
{
EscapeHTML(attribute);
}
rv |= strm->Write(htmlAttrib, strlen(htmlAttrib), &dummy);
rv |= strm->Write(attribute.get(), attribute.Length(), &dummy);
rv |= strm->Write(kQuoteStr, sizeof(kQuoteStr)-1, &dummy);

Просмотреть файл

@ -1515,6 +1515,10 @@
.createInstance(Components.interfaces.nsISHistoryInternal);
oldBrowser.webNavigation.sessionHistory = newSH;
var entry = oldSH.getEntryAtIndex(oldSH.index, false)
.QueryInterface(Components.interfaces.nsISHEntry)
.clone();
// don't try to repost data when restoring the tab
entry.postData = null;
newSH.addEntry(entry, true);
// about:blank is light

Просмотреть файл

@ -346,6 +346,9 @@ function selectServer(uri)
// see bug #XXXXXX
serverMenu.setAttribute("label", msgFolder.name);
serverMenu.setAttribute("uri",uri);
serverMenu.setAttribute("IsServer", msgFolder.isServer);
serverMenu.setAttribute("IsSecure", msgFolder.server.isSecure);
serverMenu.setAttribute("ServerType", msgFolder.server.type);
setServer(uri);
}

Просмотреть файл

@ -72,6 +72,10 @@
accesskey="&filtersForPrefix.accesskey;" control="serverMenu"/>
<menulist id="serverMenu"
class="folderMenuItem"
IsServer="true"
IsSecure="false"
ServerType="none"
datasources="rdf:msgaccountmanager rdf:mailnewsfolders"
sortResource="http://home.netscape.com/NC-rdf#FolderTreeName"
sortDirection="ascending"

Просмотреть файл

@ -101,8 +101,9 @@
margin: 0px !important;
}
/* ::::: iconic menuitems ::::: */
/* ::::: iconic menus and menuitems ::::: */
menu.menu-iconic > .menu-iconic-left,
menuitem.menuitem-iconic > .menu-iconic-left {
display: -moz-box;
}