Fix crop editor.

This commit is contained in:
Aaron van Geffen 2017-11-09 16:14:20 +01:00
parent e439a074a6
commit cda7f3115c
2 changed files with 2 additions and 1 deletions

View File

@ -146,7 +146,7 @@ CropEditor.prototype.save = function() {
source_x: this.source_x.value,
source_y: this.source_y.value
};
var req = HttpRequest("post", this.parent.action + "?id=" + this.opt.asset_id + "&updatethumb",
var req = HttpRequest("post", this.opt.submitUrl + "?id=" + this.opt.asset_id + "&updatethumb",
"data=" + encodeURIComponent(JSON.stringify(payload)), function(response) {
this.opt.after_save(response);
this.hide();

View File

@ -193,6 +193,7 @@ class EditAssetForm extends SubTemplate
<script type="text/javascript">
setTimeout(function() {
var editor = new CropEditor({
submit_url: "', BASEURL, '/editasset/",
original_image_src: "', $this->asset->getUrl(), '",
editor_container_parent_id: "asset_form",
thumbnail_select_id: "thumbnail_src",