mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 08:34:39 +00:00
(ui) replace stdDialogRemoveItem(), emulate for backwards compatiblilty
This commit is contained in:
parent
ec58aadd94
commit
fb6125ccb2
@ -271,15 +271,15 @@ function initFormAdvancedUI() {
|
||||
}
|
||||
|
||||
/**
|
||||
* standard remove items dialog, wrapper around BootstrapDialog
|
||||
* standard dialog when confirmation is required, wrapper around BootstrapDialog
|
||||
*/
|
||||
function stdDialogRemoveItem(message, callback) {
|
||||
function stdDialogConfirmation(title, message, accept, decline, callback) {
|
||||
BootstrapDialog.confirm({
|
||||
title: 'Remove',
|
||||
title: title,
|
||||
message: message,
|
||||
type:BootstrapDialog.TYPE_DANGER,
|
||||
btnCancelLabel: 'Cancel',
|
||||
btnOKLabel: 'Yes',
|
||||
btnCancelLabel: decline,
|
||||
btnOKLabel: accept,
|
||||
btnOKClass: 'btn-primary',
|
||||
callback: function(result) {
|
||||
if(result) {
|
||||
@ -288,3 +288,10 @@ function stdDialogRemoveItem(message, callback) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* wrapper for backwards compatibility
|
||||
*/
|
||||
function stdDialogRemoveItem(message, callback) {
|
||||
stdDialogConfirmation('Remove', message, 'Yes', 'Cancel', callback)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user