mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 293141 Fix "Copy" filter action UI issues r+a=shaver sr=bienvenu
This commit is contained in:
parent
d1574edf45
commit
987ae6bf26
@ -48,6 +48,7 @@ var gFilter;
|
||||
var gFilterList;
|
||||
var gFilterNameElement;
|
||||
var gActionTargetElement;
|
||||
var gActionTargetMoveElement;
|
||||
var gActionTargetCopyElement;
|
||||
var gActionValueDeck;
|
||||
var gActionPriority;
|
||||
@ -261,7 +262,7 @@ function setLabelAttributes(labelID, menuItemID)
|
||||
function initializeFilterWidgets()
|
||||
{
|
||||
gFilterNameElement = document.getElementById("filterName");
|
||||
gActionTargetElement = document.getElementById("actionTargetFolder");
|
||||
gActionTargetMoveElement = document.getElementById("actionTargetFolder");
|
||||
gActionTargetCopyElement = document.getElementById("actionTargetFolder2");
|
||||
gActionValueDeck = document.getElementById("actionValueDeck");
|
||||
gActionPriority = document.getElementById("actionValuePriority");
|
||||
@ -297,7 +298,7 @@ function initializeDialog(filter)
|
||||
gMoveToFolderCheckbox.checked = true;
|
||||
var target = filterAction.targetFolderUri;
|
||||
if (target)
|
||||
SetFolderPicker(target, gActionTargetElement.id);
|
||||
SetFolderPicker(target, gActionTargetMoveElement.id);
|
||||
}
|
||||
else if (filterAction.type == nsMsgFilterAction.CopyToFolder)
|
||||
{
|
||||
@ -436,8 +437,8 @@ function saveFilter()
|
||||
|
||||
if (gMoveToFolderCheckbox.checked)
|
||||
{
|
||||
if (gActionTargetElement)
|
||||
targetUri = gActionTargetElement.getAttribute("uri");
|
||||
if (gActionTargetMoveElement)
|
||||
targetUri = gActionTargetMoveElement.getAttribute("uri");
|
||||
if (!targetUri || targetUri == "")
|
||||
{
|
||||
if (gPromptService)
|
||||
@ -678,12 +679,14 @@ function showLabelColorFor(menuitem)
|
||||
function GetFirstSelectedMsgFolder()
|
||||
{
|
||||
var selectedFolder = gActionTargetElement.getAttribute("uri");
|
||||
if (!selectedFolder)
|
||||
return null;
|
||||
|
||||
var msgFolder = GetMsgFolderFromUri(selectedFolder, true);
|
||||
return msgFolder;
|
||||
}
|
||||
|
||||
function SearchNewFolderOkCallback(name,uri,targetid)
|
||||
function SearchNewFolderOkCallback(name, uri)
|
||||
{
|
||||
var msgFolder = GetMsgFolderFromUri(uri, true);
|
||||
var imapFolder = null;
|
||||
@ -719,7 +722,7 @@ function SearchNewFolderOkCallback(name,uri,targetid)
|
||||
if (!imapFolder)
|
||||
{
|
||||
var curFolder = uri+"/"+encodeURIComponent(name);
|
||||
SetFolderPicker(curFolder, targetid);
|
||||
SetFolderPicker(curFolder, gActionTargetElement.id);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -106,22 +106,24 @@
|
||||
</listcell>
|
||||
<listcell>
|
||||
<button id="newFolderButton" enablefornews="false" label="&newFolderButton.label;"
|
||||
accesskey="&newFolderButton.accesskey;"
|
||||
oncommand="MsgNewFolder(function (name,uri){ SearchNewFolderOkCallback(name,uri,'actionTargetFolder'); } )"/>
|
||||
accesskey="&newFolderButton.accesskey;"
|
||||
oncommand="gActionTargetElement = gActionTargetMoveElement;
|
||||
MsgNewFolder(SearchNewFolderOkCallback);"/>
|
||||
</listcell>
|
||||
</listitem>
|
||||
|
||||
<listitem allowevents="true">
|
||||
<listcell>
|
||||
<checkbox id="copyToFolder" enablefornews="false" label="©ToFolder.label;"/>
|
||||
<checkbox id="copyToFolder" label="©ToFolder.label;"/>
|
||||
</listcell>
|
||||
<listcell>
|
||||
<menulist id="actionTargetFolder2" enablefornews="false" flex="1"/>
|
||||
<menulist id="actionTargetFolder2" flex="1"/>
|
||||
</listcell>
|
||||
<listcell>
|
||||
<button id="copyNewFolderButton" enablefornews="false" label="&newFolderButton.label;"
|
||||
accesskey="&newFolderButton.accesskey;"
|
||||
oncommand="MsgNewFolder(function (name,uri){ SearchNewFolderOkCallback(name,uri,'actionTargetFolder2'); } )"/>
|
||||
<button id="copyNewFolderButton" label="&newFolderButton.label;"
|
||||
accesskey="&newFolderButton.accesskey;"
|
||||
oncommand="gActionTargetElement = gActionTargetCopyElement;
|
||||
MsgNewFolder(SearchNewFolderOkCallback);"/>
|
||||
</listcell>
|
||||
</listitem>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user