function views_field_tooltip__qtip2_get_help in Views Field Tooltip 7
Return help string for qTip 2 settings.
2 string references to 'views_field_tooltip__qtip2_get_help'
- hook_views_field_tooltip_library_info in ./
views_field_tooltip.api.php - Provide information about supported tooltip libraries.
- views_field_tooltip_views_field_tooltip_library_info in ./
views_field_tooltip.module - Implements hook_views_field_tooltip_library_info().
File
- ./
views_field_tooltip.module, line 1028 - Shows tooltips on Views fields and labels.
Code
function views_field_tooltip__qtip2_get_help() {
$example = <<<EOS
{
"position": {
"my": "top left",
"at": "bottom right",
"adjust": {
"method": "flip"
}
},
"hide": {
"fixed": true,
"delay": 300,
"event": "mouseout"
},
"show": {
"solo": true
},
"style": {
"width": "400px",
"height": "300px",
"classes": "qtip qtip-shadow my-custom-class"
}
}
EOS;
return t('
Add tooltip settings in JSON format as per the <a href="@url" target="_blank">qTip2 documentation</a>.
Leave empty to use qTip2 defaults.
Note that the <code>content</code> part will be automatically filled in by each field\'s <strong>Tooltip</strong> setting.
Here are some common qTip2 settings:
<pre>!example</pre>
The <code><a href="@url_position_my" target="_blank">position.my</a></code> and <code><a href="@url_position_at" target="_blank">position.at</a></code> attributes control the tooltip\'s position relative to the question mark.
The <code><a href="@url_position_adjustmethod" target="_blank">position.adjust.method</a></code> attribute controls the positioning behavior at the edges of the viewport.
The <code><a href="@url_hide_fixed" target="_blank">hide.fixed = true</a></code> attribute keeps the tooltip open when moused over.
The <code><a href="@url_hide_delay" target="_blank">hide.delay</a></code> attribute controls the time in milliseconds by which to delay hiding the tooltip.
The <code><a href="@url_hide_event" target="_blank">hide.event = "mouseout"</a></code> attribute hides the tooltip when mouse hovers elsewhere.
The <code><a href="@url_show_solo" target="_blank">show.solo = true</a></code> attribute hides other open tooltips when a new one is activated.
The <code><a href="@url_style_classes" target="_blank">style.classes = "qtip"</a></code> attribute shows the default qTip2 tooltip style.
The <code><a href="@url_style_classes" target="_blank">style.classes = "qtip-shadow"</a></code> attribute adds a drop shadow to the tooltip.
The <code><a href="@url_style_classes" target="_blank">style.classes = "my-custom-class"</a></code> attribute adds a new CSS class to the tooltip, allowing for user-defined CSS customizations.
', array(
'@url' => 'http://qtip2.com/options',
'!example' => $example,
'@url_position_my' => 'http://qtip2.com/options#position.my',
'@url_position_at' => 'http://qtip2.com/options#position.at',
'@url_position_adjustmethod' => 'http://qtip2.com/plugins#viewport.adjustmethod',
'@url_hide_fixed' => 'http://qtip2.com/options#hide.fixed',
'@url_hide_delay' => 'http://qtip2.com/options#hide.delay',
'@url_hide_event' => 'http://qtip2.com/options#hide.event',
'@url_show_solo' => 'http://qtip2.com/options#show.solo',
'@url_style_classes' => 'http://qtip2.com/options#style.classes',
));
}