зеркало из https://github.com/mozilla/gecko-dev.git
Bug 329544 Port back mailnews improvements to dynamic 3-pane generation/decks
p=me r=mscott sr=bienvenu
This commit is contained in:
Родитель
4597bc5c39
Коммит
14ca93ed83
|
@ -79,7 +79,7 @@ var favoriteFoldersDataSource;
|
|||
var recentFoldersDataSource;
|
||||
|
||||
var accountCentralBox = null;
|
||||
var gAccountCentralLoaded = false;
|
||||
var gAccountCentralLoaded = true;
|
||||
var gFakeAccountPageLoaded = false;
|
||||
//End progress and Status variables
|
||||
|
||||
|
@ -211,7 +211,6 @@ function CreateMailWindowGlobals()
|
|||
unreadFolderDataSource = Components.classes[unreadFoldersDSContractID].getService();
|
||||
favoriteFoldersDataSource = Components.classes[favoriteFoldersDSContractID].getService();
|
||||
recentFoldersDataSource = Components.classes[recentFoldersDSContractID].getService();
|
||||
accountCentralBox = document.getElementById("accountCentralBox");
|
||||
}
|
||||
|
||||
function InitMsgWindow()
|
||||
|
@ -531,34 +530,19 @@ function loadStartPage()
|
|||
}
|
||||
}
|
||||
|
||||
// When the ThreadPane is hidden via the displayDeck, we should collapse the
|
||||
// elements that are only meaningful to the thread pane. When AccountCentral is
|
||||
// shown via the displayDeck, we need to switch the displayDeck to show the
|
||||
// accountCentralBox, and load the iframe in the AccountCentral box with
|
||||
// corresponding page.
|
||||
function ShowAccountCentral()
|
||||
{
|
||||
if (document.getElementById("displayDeck").selectedPanel == accountCentralBox)
|
||||
ShowingAccountCentral(); // force us to reload account central because the user has switched accounts
|
||||
else
|
||||
document.getElementById("displayDeck").selectedPanel = accountCentralBox;
|
||||
}
|
||||
|
||||
// When AccountCentral is shown via the displayDeck, we need to switch the
|
||||
// displayDeck to show the accountCentralBox, collapse all the other
|
||||
// UI elements that aren't meaningful for AccountCentral, and finally
|
||||
// load the iframe in the AccountCentral box with corresponding page.
|
||||
function ShowingAccountCentral()
|
||||
{
|
||||
try
|
||||
{
|
||||
document.getElementById("displayDeck").selectedPanel = accountCentralBox;
|
||||
var acctCentralPage = pref.getComplexValue("mailnews.account_central_page.url",
|
||||
Components.interfaces.nsIPrefLocalizedString).data;
|
||||
GetMessagePane().collapsed = true;
|
||||
document.getElementById("threadpane-splitter").collapsed = true;
|
||||
document.getElementById("key_toggleMessagePane").setAttribute("disabled", "true");
|
||||
|
||||
Components.interfaces.nsIPrefLocalizedString).data;
|
||||
window.frames["accountCentralPane"].location.href = acctCentralPage;
|
||||
|
||||
if (!IsFolderPaneCollapsed())
|
||||
GetFolderTree().focus();
|
||||
|
||||
gAccountCentralLoaded = true;
|
||||
}
|
||||
catch (ex)
|
||||
{
|
||||
|
@ -566,17 +550,16 @@ function ShowingAccountCentral()
|
|||
}
|
||||
}
|
||||
|
||||
function ShowingAccountCentral()
|
||||
{
|
||||
if (!IsFolderPaneCollapsed())
|
||||
GetFolderTree().focus();
|
||||
|
||||
gAccountCentralLoaded = true;
|
||||
}
|
||||
|
||||
function HidingAccountCentral()
|
||||
{
|
||||
try
|
||||
{
|
||||
window.frames["accountCentralPane"].location.href = "about:blank";
|
||||
}
|
||||
catch (ex)
|
||||
{
|
||||
dump("Error hiding AccountCentral page -> " + ex + "\n");
|
||||
}
|
||||
document.getElementById("key_toggleMessagePane").removeAttribute("disabled");
|
||||
gAccountCentralLoaded = false;
|
||||
}
|
||||
|
||||
|
@ -591,11 +574,17 @@ function ShowingThreadPane()
|
|||
var threadPaneSplitter = document.getElementById("threadpane-splitter");
|
||||
threadPaneSplitter.collapsed = false;
|
||||
GetMessagePane().collapsed = (threadPaneSplitter.getAttribute("state") == "collapsed");
|
||||
document.getElementById("key_toggleMessagePane").removeAttribute("disabled");
|
||||
}
|
||||
|
||||
function HidingThreadPane()
|
||||
{
|
||||
ClearThreadPane();
|
||||
ClearThreadPane();
|
||||
GetUnreadCountElement().hidden = true;
|
||||
GetTotalCountElement().hidden = true;
|
||||
GetMessagePane().collapsed = true;
|
||||
document.getElementById("threadpane-splitter").collapsed = true;
|
||||
document.getElementById("key_toggleMessagePane").setAttribute("disabled", "true");
|
||||
}
|
||||
|
||||
// the find toolbar needs a method called getBrowser
|
||||
|
@ -606,9 +595,8 @@ function getBrowser()
|
|||
|
||||
function ObserveDisplayDeckChange(event)
|
||||
{
|
||||
var deck = document.getElementById("displayDeck");
|
||||
var nowSelected = null;
|
||||
try { nowSelected = deck.selectedPanel.id; } catch (ex) { }
|
||||
var selectedPanel = document.getElementById("displayDeck").selectedPanel;
|
||||
var nowSelected = selectedPanel ? selectedPanel.id : "";
|
||||
|
||||
if (nowSelected == "threadPaneBox")
|
||||
ShowingThreadPane();
|
||||
|
|
|
@ -404,7 +404,7 @@
|
|||
<key keycode="VK_F6" oncommand="SwitchPaneFocus(event);"/>
|
||||
|
||||
<!-- View Toggle Keys (F8) -->
|
||||
<key id="key_toggleMessagePane" keycode="VK_F8" oncommand="MsgToggleMessagePane();"/>
|
||||
<key id="key_toggleMessagePane" keycode="VK_F8" oncommand="MsgToggleMessagePane();" disabled="true"/>
|
||||
|
||||
<!-- Label Keys -->
|
||||
<key id="key_label0" charcode="&labelCmd0.key;" oncommand="goDoCommand('cmd_label0')"/>
|
||||
|
|
|
@ -313,7 +313,11 @@
|
|||
<hbox id="messengerBox" flex="1" minheight="100" height="100" persist="height">
|
||||
<deck id="displayDeck" flex="1" selectedIndex="0"
|
||||
onselect="ObserveDisplayDeckChange(event)">
|
||||
<!-- first panel is the threadPane -->
|
||||
<!-- first panel in displayDeck is Account Central -->
|
||||
<vbox id="accountCentralBox" flex="1">
|
||||
<iframe name="accountCentralPane" width="150" flex="1" src="about:blank"/>
|
||||
</vbox>
|
||||
<!-- second panel is the threadPane -->
|
||||
<vbox id="threadPaneBox" flex="1">
|
||||
<tree id="threadTree" persist="lastfoldersent" flex="2" enableColumnDrag="true" _selectDelay="500" class="plain focusring" lastfoldersent="false"
|
||||
disableKeyNavigation="true"
|
||||
|
@ -385,19 +389,16 @@
|
|||
<treechildren ondraggesture="BeginDragThreadPane(event);"/>
|
||||
</tree>
|
||||
</vbox>
|
||||
<!-- second panel in displayDeck is Account Central -->
|
||||
<vbox id="accountCentralBox" flex="1">
|
||||
<iframe name="accountCentralPane" width="150" flex="1" src="about:blank"/>
|
||||
</vbox>
|
||||
<!-- extensions may overlay in additional panels; don't assume that there are only 2! -->
|
||||
</deck> <!-- displayDeck -->
|
||||
</hbox>
|
||||
|
||||
<!-- if you change this id, please change GetThreadAndMessagePaneSplitter() and MsgToggleMessagePane() -->
|
||||
<splitter id="threadpane-splitter" collapse="after" persist="state"
|
||||
<splitter id="threadpane-splitter" collapse="after" persist="state" collapsed="true"
|
||||
onmouseup="OnMouseUpThreadAndMessagePaneSplitter()"/>
|
||||
|
||||
<vbox id="messagepanebox" flex="1" minheight="100" height="200" minwidth="100" width="200" persist="collapsed height width">
|
||||
<vbox id="messagepanebox" flex="1" minheight="100" height="200"
|
||||
minwidth="100" width="200" persist="height width">
|
||||
<deck id="msgNotificationBar"/>
|
||||
<hbox id="msgHeaderView"/>
|
||||
<browser id="messagepane" context="messagePaneContext" autofind="false"
|
||||
|
|
|
@ -793,9 +793,10 @@ function delayedOnLoadMessenger()
|
|||
|
||||
AddMailOfflineObserver();
|
||||
CreateMailWindowGlobals();
|
||||
accountCentralBox = document.getElementById("accountCentralBox");
|
||||
GetMessagePane().collapsed = true;
|
||||
verifyAccounts(null);
|
||||
|
||||
ShowThreadPane();
|
||||
InitMsgWindow();
|
||||
messenger.SetWindow(window, msgWindow);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче