From a4085880b43a963cf52fd60cd098b5391e9218a9 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 4 Nov 2011 22:14:13 +0000 Subject: [PATCH] removeElement -> remove dont send empty query --- static/js/pandora/account.js | 4 ++-- static/js/pandora/appPanel.js | 2 +- static/js/pandora/home.js | 8 +++----- static/js/pandora/info.js | 2 +- static/js/pandora/leftPanel.js | 4 ++-- static/js/pandora/toolbar.js | 4 ++-- 6 files changed, 11 insertions(+), 13 deletions(-) diff --git a/static/js/pandora/account.js b/static/js/pandora/account.js index 96404988..bf442cfc 100644 --- a/static/js/pandora/account.js +++ b/static/js/pandora/account.js @@ -23,7 +23,7 @@ pandora.ui.accountDialog = function(action) { pandora.ui.accountDialogOptions = function(action, value) { //Ox.Log('', 'ACTION', action) - pandora.$ui.accountForm && pandora.$ui.accountForm.removeElement(); + pandora.$ui.accountForm && pandora.$ui.accountForm.remove(); var buttons = { signin: ['signup', 'reset'], signup: ['signin'], @@ -120,7 +120,7 @@ pandora.ui.accountForm = function(action, value) { //Ox.Event.unbind('usernameOrEmailInput') } //Ox.Log('', 'REMOVING ITEM', item.options('id')); - item.removeElement(); + item.remove(); }); } var items = { diff --git a/static/js/pandora/appPanel.js b/static/js/pandora/appPanel.js index be1a6d32..6b55a46d 100644 --- a/static/js/pandora/appPanel.js +++ b/static/js/pandora/appPanel.js @@ -22,7 +22,7 @@ pandora.ui.appPanel = function() { return that; } that.reload = function() { - pandora.$ui.appPanel.removeElement(); + pandora.$ui.appPanel.remove(); pandora.$ui.appPanel = pandora.ui.appPanel().appendTo(pandora.$ui.body); return that; } diff --git a/static/js/pandora/home.js b/static/js/pandora/home.js index 3f4ca7bb..f5d9a86c 100644 --- a/static/js/pandora/home.js +++ b/static/js/pandora/home.js @@ -109,11 +109,9 @@ pandora.ui.home = function() { pandora.$ui.findInput.options({value: value}); that.fadeOutScreen(); pandora.UI.set('find', { - conditions: [{ - key: '*', - value: value, - operator: '=' - }], + conditions: value === '' + ? [] + : [{key: '*', value: value, operator: '='}], operator: '&' }); } diff --git a/static/js/pandora/info.js b/static/js/pandora/info.js index edde5493..ce9fbd1f 100644 --- a/static/js/pandora/info.js +++ b/static/js/pandora/info.js @@ -78,7 +78,7 @@ pandora.ui.info = function() { keys: ['duration', 'rendered', 'videoRatio'] }, function(result) { if (result.data && result.data.rendered) { - pandora.$ui.videoPreview && pandora.$ui.videoPreview.removeElement(); + pandora.$ui.videoPreview && pandora.$ui.videoPreview.remove(); pandora.$ui.videoPreview = pandora.ui.videoPreview({ duration: result.data.duration, frameRatio: result.data.videoRatio, diff --git a/static/js/pandora/leftPanel.js b/static/js/pandora/leftPanel.js index 630fa47b..1a8a4036 100644 --- a/static/js/pandora/leftPanel.js +++ b/static/js/pandora/leftPanel.js @@ -25,11 +25,11 @@ pandora.ui.leftPanel = function() { pandora.user.ui.sidebarSize = data.size; var infoHeight = pandora.getInfoHeight(true); if (data.size < pandora.site.sectionButtonsWidth && pandora.$ui.sectionButtons) { - pandora.$ui.sectionButtons.removeElement(); + pandora.$ui.sectionButtons.remove(); delete pandora.$ui.sectionButtons; pandora.$ui.sectionbar.append(pandora.$ui.sectionSelect = pandora.ui.sectionSelect()); } else if (data.size >= pandora.site.sectionButtonsWidth && pandora.$ui.sectionSelect) { - pandora.$ui.sectionSelect.removeElement(); + pandora.$ui.sectionSelect.remove(); delete pandora.$ui.sectionSelect; pandora.$ui.sectionbar.append(pandora.$ui.sectionButtons = pandora.ui.sectionButtons()); } diff --git a/static/js/pandora/toolbar.js b/static/js/pandora/toolbar.js index 9a065176..af514257 100644 --- a/static/js/pandora/toolbar.js +++ b/static/js/pandora/toolbar.js @@ -44,8 +44,8 @@ pandora.ui.toolbar = function() { Ox.Log('', 'IS/WAS', isNavigationView, wasNavigationView); if (isNavigationView != wasNavigationView) { if (isNavigationView) { - pandora.$ui.sortSelect.removeElement(); - pandora.$ui.orderButton.removeElement(); + pandora.$ui.sortSelect.remove(); + pandora.$ui.orderButton.remove(); } else { pandora.$ui.sortSelect = pandora.ui.sortSelect().insertAfter(pandora.$ui.viewSelect); pandora.$ui.orderButton = pandora.ui.orderButton().insertAfter(pandora.$ui.sortSelect);