reformatting
This commit is contained in:
parent
0fe19ae166
commit
fa628495d1
1 changed files with 30 additions and 20 deletions
|
@ -56,29 +56,35 @@ pandora.ui.accountDialogOptions = function(action, value) {
|
||||||
return Ox.Button({
|
return Ox.Button({
|
||||||
id: 'cancel' + Ox.toTitleCase(action),
|
id: 'cancel' + Ox.toTitleCase(action),
|
||||||
title: 'Cancel'
|
title: 'Cancel'
|
||||||
}).bindEvent('click', function() {
|
}).bindEvent({
|
||||||
|
click: function() {
|
||||||
pandora.$ui.accountDialog.close();
|
pandora.$ui.accountDialog.close();
|
||||||
pandora.UI.set({page: ''});
|
pandora.UI.set({page: ''});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else if (type == 'submit') {
|
} else if (type == 'submit') {
|
||||||
return Ox.Button({
|
return Ox.Button({
|
||||||
disabled: true,
|
disabled: true,
|
||||||
id: 'submit' + Ox.toTitleCase(action),
|
id: 'submit' + Ox.toTitleCase(action),
|
||||||
title: buttonTitle[action]
|
title: buttonTitle[action]
|
||||||
}).bindEvent('click', function() {
|
}).bindEvent({
|
||||||
|
click: function() {
|
||||||
pandora.$ui.accountForm.submit();
|
pandora.$ui.accountForm.submit();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
return Ox.Button({
|
return Ox.Button({
|
||||||
id: type,
|
id: type,
|
||||||
title: buttonTitle[type] + '...'
|
title: buttonTitle[type] + '...'
|
||||||
}).bindEvent('click', function() {
|
}).bindEvent({
|
||||||
|
click: function() {
|
||||||
if (['signin', 'signup'].indexOf(type) > -1 && type != pandora.user.ui.page) {
|
if (['signin', 'signup'].indexOf(type) > -1 && type != pandora.user.ui.page) {
|
||||||
pandora.UI.set({page: type});
|
pandora.UI.set({page: type});
|
||||||
} else {
|
} else {
|
||||||
pandora.$ui.accountDialog.options(pandora.ui.accountDialogOptions(type));
|
pandora.$ui.accountDialog.options(pandora.ui.accountDialogOptions(type));
|
||||||
}
|
}
|
||||||
pandora.$ui.accountForm.find('input.OxInput')[0].focus();
|
pandora.$ui.accountForm.find('input.OxInput')[0].focus();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -310,19 +316,23 @@ pandora.ui.accountSignoutDialog = function() {
|
||||||
Ox.Button({
|
Ox.Button({
|
||||||
id: 'stay',
|
id: 'stay',
|
||||||
title: 'Stay Signed In'
|
title: 'Stay Signed In'
|
||||||
}).bindEvent('click', function() {
|
}).bindEvent({
|
||||||
|
click: function() {
|
||||||
that.close();
|
that.close();
|
||||||
pandora.UI.set({page: ''});
|
pandora.UI.set({page: ''});
|
||||||
|
}
|
||||||
}),
|
}),
|
||||||
Ox.Button({
|
Ox.Button({
|
||||||
id: 'signout',
|
id: 'signout',
|
||||||
title: 'Sign Out'
|
title: 'Sign Out'
|
||||||
}).bindEvent('click', function() {
|
}).bindEvent({
|
||||||
|
click: function() {
|
||||||
that.close();
|
that.close();
|
||||||
pandora.UI.set({page: ''});
|
pandora.UI.set({page: ''});
|
||||||
pandora.api.signout({}, function(result) {
|
pandora.api.signout({}, function(result) {
|
||||||
pandora.signout(result.data);
|
pandora.signout(result.data);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
content: Ox.Element()
|
content: Ox.Element()
|
||||||
|
|
Loading…
Reference in a new issue