mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-19 19:15:22 +00:00
MVC: SimpleActionButton, add onAction option to allow additional actions. compare status case-insensitive.
This commit is contained in:
parent
1a693a9ce7
commit
d189f62b95
@ -487,7 +487,10 @@ $.fn.SimpleActionButton = function (params) {
|
||||
this_button.on('click', function(){
|
||||
this_button.find('.reload_progress').addClass("fa fa-spinner fa-pulse");
|
||||
ajaxCall(this_button.data('endpoint'), {}, function(data,status) {
|
||||
if (status != "success" || data['status'] != 'ok') {
|
||||
if (params.onAction) {
|
||||
params.onAction(data, status);
|
||||
}
|
||||
if (status != "success" || data['status'].toLowerCase() != 'ok') {
|
||||
BootstrapDialog.show({
|
||||
type: BootstrapDialog.TYPE_WARNING,
|
||||
title: this_button.data('error-title'),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user