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') {
|
if (pandora.$ui.home && e.target.pathname != '/home') {
|
||||||
pandora.$ui.home.fadeOutScreen();
|
pandora.$ui.home.fadeOutScreen();
|
||||||
}
|
}
|
||||||
pandora.URL.push(e.target.pathname);
|
pandora.URL.push(e.target.pathname, true);
|
||||||
} else {
|
} else {
|
||||||
window.open('/url=' + encodeURIComponent(e.target.href), '_blank');
|
window.open('/url=' + encodeURIComponent(e.target.href), '_blank');
|
||||||
}
|
}
|
||||||
|
@ -267,19 +267,21 @@ pandora.createLinks = function($element) {
|
||||||
$element
|
$element
|
||||||
.on({
|
.on({
|
||||||
click: function(e) {
|
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();
|
e.preventDefault();
|
||||||
|
if (isExternalLink(e.target)) {
|
||||||
window.open('/url=' + encodeURIComponent(e.target.href), '_blank');
|
window.open('/url=' + encodeURIComponent(e.target.href), '_blank');
|
||||||
}
|
} else {
|
||||||
return false;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.bindEvent({
|
|
||||||
singleclick: function(e) {
|
|
||||||
if ($(e.target).is('a') && !isExternalLink(e.target)) {
|
|
||||||
pandora.clickLink(e);
|
pandora.clickLink(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue