cosmetic changes

This commit is contained in:
rolux 2013-08-08 14:44:59 +00:00
parent f5a75d3177
commit 8236c1c4fa

View file

@ -264,25 +264,24 @@ pandora.createLinks = function($element) {
return target.hostname != document.location.hostname return target.hostname != document.location.hostname
|| Ox.startsWith(target.pathname, '/static'); || Ox.startsWith(target.pathname, '/static');
} }
$element $element.on({
.on({ click: function(e) {
click: function(e) { var $target = $(e.target);
var $target = $(e.target); if (
if ( $target.is('a')
$target.is('a') && !$($target.parent()).is('.OxEditable')
&& !$($target.parent()).is('.OxEditable') && !$($target.parent()).is('.OxEditableContent')
&& !$($target.parent()).is('.OxEditableContent') ) {
) { e.preventDefault();
e.preventDefault(); if (isExternalLink(e.target)) {
if (isExternalLink(e.target)) { window.open('/url=' + encodeURIComponent(e.target.href), '_blank');
window.open('/url=' + encodeURIComponent(e.target.href), '_blank'); } else {
} else { pandora.clickLink(e);
pandora.clickLink(e);
}
} }
return false;
} }
}); return false;
}
});
}; };
(function() { (function() {