Commit 0e4e96932435f74ec8d772f7a71a97275e7e2cd9
1 parent
039b775f
Exists in
master
FWK-223: Atualizar o arquétipo com os novos experimentos
Task-Url: https://demoiselle.atlassian.net/browse/FWK-223
Showing
3 changed files
with
16 additions
and
14 deletions
Show diff stats
archetype/html-rest/src/main/resources/archetype-resources/src/main/webapp/js/controller/bookmark-edit.js
| ... | ... | @@ -3,7 +3,7 @@ $(function() { |
| 3 | 3 | $("#description").focus(); |
| 4 | 4 | |
| 5 | 5 | if (id = App.getUrlParameterByName('id')) { |
| 6 | - BookmarkProxy.load(id).done(loadOk).fail(loadFailed); | |
| 6 | + BookmarkProxy.load(id).done(loadOk).fail(loadFail); | |
| 7 | 7 | } |
| 8 | 8 | |
| 9 | 9 | MetadataProxy.getDemoiselleVersion().done(function(data) { |
| ... | ... | @@ -21,9 +21,9 @@ $(function() { |
| 21 | 21 | }; |
| 22 | 22 | |
| 23 | 23 | if (id = $("#id").val()) { |
| 24 | - BookmarkProxy.update(id, data).done(saveOk).fail(saveFailed); | |
| 24 | + BookmarkProxy.update(id, data).done(saveOk).fail(saveFail); | |
| 25 | 25 | } else { |
| 26 | - BookmarkProxy.insert(data).done(saveOk).fail(saveFailed); | |
| 26 | + BookmarkProxy.insert(data).done(saveOk).fail(saveFail); | |
| 27 | 27 | } |
| 28 | 28 | }); |
| 29 | 29 | |
| ... | ... | @@ -49,8 +49,8 @@ function loadOk(data) { |
| 49 | 49 | $("#delete").show(); |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | -function loadFailed(request) { | |
| 53 | - switch (request.status) { | |
| 52 | +function loadFail(jqXHR) { | |
| 53 | + switch (jqXHR.status) { | |
| 54 | 54 | case 404: |
| 55 | 55 | bootbox.alert("Você está tentando acessar um registro inexistente!", function() { |
| 56 | 56 | location.href = "bookmark-list.html"; |
| ... | ... | @@ -62,18 +62,18 @@ function loadFailed(request) { |
| 62 | 62 | } |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | -function saveOk(data) { | |
| 65 | +function saveOk() { | |
| 66 | 66 | location.href = 'bookmark-list.html'; |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | -function saveFailed(request) { | |
| 70 | - switch (request.status) { | |
| 69 | +function saveFail(jqXHR) { | |
| 70 | + switch (jqXHR.status) { | |
| 71 | 71 | case 422: |
| 72 | 72 | $($("form input").get().reverse()).each(function() { |
| 73 | 73 | var id = $(this).attr('id'); |
| 74 | 74 | var message = null; |
| 75 | 75 | |
| 76 | - $.each(request.responseJSON, function(index, value) { | |
| 76 | + $.each(jqXHR.responseJSON, function(index, value) { | |
| 77 | 77 | if (id == value.property) { |
| 78 | 78 | message = value.message; |
| 79 | 79 | return; |
| ... | ... | @@ -94,6 +94,6 @@ function saveFailed(request) { |
| 94 | 94 | } |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | -function removeOk(data) { | |
| 97 | +function removeOk() { | |
| 98 | 98 | location.href = 'bookmark-list.html'; |
| 99 | 99 | } | ... | ... |
archetype/html-rest/src/main/resources/archetype-resources/src/main/webapp/js/controller/home.js
archetype/html-rest/src/main/resources/archetype-resources/src/main/webapp/js/controller/login.js
| ... | ... | @@ -26,7 +26,7 @@ function loginOk(data, textStatus, jqXHR) { |
| 26 | 26 | App.restoreSavedLocation(); |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | -function loginFail(jqXHR, textStatus, errorThrown) { | |
| 29 | +function loginFail(jqXHR) { | |
| 30 | 30 | switch (jqXHR.status) { |
| 31 | 31 | case 401: |
| 32 | 32 | $("#global-message").html(jqXHR.responseText).show(); | ... | ... |