forked from Public/pics
Fix crop editor.
This commit is contained in:
parent
e439a074a6
commit
cda7f3115c
@ -146,7 +146,7 @@ CropEditor.prototype.save = function() {
|
|||||||
source_x: this.source_x.value,
|
source_x: this.source_x.value,
|
||||||
source_y: this.source_y.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) {
|
"data=" + encodeURIComponent(JSON.stringify(payload)), function(response) {
|
||||||
this.opt.after_save(response);
|
this.opt.after_save(response);
|
||||||
this.hide();
|
this.hide();
|
||||||
|
@ -193,6 +193,7 @@ class EditAssetForm extends SubTemplate
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
var editor = new CropEditor({
|
var editor = new CropEditor({
|
||||||
|
submit_url: "', BASEURL, '/editasset/",
|
||||||
original_image_src: "', $this->asset->getUrl(), '",
|
original_image_src: "', $this->asset->getUrl(), '",
|
||||||
editor_container_parent_id: "asset_form",
|
editor_container_parent_id: "asset_form",
|
||||||
thumbnail_select_id: "thumbnail_src",
|
thumbnail_select_id: "thumbnail_src",
|
||||||
|
Loading…
Reference in New Issue
Block a user