From 146a4e5756814e9eadf361b77af41f7d57537eab Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Wed, 20 Jun 2012 12:47:15 +0200 Subject: [PATCH] use new list query option --- static/js/pandora/namesDialog.js | 6 +----- static/js/pandora/titlesDialog.js | 6 +----- static/js/pandora/usersDialog.js | 23 ++++++++--------------- 3 files changed, 10 insertions(+), 25 deletions(-) diff --git a/static/js/pandora/namesDialog.js b/static/js/pandora/namesDialog.js index c7fb80ba..4d4e9af4 100644 --- a/static/js/pandora/namesDialog.js +++ b/static/js/pandora/namesDialog.js @@ -25,11 +25,7 @@ pandora.ui.namesDialog = function() { operator: '|' }; $list.options({ - items: function(data, callback) { - return pandora.api.findNames(Ox.extend(data, { - query: query - }), callback); - } + query: query, }); } }), diff --git a/static/js/pandora/titlesDialog.js b/static/js/pandora/titlesDialog.js index b0c71148..6ee5e36f 100644 --- a/static/js/pandora/titlesDialog.js +++ b/static/js/pandora/titlesDialog.js @@ -23,11 +23,7 @@ pandora.ui.titlesDialog = function() { operator: '|' }; $list.options({ - items: function(data, callback) { - return pandora.api.findTitles(Ox.extend(data, { - query: query - }), callback); - } + query: query }); } }), diff --git a/static/js/pandora/usersDialog.js b/static/js/pandora/usersDialog.js index d1be264f..5880b7b2 100644 --- a/static/js/pandora/usersDialog.js +++ b/static/js/pandora/usersDialog.js @@ -360,16 +360,13 @@ pandora.ui.usersDialog = function() { ], columnsRemovable: true, columnsVisible: true, - items: function(data, callback) { - pandora.api.findUsers(Ox.extend(data, { - query: { - conditions: [ - {key: 'level', value: 'guest', operator: '!='}, - {key: 'level', value: 'robot', operator: '!='} - ], - operator: '&' - } - }), callback); + items: pandora.api.findUsers, + query: { + conditions: [ + {key: 'level', value: 'guest', operator: '!='}, + {key: 'level', value: 'robot', operator: '!='} + ], + operator: '&' }, keys: ['notes', 'groups'], max: -1, @@ -976,11 +973,7 @@ pandora.ui.usersDialog = function() { operator: key == 'all' && value ? '|' : '&' }; $list.options({ - items: function(data, callback) { - return pandora.api.findUsers(Ox.extend(data, { - query: query - }), callback); - } + query: query }); }