You are here

function views_field_tooltip__qtip_get_help in Views Field Tooltip 7

Return help string for qTip 1 settings.

2 string references to 'views_field_tooltip__qtip_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 967
Shows tooltips on Views fields and labels.

Code

function views_field_tooltip__qtip_get_help() {
  $example = <<<EOS
{
  "position": {
    "corner": {
      "tooltip": "topLeft",
      "target": "bottomRight"
    },
    "adjust": {
      "screen": true
    }
  },
  "hide": {
    "fixed": true,
    "delay": 300,
    "when": {
      "event": "mouseout"
    }
  },
  "show": {
    "solo": true
  },
  "style": {
    "width": 400,
    "height": 300,
    "classes": {
      "content": "my-custom-class"
    }
  }
}
EOS;
  return t('
    Add tooltip settings in JSON format as per the <a href="@url" target="_blank">qTip documentation</a>.
    Leave empty to use qTip 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 qTip settings:
    <pre>!example</pre>
    The <code><a href="@url_position_tooltip" target="_blank">position.corner.tooltip</a></code> and <code><a href="@url_position_target" target="_blank">position.corner.target</a></code> attributes control the tooltip\'s position relative to the question mark.
    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 = "my-custom-class"</a></code> attribute adds a new CSS class to the tooltip, allowing for user-defined CSS customizations.
    ', array(
    '@url' => 'http://craigsworks.com/projects/qtip/docs/',
    '!example' => $example,
    '@url_position_tooltip' => 'http://craigsworks.com/projects/qtip/docs/reference/#position-corner-tooltip',
    '@url_position_target' => 'http://craigsworks.com/projects/qtip/docs/reference/#position-corner-target',
    '@url_hide_fixed' => 'http://craigsworks.com/projects/qtip/docs/reference/#hide-fixed',
    '@url_hide_delay' => 'http://craigsworks.com/projects/qtip/docs/reference/#hide-delay',
    '@url_hide_event' => 'http://craigsworks.com/projects/qtip/docs/reference/#hide-when-event',
    '@url_show_solo' => 'http://craigsworks.com/projects/qtip/docs/reference/#show-solo',
    '@url_style_classes' => 'http://craigsworks.com/projects/qtip/docs/reference/#style-classes-content',
  ));
}