From 10e38ec279fabbcb119ebca99594c8fc5625d03f Mon Sep 17 00:00:00 2001 From: rolux Date: Mon, 17 Feb 2014 11:44:49 +0530 Subject: [PATCH] minor refactoring --- static/js/filterForm.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/static/js/filterForm.js b/static/js/filterForm.js index bb5d7c12d..33d48eb9c 100644 --- a/static/js/filterForm.js +++ b/static/js/filterForm.js @@ -3,6 +3,7 @@ 'use strict'; pandora.ui.filterForm = function(options) { + // mode can be find, list, embed var list = options.list, mode = options.mode, that = Ox.Element(); @@ -46,7 +47,11 @@ pandora.ui.filterForm = function(options) { .css(mode == 'embed' ? {} : {padding: '16px'}) .bindEvent({ change: function(data) { - if (mode == 'list') { + if (mode == 'find') { + if (pandora.user.ui.updateAdvancedFindResults) { + that.updateResults(); + } + } else if (mode == 'list') { pandora.api.editList({ id: list.id, query: data.value @@ -55,8 +60,6 @@ pandora.ui.filterForm = function(options) { that.updateResults(); } }); - } else if (pandora.user.ui.updateAdvancedFindResults) { - that.updateResults(); } that.triggerEvent('change', data); }