-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cancel button in post edit page #1428
Conversation
@@ -69,7 +69,7 @@ | |||
<div class="toolbar toolbar-secondary"> | |||
<div class="button-group"> | |||
|
|||
<button class="button-flat" ng-click="leavePost()" translate>app.cancel</button> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job finding your way to this!
@@ -89,6 +89,10 @@ function PostDataEditorController( | |||
$scope.selectForm = selectForm; | |||
$scope.isSaving = LoadingProgress.getSavingState; | |||
|
|||
$scope.cancel = function () { | |||
$location.path('/views/data'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want to keep the post selected here, instead of going to the general data-view. Hint: if you look at this row (its the function for the upper cancel-button in the "toolbar"): https://github.com/ushahidi/platform-client/blob/develop/app/main/posts/views/post-toolbar.directive.js#L53, it goes to the data-view with the post still selected.
@himil-vasava Looks good, you are on the right track, just a minor change, see my comment! |
@Angamanga I have made the changes requested by you. Are they okay? |
@Angamanga @tuxpiper can u check it please? |
@himil-vasava Looks great now! Thank you!! |
This pull request makes the following changes:
Before Changes:
The cancel button in the post edit page was not working.
After Changes:
As the cancel button is clicked the edit mode is cancelled and it goes back to post view.
Testing checklist:
Fixes ushahidi/platform#3828 .
Ping @ushahidi/platform