[RFR] Delete view: back to previous state, not edit or list view#538
[RFR] Delete view: back to previous state, not edit or list view#538jpetitcolas merged 3 commits intomarmelab:masterfrom
Conversation
There was a problem hiding this comment.
$state isn't used anymore. Please remove it entirely from the controller.
|
I remember thinking about it, too, but I think this creates problems in e2e tests. As protractor failed to run, I relaunched the build, let's see. |
|
Local version of Protractor reported no failures now. |
There was a problem hiding this comment.
No need of a temp variable here. Just do a this.$window.history.back().
|
This PR needs rebase. :) |
|
Bump, can you rebase and refactor the |
8a7280f to
9c62baa
Compare
|
Rebased branch and One test (filter button should reappear once an unpinned filter is removed) is failing if browser window, opened by Selenium is too small. May this be a reason for Travis CI fails? |
9c62baa to
c473394
Compare
|
Tests on master are passing. Can you try to rebase to check if it fixes your PR? |
c473394 to
f185942
Compare
|
Rebased. All tests has been passed successfully. |
[RFR] Delete view: back to previous state, not edit or list view
There was a problem hiding this comment.
looks to me like this causes a regression: if you click "delete" while on the showView page, the new code sends you "back" to that page which 404's.
If I press
Cancelin delete view I want to go back where I came from, not to the deleted object's edit view (the delete button may be pressed in list view or inreferenced_listfield of other entity, not always in edit view; also list view or edit view or both may be disabled for deleted entity - than we would have an error). Same thing with after-delete-redirect.I think it is much more logical to just redirect user to the previous entry in history, than to specifically edit view or list view. Is there some problems with this approach? I don't see any.