Prompts to add video/image
authorJan Szejko <janek37@gmail.com>
Wed, 28 Dec 2016 08:41:57 +0000 (09:41 +0100)
committerJan Szejko <janek37@gmail.com>
Wed, 28 Dec 2016 08:41:57 +0000 (09:41 +0100)
src/editor/plugins/core/img/imgElement.js
src/editor/plugins/core/video/videoElement.js

index 5aaecfc..ae0e081 100644 (file)
@@ -47,7 +47,12 @@ _.extend(linkElement, {
 
     refreshLink: function(linkUrl) {
         this._container().text('');
 
     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) {
     },
 
     changeLink: function(e) {
index 96003d7..0687955 100644 (file)
@@ -59,7 +59,7 @@ _.extend(linkElement, {
             this._container().text('');
             this._container().append($(video_frame));
         } else {
             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'));
         }
     },
 
         }
     },