prevent popup blocker for external links
This commit is contained in:
parent
c9d089ce5f
commit
7bb9afa4ed
1 changed files with 8 additions and 7 deletions
|
@ -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) {
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue