]> git.proxmox.com Git - proxmox-widget-toolkit.git/commitdiff
proxmoxStdRemoveButton: add getUrl method
authorDietmar Maurer <dietmar@proxmox.com>
Mon, 20 Mar 2017 06:31:05 +0000 (07:31 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 20 Mar 2017 06:31:05 +0000 (07:31 +0100)
button/Button.js

index 5a03be7a7391e1affed1cdba1707e12ecc4fd170..f0a2a6f7cef6c1add9011e7692d1f92f0986319c 100644 (file)
@@ -86,6 +86,10 @@ Ext.define('Proxmox.button.StdRemoveButton', {
 
     baseurl: undefined,
 
+    getUrl: function(rec) {
+       return me.baseurl + '/' + rec.getId();
+    },
+
     callback: function(options, success, response) {},
 
     getRecordName: function(rec) { return rec.getId() },
@@ -103,7 +107,7 @@ Ext.define('Proxmox.button.StdRemoveButton', {
        var me = this;
 
        Proxmox.Utils.API2Request({
-           url: me.baseurl + '/' + rec.getId(),
+           url: me.getUrl(rec),
            method: 'DELETE',
            waitMsgTarget: me.waitMsgTarget,
            callback: me.callback,