delete.js 765 Bytes
Newer Older
‘oliver.hui’'s avatar
‘oliver.hui’ committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
try {
	var ans = TMessageBox.question(this, this.ttr("Are you sure to delete selected items?"), '', this.ttr('Delete'),
		[this.ttr("Delete") + ":Yes:Yes:Error", this.ttr("Cancel") + ":Cancel:Cancel:Normal"]);
	if (ans != 'Yes') {
		return;
	}
	this.deleteItem(this.selectedItems());
} catch (e) {
	print(e);
}

/*---ACTION---
ICON: "times-circle"
LABEL: "Delete"
LABEL_ZHCN: "删除"
LABEL_ZHTW: "刪除"
ACCEL: "Delete"
TOOLTIP: "Delete User"
TOOLTIP_ZHCN: "删除用户"
TOOLTIP_ZHTW: "刪除用戶"
PERMISSION: "sys-user-delete"
CHECKED: ""
GROUP: ""
STYLE: "size=small button_style=both"
LANG: "JavaScript"
STATUS: "Release"
VERSION: "1"
STATEHOOK: "if(this.selectedItems().length > 0 && this.canModify()){return 'enable'}else{return 'disable'}"
---ACTION---*/