183994 - filter/search dialog ui nits, 169938 - clean up filter list statusbar, 186217 - filter not saved after action error, 195313 - menulists in filter/search dialogs dynamically change width. r/sr=sspitzer

This commit is contained in:
shliang%netscape.com 2003-02-28 00:21:31 +00:00
Родитель 459b0f454b
Коммит c54e77633a
11 изменённых файлов: 188 добавлений и 97 удалений

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

@ -127,7 +127,7 @@ function filterEditorOnLoad()
var count = 1; var count = 1;
var name = stub; var name = stub;
// Set the default filter name to be "untitled filter" // Set the default filter name to be "Untitled Filter"
while (duplicateFilterNameExists(name)) while (duplicateFilterNameExists(name))
{ {
count++; count++;
@ -490,6 +490,10 @@ function saveFilter()
{ {
str = gFilterBundle.getString("mustSelectAction"); str = gFilterBundle.getString("mustSelectAction");
window.alert(str); window.alert(str);
// reset gFilter so that filter is still saved next time around
// see bug #186217
gFilter = null;
return false; return false;
} }

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

@ -36,7 +36,6 @@ Contributor(s):
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="&window.title;" title="&window.title;"
windowtype="mailnews:filtereditor" windowtype="mailnews:filtereditor"
width="560" height="460"
persist="width height screenX screenY" persist="width height screenX screenY"
buttons="accept,cancel,help" buttons="accept,cancel,help"
onload="filterEditorOnLoad();" onload="filterEditorOnLoad();"
@ -67,101 +66,105 @@ Contributor(s):
<vbox flex="1"> <vbox flex="1">
<label value="&conditionDesc.label;"/> <label value="&conditionDesc.label;"/>
<vbox id="searchTermListBox" flex="1"/> <hbox flex="1">
<vbox id="searchTermListBox" flex="1"/>
</hbox>
</vbox> </vbox>
<separator/> <separator/>
<vbox> <vbox flex="1">
<label value="&filterActionDesc.label;" accesskey="&filterActionDesc.accesskey;"/> <label value="&filterActionDesc.label;" accesskey="&filterActionDesc.accesskey;"/>
<hbox align="start" height="100"> <hbox flex="1">
<listbox flex="1" id="filterActionList"> <vbox flex="1">
<listcols> <listbox flex="1" id="filterActionList">
<listcol flex="1"/> <listcols>
<listcol flex="1"/> <listcol flex="1"/>
<listcol flex="1"/> <listcol flex="1"/>
</listcols> <listcol flex="1"/>
<listitem allowevents="true"> </listcols>
<listcell> <listitem allowevents="true">
<checkbox id="moveToFolder" enablefornews="false" label="&moveToFolder.label;"/> <listcell>
</listcell> <checkbox id="moveToFolder" enablefornews="false" label="&moveToFolder.label;"/>
<listcell> </listcell>
<menulist id="actionTargetFolder" enablefornews="false" flex="1"/> <listcell>
</listcell> <menulist id="actionTargetFolder" enablefornews="false" flex="1"/>
<listcell> </listcell>
<button id="newFolderButton" enablefornews="false" label="&newFolderButton.label;" <listcell>
accesskey="&newFolderButton.accesskey;" <button id="newFolderButton" enablefornews="false" label="&newFolderButton.label;"
oncommand="MsgNewFolder(SearchNewFolderOkCallback);"/> accesskey="&newFolderButton.accesskey;"
</listcell> oncommand="MsgNewFolder(SearchNewFolderOkCallback);"/>
</listitem> </listcell>
</listitem>
<listitem allowevents="true"> <listitem allowevents="true">
<listcell> <listcell>
<checkbox id="label" label="&label.label;"/> <checkbox id="label" label="&label.label;"/>
</listcell> </listcell>
<listcell> <listcell>
<menulist id="actionValueLabel" flex="1"> <menulist id="actionValueLabel" flex="1">
<menupopup> <menupopup>
<!-- see MailNewsTypes2.idl --> <!-- see MailNewsTypes2.idl -->
<menuitem id="labelMenuItem1" value="1"/> <menuitem id="labelMenuItem1" value="1"/>
<menuitem id="labelMenuItem2" value="2"/> <menuitem id="labelMenuItem2" value="2"/>
<menuitem id="labelMenuItem3" value="3"/> <menuitem id="labelMenuItem3" value="3"/>
<menuitem id="labelMenuItem4" value="4"/> <menuitem id="labelMenuItem4" value="4"/>
<menuitem id="labelMenuItem5" value="5"/> <menuitem id="labelMenuItem5" value="5"/>
</menupopup> </menupopup>
</menulist> </menulist>
</listcell> </listcell>
</listitem> </listitem>
<listitem allowevents="true"> <listitem allowevents="true">
<listcell> <listcell>
<checkbox id="changePriority" label="&changePriority.label;"/> <checkbox id="changePriority" label="&changePriority.label;"/>
</listcell> </listcell>
<listcell> <listcell>
<menulist id="actionValuePriority" flex="1"> <menulist id="actionValuePriority" flex="1">
<menupopup> <menupopup>
<!-- see MailNewsTypes2.idl --> <!-- see MailNewsTypes2.idl -->
<menuitem value="6" label="&highestPriorityCmd.label;"/> <menuitem value="6" label="&highestPriorityCmd.label;"/>
<menuitem value="5" label="&highPriorityCmd.label;"/> <menuitem value="5" label="&highPriorityCmd.label;"/>
<menuitem value="4" label="&normalPriorityCmd.label;"/> <menuitem value="4" label="&normalPriorityCmd.label;"/>
<menuitem value="3" label="&lowPriorityCmd.label;"/> <menuitem value="3" label="&lowPriorityCmd.label;"/>
<menuitem value="2" label="&lowestPriorityCmd.label;"/> <menuitem value="2" label="&lowestPriorityCmd.label;"/>
</menupopup> </menupopup>
</menulist> </menulist>
</listcell> </listcell>
</listitem> </listitem>
<listitem allowevents="true"> <listitem allowevents="true">
<listcell> <listcell>
<checkbox id="markRead" label="&markRead.label;"/> <checkbox id="markRead" label="&markRead.label;"/>
</listcell> </listcell>
</listitem> </listitem>
<listitem allowevents="true"> <listitem allowevents="true">
<listcell> <listcell>
<checkbox id="markFlagged" label="&markFlagged.label;"/> <checkbox id="markFlagged" label="&markFlagged.label;"/>
</listcell> </listcell>
</listitem> </listitem>
<listitem allowevents="true"> <listitem allowevents="true">
<listcell> <listcell>
<checkbox id="delete" label="&delete.label;"/> <checkbox id="delete" label="&delete.label;"/>
</listcell> </listcell>
</listitem> </listitem>
<listitem allowevents="true"> <listitem allowevents="true">
<listcell> <listcell>
<checkbox id="kill" enablefornews="true" label="&killThread.label;"/> <checkbox id="kill" enablefornews="true" label="&killThread.label;"/>
</listcell> </listcell>
</listitem> </listitem>
<listitem allowevents="true"> <listitem allowevents="true">
<listcell> <listcell>
<checkbox id="watch" enablefornews="true" label="&watchThread.label;"/> <checkbox id="watch" enablefornews="true" label="&watchThread.label;"/>
</listcell> </listcell>
</listitem> </listitem>
</listbox> </listbox>
</vbox>
</hbox> </hbox>
</vbox> </vbox>

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

@ -32,6 +32,7 @@ Contributor(s): Hkan Waara <hwaara@chello.se>
xmlns:nc="http://home.netscape.com/NC-rdf#" xmlns:nc="http://home.netscape.com/NC-rdf#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
windowtype="mailnews:filterlist" windowtype="mailnews:filterlist"
width="480" height="360"
onload="onLoad();" onload="onLoad();"
onclose="return onFilterClose();" onclose="return onFilterClose();"
persist="width height screenX screenY" persist="width height screenX screenY"
@ -195,10 +196,12 @@ Contributor(s): Hkan Waara <hwaara@chello.se>
<separator/> <separator/>
<hbox id="statusContainerBox" align="center"> <statusbar class="chromeclass-status" id="status-bar">
<spacer flex="1"/> <statusbarpanel class="statusbarpanel-progress">
<label id="statusText" crop="right" flex="1"/> <progressmeter class="progressmeter-statusbar" id="statusbar-icon" mode="normal" value="0"/>
<progressmeter class="progressmeter-statusbar" id="statusbar-icon" mode="normal" value="0"/> </statusbarpanel>
</hbox> <statusbarpanel id="statusText" crop="right" flex="1"/>
</statusbar>
</window> </window>

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

@ -332,7 +332,10 @@ function createSearchRow(index, scope, searchTerm)
var listcells = searchrow.childNodes; var listcells = searchrow.childNodes;
var j=0; var j=0;
for (var i=0; i<listcells.length; i+=2) { for (var i=0; i<listcells.length; i+=2) {
stringNodes[j++] = listcells[i]; stringNodes[j++] = listcells[i];
// see bug #183994 for why these cells are hidden
listcells[i].hidden = true;
} }
searchTermObj.booleanNodes = stringNodes; searchTermObj.booleanNodes = stringNodes;

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

@ -41,13 +41,14 @@
<hbox id="searchterms"/> <hbox id="searchterms"/>
<listbox flex="1" id="searchTermList"> <listbox flex="1" id="searchTermList">
<listcols> <listcols>
<listcol flex="&searchTermListSpace1FlexValue;"/> // see bug #183994 for why these cells are hidden
<listcol flex="&searchTermListSpace1FlexValue;" hidden="true"/>
<listcol flex="&searchTermListAttributesFlexValue;"/> <listcol flex="&searchTermListAttributesFlexValue;"/>
<listcol flex="&searchTermListSpace2FlexValue;"/> <listcol flex="&searchTermListSpace2FlexValue;" hidden="true"/>
<listcol flex="&searchTermListOperatorsFlexValue;"/> <listcol flex="&searchTermListOperatorsFlexValue;"/>
<listcol flex="&searchTermListSpace3FlexValue;"/> <listcol flex="&searchTermListSpace3FlexValue;" hidden="true"/>
<listcol flex="&searchTermListValueFlexValue;"/> <listcol flex="&searchTermListValueFlexValue;"/>
<listcol flex="&searchTermListSpace4FlexValue;"/> <listcol flex="&searchTermListSpace4FlexValue;" hidden="true"/>
</listcols> </listcols>
<!-- this is what the listitems will look like: <!-- this is what the listitems will look like:

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

@ -6,7 +6,7 @@ mustSelectAction=You must select at least one filter action.
cannotHaveDuplicateFilterTitle=Duplicate Filter Name cannotHaveDuplicateFilterTitle=Duplicate Filter Name
cannotHaveDuplicateFilterMessage=The filter name you entered already exists. Please enter a different filter name. cannotHaveDuplicateFilterMessage=The filter name you entered already exists. Please enter a different filter name.
deleteFilterConfirmation=Are you sure you want to delete this filter? deleteFilterConfirmation=Are you sure you want to delete this filter?
untitledFilterName=untitled filter untitledFilterName=Untitled Filter
filterListBackUpMsg=Your filters do not work because the msgFilterRules.dat file, which contains your filters, could not be read. A new msgFilterRules.dat file will be created and a backup of the old file, called rulesbackup.dat, will be created in the same directory. filterListBackUpMsg=Your filters do not work because the msgFilterRules.dat file, which contains your filters, could not be read. A new msgFilterRules.dat file will be created and a backup of the old file, called rulesbackup.dat, will be created in the same directory.
customHeaderOverflow=You've exceeded the limit of 50 custom headers. Please remove one or more custom headers and try again. customHeaderOverflow=You've exceeded the limit of 50 custom headers. Please remove one or more custom headers and try again.
filterCustomHeaderOverflow=Your filters have exceeded the limit of 50 custom headers. Please edit the msgFilterRules.dat file, which contains your filters, to use fewer custom headers. filterCustomHeaderOverflow=Your filters have exceeded the limit of 50 custom headers. Please edit the msgFilterRules.dat file, which contains your filters, to use fewer custom headers.

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

@ -22,6 +22,7 @@ Rights Reserved.
--> -->
<?xml-stylesheet href="chrome://messenger/skin/dialogs.css" type="text/css"?> <?xml-stylesheet href="chrome://messenger/skin/dialogs.css" type="text/css"?>
<?xml-stylesheet href="chrome://messenger/skin/searchDialog.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?> <?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<?xul-overlay href="chrome://messenger/content/searchTermOverlay.xul"?> <?xul-overlay href="chrome://messenger/content/searchTermOverlay.xul"?>
@ -33,7 +34,7 @@ Rights Reserved.
onunload="mailViewOnUnLoad();" onunload="mailViewOnUnLoad();"
windowtype="mailnews:mailview" windowtype="mailnews:mailview"
title="&mailViewSetupTitle.label;" title="&mailViewSetupTitle.label;"
width="640" height="300" width="560" height="300"
persist="screenX screenY width height"> persist="screenX screenY width height">
<stringbundleset id="stringbundleset"> <stringbundleset id="stringbundleset">

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

@ -39,3 +39,24 @@ treechildren:-moz-tree-image(activeColumn) {
treechildren:-moz-tree-image(activeColumn, Enabled-true) { treechildren:-moz-tree-image(activeColumn, Enabled-true) {
list-style-image: url("chrome://messenger/skin/icons/check.gif"); list-style-image: url("chrome://messenger/skin/icons/check.gif");
} }
menulist {
min-width: 15em;
}
menulist > menupopup > menuitem {
padding-right: 2px;
}
textbox {
margin: 1px 4px;
}
listbox {
padding-top: 2px;
}
#FilterEditor {
width: 560px;
min-height:1px;
}

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

@ -42,5 +42,21 @@
#searchResultListBox { #searchResultListBox {
margin: 5px; margin: 5px;
height: 100px; height: 100px;
} }
menulist {
min-width: 15em;
}
menulist > menupopup > menuitem {
padding-right: 2px;
}
textbox {
margin: 1px 4px;
}
listbox {
padding-top: 2px;
}

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

@ -52,3 +52,25 @@ treechildren:-moz-tree-image(activeColumn) {
treechildren:-moz-tree-image(activeColumn, Enabled-true) { treechildren:-moz-tree-image(activeColumn, Enabled-true) {
list-style-image: url("chrome://global/skin/checkbox/cbox-check.gif"); list-style-image: url("chrome://global/skin/checkbox/cbox-check.gif");
} }
menulist {
min-width: 15em;
}
menulist > menupopup > menuitem {
padding-right: 2px;
}
textbox {
margin: 1px 4px;
}
listbox {
padding-top: 2px;
}
#FilterEditor {
width: 560px;
min-height:1px;
}

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

@ -58,3 +58,20 @@
margin: 5px; margin: 5px;
height: 100px; height: 100px;
} }
menulist {
min-width: 15em;
}
menulist > menupopup > menuitem {
padding-right: 2px;
}
textbox {
margin: 1px 4px;
}
listbox {
padding-top: 2px;
}