]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Javascript fix the improved mux-copy operation. The previous version 70/head
authorJaroslav Kysela <perex@perex.cz>
Mon, 26 Mar 2012 08:50:41 +0000 (10:50 +0200)
committerJaroslav Kysela <perex@perex.cz>
Mon, 26 Mar 2012 08:53:43 +0000 (10:53 +0200)
did not work with the DVB-T tuners (without satconf).

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/webui/static/app/dvb.js

index 1fee1bcc1206c68f1c65a755388ad0ff1bac429e..5b7d057682a199e0b502a525d6eecf321c58e019 100644 (file)
@@ -227,6 +227,37 @@ tvheadend.dvb_muxes = function(adapterData, satConfStore) {
              satConf = null;
          }
 
+         var mitems = [
+             new Ext.form.ComboBox({
+                 store: targetStore,
+                 fieldLabel: 'Target adapter',
+                 name: 'targetadapter',
+                 hiddenName: 'targetID',
+                 editable: false,
+                 allowBlank: false,
+                 triggerAction: 'all',
+                 mode: 'remote',
+                 displayField:'name',
+                 valueField:'identifier',
+                 emptyText: 'Select target adapter...',
+                 listeners: {
+                    'select': function(combo, value) {
+                        if (satConf) {
+                            satConf.emptyText = 'Select satellite configuration...';
+                            satConf.clearValue();
+                            targetSatConfStore.baseParams = {adapter: combo.value};
+                            targetSatConfStore.load();
+                            satConf.focus();
+                            satConf.expand();
+                        }
+                    }
+                }
+             }),
+        ];
+
+        if (satConf)
+            mitems.push(satConf);
+
         var panel = new Ext.FormPanel({
             frame:true,
             border:true,
@@ -234,35 +265,7 @@ tvheadend.dvb_muxes = function(adapterData, satConfStore) {
             labelAlign: 'right',
             labelWidth: 150,
             defaultType: 'textfield',
-            items: [
-
-                new Ext.form.ComboBox({
-                    store: targetStore,
-                    fieldLabel: 'Target adapter',
-                    name: 'targetadapter',
-                    hiddenName: 'targetID',
-                    editable: false,
-                    allowBlank: false,
-                    triggerAction: 'all',
-                    mode: 'remote',
-                    displayField:'name',
-                    valueField:'identifier',
-                    emptyText: 'Select target adapter...',
-                    listeners: {
-                       'select': function(combo, value) {
-                            if (satConf) {
-                                satConf.emptyText = 'Select satellite configuration...';
-                                satConf.clearValue();
-                                targetSatConfStore.baseParams = {adapter: combo.value};
-                                targetSatConfStore.load();
-                                satConf.focus();
-                                satConf.expand();
-                            }
-                       }
-                    }
-                }),
-                satConf,
-            ],
+            items: mitems,
             buttons: [{
                 text: 'Copy',
                 handler: doCopy