]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
webui idnode: hack to overcome extjs display issue
authorAdam Sutton <dev@adamsutton.me.uk>
Mon, 17 Mar 2014 23:48:15 +0000 (23:48 +0000)
committerAdam Sutton <dev@adamsutton.me.uk>
Tue, 18 Mar 2014 21:46:11 +0000 (21:46 +0000)
src/webui/static/app/idnode.js

index 238c76b2f0e123af34c42054520506f0ea3efca5..5a8577e337fcc52d61101b7b54185698cb7dd7cc 100644 (file)
@@ -112,7 +112,7 @@ tvheadend.IdNodeField = function (conf)
   this.id     = conf.id;
   this.text   = conf.caption || this.id;
   this.type   = conf.type;
-  this.list = conf.list;
+  this.list   = conf.list;
   this.rdonly = conf.rdonly;
   this.wronly = conf.wronly;
   this.wronce = conf.wronce;
@@ -298,9 +298,11 @@ tvheadend.idnode_editor_field = function(f, create)
       }
     });
     if (st.on) {
-      st.on('load', function() {
-        r.setValue(r.getValue());
-      });
+      var fn = function() {
+        st.un('load', fn);
+        r.setValue(value); // HACK: to get extjs to display properly
+      };
+      st.on('load', fn);
     }
     return r;
     /* TODO: listeners for regexp?