mirror of
https://github.com/documize/community.git
synced 2025-07-24 15:49:44 +02:00
completed red-line links
This commit is contained in:
parent
16b7fd45d7
commit
7c2051cc7a
8 changed files with 70 additions and 16 deletions
|
@ -70,7 +70,7 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, {
|
|||
let doc = this.get('document');
|
||||
let self = this;
|
||||
|
||||
$("a[data-documize='true']").off('click').on('click', function() {
|
||||
$("a[data-documize='true']").off('click').on('click', function(e) {
|
||||
let link = links.getLinkObject(self.get('meta.outboundLinks'), this);
|
||||
|
||||
// local link? exists?
|
||||
|
@ -88,6 +88,8 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, {
|
|||
if (link.orphan) {
|
||||
$(this).addClass('broken-link');
|
||||
self.showNotification('Broken link!');
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue