зеркало из https://github.com/mozilla/pjs.git
bug 372823 - Minor cleanup to reuse helpers where possible. r1=ctalbert, r2=jminta
This commit is contained in:
Родитель
9bfdfa4ff9
Коммит
c67297c870
|
@ -222,7 +222,7 @@ function switchToView(aViewType) {
|
|||
}
|
||||
|
||||
function moveView(aNumber) {
|
||||
getViewDeck().selectedPanel.moveView(aNumber);
|
||||
currentView().moveView(aNumber);
|
||||
}
|
||||
|
||||
// Helper function to get the view deck in a neutral way, regardless of whether
|
||||
|
@ -233,6 +233,9 @@ function getViewDeck() {
|
|||
return sbDeck || ltnDeck;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the currently visible calendar view.
|
||||
*/
|
||||
function currentView() {
|
||||
return getViewDeck().selectedPanel;
|
||||
}
|
||||
|
@ -242,10 +245,7 @@ function currentView() {
|
|||
* neutral way
|
||||
*/
|
||||
function getSelectedDay() {
|
||||
var sbView = document.getElementById("view-deck");
|
||||
var ltnView = document.getElementById("calendar-view-box");
|
||||
var viewDeck = sbView || ltnView;
|
||||
return viewDeck.selectedPanel.selectedDay;
|
||||
return currentView().selectedDay;
|
||||
}
|
||||
|
||||
/** Creates a timer that will fire after midnight. Pass in a function as
|
||||
|
|
Загрузка…
Ссылка в новой задаче