]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Javascript: define default sort for some config grids
authorJaroslav Kysela <perex@perex.cz>
Thu, 6 Mar 2014 14:04:14 +0000 (15:04 +0100)
committerAdam Sutton <dev@adamsutton.me.uk>
Fri, 7 Mar 2014 20:38:11 +0000 (20:38 +0000)
src/webui/static/app/chconf.js
src/webui/static/app/cwceditor.js
src/webui/static/app/idnode.js
src/webui/static/app/iptv.js
src/webui/static/app/mpegts.js

index 482b085b8943b57d1b7534f7fb7a1ab73c077a0b..8198ec70f04d858d7240130da429119b245e531d 100644 (file)
@@ -70,6 +70,10 @@ tvheadend.channel_tab = function(panel)
           return "<a href='stream/channel/" + r.id + "'>Play</a>";
         }
       }
-    ]
+    ],
+    sort    : {
+      field : 'number',
+      direction : 'ASC'
+    }
   });
 }
index 1a96ee2d768b99d647c0805ddaef4f85004847b2..7ec176e7a2cacd5cd095bf79cf8f8d105dcf62fe 100644 (file)
@@ -106,7 +106,11 @@ tvheadend.cwceditor = function() {
                baseParams : {
                        table : 'cwc',
                        op : "get"
-               }
+               },
+               sortInfo : {
+                        field : 'username',
+                        direction : 'ASC'
+                }
        });
 
        var grid = new tvheadend.tableEditor('Code Word Client', 'cwc', cm, rec, [],
index 2a573286f61c1bf1445081f4d102ee700377e1b0..238c76b2f0e123af34c42054520506f0ea3efca5 100644 (file)
@@ -634,6 +634,10 @@ tvheadend.idnode_grid = function(panel, conf)
       filters : filters
     });
 
+    var sort = null;
+    if (conf.sort)
+      sort = conf.sort;
+
     /* Store */
     var store  = new Ext.data.JsonStore({
       root                 : 'entries',
@@ -643,7 +647,8 @@ tvheadend.idnode_grid = function(panel, conf)
       totalProperty        : 'total',
       fields               : fields,
       remoteSort           : true,
-      pruneModifiedRecords : true
+      pruneModifiedRecords : true,
+      sortInfo             : sort
     });
 
     /* Model */
index 1aab499cf5a3510dc93471ec43630ac382c649ca..d5fc6e19355f34a29816f8ca3b434979b48a67e0 100644 (file)
@@ -11,7 +11,11 @@ tvheadend.iptv = function(adapterId) {
                  op : 'servicetypeList'
          },
          fields : [ 'val', 'str' ],
-         autoLoad : false
+         autoLoad : false,
+         sortInfo : {
+               field : 'channelname',
+               direction : 'ASC'
+         }
   });
 
        var fm = Ext.form;
index 968845eda3125b4870163fdd2cf174718c98752e..ab46c5a839b92c78681c92d099867f47a841de68 100644 (file)
@@ -46,7 +46,11 @@ tvheadend.networks = function(panel)
         url          : 'api/mpegts/network/create'
       }
     },
-    del     : true
+    del     : true,
+    sort    : {
+      field : 'networkname',
+      direction : 'ASC'
+    }
   });
 }
 
@@ -82,7 +86,11 @@ tvheadend.muxes = function(panel)
           return "<a href='stream/mux/" + r.id + "'>Play</a>";
         }
       }
-    ]
+    ],
+    sort    : {
+      field  : 'name',
+      direction : 'ASC'
+    }
   });
 }
 
@@ -120,6 +128,10 @@ tvheadend.services = function(panel)
           return "<a href='stream/service/" + r.id + "'>Play</a>";
         }
       }
-    ]
+    ],
+    sort     : {
+      field  : 'svcname',
+      direction : 'ASC'
+    }
   });
 }