mirror of
https://git.proxmox.com/git/pmg-gui
synced 2025-08-17 17:22:54 +00:00
quarantine: refactor action logic
so that it can be reused Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
5fb0f71ea0
commit
7f0619ff3b
@ -91,13 +91,19 @@ Ext.define('PMG.SpamQuarantine', {
|
||||
},
|
||||
|
||||
btnHandler: function(button, e) {
|
||||
var me = this;
|
||||
var action = button.reference;
|
||||
var list = this.lookupReference('list');
|
||||
var selected = list.getSelection();
|
||||
me.doAction(action, selected);
|
||||
},
|
||||
|
||||
doAction: function(action, selected) {
|
||||
if (!selected.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
var action = button.reference;
|
||||
var list = this.lookupReference('list');
|
||||
|
||||
if (selected.length > 1) {
|
||||
var idlist = [];
|
||||
|
Loading…
Reference in New Issue
Block a user