Hint in browse-mode: Add PMA_createqTip function in 'function.js' file and make qTip style to match previous hint style
This commit is contained in:
parent
d5eca34f4f
commit
b314125759
@ -2702,3 +2702,42 @@ $(document).ready(function() {
|
||||
}; //end noSelect
|
||||
})(jQuery);
|
||||
|
||||
/**
|
||||
* Create default PMA tooltip for the element specified. The default appearance
|
||||
* can be overriden by specifying optional "options" parameter (see qTip options).
|
||||
*/
|
||||
function PMA_createqTip($elements, content, options) {
|
||||
var o = {
|
||||
content: content,
|
||||
style: {
|
||||
background: '#333',
|
||||
border: {
|
||||
radius: 5
|
||||
},
|
||||
fontSize: '0.8em',
|
||||
padding: '0 0.5em',
|
||||
name: 'dark'
|
||||
},
|
||||
position: {
|
||||
target: 'mouse',
|
||||
corner: { target: 'rightMiddle', tooltip: 'leftMiddle' },
|
||||
adjust: { x: 20 }
|
||||
},
|
||||
show: {
|
||||
delay: 0,
|
||||
effect: {
|
||||
type: 'grow',
|
||||
length: 100
|
||||
}
|
||||
},
|
||||
hide: {
|
||||
effect: {
|
||||
type: 'grow',
|
||||
length: 150
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$elements.qtip($.extend(true, o, options));
|
||||
}
|
||||
|
||||
|
||||
@ -593,15 +593,7 @@
|
||||
});
|
||||
|
||||
// create qtip for each <th> with draggable class
|
||||
$(t).find('th.draggable').qtip({
|
||||
style: {
|
||||
tip: true,
|
||||
name: 'dark'
|
||||
},
|
||||
position: {
|
||||
corner: { target: 'topRight', tooltip: 'bottomLeft' }
|
||||
}
|
||||
});
|
||||
PMA_createqTip($(t).find('th.draggable'));
|
||||
|
||||
// register events
|
||||
if (g.reorderHint) { // make sure columns is reorderable
|
||||
@ -626,17 +618,10 @@
|
||||
});
|
||||
}
|
||||
if ($firstRowCols.length > 1) {
|
||||
$(t).find('th:not(.draggable)')
|
||||
.qtip({
|
||||
style: {
|
||||
tip: true,
|
||||
name: 'dark'
|
||||
},
|
||||
position: {
|
||||
corner: { target: 'topRight', tooltip: 'bottomLeft' }
|
||||
}
|
||||
})
|
||||
.mouseenter(function(e) {
|
||||
var $colVisibTh = $(t).find('th:not(.draggable)');
|
||||
|
||||
PMA_createqTip($colVisibTh);
|
||||
$colVisibTh.mouseenter(function(e) {
|
||||
g.showColVisibHint = true;
|
||||
g.showHint(e);
|
||||
})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user