本文整理匯總了PHP中FabrikHelperHTML::modalJLayouts方法的典型用法代碼示例。如果您正苦於以下問題:PHP FabrikHelperHTML::modalJLayouts方法的具體用法?PHP FabrikHelperHTML::modalJLayouts怎麽用?PHP FabrikHelperHTML::modalJLayouts使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類FabrikHelperHTML
的用法示例。
在下文中一共展示了FabrikHelperHTML::modalJLayouts方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: framework
/**
* Load Fabrik's framework (js and base css file)
*
* @return array Framework js files
*/
public static function framework()
{
if (!self::$framework) {
$app = JFactory::getApplication();
$version = new JVersion();
FabrikHelperHTML::modalJLayouts();
$liveSiteSrc = array();
$liveSiteReq = array();
$fbConfig = JComponentHelper::getParams('com_fabrik');
// Only use template test for testing in 2.5 with my temp J bootstrap template.
$bootstrapped = in_array($app->getTemplate(), array('bootstrap', 'fabrik4')) || $version->RELEASE > 2.5;
//$ext = self::isDebug() ? '.js' : '-min.js';
$mediaFolder = self::getMediaFolder();
$src = array();
JHtml::_('behavior.framework', true);
// Ensure bootstrap js is loaded - as J template may not load it.
if ($version->RELEASE > 2.5) {
JHtml::_('bootstrap.framework');
self::loadBootstrapCSS();
JHtml::_('script', $mediaFolder . '/lib/jquery-ui/jquery-ui.min.js');
}
// Require js test - list with no cal loading ajax form with cal
JHTML::_('behavior.calendar');
$liveSiteReq['Chosen'] = $mediaFolder . '/chosen-loader';
$liveSiteReq['Fabrik'] = $mediaFolder . '/fabrik';
if ($bootstrapped) {
$liveSiteReq['FloatingTips'] = $mediaFolder . '/tipsBootStrapMock';
} else {
$liveSiteReq['FloatingTips'] = $mediaFolder . '/tips';
}
if ($fbConfig->get('advanced_behavior', '0') == '1') {
$chosenOptions = $fbConfig->get('advanced_behavior_options', '{}');
$chosenOptions = empty($chosenOptions) ? new stdClass() : ArrayHelper::fromObject(json_decode($chosenOptions));
JHtml::_('stylesheet', 'jui/chosen.css', false, true);
JHtml::_('script', 'jui/chosen.jquery.min.js', false, true, false, false, self::isDebug());
JHtml::_('script', 'jui/ajax-chosen.min', false, true, false, false, self::isDebug());
}
if (self::inAjaxLoadedPage() && !$bootstrapped) {
// $$$ rob 06/02/2012 recall ant so that Color.detach is available (needed for opening a window from within a window)
JHtml::_('script', 'media/com_fabrik/js/lib/art.js');
}
if ($fbConfig->get('advanced_behavior', '0') == '1') {
$liveSiteSrc[] = "var chosenInterval = window.setInterval(function () {\r\n\t\t\t\t\t\tif (Fabrik.buildChosen) {\r\n\t\t\t\t\t\t\twindow.clearInterval(chosenInterval);\r\n\t Fabrik.buildChosen('select.advancedSelect', " . json_encode($chosenOptions) . ");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}, 100);";
}
if (!self::inAjaxLoadedPage()) {
// Require.js now added in fabrik system plugin onAfterRender()
JText::script('COM_FABRIK_LOADING');
$src['Window'] = $mediaFolder . '/window.js';
self::styleSheet(COM_FABRIK_LIVESITE . 'media/com_fabrik/css/fabrik.css');
$liveSiteSrc[] = "\tFabrik.liveSite = '" . COM_FABRIK_LIVESITE . "';";
$liveSiteSrc[] = "\tFabrik.package = '" . $app->getUserState('com_fabrik.package', 'fabrik') . "';";
$liveSiteSrc[] = "\tFabrik.debug = " . (self::isDebug() ? 'true;' : 'false;');
// need to put jLayouts in session data, and add it in the system plugin buildjs(), so just add %%jLayouts%% placeholder
//$liveSiteSrc[] = "\tFabrik.jLayouts = " . json_encode(ArrayHelper::toObject(self::$jLayoutsJs)) . ";";
$liveSiteSrc[] = "\tFabrik.jLayouts = %%jLayouts%%;\n";
if ($bootstrapped) {
$liveSiteSrc[] = "\tFabrik.bootstrapped = true;";
} else {
$liveSiteSrc[] = "\tFabrik.iconGen = new IconGenerator({scale: 0.5});";
$liveSiteSrc[] = "\tFabrik.bootstrapped = false;";
}
$liveSiteSrc[] = self::tipInt();
$liveSiteSrc = implode("\n", $liveSiteSrc);
} else {
if ($bootstrapped) {
$liveSiteSrc[] = "\tFabrik.bootstrapped = true;";
} else {
$liveSiteSrc[] = "\tFabrik.iconGen = new IconGenerator({scale: 0.5});";
$liveSiteSrc[] = "\tFabrik.bootstrapped = false;";
}
$liveSiteSrc[] = "\tif (!Fabrik.jLayouts) {\r\n\t\t\t\tFabrik.jLayouts = {};\r\n\t\t\t\t}\r\n\t\t\t\tFabrik.jLayouts = jQuery.extend(Fabrik.jLayouts, %%jLayouts%%);";
}
self::script($liveSiteReq, $liveSiteSrc, '-min.js');
self::$framework = $src;
}
self::addToSessionJLayouts();
return self::$framework;
}
示例2: framework
/**
* Load Fabrik's framework (js and base css file)
*
* @return array Framework js files
*/
public static function framework()
{
if (!self::$framework) {
$app = JFactory::getApplication();
$version = new JVersion();
FabrikHelperHTML::modalJLayouts();
$jsAssetBaseURI = self::getJSAssetBaseURI();
$fbConfig = JComponentHelper::getParams('com_fabrik');
// Only use template test for testing in 2.5 with my temp J bootstrap template.
$bootstrapped = in_array($app->getTemplate(), array('bootstrap', 'fabrik4')) || $version->RELEASE > 2.5;
$ext = self::isDebug() ? '.js' : '-min.js';
$src = array();
JHtml::_('behavior.framework', true);
// Ensure bootstrap js is loaded - as J template may not load it.
if ($version->RELEASE > 2.5) {
JHtml::_('bootstrap.framework');
}
// Require js test - list with no cal loading ajax form with cal
JHTML::_('behavior.calendar');
if ($fbConfig->get('advanced_behavior', '0') == '1') {
$chosenOptions = $fbConfig->get('advanced_behavior_options', '{}');
$chosenOptions = empty($chosenOptions) ? array() : JArrayHelper::fromObject(json_decode($chosenOptions));
JHtml::_('formbehavior.chosen', 'select.advancedSelect', null, $chosenOptions);
}
if (self::inAjaxLoadedPage() && !$bootstrapped) {
// $$$ rob 06/02/2012 recall ant so that Color.detach is available (needed for opening a window from within a window)
JHtml::_('script', 'media/com_fabrik/js/lib/art.js');
JHtml::_('script', 'media/com_fabrik/js/lib/Event.mock.js');
}
if (!self::inAjaxLoadedPage()) {
// Require.js now added in fabrik system plugin onAfterRender()
JText::script('COM_FABRIK_LOADING');
$src[] = 'media/com_fabrik/js/fabrik' . $ext;
$src[] = 'media/com_fabrik/js/window' . $ext;
self::styleSheet(COM_FABRIK_LIVESITE . 'media/com_fabrik/css/fabrik.css');
$liveSiteReq = array();
$liveSiteReq[] = 'media/com_fabrik/js/fabrik' . $ext;
if ($bootstrapped) {
$liveSiteReq[] = 'media/com_fabrik/js/tipsBootStrapMock' . $ext;
} else {
$liveSiteReq[] = 'media/com_fabrik/js/tips' . $ext;
}
$liveSiteSrc = array();
$liveSiteSrc[] = "\tFabrik.liveSite = '" . COM_FABRIK_LIVESITE . "';";
$liveSiteSrc[] = "\tFabrik.package = '" . $app->getUserState('com_fabrik.package', 'fabrik') . "';";
$liveSiteSrc[] = "\tFabrik.debug = " . (self::isDebug() ? 'true;' : 'false;');
$liveSiteSrc[] = "\tFabrik.jLayouts = " . json_encode(JArrayHelper::toObject(self::$jLayoutsJs)) . ";";
if ($bootstrapped) {
$liveSiteSrc[] = "\tFabrik.bootstrapped = true;";
} else {
$liveSiteSrc[] = "\tFabrik.iconGen = new IconGenerator({scale: 0.5});";
$liveSiteSrc[] = "\tFabrik.bootstrapped = false;";
}
$liveSiteSrc[] = self::tipInt();
$liveSiteSrc = implode("\n", $liveSiteSrc);
self::script($liveSiteReq, $liveSiteSrc);
} else {
if ($bootstrapped) {
$liveSiteSrc[] = "\tFabrik.bootstrapped = true;";
} else {
$liveSiteSrc[] = "\tFabrik.iconGen = new IconGenerator({scale: 0.5});";
$liveSiteSrc[] = "\tFabrik.bootstrapped = false;";
}
$liveSiteSrc[] = "\tif (!Fabrik.jLayouts) {\n\t\t\t\tFabrik.jLayouts = {};\n\t\t\t\t}\n\t\t\t\tFabrik.jLayouts = jQuery.extend(Fabrik.jLayouts, " . json_encode(self::$jLayoutsJs) . ");";
$liveSiteReq[] = 'media/com_fabrik/js/fabrik' . $ext;
self::script($liveSiteReq, $liveSiteSrc);
}
self::$framework = $src;
}
return self::$framework;
}