Skip to content

Commit

Permalink
Merge pull request #153 from collective/petschki-reset-button
Browse files Browse the repository at this point in the history
Reset to last saved state
  • Loading branch information
petschki authored Oct 18, 2023
2 parents 1ee4d17 + f3a4476 commit 0ec0127
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 13 deletions.
2 changes: 2 additions & 0 deletions news/153.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Reset to last saved state when hitting the reset button.
[petschki]
2 changes: 1 addition & 1 deletion resources/js/cropperpattern.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export default Base.extend({
reset: function () {
log.info("RESET");
this.while_reset = true;
this.cropper.setData(this.initial_data);
this.cropper.setData(this.original_data);
this.visualize_selected_area();
this.while_reset = false;
this.update_badges();
Expand Down
10 changes: 5 additions & 5 deletions src/plone/app/imagecropping/browser/editor.pt
Original file line number Diff line number Diff line change
Expand Up @@ -190,16 +190,16 @@
>
<span i18n:translate="button_save">Save</span>
${python:view.field_label(fieldname)} ${python:scale['title']}</button>
<button class="btn btn-danger remove standalone"
title="Delete the manual chosen cropping area and auto scale on the server side."
i18n:attributes="title button_remove_description"
i18n:translate="button_remove"
>Remove</button>
<button class="btn btn-warning reset standalone"
title="Set to initial value of ${scale/current/w}&times;${scale/current/h}. offset ${scale/current/x}, ${scale/current/y}"
i18n:attributes="title button_reset_description"
i18n:translate="button_reset"
>Reset</button>
<button class="btn btn-danger remove standalone"
title="Delete the manual chosen cropping area and auto scale on the server side."
i18n:attributes="title button_remove_description"
i18n:translate="button_remove"
>Remove</button>
</div>
</div>
</div>
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Loading

0 comments on commit 0ec0127

Please sign in to comment.