From fa628495d14e5893fe2471f696638aec25244861 Mon Sep 17 00:00:00 2001 From: rolux Date: Sat, 30 Jun 2012 20:02:52 +0000 Subject: [PATCH] reformatting --- static/js/pandora/account.js | 50 +++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/static/js/pandora/account.js b/static/js/pandora/account.js index c707dc117..3e9b163c5 100644 --- a/static/js/pandora/account.js +++ b/static/js/pandora/account.js @@ -56,29 +56,35 @@ pandora.ui.accountDialogOptions = function(action, value) { return Ox.Button({ id: 'cancel' + Ox.toTitleCase(action), title: 'Cancel' - }).bindEvent('click', function() { - pandora.$ui.accountDialog.close(); - pandora.UI.set({page: ''}); + }).bindEvent({ + click: function() { + pandora.$ui.accountDialog.close(); + pandora.UI.set({page: ''}); + } }); } else if (type == 'submit') { return Ox.Button({ disabled: true, id: 'submit' + Ox.toTitleCase(action), title: buttonTitle[action] - }).bindEvent('click', function() { - pandora.$ui.accountForm.submit(); + }).bindEvent({ + click: function() { + pandora.$ui.accountForm.submit(); + } }); } else { return Ox.Button({ id: type, title: buttonTitle[type] + '...' - }).bindEvent('click', function() { - if (['signin', 'signup'].indexOf(type) > -1 && type != pandora.user.ui.page) { - pandora.UI.set({page: type}); - } else { - pandora.$ui.accountDialog.options(pandora.ui.accountDialogOptions(type)); + }).bindEvent({ + click: function() { + if (['signin', 'signup'].indexOf(type) > -1 && type != pandora.user.ui.page) { + pandora.UI.set({page: type}); + } else { + 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({ id: 'stay', title: 'Stay Signed In' - }).bindEvent('click', function() { - that.close(); - pandora.UI.set({page: ''}); + }).bindEvent({ + click: function() { + that.close(); + pandora.UI.set({page: ''}); + } }), Ox.Button({ id: 'signout', title: 'Sign Out' - }).bindEvent('click', function() { - that.close(); - pandora.UI.set({page: ''}); - pandora.api.signout({}, function(result) { - pandora.signout(result.data); - }); + }).bindEvent({ + click: function() { + that.close(); + pandora.UI.set({page: ''}); + pandora.api.signout({}, function(result) { + pandora.signout(result.data); + }); + } }) ], content: Ox.Element()