Bug #335590 --> experimental UI for exposing folder views. Add some left and right arrows for cycling the view. sr=bienvenu

This commit is contained in:
scott%scott-macgregor.org 2006-04-27 20:42:04 +00:00
parent 502cbe8c37
commit dfd8a49b91
4 changed files with 42 additions and 15 deletions

View File

@ -176,8 +176,12 @@
<label id="folderColumnLabel" hidden="true" value="&folderColumn.label;"/>
<sidebarheader id="folderPaneHeader" align="center">
<toolbarbutton id="folderpane-title" onclick="CycleFolderView();">
</toolbarbutton>
<label id="folderpane-title" onclick="CycleFolderView(true);"/>
<spacer flex="1"/>
<toolbarbutton id="folderview-cycler-left" class="folderview-cycler"
onclick="CycleFolderView(false);"/>
<toolbarbutton id="folderview-cycler-right" class="folderview-cycler"
onclick="CycleFolderView(true);"/>
</sidebarheader>
<tree id="folderTree" class="plain focusring" flex="1" seltype="single" selstyle="primary"

View File

@ -1069,8 +1069,6 @@ function UpdateFolderColumnVisibility()
}
folderNameCol.setAttribute("hideheader", showColumns ? "false" : "true");
var folderPaneHeader = document.getElementById("folderPaneHeader");
folderPaneHeader.setAttribute("hidden", showColumns ? "true" : "false");
var folderTree = document.getElementById("folderTree");
folderTree.setAttribute("hidecolumnpicker", showColumns ? "false" : "true");
var hidden = folderUnreadCol.getAttribute("hidden");
@ -1122,16 +1120,18 @@ function loadFolderView(aNewFolderView)
}
folderTree.setAttribute('ref', folderViews[aNewFolderView].ref);
folderPaneHeader.label = gMessengerBundle.getString(folderViews[aNewFolderView].label);
folderPaneHeader.value = gMessengerBundle.getString(folderViews[aNewFolderView].label);
// reflect the new value back into prefs
pref.setIntPref('mail.ui.folderpane.view', gCurrentFolderView = aNewFolderView);
}
function CycleFolderView()
// we can cycle the folder view forward or backwards
function CycleFolderView(aCycleForward)
{
// pass the call onto loadFolderView...
loadFolderView((gCurrentFolderView + 1) % kNumFolderViews);
var offset = aCycleForward ? 1 : kNumFolderViews - 1;
loadFolderView((gCurrentFolderView + offset) % kNumFolderViews);
}
function OnLoadFolderPane()
@ -1388,7 +1388,6 @@ function FolderPaneOnClick(event)
if (event.originalTarget.localName == "treecol") {
// clicking on the name column in the folder pane should not sort
event.stopPropagation();
CycleFolderView(); // needed to cycle the folder view for the old school tree col users
}
return;
}

View File

@ -869,6 +869,25 @@ treechildren::-moz-tree-cell-text(lc-black, selected) {
*/
/* ..... folder pane adjustments ..... */
#folderpane-title {
padding-left: 12px;
padding-right: 8px;
}
.folderview-cycler {
-moz-padding-end: 0px !important;
}
#folderview-cycler-left {
list-style-image: url("chrome://global/skin/arrow/arrow-lft.gif");
}
#folderview-cycler-right {
list-style-image: url("chrome://global/skin/arrow/arrow-rit.gif");
}
/* ..... splitter adjustments ..... */
splitter {

View File

@ -872,15 +872,20 @@ treechildren::-moz-tree-cell-text(lc-black, selected, focus) {
/* ..... folder pane adjustments ..... */
#folderpane-title {
margin-top: 0px;
margin-left: 4px;
margin-bottom: 0px;
padding: 0px;
padding-left: 12px;
padding-right: 8px;
}
#folderpane-title > .toolbarbutton-text {
padding-left: 8px;
padding-right: 8px;
.folderview-cycler {
-moz-padding-end: 0px !important;
}
#folderview-cycler-left {
list-style-image: url("chrome://global/skin/arrow/arrow-lft.gif");
}
#folderview-cycler-right {
list-style-image: url("chrome://global/skin/arrow/arrow-rit.gif");
}
/* ..... splitter adjustments ..... */