prevent popup blocker for external links

This commit is contained in:
j 2013-02-01 14:07:20 +00:00
parent c9d089ce5f
commit 7bb9afa4ed

View file

@ -64,15 +64,10 @@ Ox.Editable = function(options, self) {
})
.addClass('OxEditableElement' + (self.options.editable ? ' OxEditable' : ''))
.on({
click: function() {
return false;
}
})
.bindEvent({
doubleclick: edit,
singleclick: function(e) {
click: function(e) {
var $target = $(e.target);
if ($target.is('a') || ($target = $target.parents('a')).length) {
e.preventDefault();
if (self.options.clickLink) {
e.target = $target[0];
self.options.clickLink(e);
@ -80,6 +75,12 @@ Ox.Editable = function(options, self) {
document.location.href = $target.attr('href');
}
}
return false;
}
})
.bindEvent({
doubleclick: edit,
singleclick: function(e) {
}
});