From cda7f3115cfcff013b74bb4eea4d13f4a21d613a Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Thu, 9 Nov 2017 16:14:20 +0100 Subject: [PATCH] Fix crop editor. --- public/js/crop_editor.js | 2 +- templates/EditAssetForm.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/public/js/crop_editor.js b/public/js/crop_editor.js index 11b26e53..e010d035 100644 --- a/public/js/crop_editor.js +++ b/public/js/crop_editor.js @@ -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(); diff --git a/templates/EditAssetForm.php b/templates/EditAssetForm.php index 7ba33cfc..b80fa1aa 100644 --- a/templates/EditAssetForm.php +++ b/templates/EditAssetForm.php @@ -193,6 +193,7 @@ class EditAssetForm extends SubTemplate