From: Jan Szejko Date: Wed, 28 Dec 2016 08:41:57 +0000 (+0100) Subject: Prompts to add video/image X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/b11a0eec5cc01d83229ca9459b1e4f7e592152ce?ds=sidebyside Prompts to add video/image --- diff --git a/src/editor/plugins/core/img/imgElement.js b/src/editor/plugins/core/img/imgElement.js index 5aaecfc..ae0e081 100644 --- a/src/editor/plugins/core/img/imgElement.js +++ b/src/editor/plugins/core/img/imgElement.js @@ -47,7 +47,12 @@ _.extend(linkElement, { refreshLink: function(linkUrl) { this._container().text(''); - this._container().attr('style', 'background-image: url(\'' + linkUrl + '\');'); + if (linkUrl) { + this._container().text(''); + this._container().attr('style', 'background-image: url(\'' + linkUrl + '\');'); + } else { + this._container().text(gettext('No image. Click here to add image')); + } }, changeLink: function(e) { diff --git a/src/editor/plugins/core/video/videoElement.js b/src/editor/plugins/core/video/videoElement.js index 96003d7..0687955 100644 --- a/src/editor/plugins/core/video/videoElement.js +++ b/src/editor/plugins/core/video/videoElement.js @@ -59,7 +59,7 @@ _.extend(linkElement, { this._container().text(''); this._container().append($(video_frame)); } else { - this._container().text(gettext('No video')); + this._container().text(gettext('No video. Click here to add link to your video')); } },