forked from 0x2620/pandora
cosmetic changes
This commit is contained in:
parent
f5a75d3177
commit
8236c1c4fa
1 changed files with 16 additions and 17 deletions
|
@ -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() {
|
||||||
|
|
Loading…
Reference in a new issue