]> git.proxmox.com Git - proxmox-widget-toolkit.git/commitdiff
StdRemoveButton: getUrl: fallback to baseurl if no selModel is set
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 18 Apr 2020 17:12:51 +0000 (19:12 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 18 Apr 2020 17:16:25 +0000 (19:16 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
button/Button.js

index 61298b48ee2697a6e6a423935dfd288994a9d104..e2fe853d3e2727836306cfa1bf7f8407a82cf341 100644 (file)
@@ -114,7 +114,11 @@ Ext.define('Proxmox.button.StdRemoveButton', {
     getUrl: function(rec) {
        var me = this;
 
-       return me.baseurl + '/' + rec.getId();
+       if (me.selModel) {
+           return me.baseurl + '/' + rec.getId();
+       } else {
+           return me.baseurl;
+       }
     },
 
     // also works with names scopes