From 18fdba86548848c1532d75399f6b31454c021472 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Mon, 7 Oct 2013 19:41:20 +0000 Subject: [PATCH] fix home screen, fixes #1901 --- static/js/home.0xdb.js | 12 ++++++++---- static/js/home.indiancinema.js | 12 ++++++++---- static/js/home.js | 12 ++++++++---- static/js/home.padma.js | 12 ++++++++---- 4 files changed, 32 insertions(+), 16 deletions(-) diff --git a/static/js/home.0xdb.js b/static/js/home.0xdb.js index 74b40ee7b..5d28d85f9 100644 --- a/static/js/home.0xdb.js +++ b/static/js/home.0xdb.js @@ -119,8 +119,10 @@ pandora.ui.home = function() { var folder = pandora.getListData().folder, value = $findInput.value(); folder && pandora.$ui.folderList[folder].options({selected: []}); - pandora.$ui.findSelect.value('*'); - pandora.$ui.findInput.value(value); + if (pandora.user.ui.section == 'items') { + pandora.$ui.findSelect.value('*'); + pandora.$ui.findInput.value(value); + } that.fadeOutScreen(); pandora.UI.set({ page: '', @@ -129,7 +131,8 @@ pandora.ui.home = function() { ? [] : [{key: '*', value: value, operator: '='}], operator: '&' - } + }, + section: 'items' }); } }) @@ -151,7 +154,8 @@ pandora.ui.home = function() { .bindEvent({ click: function() { pandora.UI.set({ - page: pandora.user.ui.page == 'home' ? '' : pandora.user.ui.page + page: pandora.user.ui.page == 'home' ? '' : pandora.user.ui.page, + section: 'items' }); that.fadeOutScreen(); } diff --git a/static/js/home.indiancinema.js b/static/js/home.indiancinema.js index d8424b69d..6496a22c7 100644 --- a/static/js/home.indiancinema.js +++ b/static/js/home.indiancinema.js @@ -158,8 +158,10 @@ pandora.ui.home = function() { var folder = pandora.getListData().folder, value = $findInput.value(); folder && pandora.$ui.folderList[folder].options({selected: []}); - pandora.$ui.findSelect.value('*'); - pandora.$ui.findInput.value(value); + if (pandora.user.ui.section == 'items') { + pandora.$ui.findSelect.value('*'); + pandora.$ui.findInput.value(value); + } that.fadeOutScreen(); pandora.UI.set({ page: '', @@ -168,7 +170,8 @@ pandora.ui.home = function() { ? [] : [{key: '*', value: value, operator: '='}], operator: '&' - } + }, + section: 'items' }); } }) @@ -190,7 +193,8 @@ pandora.ui.home = function() { .bindEvent({ click: function() { pandora.UI.set({ - page: pandora.user.ui.page == 'home' ? '' : pandora.user.ui.page + page: pandora.user.ui.page == 'home' ? '' : pandora.user.ui.page, + section: 'items' }); that.fadeOutScreen(); } diff --git a/static/js/home.js b/static/js/home.js index 300c57e29..4c31fdf36 100644 --- a/static/js/home.js +++ b/static/js/home.js @@ -110,8 +110,10 @@ pandora.ui.home = function() { var folder = pandora.getListData().folder, value = $findInput.value(); folder && pandora.$ui.folderList[folder].options({selected: []}); - pandora.$ui.findSelect.value('*'); - pandora.$ui.findInput.value(value); + if (pandora.user.ui.section == 'items') { + pandora.$ui.findSelect.value('*'); + pandora.$ui.findInput.value(value); + } that.fadeOutScreen(); pandora.UI.set({ page: '', @@ -120,7 +122,8 @@ pandora.ui.home = function() { ? [] : [{key: '*', value: value, operator: '='}], operator: '&' - } + }, + section: 'items' }); } }) @@ -141,7 +144,8 @@ pandora.ui.home = function() { .bindEvent({ click: function() { pandora.UI.set({ - page: pandora.user.ui.page == 'home' ? '' : pandora.user.ui.page + page: pandora.user.ui.page == 'home' ? '' : pandora.user.ui.page, + section: 'items' }); that.fadeOutScreen(); } diff --git a/static/js/home.padma.js b/static/js/home.padma.js index c75b59a77..52e47324f 100644 --- a/static/js/home.padma.js +++ b/static/js/home.padma.js @@ -130,8 +130,10 @@ pandora.ui.home = function() { var folder = pandora.getListData().folder, value = $findInput.value(); folder && pandora.$ui.folderList[folder].options({selected: []}); - pandora.$ui.findSelect.value('*'); - pandora.$ui.findInput.value(value); + if (pandora.user.ui.section == 'items') { + pandora.$ui.findSelect.value('*'); + pandora.$ui.findInput.value(value); + } that.fadeOutScreen(); pandora.UI.set({ page: '', @@ -140,7 +142,8 @@ pandora.ui.home = function() { ? [] : [{key: '*', value: value, operator: '='}], operator: '&' - } + }, + section: 'items' }); } }) @@ -162,7 +165,8 @@ pandora.ui.home = function() { .bindEvent({ click: function() { pandora.UI.set({ - page: pandora.user.ui.page == 'home' ? '' : pandora.user.ui.page + page: pandora.user.ui.page == 'home' ? '' : pandora.user.ui.page, + section: 'items' }); that.fadeOutScreen(); }