fix the issue where images do not appear when set through asset linkin Studio scheduls and details page

This commit is contained in:
Ibrahim
2016-05-12 17:51:29 +05:00
committed by Douglas Hall
parent 5a372a2c88
commit 2a2560e30e

View File

@@ -305,6 +305,8 @@ var DetailsView = ValidatingView.extend({
this.setField(event);
var url = $(event.currentTarget).val();
var image_name = _.last(url.split('/'));
// If image path is entered directly, we need to strip the asset prefix
image_name = _.last(image_name.split('block@'));
this.model.set(image_field, image_name);
// Wait to set the image src until the user stops typing
clearTimeout(this.imageTimer);