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