show link remover for invalid links too
This commit is contained in:
parent
cc986368be
commit
8c16c60554
1 changed files with 5 additions and 2 deletions
|
@ -72,9 +72,11 @@ const TopicCard = {
|
||||||
}
|
}
|
||||||
|
|
||||||
$('.CardOnGraph').addClass('hasAttachment')
|
$('.CardOnGraph').addClass('hasAttachment')
|
||||||
if (self.authorizedToEdit) {
|
},
|
||||||
|
showLinkRemover: function() {
|
||||||
|
if (TopicCard.authorizedToEdit && $('#linkremove').length === 0) {
|
||||||
$('.embeds').append('<div id="linkremove"></div>')
|
$('.embeds').append('<div id="linkremove"></div>')
|
||||||
$('#linkremove').click(self.removeLink)
|
$('#linkremove').click(TopicCard.removeLink)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
removeLink: function () {
|
removeLink: function () {
|
||||||
|
@ -151,6 +153,7 @@ const TopicCard = {
|
||||||
loader.setRange(0.9); // default is 1.3
|
loader.setRange(0.9); // default is 1.3
|
||||||
loader.show() // Hidden by default
|
loader.show() // Hidden by default
|
||||||
var e = embedly('card', document.getElementById('embedlyLink'))
|
var e = embedly('card', document.getElementById('embedlyLink'))
|
||||||
|
self.showLinkRemover()
|
||||||
if (!e) {
|
if (!e) {
|
||||||
self.handleInvalidLink()
|
self.handleInvalidLink()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue