confirm fix
This commit is contained in:
+2
-2
@@ -366,7 +366,7 @@ define('ui', [], function () {
|
||||
dialog.close();
|
||||
},
|
||||
style: confirmStyle,
|
||||
pullLeft: true
|
||||
pullLeft: true,
|
||||
},
|
||||
{
|
||||
text: cancelText,
|
||||
@@ -381,7 +381,7 @@ define('ui', [], function () {
|
||||
}
|
||||
}
|
||||
},
|
||||
pullRight: true
|
||||
pullRight: true,
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
+10
-6
@@ -234,20 +234,24 @@ define('view', [], function () {
|
||||
},
|
||||
|
||||
confirm: function (o, callback, context) {
|
||||
var confirmStyle = null;
|
||||
if (typeof o === 'string' || o instanceof String) {
|
||||
var message = o;
|
||||
var confirmText = this.translate('Yes');
|
||||
o = o || {};
|
||||
} else {
|
||||
o = o || {};
|
||||
var message = o.message;
|
||||
var confirmText = o.confirmText;
|
||||
confirmStyle = o.confirmStyle || null;
|
||||
}
|
||||
|
||||
var confirmText = o.confirmText || this.translate('Yes');
|
||||
var confirmStyle = o.confirmStyle || null;
|
||||
var cancelText = o.cancelText || this.translate('Cancel');
|
||||
|
||||
return Espo.Ui.confirm(message, {
|
||||
confirmText: confirmText,
|
||||
cancelText: this.translate('Cancel'),
|
||||
confirmStyle: confirmStyle
|
||||
cancelText: cancelText,
|
||||
confirmStyle: confirmStyle,
|
||||
noCancelButton: o.noCancelButton,
|
||||
backdrop: ('backdrop' in o) ? o.backdrop : false,
|
||||
}, callback, context);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user