bug 866304 DialogUI dialogs cleanup patch. Removes unused/obsolete code from DialogUI. r=mbrubeck

The "dialog" concept is unused (the last consumer was the sync setup UI which is now a flyout) and is obsolete since we have prompts.
This commit is contained in:
Tim Abraldes 2013-08-05 23:29:55 -07:00
parent 9ee2f09a48
commit 808e8c5722

View File

@ -231,7 +231,6 @@ var BrowserUI = {
},
showContent: function showContent(aURI) {
DialogUI.closeAllDialogs();
StartUI.update(aURI);
ContextUI.dismissTabs();
ContextUI.dismissContextAppbar();
@ -735,13 +734,6 @@ var BrowserUI = {
return;
}
// Check open dialogs
let dialog = DialogUI.activeDialog;
if (dialog) {
dialog.close();
return;
}
// Check open modal elements
if (DialogUI.modals.length > 0) {
return;
@ -1317,7 +1309,6 @@ var PanelUI = {
};
var DialogUI = {
_dialogs: [],
_popup: null,
init: function() {
@ -1384,39 +1375,6 @@ var DialogUI = {
return dialog;
},
/*******************************************
* Dialogs
*/
get activeDialog() {
// Return the topmost dialog
if (this._dialogs.length)
return this._dialogs[this._dialogs.length - 1];
return null;
},
closeAllDialogs: function closeAllDialogs() {
while (this.activeDialog)
this.activeDialog.close();
},
pushDialog: function pushDialog(aDialog) {
// If we have a dialog push it on the stack and set the attr for CSS
if (aDialog) {
this._dialogs.push(aDialog);
Elements.contentShowing.setAttribute("disabled", "true");
}
},
popDialog: function popDialog() {
if (this._dialogs.length)
this._dialogs.pop();
// If no more dialogs are being displayed, remove the attr for CSS
if (!this._dialogs.length)
Elements.contentShowing.removeAttribute("disabled");
},
/*******************************************
* Popups
*/