Commit 57287e6b6609f4e4764582b692452d80ad48bb11
1 parent
5a07737c
Exists in
master
and in
5 other branches
puting de modal delete in remove category #177
Showing
1 changed file
with
30 additions
and
0 deletions
Show diff stats
| ... | ... | @@ -0,0 +1,30 @@ |
| 1 | + | |
| 2 | +var Submite = { | |
| 3 | + remove: function(url,dados,id_li_link){ | |
| 4 | + $('#category').modal('hide'); | |
| 5 | + $.post(url,dados, function(data){ | |
| 6 | + $(id_li_link).remove(); | |
| 7 | + $("#modal_category").empty(); | |
| 8 | + $("div.modal-backdrop.fade.in").remove(); | |
| 9 | + alertify.success("Category removed successfully!"); | |
| 10 | + }).fail(function(){ | |
| 11 | + $("#modal_category").empty(); | |
| 12 | + $("#modal_category").append(data); | |
| 13 | + $('#category').modal('show'); | |
| 14 | + }); | |
| 15 | + } | |
| 16 | +} | |
| 17 | + | |
| 18 | +var modal = { | |
| 19 | + get: function (url, id_modal, id_div_modal){ | |
| 20 | + $.get(url, function(data){ | |
| 21 | + if($(id_modal).length){ | |
| 22 | + $(id_div_modal).empty(); | |
| 23 | + $(id_div_modal).append(data); | |
| 24 | + } else { | |
| 25 | + $(id_div_modal).append(data); | |
| 26 | + } | |
| 27 | + $(id_modal).modal('show'); | |
| 28 | + }); | |
| 29 | + } | |
| 30 | +}; | |
| 0 | 31 | \ No newline at end of file | ... | ... |