mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-26 03:35:33 +00:00
still bug 28519 - mail 3 pane - finally getting it right. r=hyatt.
This commit is contained in:
parent
b48e62f3d2
commit
eb4561f07e
@ -158,7 +158,7 @@ var ThreadPaneController =
|
||||
ClearMessagePane();
|
||||
}
|
||||
//setting threadTree on
|
||||
document.getElementById("threadTree").setAttribute("focusring","true");
|
||||
//document.getElementById("threadTree").setAttribute("focusring","true");
|
||||
break;
|
||||
}
|
||||
},
|
||||
@ -168,14 +168,14 @@ var ThreadPaneController =
|
||||
// on blur events set the menu item texts back to the normal values
|
||||
if ( event == 'blur' )
|
||||
{
|
||||
document.getElementById("threadTree").setAttribute("focusring","false");
|
||||
//document.getElementById("threadTree").setAttribute("focusring","false");
|
||||
|
||||
}
|
||||
|
||||
if ( event == 'focus' )
|
||||
{
|
||||
//alert("focus")
|
||||
document.getElementById("threadTree").setAttribute("focusring","true");
|
||||
//document.getElementById("threadTree").setAttribute("focusring","true");
|
||||
|
||||
}
|
||||
}
|
||||
@ -503,44 +503,6 @@ function GetNumSelectedMessages()
|
||||
|
||||
function CommandUpdate_Mail()
|
||||
{
|
||||
//var messagePane = top.document.getElementById('messagePane');
|
||||
//var drawFocusBorder = messagePane.getAttribute('draw-focus-border');
|
||||
document.getElementById("messagepanebox").setAttribute("focusring","false");
|
||||
document.getElementById("threadTree").setAttribute("focusring","false")
|
||||
document.getElementById("folderTree").setAttribute("focusring","false")
|
||||
|
||||
if ( MessagePaneHasFocus() )
|
||||
{
|
||||
//if ( !drawFocusBorder )
|
||||
// messagePane.setAttribute('draw-focus-border', 'true');
|
||||
document.getElementById("messagepanebox").setAttribute("focusring","true");
|
||||
//document.getElementById("threadTree").setAttribute("focusring","false")
|
||||
//document.getElementById("folderTree").setAttribute("focusring","false")
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
//if ( drawFocusBorder )
|
||||
// messagePane.removeAttribute('draw-focus-border');
|
||||
//document.getElementById("messagepanebox").setAttribute("focusring","false");
|
||||
|
||||
if( WhichPaneHasFocus() == "threadTree"){
|
||||
document.getElementById("threadTree").setAttribute("focusring","true")
|
||||
//document.getElementById("folderTree").setAttribute("focusring","false")
|
||||
}
|
||||
|
||||
// mail3PaneWindowCommands.js
|
||||
else{
|
||||
if(WhichPaneHasFocus()=="folderTree")
|
||||
//document.getElementById("threadTree").setAttribute("focusring","false")
|
||||
document.getElementById("folderTree").setAttribute("focusring","true")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//goUpdateCommand('button_delete');
|
||||
|
||||
@ -567,6 +529,52 @@ function CommandUpdate_Mail()
|
||||
goUpdateCommand('cmd_compactFolder');
|
||||
}
|
||||
|
||||
|
||||
var lastFocusedElement=null;
|
||||
|
||||
function FocusRingUpdate_Mail(){
|
||||
var currentFocusedElement = null;
|
||||
|
||||
if(MessagePaneHasFocus()){
|
||||
currentFocusedElement="messagepanebox"
|
||||
}
|
||||
else{
|
||||
currentFocusedElement= WhichPaneHasFocus()
|
||||
}
|
||||
|
||||
if(currentFocusedElement != lastFocusedElement){
|
||||
if( currentFocusedElement == "threadTree"){
|
||||
document.getElementById("threadTree").setAttribute("focusring","true")
|
||||
//document.getElementById("folderTree").setAttribute("focusring","false")
|
||||
document.getElementById("messagepanebox").setAttribute("focusring","false")
|
||||
|
||||
}
|
||||
|
||||
else{
|
||||
if(currentFocusedElement=="folderTree"){
|
||||
document.getElementById("threadTree").setAttribute("focusring","false")
|
||||
//document.getElementById("folderTree").setAttribute("focusring","true")
|
||||
document.getElementById("messagepanebox").setAttribute("focusring","false")
|
||||
}
|
||||
else{
|
||||
if(currentFocusedElement=="messagepanebox"){
|
||||
document.getElementById("threadTree").setAttribute("focusring","false")
|
||||
//document.getElementById("folderTree").setAttribute("focusring","false")
|
||||
document.getElementById("messagepanebox").setAttribute("focusring","true")
|
||||
}
|
||||
else{
|
||||
document.getElementById("threadTree").setAttribute("focusring","false")
|
||||
//document.getElementById("folderTree").setAttribute("focusring","false")
|
||||
document.getElementById("messagepanebox").setAttribute("focusring","false")
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
lastFocusedElement=currentFocusedElement;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function ThreadTreeUpdate_Mail(command)
|
||||
{
|
||||
goUpdateCommand('button_reply');
|
||||
@ -655,6 +663,7 @@ function MessagePaneHasFocus()
|
||||
if ( focusedWindow && messagePaneWindow && (focusedWindow != top) )
|
||||
{
|
||||
var hasFocus = IsSubWindowOf(focusedWindow, messagePaneWindow, false);
|
||||
|
||||
return hasFocus;
|
||||
}
|
||||
|
||||
@ -686,7 +695,9 @@ function WhichPaneHasFocus(){
|
||||
if(currentNode.getAttribute("id") == "threadTree" ){ whichPane="threadTree" }
|
||||
|
||||
if(currentNode.getAttribute("id") == "folderTree"){ whichPane="folderTree" }
|
||||
|
||||
|
||||
if(currentNode.getAttribute("id") == "messagepanebox"){ whichPane="messagepanebox" }
|
||||
|
||||
currentNode = currentNode.parentNode;
|
||||
}
|
||||
|
||||
|
@ -73,6 +73,10 @@ Rights Reserved.
|
||||
commandupdater="true"
|
||||
events="threadTree-select"
|
||||
oncommandupdate="ThreadTreeUpdate_Mail()"/>
|
||||
<commandset id="FocusRingUpdate_Mail"
|
||||
commandupdater="true"
|
||||
events="focus"
|
||||
oncommandupdate="FocusRingUpdate_Mail()"/>
|
||||
<commandset id="globalEditMenuItems"/>
|
||||
<commandset id="selectEditMenuItems"/>
|
||||
<commandset id="undoEditMenuItems"/>
|
||||
@ -123,7 +127,7 @@ Rights Reserved.
|
||||
|
||||
<box orient="vertical" flex="1">
|
||||
<box align ="horizontal" flex="1">
|
||||
<tree id="folderTree" flex="1" style="width:0px;" context="folderPaneContext" focusring="false"/>
|
||||
<tree id="folderTree" flex="1" style="width:0px;" context="folderPaneContext" />
|
||||
<splitter id="gray_vertical_splitter" collapse="after" persist="state"/>
|
||||
<tree id="threadTree" flex="2" style="width:0px" context="threadPaneContext" class="window-focusborder" focusring="false"/>
|
||||
</box>
|
||||
|
@ -71,10 +71,15 @@ Rights Reserved.
|
||||
<script src="chrome://navigator/content/navigator.js"></script>
|
||||
|
||||
<commands id="commands">
|
||||
|
||||
<commandset id="CommandUpdate_Mail"
|
||||
commandupdater="true"
|
||||
events="focus,folderTree-select,threadTree-select,blur"
|
||||
events="focus,folderTree-select,threadTree-select"
|
||||
oncommandupdate="CommandUpdate_Mail()"/>
|
||||
<commandset id="FocusRingUpdate_Mail"
|
||||
commandupdater="true"
|
||||
events="focus"
|
||||
oncommandupdate="FocusRingUpdate_Mail()"/>
|
||||
<commandset id="ThreadTreeUpdate_Mail"
|
||||
commandupdater="true"
|
||||
events="threadTree-select"
|
||||
@ -83,6 +88,7 @@ Rights Reserved.
|
||||
<commandset id="selectEditMenuItems"/>
|
||||
<commandset id="undoEditMenuItems"/>
|
||||
<commandset id="clipboardEditMenuItems"/>
|
||||
|
||||
</commands>
|
||||
|
||||
<broadcasterset id="broadcasterset"/>
|
||||
@ -123,14 +129,14 @@ Rights Reserved.
|
||||
|
||||
<box id="sidebar-box">
|
||||
<sidebarheader type="box" class="sidebarheader-main" value="&mail-sidebar-header.label;"/>
|
||||
<tree id="folderTree" flex="1000" context="folderPaneContext" focusring="false"/>
|
||||
<tree id="folderTree" flex="1000" context="folderPaneContext" />
|
||||
</box>
|
||||
|
||||
<splitter id="sidebar-splitter"/>
|
||||
|
||||
<box orient="vertical" flex="1">
|
||||
|
||||
<tree id="threadTree" flex="2" style="height:0px" context="threadPaneContext" class="window-focusborder" focusring="false"/>
|
||||
<tree id="threadTree" flex="2" style="height:0px" context="threadPaneContext" focusring="false"/>
|
||||
|
||||
<!-- if you change this id, please change GetThreadAndMessagePaneSplitter() and MsgToggleMessagePane() -->
|
||||
<splitter collapse="after" persist="state" onclick="OnClickThreadAndMessagePaneSplitter()"
|
||||
|
@ -33,6 +33,7 @@ Rights Reserved.
|
||||
|
||||
|
||||
<tree datasources="rdf:null" id="threadTree"
|
||||
class="window-focusborder"
|
||||
onclick="ThreadPaneOnClick(event);"
|
||||
ondraggesture="return BeginDragThreadTree(event);"
|
||||
ondragdrop="return DropOnThreadTree(event);"
|
||||
|
@ -414,27 +414,24 @@ searchterm
|
||||
*Focus rings on 3 pane view
|
||||
*/
|
||||
|
||||
|
||||
#folderTree[focusring="true"]{
|
||||
border:2px solid black;
|
||||
}
|
||||
|
||||
#folderTree[focusring="false"]{
|
||||
border:2px solid transparent;
|
||||
}
|
||||
|
||||
#folderTree{
|
||||
border: 2px solid transparent !important;
|
||||
}
|
||||
|
||||
#folderTree:focus{
|
||||
border: 2px solid black !important;
|
||||
}
|
||||
|
||||
|
||||
.window-focusborder[focusring="true"]{
|
||||
|
||||
border:2px solid black;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.window-focusborder[focusring="false"]{
|
||||
border:2px solid transparent;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -413,25 +413,23 @@ searchterm
|
||||
*Focus rings on 3 pane view
|
||||
*/
|
||||
|
||||
|
||||
#folderTree[focusring="true"]{
|
||||
border:2px solid black;
|
||||
}
|
||||
|
||||
#folderTree[focusring="false"]{
|
||||
border:2px solid transparent;
|
||||
}
|
||||
|
||||
#folderTree{
|
||||
border: 2px solid transparent !important;
|
||||
|
||||
}
|
||||
|
||||
#folderTree:focus{
|
||||
border: 2px solid black !important;
|
||||
}
|
||||
|
||||
|
||||
.window-focusborder[focusring="true"]{
|
||||
|
||||
border:2px solid black;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.window-focusborder[focusring="false"]{
|
||||
border:2px solid transparent;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -487,21 +487,17 @@ searchterm {
|
||||
*Focus rings on 3 pane view
|
||||
*/
|
||||
|
||||
|
||||
#folderTree[focusring="true"]{
|
||||
border:2px solid black;
|
||||
}
|
||||
|
||||
#folderTree[focusring="false"]{
|
||||
border:2px solid transparent;
|
||||
}
|
||||
|
||||
#folderTree{
|
||||
border: 2px solid transparent;
|
||||
}
|
||||
|
||||
#folderTree:focus{
|
||||
border: 2px solid black;
|
||||
}
|
||||
|
||||
|
||||
.window-focusborder[focusring="true"]{
|
||||
|
||||
border:2px solid black;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.window-focusborder[focusring="false"]{
|
||||
@ -510,3 +506,7 @@ searchterm {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user