fix #2597 (pandora): 'if an annotation contains a link, tooltip has to change'

This commit is contained in:
rolux 2014-12-17 12:37:03 +00:00
parent e43881c594
commit a21327ff7e

View file

@ -174,17 +174,23 @@ Ox.ArrayEditable = function(options, self) {
highlight: self.options.highlight, highlight: self.options.highlight,
maxHeight: self.options.maxHeight, maxHeight: self.options.maxHeight,
submitOnBlur: self.options.submitOnBlur, submitOnBlur: self.options.submitOnBlur,
tooltip: ( tooltip: function(e) {
self.options.tooltipText var $target = $(e.target),
? self.options.tooltipText(item) + '<br>' isLink = $target.is('a') || $target.parents('a').length,
: '' click = isLink ? 'Shift-click' : 'Click',
) + ( doubleclick = isLink ? 'shift-doubleclick' : 'doubleclick';
self.options.editable return (
? Ox._('Click to select') + ( self.options.tooltipText
item.editable ? Ox._(', doubleclick to edit') : '' ? self.options.tooltipText(item) + '<br>'
) : ''
: '' ) + (
), self.options.editable
? Ox._(click + ' to select') + (
item.editable ? Ox._(', ' + doubleclick + ' to edit') : ''
)
: ''
);
},
type: self.options.type, type: self.options.type,
unformat: self.options.unformat, unformat: self.options.unformat,
value: item.value, value: item.value,