in clickLink, set expandURL to true; in createLinks, don't create handlers inside editable elements
This commit is contained in:
parent
58fb719490
commit
0bf2ae04ef
1 changed files with 12 additions and 10 deletions
|
@ -253,7 +253,7 @@ pandora.clickLink = function(e) {
|
|||
if (pandora.$ui.home && e.target.pathname != '/home') {
|
||||
pandora.$ui.home.fadeOutScreen();
|
||||
}
|
||||
pandora.URL.push(e.target.pathname);
|
||||
pandora.URL.push(e.target.pathname, true);
|
||||
} else {
|
||||
window.open('/url=' + encodeURIComponent(e.target.href), '_blank');
|
||||
}
|
||||
|
@ -267,19 +267,21 @@ pandora.createLinks = function($element) {
|
|||
$element
|
||||
.on({
|
||||
click: function(e) {
|
||||
if ($(e.target).is('a') && isExternalLink(e.target)) {
|
||||
var $target = $(e.target);
|
||||
if (
|
||||
$target.is('a')
|
||||
&& !$($target.parent()).is('.OxEditable')
|
||||
&& !$($target.parent()).is('.OxEditableContent')
|
||||
) {
|
||||
e.preventDefault();
|
||||
window.open('/url=' + encodeURIComponent(e.target.href), '_blank');
|
||||
if (isExternalLink(e.target)) {
|
||||
window.open('/url=' + encodeURIComponent(e.target.href), '_blank');
|
||||
} else {
|
||||
pandora.clickLink(e);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
})
|
||||
.bindEvent({
|
||||
singleclick: function(e) {
|
||||
if ($(e.target).is('a') && !isExternalLink(e.target)) {
|
||||
pandora.clickLink(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue