Mise à jour librairie QTip
This commit is contained in:
parent
9252c442b6
commit
c138fcbccf
File diff suppressed because one or more lines are too long
@ -9,7 +9,7 @@
|
||||
* http://en.wikipedia.org/wiki/MIT_License
|
||||
* http://en.wikipedia.org/wiki/GNU_General_Public_License
|
||||
*
|
||||
* Date: Sun Oct 2 09:21:22.0000000000 2011
|
||||
* Date: Tue Nov 1 14:06:07.0000000000 2011
|
||||
*/
|
||||
|
||||
/*jslint browser: true, onevar: true, undef: true, nomen: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: true */
|
||||
@ -438,6 +438,7 @@ function QTip(target, options, id, attr)
|
||||
hide: options.hide.target,
|
||||
viewport: $(posOptions.viewport),
|
||||
document: $(document),
|
||||
body: $(document.body),
|
||||
window: $(window)
|
||||
},
|
||||
events = {
|
||||
@ -550,11 +551,11 @@ function QTip(target, options, id, attr)
|
||||
|
||||
// Hide tooltip on document mousedown if unfocus events are enabled
|
||||
if(('' + options.hide.event).indexOf('unfocus') > -1) {
|
||||
targets.document.bind('mousedown'+namespace, function(event) {
|
||||
targets.body.bind('mousedown'+namespace, function(event) {
|
||||
var $target = $(event.target),
|
||||
enabled = !tooltip.hasClass(disabled) && tooltip.is(':visible');
|
||||
|
||||
if($target[0] !== tooltip[0] && $target.parents(selector).length === 0 && $target.add(target).length > 1 && !$target.is(':disabled')) {
|
||||
if($target[0] !== tooltip[0] && $target.parents(selector).length === 0 && $target.add(target).length > 1 && !$target.attr('disabled')) {
|
||||
self.hide(event);
|
||||
}
|
||||
});
|
||||
@ -2494,10 +2495,10 @@ function Tip(qTip, command)
|
||||
return self.corner.string() !== 'centercenter';
|
||||
},
|
||||
|
||||
detectColours: function() {
|
||||
detectColours: function(actual) {
|
||||
var i, fill, border,
|
||||
tip = elems.tip.css({ backgroundColor: '', border: '' }),
|
||||
corner = self.corner,
|
||||
tip = elems.tip.css('cssText', ''),
|
||||
corner = actual || self.corner,
|
||||
precedance = corner[ corner.precedance ],
|
||||
|
||||
borderSide = 'border-' + precedance + '-color',
|
||||
@ -2506,6 +2507,7 @@ function Tip(qTip, command)
|
||||
invalid = /rgba?\(0, 0, 0(, 0)?\)|transparent/i,
|
||||
backgroundColor = 'background-color',
|
||||
transparent = 'transparent',
|
||||
important = ' !important',
|
||||
|
||||
bodyBorder = $(document.body).css('color'),
|
||||
contentColour = qTip.elements.content.css('color'),
|
||||
@ -2529,13 +2531,13 @@ function Tip(qTip, command)
|
||||
}
|
||||
if(!border || invalid.test(border) || border === bodyBorder) {
|
||||
color.border = colorElem.css(borderSide) || transparent;
|
||||
if(invalid.test(color.border) || color.border === contentColour) {
|
||||
if(invalid.test(color.border)) {
|
||||
color.border = border;
|
||||
}
|
||||
}
|
||||
|
||||
// Reset background and border colours
|
||||
$('*', tip).add(tip).css(backgroundColor, transparent).css('border', '');
|
||||
$('*', tip).add(tip).css('cssText', backgroundColor+':'+transparent+important+';border:0'+important+';');
|
||||
|
||||
// Remove fluid class
|
||||
tooltip.removeClass(fluidClass);
|
||||
@ -2596,7 +2598,7 @@ function Tip(qTip, command)
|
||||
precedance = mimic.precedance;
|
||||
|
||||
// Update our colours
|
||||
self.detectColours();
|
||||
self.detectColours(corner);
|
||||
|
||||
// Detect border width, taking into account colours
|
||||
if(color.border !== 'transparent' && color.border !== '#123456') {
|
||||
|
@ -9,7 +9,7 @@
|
||||
* http://en.wikipedia.org/wiki/MIT_License
|
||||
* http://en.wikipedia.org/wiki/GNU_General_Public_License
|
||||
*
|
||||
* Date: Sun Oct 2 09:21:22.0000000000 2011
|
||||
* Date: Tue Nov 1 14:06:07.0000000000 2011
|
||||
*/
|
||||
|
||||
/* Core qTip styles */
|
||||
|
Loading…
Reference in New Issue
Block a user