| @@ -1,0 +1,59 @@ | ||
| 1 | + | |
| 2 | +jQuery( document ).bind( 'sucom_init_metabox', function( event, container_id, doing_ajax ) { | |
| 3 | + | |
| 4 | + sucomInitToolTips( container_id, doing_ajax ); | |
| 5 | +} ); | |
| 6 | + | |
| 7 | +function sucomInitToolTips( container_id, doing_ajax ) { | |
| 8 | + | |
| 9 | + var table_id = 'table.sucom-settings'; | |
| 10 | + | |
| 11 | + if ( 'undefined' !== typeof container_id && container_id ) { | |
| 12 | + | |
| 13 | + table_id = container_id + ' ' + table_id; | |
| 14 | + } | |
| 15 | + | |
| 16 | + var tableTooltips = jQuery( 'body.rtl ' + table_id + ' .sucom-tooltip' ); | |
| 17 | + var qtipCorner = 'bottom right'; | |
| 18 | + | |
| 19 | + if ( ! tableTooltips.length ) { | |
| 20 | + | |
| 21 | + tableTooltips = jQuery( table_id + ' .sucom-tooltip' ); | |
| 22 | + qtipCorner = 'bottom left'; | |
| 23 | + } | |
| 24 | + | |
| 25 | + tableTooltips.qtip( { | |
| 26 | + content:{ | |
| 27 | + attr:'data-help', | |
| 28 | + }, | |
| 29 | + position:{ | |
| 30 | + at:'top center', | |
| 31 | + my:qtipCorner, | |
| 32 | + adjust:{ | |
| 33 | + x:0, | |
| 34 | + y:-5, | |
| 35 | + resize:true, // Adjust the tooltips position when the window is resized. | |
| 36 | + scroll:true, // Adjust the tooltips position when the window is scrolled. | |
| 37 | + }, | |
| 38 | + }, | |
| 39 | + show:{ | |
| 40 | + when:{ | |
| 41 | + event:'mouseover', | |
| 42 | + }, | |
| 43 | + }, | |
| 44 | + hide:{ | |
| 45 | + fixed:true, | |
| 46 | + delay:500, | |
| 47 | + when:{ | |
| 48 | + event:'mouseleave', | |
| 49 | + }, | |
| 50 | + }, | |
| 51 | + style:{ | |
| 52 | + tip:{ | |
| 53 | + corner:true, | |
| 54 | + }, | |
| 55 | + classes:'sucom-qtip qtip-lime-green qtip-shadow', | |
| 56 | + width:600, | |
| 57 | + }, | |
| 58 | + } ); | |
| 59 | +} | |