fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
small refactor + fix brackets
[fnpeditor.git]
/
src
/
editor
/
plugins
/
core
/
img
/
imgElement.js
diff --git
a/src/editor/plugins/core/img/imgElement.js
b/src/editor/plugins/core/img/imgElement.js
index
be0ff24
..
ff3dad3
100644
(file)
--- 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('');
refreshLink: function(linkUrl) {
this._container().text('');
- this._container().attr('style', 'background-image: url(\'' + linkUrl + '\');');
+ if (linkUrl && linkUrl !== 'http://') {
+ 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) {
@@
-63,7
+68,7
@@
_.extend(linkElement, {
prePasteHandler: function(text) {
return this.wlxmlNode.document.getLinkForUrl(text);
}.bind(this),
prePasteHandler: function(text) {
return this.wlxmlNode.document.getLinkForUrl(text);
}.bind(this),
- description: '<a href="#-" class="attachment-library">
attachment library
</a>'
+ description: '<a href="#-" class="attachment-library">
' + gettext('attachment library') + '
</a>'
}
]
});
}
]
});