forked from 0x2620/pandora
correctly update url when closing preferences dialog via close button
This commit is contained in:
parent
876dc8f138
commit
8d637a33f0
1 changed files with 30 additions and 25 deletions
|
@ -3,10 +3,10 @@
|
||||||
pandora.ui.preferencesDialog = function() {
|
pandora.ui.preferencesDialog = function() {
|
||||||
|
|
||||||
var tabs = [
|
var tabs = [
|
||||||
{id: 'account', title: 'Account', selected: true},
|
{id: 'account', title: 'Account', selected: true},
|
||||||
{id: 'advanced', title: 'Advanced'}
|
{id: 'advanced', title: 'Advanced'}
|
||||||
];
|
],
|
||||||
var $tabPanel = Ox.TabPanel({
|
$tabPanel = Ox.TabPanel({
|
||||||
content: function(id) {
|
content: function(id) {
|
||||||
var $content = Ox.Element()
|
var $content = Ox.Element()
|
||||||
.css({overflowY: 'auto'})
|
.css({overflowY: 'auto'})
|
||||||
|
@ -125,27 +125,32 @@ pandora.ui.preferencesDialog = function() {
|
||||||
return $content;
|
return $content;
|
||||||
},
|
},
|
||||||
tabs: tabs
|
tabs: tabs
|
||||||
});
|
}),
|
||||||
var $dialog = Ox.Dialog({
|
$dialog = Ox.Dialog({
|
||||||
buttons: [
|
buttons: [
|
||||||
Ox.Button({
|
Ox.Button({
|
||||||
id: 'done',
|
id: 'done',
|
||||||
title: 'Done'
|
title: 'Done'
|
||||||
}).bindEvent({
|
}).bindEvent({
|
||||||
click: function() {
|
click: function() {
|
||||||
$dialog.close();
|
$dialog.close();
|
||||||
pandora.UI.set({page: ''});
|
}
|
||||||
}
|
})
|
||||||
})
|
],
|
||||||
],
|
closeButton: true,
|
||||||
closeButton: true,
|
content: $tabPanel,
|
||||||
content: $tabPanel,
|
height: 192,
|
||||||
height: 192,
|
minHeight: 192,
|
||||||
minHeight: 192,
|
minWidth: 432,
|
||||||
minWidth: 432,
|
title: 'Preferences',
|
||||||
title: 'Preferences',
|
width: 432
|
||||||
width: 432
|
}),
|
||||||
});
|
closeDialog = $dialog.close;
|
||||||
|
|
||||||
|
$dialog.close = function() {
|
||||||
|
closeDialog();
|
||||||
|
pandora.UI.set({page: ''});
|
||||||
|
};
|
||||||
|
|
||||||
return $dialog;
|
return $dialog;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue