本文整理汇总了PHP中TooltipManager::init方法的典型用法代码示例。如果您正苦于以下问题:PHP TooltipManager::init方法的具体用法?PHP TooltipManager::init怎么用?PHP TooltipManager::init使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TooltipManager
的用法示例。
在下文中一共展示了TooltipManager::init方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initializeLocale
// composer
require_once __CA_LIB_DIR__ . '/core/Utils/Debug.php';
require_once __CA_LIB_DIR__ . '/core/Zend/Translate.php';
require_once __CA_LIB_DIR__ . '/core/Zend/Cache.php';
require_once __CA_LIB_DIR__ . '/core/Zend/Registry.php';
require_once __CA_LIB_DIR__ . '/core/Cache/MemoryCache.php';
// is used in utilityHelpers
require_once __CA_APP_DIR__ . '/helpers/utilityHelpers.php';
require_once __CA_APP_DIR__ . '/helpers/initializeLocale.php';
if (isset($_COOKIE['CA_' . __CA_APP_NAME__ . '_ui_locale'])) {
$g_ui_locale = $_COOKIE['CA_' . __CA_APP_NAME__ . '_ui_locale'];
initializeLocale($g_ui_locale);
}
require_once __CA_APP_DIR__ . '/helpers/navigationHelpers.php';
require_once __CA_APP_DIR__ . '/helpers/mailHelpers.php';
require_once __CA_LIB_DIR__ . '/core/ApplicationMonitor.php';
require_once __CA_LIB_DIR__ . '/core/BaseModel.php';
require_once __CA_LIB_DIR__ . '/core/Controller/AppController.php';
require_once __CA_LIB_DIR__ . '/ca/MetaTagManager.php';
require_once __CA_LIB_DIR__ . '/ca/AssetLoadManager.php';
require_once __CA_LIB_DIR__ . '/ca/TooltipManager.php';
require_once __CA_LIB_DIR__ . '/ca/FooterManager.php';
require_once __CA_LIB_DIR__ . '/ca/AppNavigation.php';
require_once __CA_LIB_DIR__ . '/core/Controller/ActionController.php';
require_once __CA_MODELS_DIR__ . '/ca_acl.php';
require_once __CA_LIB_DIR__ . '/core/Cache/ExternalCache.php';
require_once __CA_LIB_DIR__ . '/core/Cache/CompositeCache.php';
require_once __CA_APP_DIR__ . '/lib/ca/GarbageCollection.php';
// initialize Tooltip manager
TooltipManager::init();
示例2: getLoadHTML
/**
* Returns HTML <script> block setting tooltips for response
*
* @param string $ps_namespace Optional namespace specifier; allows you to group tooltip code and output different tool tips at different times in the request cycle
* @return string HTML <script> block setting up tooltips
*/
static function getLoadHTML($ps_namespace = 'default')
{
if (!$ps_namespace) {
$ps_namespace = 'default';
}
$vs_buf = '';
if (!is_array(TooltipManager::$opa_tooltips)) {
TooltipManager::init();
}
if (isset(TooltipManager::$opa_tooltips[$ps_namespace]) && sizeof(TooltipManager::$opa_tooltips[$ps_namespace]) || isset(TooltipManager::$opa_tooltip_functions[$ps_namespace]) && sizeof(TooltipManager::$opa_tooltip_functions[$ps_namespace])) {
$vs_buf = "<script type='text/javascript'>\njQuery(document).ready(function() {\n";
if (isset(TooltipManager::$opa_tooltips[$ps_namespace]) && is_array(TooltipManager::$opa_tooltips[$ps_namespace])) {
foreach (TooltipManager::$opa_tooltips[$ps_namespace] as $vs_id => $vs_content) {
$vs_class = isset(TooltipManager::$opa_namespace_classes[$ps_namespace]) && TooltipManager::$opa_namespace_classes[$ps_namespace] ? TooltipManager::$opa_namespace_classes[$ps_namespace] : "tooltipFormat";
$vs_buf .= "jQuery('{$vs_id}').attr('title', '" . preg_replace('![\\n\\r]{1}!', ' ', addslashes($vs_content)) . "').tooltip({ tooltipClass: '{$vs_class}', show: 150, hide: 150});\n";
}
}
if (isset(TooltipManager::$opa_tooltip_functions[$ps_namespace]) && is_array(TooltipManager::$opa_tooltip_functions[$ps_namespace])) {
foreach (TooltipManager::$opa_tooltip_functions[$ps_namespace] as $vs_id => $vs_code) {
$vs_class = isset(TooltipManager::$opa_namespace_classes[$ps_namespace]) && TooltipManager::$opa_namespace_classes[$ps_namespace] ? TooltipManager::$opa_namespace_classes[$ps_namespace] : "tooltipFormat";
$vs_buf .= "jQuery('{$vs_id}').tooltip({ tooltipClass: '{$vs_class}', show: 150, hide: 150, items: '*', content: function() { {$vs_code}; }});\n";
}
}
$vs_buf .= "});\n</script>\n";
}
return $vs_buf;
}
示例3: getLoadHTML
/**
* Returns HTML <script> block setting tooltips for response
*
* @param string $ps_namespace Optional namespace specifier; allows you to group tooltip code and output different tool tips at different times in the request cycle
* @return string HTML <script> block setting up tooltips
*/
static function getLoadHTML($ps_namespace = 'default')
{
if (!$ps_namespace) {
$ps_namespace = 'default';
}
$vs_buf = '';
if (!is_array(TooltipManager::$opa_tooltips)) {
TooltipManager::init();
}
if (isset(TooltipManager::$opa_tooltips[$ps_namespace]) && is_array(TooltipManager::$opa_tooltips[$ps_namespace])) {
$vs_class = isset(TooltipManager::$opa_namespace_classes[$ps_namespace]) && TooltipManager::$opa_namespace_classes[$ps_namespace] ? TooltipManager::$opa_namespace_classes[$ps_namespace] : "tooltipFormat";
$vs_buf .= caGetTooltipJS(TooltipManager::$opa_tooltips[$ps_namespace], $vs_class);
}
if (isset(TooltipManager::$opa_tooltip_functions[$ps_namespace]) && is_array(TooltipManager::$opa_tooltip_functions[$ps_namespace])) {
$vs_buf .= "<script type='text/javascript'>\njQuery(document).ready(function() {\n";
foreach (TooltipManager::$opa_tooltip_functions[$ps_namespace] as $vs_id => $vs_code) {
$vs_class = isset(TooltipManager::$opa_namespace_classes[$ps_namespace]) && TooltipManager::$opa_namespace_classes[$ps_namespace] ? TooltipManager::$opa_namespace_classes[$ps_namespace] : "tooltipFormat";
$vs_buf .= "jQuery('{$vs_id}').tooltip({ tooltipClass: '{$vs_class}', show: 150, hide: 150, items: '*', content: function() { {$vs_code}; }});\n";
}
$vs_buf .= "});\n</script>\n";
}
return $vs_buf;
}