Refactor the run configuration

pull/4029/head
Alex Dik 9 years ago
parent 65c46896a8
commit 000658fea5
  1. 12
      frontend/app/components/common/routing.ts

@ -239,10 +239,9 @@ angular
// Angular's HTML5-mode turns on.
$rootElement.off('click');
$rootElement.on('click', 'a[data-ui-route]', (event) => {
if (!jQuery('body').has('div[ui-view]').length) {
return;
}
if (event.ctrlKey || event.metaKey || event.which === 2) {
if (!jQuery('body').has('div[ui-view]').length || event.ctrlKey || event.metaKey
|| event.which === 2) {
return;
}
@ -251,10 +250,9 @@ angular
var absHref = elm.prop('href');
var rewrittenUrl = $location.$$rewrite(absHref);
if (absHref && !elm.attr('target') &&
rewrittenUrl && !event.isDefaultPrevented()) {
if (absHref && !elm.attr('target') && rewrittenUrl && !event.isDefaultPrevented()) {
event.preventDefault();
if (rewrittenUrl !== $browser.url()) {
// update location manually
$location.$$parse(rewrittenUrl);

Loading…
Cancel
Save