|
|
|
@ -77,6 +77,8 @@ module.exports = function($window, $rootScope, $timeout, PathHelper) { |
|
|
|
|
$timeout(function() { |
|
|
|
|
elem.focus(); |
|
|
|
|
}); |
|
|
|
|
} else if(elem.is('[href]')) { |
|
|
|
|
clickLink(elem[0]); |
|
|
|
|
} else { |
|
|
|
|
elem.click(); |
|
|
|
|
} |
|
|
|
@ -93,6 +95,26 @@ module.exports = function($window, $rootScope, $timeout, PathHelper) { |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function clickLink(link) { |
|
|
|
|
var cancelled = false; |
|
|
|
|
|
|
|
|
|
if (document.createEvent) { |
|
|
|
|
var event = new MouseEvent('click', { |
|
|
|
|
view: window, |
|
|
|
|
bubbles: true, |
|
|
|
|
cancelable: true |
|
|
|
|
}); |
|
|
|
|
cancelled = !link.dispatchEvent(event); |
|
|
|
|
} |
|
|
|
|
else if (link.fireEvent) { |
|
|
|
|
cancelled = !link.fireEvent('onclick'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!cancelled) { |
|
|
|
|
window.location = link.href; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function showHelpModal() { |
|
|
|
|
modalHelperInstance.createModal(PathHelper.staticKeyboardShortcutsHelpPath()); |
|
|
|
|
} |
|
|
|
|