зеркало из https://github.com/mozilla/pjs.git
(This commit introduces a dependency on the patch in bug 289483, which adds
a <deck> to tbird for controlling the main display mode.) Overlay the world's simplest lightning-deck into tbird, and switch to it when our pane gets the user's attention. r=pavlov, though I will note his objection to the Ltn prefix in my function. NPOTB > NKOTB.
This commit is contained in:
Родитель
54dccd5b6c
Коммит
7baaa5733f
|
@ -0,0 +1,23 @@
|
|||
function selectedCalendarPane(event)
|
||||
{
|
||||
dump("selecting calendar pane\n");
|
||||
document.getElementById("displayDeck").selectedPanel =
|
||||
document.getElementById("calendarViewBox");
|
||||
}
|
||||
|
||||
function LtnObserveDisplayDeckChange(event)
|
||||
{
|
||||
var deck = event.target;
|
||||
if (deck.selectedPanel.id == "calendarViewBox") {
|
||||
GetMessagePane().collapsed = true;
|
||||
document.getElementById("threadpane-splitter").collapsed = true;
|
||||
gSearchBox.collapsed = true;
|
||||
} else {
|
||||
// nothing to "undo" for now
|
||||
// Later: mark the view as not needing reflow due to new events coming
|
||||
// in, for better performance and batching.
|
||||
}
|
||||
}
|
||||
|
||||
document.getElementById("displayDeck").
|
||||
addEventListener("select", LtnObserveDisplayDeckChange, true);
|
|
@ -7,6 +7,7 @@
|
|||
<script type="application/x-javascript" src="chrome://calendar/content/calendarUtils.js"/>
|
||||
<script type="application/x-javascript" src="chrome://calendar/content/calendarCreation.js"/>
|
||||
<script type="application/x-javascript" src="chrome://lightning/content/calendar-management.js"/>
|
||||
<script type="application/x-javascript" src="chrome://lightning/content/messenger-overlay-sidebar.js"/>
|
||||
|
||||
<vbox id="folderPaneBox">
|
||||
<splitter id="folderpaneCalendarSplitter" collapse="after" persist="state"/>
|
||||
|
@ -19,7 +20,8 @@
|
|||
</popup>
|
||||
</popupset>
|
||||
|
||||
<tree id="calendarTree" flex="1" context="ltnCalendarTreeContext">
|
||||
<tree id="calendarTree" onfocus="selectedCalendarPane(event)" flex="1"
|
||||
context="ltnCalendarTreeContext">
|
||||
<treecols>
|
||||
<treecol label="Calendar" id="col-calendar-Calendar" flex="1"/>
|
||||
</treecols>
|
||||
|
@ -28,4 +30,9 @@
|
|||
</tree>
|
||||
</vbox>
|
||||
|
||||
<deck id="displayDeck">
|
||||
<vbox id="calendarViewBox" flex="1">
|
||||
<iframe name="calendarViewTempIframe" width="150" flex="1" src="javascript:'Lightning'"/>
|
||||
</vbox>
|
||||
</deck>
|
||||
</overlay>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
lightning.jar:
|
||||
content/lightning/messenger-overlay-sidebar.xul (content/messenger-overlay-sidebar.xul)
|
||||
content/lightning/messenger-overlay-sidebar.js (content/messenger-overlay-sidebar.js)
|
||||
content/lightning/calendar-management.js (content/calendar-management.js)
|
||||
content/lightning/weekView.xul (content/weekView.xul)
|
||||
content/lightning/weekView.js (content/weekView.js)
|
||||
|
|
Загрузка…
Ссылка в новой задаче