From 509f47e30cdc13001a805534778ade7d56f83d12 Mon Sep 17 00:00:00 2001 From: Adam Sutton Date: Sun, 10 Nov 2013 22:23:14 +0000 Subject: [PATCH] webui: fix to previous hack (and fix from linuxstb for jsonstore.find) --- src/webui/static/app/idnode.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/webui/static/app/idnode.js b/src/webui/static/app/idnode.js index 46f33648..b4127fdc 100644 --- a/src/webui/static/app/idnode.js +++ b/src/webui/static/app/idnode.js @@ -155,7 +155,7 @@ tvheadend.IdNodeField = function (conf) var st = this.store; return function (v) { - if (st && st.find) { + if (st && st instanceof Ext.data.JsonStore) { var t = [] var d; if (v.push) @@ -283,7 +283,7 @@ tvheadend.idnode_editor_field = function(f, create) value : value, disabled : d, width : 300, - mode : 'remote', + mode : 'local', valueField : 'key', displayField : 'val', store : st, @@ -297,9 +297,11 @@ tvheadend.idnode_editor_field = function(f, create) } } }); - st.on('load', function() { - r.setValue(r.getValue()); - }); + if (st.on) { + st.on('load', function() { + r.setValue(r.getValue()); + }); + } return r; /* TODO: listeners for regexp? listeners : {