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' : ''))
|
.addClass('OxEditableElement' + (self.options.editable ? ' OxEditable' : ''))
|
||||||
.on({
|
.on({
|
||||||
click: function() {
|
click: function(e) {
|
||||||
return false;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.bindEvent({
|
|
||||||
doubleclick: edit,
|
|
||||||
singleclick: function(e) {
|
|
||||||
var $target = $(e.target);
|
var $target = $(e.target);
|
||||||
if ($target.is('a') || ($target = $target.parents('a')).length) {
|
if ($target.is('a') || ($target = $target.parents('a')).length) {
|
||||||
|
e.preventDefault();
|
||||||
if (self.options.clickLink) {
|
if (self.options.clickLink) {
|
||||||
e.target = $target[0];
|
e.target = $target[0];
|
||||||
self.options.clickLink(e);
|
self.options.clickLink(e);
|
||||||
|
@ -80,6 +75,12 @@ Ox.Editable = function(options, self) {
|
||||||
document.location.href = $target.attr('href');
|
document.location.href = $target.attr('href');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.bindEvent({
|
||||||
|
doubleclick: edit,
|
||||||
|
singleclick: function(e) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue