mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 13:47:31 +02:00
Tooltips: data-tooltip-position attribute option added to 'e-tip' selector.
This commit is contained in:
@@ -73,7 +73,8 @@ class social_shortcodes extends e_shortcode
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
$class = (vartrue($parm['size'])) ? 'fa-'.$parm['size'] : '';
|
$class = (vartrue($parm['size'])) ? 'fa-'.$parm['size'] : '';
|
||||||
|
$tooltipPos = vartrue($parm['tip-pos'], 'top');
|
||||||
|
|
||||||
$text = '';
|
$text = '';
|
||||||
|
|
||||||
@@ -83,7 +84,7 @@ class social_shortcodes extends e_shortcode
|
|||||||
if($data['href'] != '')
|
if($data['href'] != '')
|
||||||
{
|
{
|
||||||
|
|
||||||
$text .= '<a rel="external" href="'.$data['href'].'" class="e-tip social-icon social-'.$id.'" title="'.$data['title'].'"><span class="fa fa-'.$id.' '.$class.'"></span></a>';
|
$text .= '<a rel="external" href="'.$data['href'].'" data-tooltip-position="'.$tooltipPos.'" class="e-tip social-icon social-'.$id.'" title="'.$data['title'].'"><span class="fa fa-'.$id.' '.$class.'"></span></a>';
|
||||||
$text .= "\n";
|
$text .= "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -852,7 +852,29 @@ $(document).ready(function()
|
|||||||
|
|
||||||
|
|
||||||
// Tooltips for bbarea.
|
// Tooltips for bbarea.
|
||||||
$(".bbcode_buttons, a.e-tip").tooltip({placement: 'top',opacity: 1.0, fade: true,html: true, container:'body'});
|
|
||||||
|
$(".bbcode_buttons, a.e-tip").each(function() {
|
||||||
|
|
||||||
|
var tip = $(this).attr('title');
|
||||||
|
|
||||||
|
if(tip === undefined)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var pos = $(this).attr('data-tooltip-position');
|
||||||
|
|
||||||
|
if(pos === undefined)
|
||||||
|
{
|
||||||
|
pos = 'top';
|
||||||
|
}
|
||||||
|
|
||||||
|
$(this).tooltip({opacity:1.0, fade:true, placement: pos, container: 'body'});
|
||||||
|
// $(this).css( 'cursor', 'pointer' )
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// $(".bbcode_buttons, a.e-tip").tooltip({placement: 'top',opacity: 1.0, fade: true,html: true, container:'body'});
|
||||||
// $("a.e-tip").tipsy({gravity: 'w',opacity: 1.0, fade: true,html: true});
|
// $("a.e-tip").tipsy({gravity: 'w',opacity: 1.0, fade: true,html: true});
|
||||||
// var tabs = $('#tab-container').clone(true);
|
// var tabs = $('#tab-container').clone(true);
|
||||||
// $('#htmlEditor').append(tabs);
|
// $('#htmlEditor').append(tabs);
|
||||||
|
Reference in New Issue
Block a user