From b11a0eec5cc01d83229ca9459b1e4f7e592152ce Mon Sep 17 00:00:00 2001 From: Jan Szejko Date: Wed, 28 Dec 2016 09:41:57 +0100 Subject: [PATCH 1/1] Prompts to add video/image --- src/editor/plugins/core/img/imgElement.js | 7 ++++++- src/editor/plugins/core/video/videoElement.js | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) 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')); } }, -- 2.20.1