Skip to content
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

Merged
merged 5 commits into from
Feb 24, 2020

Conversation

himil-vasava
Copy link
Contributor

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:

  • [X ] I certify that I ran my checklist

Fixes ushahidi/platform#3828 .

Ping @ushahidi/platform

@@ -69,7 +69,7 @@
<div class="toolbar toolbar-secondary">
<div class="button-group">

<button class="button-flat" ng-click="leavePost()" translate>app.cancel</button>
Copy link
Collaborator

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');
Copy link
Collaborator

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.

@Angamanga
Copy link
Collaborator

@himil-vasava Looks good, you are on the right track, just a minor change, see my comment!

@himil-vasava
Copy link
Contributor Author

@Angamanga I have made the changes requested by you. Are they okay?

@Angamanga
Copy link
Collaborator

@rowasc @tuxpiper this looks good, but haven’t tested it. Can you check while I am off? Thank you 🙏🏻

@himil-vasava
Copy link
Contributor Author

@Angamanga @tuxpiper can u check it please?

@Angamanga
Copy link
Collaborator

@himil-vasava Looks great now! Thank you!!

@Angamanga Angamanga merged commit 9f3aa36 into ushahidi:develop Feb 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cancel-button in the bottom of the edit-post-page is not working
2 participants