]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
WEBUI: Don't show apply button in the hardware input tree forms
authorJaroslav Kysela <perex@perex.cz>
Tue, 1 Dec 2015 08:17:18 +0000 (09:17 +0100)
committerJaroslav Kysela <perex@perex.cz>
Tue, 1 Dec 2015 08:17:18 +0000 (09:17 +0100)
src/webui/static/app/idnode.js

index e54958a79bf52e550d170e3a9518887620a81a4f..4b4a15ee59f8ea50b59850ed5d843bf1454b5acf 100644 (file)
@@ -950,23 +950,25 @@ tvheadend.idnode_editor = function(item, conf)
         });
         buttons.push(saveBtn);
 
-        var applyBtn = new Ext.Button({
-            text: _('Apply'),
-            iconCls: 'apply',
-            handler: function() {
-                var node = panel.getForm().getFieldValues();
-                node.uuid = conf.uuids ? conf.uuids : item.uuid;
-                tvheadend.Ajax({
-                    url: 'api/idnode/save',
-                    params: {
-                        node: Ext.encode(node)
-                    },
-                    success: function(d) {
-                    }
-                });
-            }
-        });
-        buttons.push(applyBtn);
+        if (!conf.noApply) {
+            var applyBtn = new Ext.Button({
+                text: _('Apply'),
+                iconCls: 'apply',
+                handler: function() {
+                    var node = panel.getForm().getFieldValues();
+                    node.uuid = conf.uuids ? conf.uuids : item.uuid;
+                    tvheadend.Ajax({
+                        url: 'api/idnode/save',
+                        params: {
+                            node: Ext.encode(node)
+                        },
+                        success: function(d) {
+                        }
+                    });
+                }
+            });
+            buttons.push(applyBtn);
+        }
 
         if (conf.help) {
             var helpBtn = new Ext.Button({
@@ -2227,6 +2229,7 @@ tvheadend.idnode_tree = function(panel, conf)
                             width: 550,
                             noautoWidth: true,
                             fixedHeight: true,
+                            noApply: true,
                             help: conf.help || null
                         });
                         mpanel.add(current);