Changeset View
Changeset View
Standalone View
Standalone View
webroot/rsrc/externals/javelin/lib/Workflow.js
| Show First 20 Lines • Show All 98 Lines • ▼ Show 20 Lines | _onlink: function(event) { | ||||
| var is_command = !!event.getRawEvent().metaKey; | var is_command = !!event.getRawEvent().metaKey; | ||||
| if (is_command) { | if (is_command) { | ||||
| return; | return; | ||||
| } | } | ||||
| var link = event.getNode('tag:a'); | var link = event.getNode('tag:a'); | ||||
| // If the link is an anchor, or does not go anywhere, ignore the event. | // If the link is an anchor, or does not go anywhere, ignore the event. | ||||
| var href = '' + link.getAttribute('href'); | var href = link.getAttribute('href'); | ||||
| if (typeof href !== 'string') { | |||||
| return; | |||||
| } | |||||
| if (!href.length || href[0] === '#') { | if (!href.length || href[0] === '#') { | ||||
| return; | return; | ||||
| } | } | ||||
| // This link will open in a new window. | // This link will open in a new window. | ||||
| if (link.target === '_blank') { | if (link.target === '_blank') { | ||||
| return; | return; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 425 Lines • Show Last 20 Lines | |||||