diff --git a/archetype/html-rest/src/main/resources/archetype-resources/src/main/webapp/js/controller/bookmark-edit.js b/archetype/html-rest/src/main/resources/archetype-resources/src/main/webapp/js/controller/bookmark-edit.js index 797ec0b..bc4706e 100644 --- a/archetype/html-rest/src/main/resources/archetype-resources/src/main/webapp/js/controller/bookmark-edit.js +++ b/archetype/html-rest/src/main/resources/archetype-resources/src/main/webapp/js/controller/bookmark-edit.js @@ -27,7 +27,7 @@ $(function() { $("#delete").click(function() { if (confirm('Tem certeza que deseja apagar?')) { - BookmarkProxy.remove([ $("#id").val() ], removeOk); + BookmarkProxy.remove($("#id").val(), removeOk); } }); @@ -57,7 +57,7 @@ function loadFailed(request) { } function saveOk(data) { - history.back(); + location.href = 'bookmark-list.html'; } function saveFailed(request) { diff --git a/archetype/html-rest/src/main/resources/archetype-resources/src/main/webapp/js/proxy/bookmark.js b/archetype/html-rest/src/main/resources/archetype-resources/src/main/webapp/js/proxy/bookmark.js index fa46955..3b8aa43 100644 --- a/archetype/html-rest/src/main/resources/archetype-resources/src/main/webapp/js/proxy/bookmark.js +++ b/archetype/html-rest/src/main/resources/archetype-resources/src/main/webapp/js/proxy/bookmark.js @@ -45,9 +45,7 @@ BookmarkProxy.update = function($id, $form, $success, $error) { BookmarkProxy.remove = function($id, $success, $error) { $.ajax({ type : "DELETE", - url : this.url, - data : JSON.stringify($id), - contentType : "application/json", + url : this.url + "/" + $id, success : $success, error : $error }); -- libgit2 0.21.2