minor refactoring
This commit is contained in:
parent
6a9d5d054d
commit
10e38ec279
1 changed files with 6 additions and 3 deletions
|
@ -3,6 +3,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
pandora.ui.filterForm = function(options) {
|
pandora.ui.filterForm = function(options) {
|
||||||
|
// mode can be find, list, embed
|
||||||
var list = options.list,
|
var list = options.list,
|
||||||
mode = options.mode,
|
mode = options.mode,
|
||||||
that = Ox.Element();
|
that = Ox.Element();
|
||||||
|
@ -46,7 +47,11 @@ pandora.ui.filterForm = function(options) {
|
||||||
.css(mode == 'embed' ? {} : {padding: '16px'})
|
.css(mode == 'embed' ? {} : {padding: '16px'})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
change: function(data) {
|
change: function(data) {
|
||||||
if (mode == 'list') {
|
if (mode == 'find') {
|
||||||
|
if (pandora.user.ui.updateAdvancedFindResults) {
|
||||||
|
that.updateResults();
|
||||||
|
}
|
||||||
|
} else if (mode == 'list') {
|
||||||
pandora.api.editList({
|
pandora.api.editList({
|
||||||
id: list.id,
|
id: list.id,
|
||||||
query: data.value
|
query: data.value
|
||||||
|
@ -55,8 +60,6 @@ pandora.ui.filterForm = function(options) {
|
||||||
that.updateResults();
|
that.updateResults();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else if (pandora.user.ui.updateAdvancedFindResults) {
|
|
||||||
that.updateResults();
|
|
||||||
}
|
}
|
||||||
that.triggerEvent('change', data);
|
that.triggerEvent('change', data);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue