本文整理汇总了PHP中JHtmlBehavior::_calendartranslation方法的典型用法代码示例。如果您正苦于以下问题:PHP JHtmlBehavior::_calendartranslation方法的具体用法?PHP JHtmlBehavior::_calendartranslation怎么用?PHP JHtmlBehavior::_calendartranslation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JHtmlBehavior
的用法示例。
在下文中一共展示了JHtmlBehavior::_calendartranslation方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: calendar
/**
* Add unobtrusive javascript support for a calendar control.
*
* @return void
* @since 11.1
*/
public static function calendar()
{
static $loaded = false;
// Only load once
if ($loaded) {
return;
}
$document = JFactory::getDocument();
$tag = JFactory::getLanguage()->getTag();
//Add uncompressed versions when debug is enabled
$uncompressed = JFactory::getConfig()->get('debug') ? '-uncompressed' : '';
JHtml::_('stylesheet', 'system/calendar-jos.css', array(' title' => JText::_('JLIB_HTML_BEHAVIOR_GREEN'), ' media' => 'all'), true);
JHtml::_('script', $tag . '/calendar' . $uncompressed . '.js', false, true);
JHtml::_('script', $tag . '/calendar-setup' . $uncompressed . '.js', false, true);
$translation = JHtmlBehavior::_calendartranslation();
if ($translation) {
$document->addScriptDeclaration($translation);
}
$loaded = true;
}
示例2: calendar
public static function calendar()
{
$document =& JFactory::getDocument();
JHtml::stylesheet('calendar-jos.css', 'media/system/css/', array(' title' => JText::_('green'), ' media' => 'all'));
JHtml::script('calendar.js', 'media/system/js/');
JHtml::script('calendar-setup.js', 'media/system/js/');
$translation = JHtmlBehavior::_calendartranslation();
if ($translation) {
$document->addScriptDeclaration($translation);
}
}
示例3: calendar
/**
* Add unobtrusive javascript support for a calendar control.
*
* @return void
*
* @since 11.1
*/
public static function calendar()
{
// Only load once
if (isset(self::$loaded[__METHOD__])) {
return;
}
$document = JFactory::getDocument();
$tag = JFactory::getLanguage()->getTag();
JHtml::_('stylesheet', 'system/calendar-jos.css', array(' title' => JText::_('JLIB_HTML_BEHAVIOR_GREEN'), ' media' => 'all'), true);
JHtml::_('script', $tag . '/calendar.js', false, true);
JHtml::_('script', $tag . '/calendar-setup.js', false, true);
$translation = JHtmlBehavior::_calendartranslation();
if ($translation) {
$document->addScriptDeclaration($translation);
}
self::$loaded[__METHOD__] = true;
}
示例4: calendar
/**
* Add unobtrusive javascript support for a calendar control.
*
* @return void
*
* @since 11.1
*/
public static function calendar()
{
// Only load once
if (isset(self::$loaded[__METHOD__])) {
return;
}
JHtml::_('stylesheet', 'system/calendar-jos.css', array(' title' => FText::_('JLIB_HTML_BEHAVIOR_GREEN'), ' media' => 'all'), true);
$translation = JHtmlBehavior::_calendartranslation();
$document = JFactory::getDocument();
$tag = JFactory::getLanguage()->getTag();
$app = JFactory::getApplication();
$option = $app->input->get('option');
// Bah - not sure why we were trying to load the calendar via requirejs
$isFabrik = $option == 'com_fabrik' || !is_null($app->input->get('fabrik_sticky_filters'));
$isFabrik = false;
if ($app->isAdmin() || !$isFabrik) {
$tag = JFactory::getLanguage()->getTag();
JHtml::_('script', $tag . '/calendar.js', false, true);
JHtml::_('script', $tag . '/calendar-setup.js', false, true);
if ($translation) {
$document->addScriptDeclaration($translation);
}
} else {
$f = array();
$f[] = JHtml::_('script', $tag . '/calendar.js', false, true, true);
$f[] = JHtml::_('script', $tag . '/calendar-setup.js', false, true, true);
if ($translation) {
// In any event its not right as the 2 scrips would need to be loaded one after the other
$translation = "requirejs(" . json_encode($f) . ", function () { {$translation} });\n";
$document->addScriptDeclaration($translation);
}
}
self::$loaded[__METHOD__] = true;
}