fix #2597 (pandora): 'if an annotation contains a link, tooltip has to change'
This commit is contained in:
parent
e43881c594
commit
a21327ff7e
1 changed files with 17 additions and 11 deletions
|
@ -174,17 +174,23 @@ Ox.ArrayEditable = function(options, self) {
|
|||
highlight: self.options.highlight,
|
||||
maxHeight: self.options.maxHeight,
|
||||
submitOnBlur: self.options.submitOnBlur,
|
||||
tooltip: (
|
||||
self.options.tooltipText
|
||||
? self.options.tooltipText(item) + '<br>'
|
||||
: ''
|
||||
) + (
|
||||
self.options.editable
|
||||
? Ox._('Click to select') + (
|
||||
item.editable ? Ox._(', doubleclick to edit') : ''
|
||||
)
|
||||
: ''
|
||||
),
|
||||
tooltip: function(e) {
|
||||
var $target = $(e.target),
|
||||
isLink = $target.is('a') || $target.parents('a').length,
|
||||
click = isLink ? 'Shift-click' : 'Click',
|
||||
doubleclick = isLink ? 'shift-doubleclick' : 'doubleclick';
|
||||
return (
|
||||
self.options.tooltipText
|
||||
? self.options.tooltipText(item) + '<br>'
|
||||
: ''
|
||||
) + (
|
||||
self.options.editable
|
||||
? Ox._(click + ' to select') + (
|
||||
item.editable ? Ox._(', ' + doubleclick + ' to edit') : ''
|
||||
)
|
||||
: ''
|
||||
);
|
||||
},
|
||||
type: self.options.type,
|
||||
unformat: self.options.unformat,
|
||||
value: item.value,
|
||||
|
|
Loading…
Reference in a new issue