]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
An attempt to make the default columns widths in idnode grids better 358/head
authorJaroslav Kysela <perex@perex.cz>
Wed, 19 Mar 2014 16:37:41 +0000 (17:37 +0100)
committerJaroslav Kysela <perex@perex.cz>
Wed, 19 Mar 2014 16:40:46 +0000 (17:40 +0100)
src/webui/static/app/chconf.js
src/webui/static/app/idnode.js
src/webui/static/app/mpegts.js

index c11951cb2e5db07d4ed932a93ffeaf27a54fa6d5..46bec4837a090cacaa9289d91d0b48ed8c65de99 100644 (file)
@@ -205,6 +205,7 @@ tvheadend.channel_tab = function(panel)
     tbar    : [ mapButton, lowNoButton, noUpButton, noDownButton, noSwapButton ],
     lcol    : [
       {
+        width    : 50,
         header   : 'Play',
         renderer : function (v, o, r) {
           return "<a href='stream/channel/" + r.id + "'>Play</a>";
index 5a8577e337fcc52d61101b7b54185698cb7dd7cc..ffc02906e9a8aad9168a7aa5c756fabb46e0ba99 100644 (file)
@@ -128,13 +128,20 @@ tvheadend.IdNodeField = function (conf)
 
   this.column = function ()
   {
+    var w = 300;
     var ftype = 'string';
     if (this.type == 'int' || this.type == 'u32' || 
-        this.type == 'u16' || this.type == 'dbl')
+        this.type == 'u16' || this.type == 'dbl') {
       ftype = 'numeric';
-    else if (this.type == 'bool')
-      ftype = 'boolean'
+      w = 80;
+    } else if (this.type == 'bool') {
+      ftype = 'boolean';
+      w = 60;
+    }
+    if (this.enum || this.list)
+      w = 300;
     return {
+      width    : w,
       dataIndex: this.id,
       header   : this.text,
       sortable : true,
index ab46c5a839b92c78681c92d099867f47a841de68..2113db0659210410f7d7731e8ed4124583aab053 100644 (file)
@@ -81,6 +81,7 @@ tvheadend.muxes = function(panel)
     del     : true,
     lcol    : [
       {
+        width    : 50,
         header   : 'Play',
         renderer : function(v, o, r) {
           return "<a href='stream/mux/" + r.id + "'>Play</a>";
@@ -123,6 +124,7 @@ tvheadend.services = function(panel)
     tbar     : [ mapButton ],
     lcol     : [
       {
+        width    : 50,
         header   : 'Play',
         renderer : function(v, o, r) {
           return "<a href='stream/service/" + r.id + "'>Play</a>";