forked from 0x2620/pandora
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();
|
||||
if (isExternalLink(e.target)) {
|
||||
window.open('/url=' + encodeURIComponent(e.target.href), '_blank');
|
||||
}
|
||||
return false;
|
||||
}
|
||||
})
|
||||
.bindEvent({
|
||||
singleclick: function(e) {
|
||||
if ($(e.target).is('a') && !isExternalLink(e.target)) {
|
||||
} else {
|
||||
pandora.clickLink(e);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue