本文整理匯總了PHP中FabrikHelperHTML::stylesheetFromPath方法的典型用法代碼示例。如果您正苦於以下問題:PHP FabrikHelperHTML::stylesheetFromPath方法的具體用法?PHP FabrikHelperHTML::stylesheetFromPath怎麽用?PHP FabrikHelperHTML::stylesheetFromPath使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類FabrikHelperHTML
的用法示例。
在下文中一共展示了FabrikHelperHTML::stylesheetFromPath方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: display
function display($tmpl = 'default')
{
FabrikHelperHTML::packageJS();
$usersConfig =& JComponentHelper::getParams('com_fabrik');
$model = $this->getModel();
$id = JRequest::getVar('id', $usersConfig->get('visualizationid', JRequest::getInt('visualizationid', 0)));
$model->setId($id);
$row =& $model->getVisualization();
$model->setTableIds();
if ($this->get('RequiredFiltersFound')) {
$model->render();
}
$this->assign('containerId', $this->get('ContainerId'));
$this->assignRef('row', $row);
$this->assign('showFilters', JRequest::getInt('showfilters', 1) === 1 ? 1 : 0);
$this->assignRef('filters', $this->get('Filters'));
$this->assign('filterFormURL', $this->get('FilterFormURL'));
$pluginParams =& $model->getPluginParams();
$this->assignRef('params', $pluginParams);
$tmplpath = COM_FABRIK_FRONTEND . DS . 'plugins' . DS . 'visualization' . DS . 'coverflow' . DS . 'views' . DS . 'coverflow' . DS . 'tmpl' . DS . $tmpl;
$this->_setPath('template', $tmplpath);
//ensure we don't have an incorrect version of mootools loaded
JHTML::stylesheet('table.css', 'media/com_fabrik/css/');
FabrikHelperHTML::script('table.js', 'media/com_fabrik/js/', true);
//check and add a general fabrik custom css file overrides template css and generic table css
FabrikHelperHTML::stylesheetFromPath("media" . DS . "com_fabrik" . DS . "css" . DS . "custom.css");
//check and add a specific biz template css file overrides template css generic table css and generic custom css
FabrikHelperHTML::stylesheetFromPath("components" . DS . "com_fabrik" . DS . "plugins" . DS . "visualization" . DS . "coverflow" . DS . "views" . DS . "coverflow" . DS . "tmpl" . DS . $tmpl . DS . "custom.css");
FabrikHelperHTML::cleanMootools();
//assign something to oPackage to ensure we can clear filters
$str = "window.addEvent('domready', function(){\n\t\t\tfabrikChart{$this->row->id} = {};";
$str .= "\n" . "oPackage.addBlock('vizualization_{$this->row->id}', fabrikChart{$this->row->id});\n\t\t});";
FabrikHelperHTML::addScriptDeclaration($str);
echo parent::display();
}
示例2: display
function display($tmpl = 'default')
{
FabrikHelperHTML::packageJS();
$usersConfig =& JComponentHelper::getParams('com_fabrik');
$model = $this->getModel();
$id = JRequest::getVar('id', $usersConfig->get('visualizationid', JRequest::getInt('visualizationid', 0)));
$model->setId($id);
$row =& $model->getVisualization();
$model->setTableIds();
$model->render();
$this->assign('containerId', $this->get('ContainerId'));
$this->assignRef('row', $row);
$this->assign('showFilters', JRequest::getInt('showfilters', 1) === 1 ? 1 : 0);
$this->assignRef('filters', $this->get('Filters'));
$this->assign('filterFormURL', $this->get('FilterFormURL'));
$pluginParams =& $model->getPluginParams();
$this->assignRef('params', $pluginParams);
$tmplpath = COM_FABRIK_FRONTEND . DS . 'plugins' . DS . 'visualization' . DS . 'timeline' . DS . 'views' . DS . 'timeline' . DS . 'tmpl' . DS . $tmpl;
$this->_setPath('template', $tmplpath);
//ensure we don't have an incorrect version of mootools loaded
JHTML::stylesheet('table.css', 'media/com_fabrik/css/');
FabrikHelperHTML::script('table.js', 'media/com_fabrik/js/', true);
//check and add a general fabrik custom css file overrides template css and generic table css
FabrikHelperHTML::stylesheetFromPath("media" . DS . "com_fabrik" . DS . "css" . DS . "custom.css");
//check and add a specific biz template css file overrides template css generic table css and generic custom css
FabrikHelperHTML::stylesheetFromPath("components" . DS . "com_fabrik" . DS . "plugins" . DS . "visualization" . DS . "timeline" . DS . "views" . DS . "timeline" . DS . "tmpl" . DS . $tmpl . DS . "custom.css");
FabrikHelperHTML::cleanMootools();
echo parent::display();
}
示例3: display
/**
* Execute and display a template script.
*
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return mixed A string if successful, otherwise a JError object.
*/
function display($tpl = 'default')
{
FabrikHelperHTML::framework();
$app = JFactory::getApplication();
$params = $app->getParams('com_fabrik');
$document = JFactory::getDocument();
$usersConfig = JComponentHelper::getParams('com_fabrik');
$model = $this->getModel();
$model->setId(JRequest::getVar('id', $usersConfig->get('visualizationid', JRequest::getInt('visualizationid', 0))));
$this->row = $model->getVisualization();
$params = $model->getParams();
$this->assign('params', $params);
$pluginParams = $model->getPluginParams();
$tpl = $pluginParams->get('fb_gm_layout', $tpl);
$tmplpath = JPATH_ROOT . '/plugins/fabrik_visualization/kaltura/views/kaltura/tmpl/' . $tpl;
$js = <<<EOT
\t\t<script type="text/javascript" >
function entryClicked ( entry_id )
{
\twindow.location = "./player.php?entry_id=" + entry_id;
}
</script>
EOT;
$this->assignRef('data', $this->get('Data'));
FabrikHelperHTML::addScriptDeclaration($js);
FabrikHelperHTML::stylesheetFromPath('plugins/fabrik_visualization/kaltura/views/kaltura/tmpl/' . $tpl . '/template.css');
$template = null;
$this->assign('containerId', $this->get('ContainerId'));
$this->assign('showFilters', JRequest::getInt('showfilters', $params->get('show_filters')) === 1 ? 1 : 0);
$this->assignRef('filters', $this->get('Filters'));
$this->_setPath('template', $tmplpath);
echo parent::display($template);
}
示例4: display
function display($tmpl = 'default')
{
FabrikHelperHTML::framework();
FabrikHelperHTML::script('media/com_fabrik/js/list.js');
$model = $this->getModel();
$usersConfig = JComponentHelper::getParams('com_fabrik');
$model->setId(JRequest::getVar('id', $usersConfig->get('visualizationid', JRequest::getInt('visualizationid', 0))));
$this->row = $model->getVisualization();
$model->setListIds();
if ($this->row->published == 0) {
JError::raiseWarning(500, JText::_('JERROR_ALERTNOAUTHOR'));
return '';
}
$calendar = $model->_row;
$this->media = $model->getMedia();
$params = $model->getParams();
$this->assign('params', $params);
$viewName = $this->getName();
$pluginManager = FabrikWorker::getPluginManager();
$plugin = $pluginManager->getPlugIn('media', 'visualization');
$this->assign('containerId', $this->get('ContainerId'));
$this->assign('showFilters', JRequest::getInt('showfilters', $params->get('show_filters')) === 1 ? 1 : 0);
$this->assignRef('filters', $this->get('Filters'));
$this->assign('params', $model->getParams());
$pluginParams = $model->getPluginParams();
$tmpl = $pluginParams->get('media_layout', $tmpl);
$tmplpath = JPATH_ROOT . '/plugins/fabrik_visualization/media/views/media/tmpl/' . $tmpl;
$this->_setPath('template', $tmplpath);
FabrikHelperHTML::stylesheetFromPath('plugins/fabrik_visualization/media/views/media/tmpl/' . $tmpl . '/template.css');
echo parent::display();
}
示例5: display
/**
* Execute and display a template script.
*
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return mixed A string if successful, otherwise a JError object.
*/
public function display($tpl = 'default')
{
$model = $this->getModel();
$j3 = FabrikWorker::j3();
$app = JFactory::getApplication();
$input = $app->input;
$usersConfig = JComponentHelper::getParams('com_fabrik');
$id = $input->get('id', $usersConfig->get('visualizationid', $input->getInt('visualizationid', 0)));
$model->setId($id);
if (!$model->canView()) {
echo FText::_('JERROR_ALERTNOAUTHOR');
return false;
}
$this->id = $id;
$this->row = $this->get('Visualization');
$this->rows = $this->get('Rows');
$this->containerId = $this->get('ContainerId');
$this->calName = $this->get('VizName');
$this->params = $model->getParams();
$tpl = $j3 ? 'bootstrap' : $tpl;
$this->_setPath('template', JPATH_SITE . '/plugins/fabrik_visualization/approvals/views/approvals/tmpl/' . $tpl);
FabrikHelperHTML::stylesheetFromPath('plugins/fabrik_visualization/approvals/views/approvals/tmpl/' . $tpl . '/template.css');
$ref = $model->getJSRenderContext();
$js = "var {$ref} = new fbVisApprovals('approvals_" . $id . "');\n";
$js .= "Fabrik.addBlock('" . $ref . "', {$ref});\n";
$js .= $model->getFilterJs();
$srcs = FabrikHelperHTML::framework();
$srcs['FbListFilter'] = 'media/com_fabrik/js/listfilter.js';
$srcs['Approvals'] = 'plugins/fabrik_visualization/approvals/approvals.js';
FabrikHelperHTML::iniRequireJs($model->getShim());
FabrikHelperHTML::script($srcs, $js);
$text = $this->loadTemplate();
FabrikHelperHTML::runContentPlugins($text);
echo $text;
}
示例6: display
/**
* Execute and display a template script.
*
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return mixed A string if successful, otherwise a JError object.
*/
public function display($tpl = 'default')
{
$app = JFactory::getApplication();
$input = $app->input;
$j3 = FabrikWorker::j3();
$srcs = FabrikHelperHTML::framework();
$model = $this->getModel();
$usersConfig = JComponentHelper::getParams('com_fabrik');
$model->setId($input->getInt('id', $usersConfig->get('visualizationid', $input->getInt('visualizationid', 0))));
$this->row = $model->getVisualization();
if (!$model->canView()) {
echo FText::_('JERROR_ALERTNOAUTHOR');
return false;
}
$this->js = $this->get('JS');
$viewName = $this->getName();
$params = $model->getParams();
$this->params = $params;
$pluginManager = JModelLegacy::getInstance('Pluginmanager', 'FabrikFEModel');
$plugin = $pluginManager->getPlugIn('slideshow', 'visualization');
$this->showFilters = $model->showFilters();
$this->filters = $this->get('Filters');
$this->filterFormURL = $this->get('FilterFormURL');
$this->params = $model->getParams();
$this->containerId = $this->get('ContainerId');
$srcs['FbListFilter'] = 'media/com_fabrik/js/listfilter.js';
if ($this->get('RequiredFiltersFound')) {
$srcs['Slideshow2'] = 'components/com_fabrik/libs/slideshow2/js/slideshow.js';
$mode = $params->get('slideshow_viz_type', 1);
switch ($mode) {
case 1:
break;
case 2:
$srcs['Kenburns'] = 'components/com_fabrik/libs/slideshow2/js/slideshow.kenburns.js';
break;
case 3:
$srcs['Push'] = 'components/com_fabrik/libs/slideshow2/js/slideshow.push.js';
break;
case 4:
$srcs['Fold'] = 'components/com_fabrik/libs/slideshow2/js/slideshow.fold.js';
break;
default:
break;
}
JHTML::stylesheet('components/com_fabrik/libs/slideshow2/css/slideshow.css');
$srcs['SlideShow'] = 'plugins/fabrik_visualization/slideshow/slideshow.js';
}
FabrikHelperHTML::slimbox();
FabrikHelperHTML::iniRequireJs($model->getShim());
FabrikHelperHTML::script($srcs, $this->js);
//FabrikHelperHTML::slimbox();
$tpl = $j3 ? 'bootstrap' : 'default';
$tpl = $params->get('slideshow_viz_layout', $tpl);
$tmplpath = $model->pathBase . 'slideshow/views/slideshow/tmpl/' . $tpl;
$this->_setPath('template', $tmplpath);
FabrikHelperHTML::stylesheetFromPath('plugins/fabrik_visualization/slideshow/views/slideshow/tmpl/' . $tpl . '/template.css');
FabrikHelperHTML::stylesheetFromPath('plugins/fabrik_visualization/slideshow/views/slideshow/tmpl/' . $tpl . '/custom.css');
echo parent::display();
}
示例7: display
/**
* Execute and display a template script.
*
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return mixed A string if successful, otherwise a JError object.
*/
public function display($tpl = 'default')
{
$document = JFactory::getDocument();
$app = JFactory::getApplication();
$input = $app->input;
$model = $this->getModel();
$usersConfig = JComponentHelper::getParams('com_fabrik');
$model->setId($input->getInt('id', $usersConfig->get('visualizationid', $input->getInt('visualizationid', 0))));
if (!$model->canView()) {
echo FText::_('JERROR_ALERTNOAUTHOR');
return false;
}
$srcs = FabrikHelperHTML::framework();
FabrikHelperHTML::styleSheet('plugins/fabrik_visualization/nvd3_chart/lib/novus-nvd3/src/nv.d3.css');
$srcs['FbListFilter'] = 'media/com_fabrik/js/listfilter.js';
$srcs['AdvancedSearch'] = 'media/com_fabrik/js/advanced-search.js';
$lib = COM_FABRIK_LIVESITE . 'plugins/fabrik_visualization/nvd3_chart/lib/novus-nvd3/';
$document->addScript($lib . 'lib/d3.v2.js');
$document->addScript($lib . 'nv.d3.js');
$document->addScript($lib . 'src/tooltip.js');
$document->addScript($lib . 'lib/fisheye.js');
$document->addScript($lib . 'src/utils.js');
$document->addScript($lib . 'src/models/legend.js');
$document->addScript($lib . 'src/models/axis.js');
$document->addScript($lib . 'src/models/scatter.js');
$document->addScript($lib . 'src/models/line.js');
$document->addScript($lib . 'src/models/lineChart.js');
$document->addScript($lib . 'src/models/multiBar.js');
$document->addScript($lib . 'src/models/multiBarChart.js');
$this->row = $model->getVisualization();
$this->requiredFiltersFound = $model->getRequiredFiltersFound();
$params = $model->getParams();
$js = $model->js();
FabrikHelperHTML::addScriptDeclaration($js);
$this->params = $params;
$viewName = $this->getName();
$pluginManager = JModelLegacy::getInstance('Pluginmanager', 'FabrikFEModel');
$plugin = $pluginManager->getPlugIn('calendar', 'visualization');
$this->params = $params;
$this->postText = $model->postText;
$this->assign('containerId', $this->get('ContainerId'));
$this->assign('filters', $this->get('Filters'));
$this->showFilters = $model->showFilters();
$this->assign('filterFormURL', $this->get('FilterFormURL'));
$tpl = $params->get('nvd3_chart_layout', $tpl);
$this->_setPath('template', JPATH_ROOT . '/plugins/fabrik_visualization/nvd3_chart/views/nvd3_chart/tmpl/' . $tpl);
FabrikHelperHTML::stylesheetFromPath('plugins/fabrik_visualization/nvd3_chart/views/nvd3_chart/tmpl/' . $tpl . '/template.css');
// Assign something to Fabrik.blocks to ensure we can clear filters
$ref = $model->getJSRenderContext();
$js = "{$ref} = {};";
$js .= "\n" . "Fabrik.addBlock('{$ref}', {$ref});";
$js .= $model->getFilterJs();
FabrikHelperHTML::iniRequireJs($model->getShim());
FabrikHelperHTML::script($srcs, $js);
$text = $this->loadTemplate();
FabrikHelperHTML::runContentPlugins($text);
echo $text;
}
示例8: css
/**
* Add CSS
*
* @param $tpl
*/
private function css($tpl)
{
$lib = COM_FABRIK_LIVESITE . 'plugins/fabrik_visualization/fullcalendar/libs/fullcalendar/';
FabrikHelperHTML::styleSheet($lib . 'fullcalendar.css');
// Add our css
FabrikHelperHTML::stylesheetFromPath('plugins/fabrik_visualization/fullcalendar/fullcalendar.css');
JHTML::stylesheet('media/com_fabrik/css/list.css');
FabrikHelperHTML::stylesheetFromPath('plugins/fabrik_visualization/fullcalendar/views/fullcalendar/tmpl/' . $tpl . '/template.css');
// Adding custom.css, just for the heck of it
FabrikHelperHTML::stylesheetFromPath('plugins/fabrik_visualization/fullcalendar/views/fullcalendar/tmpl/' . $tpl . '/custom.css');
}
示例9: display
function display($tmpl = 'default')
{
FabrikHelperHTML::framework();
$model = $this->getModel();
$usersConfig = JComponentHelper::getParams('com_fabrik');
$model->setId(JRequest::getVar('id', $usersConfig->get('visualizationid', JRequest::getInt('visualizationid', 0))));
$this->row = $model->getVisualization();
$model->setListIds();
if ($this->row->published == 0) {
JError::raiseWarning(500, JText::_('JERROR_ALERTNOAUTHOR'));
return '';
}
$this->assign('js', $this->get('JS'));
$viewName = $this->getName();
$params = $model->getParams();
$this->assign('params', $params);
$pluginManager = JModel::getInstance('Pluginmanager', 'FabrikFEModel');
$plugin = $pluginManager->getPlugIn('slideshow', 'visualization');
$this->assign('showFilters', JRequest::getInt('showfilters', $params->get('show_filters')) === 1 ? 1 : 0);
$this->assignRef('filters', $this->get('Filters'));
$this->assign('filterFormURL', $this->get('FilterFormURL'));
$pluginParams = $model->getPluginParams();
$this->assignRef('params', $model->getParams());
$tmpl = $pluginParams->get('slideshow_viz_layout', $tmpl);
$tmplpath = $model->pathBase . 'slideshow/views/slideshow/tmpl' . DS . $tmpl;
$this->_setPath('template', $tmplpath);
FabrikHelperHTML::script('media/com_fabrik/js/list.js');
if ($this->get('RequiredFiltersFound')) {
FabrikHelperHTML::script('components/com_fabrik/libs/slideshow2/js/slideshow.js');
$slideshow_viz_type = $pluginParams->get('slideshow_viz_type', 1);
switch ($slideshow_viz_type) {
case 1:
break;
case 2:
FabrikHelperHTML::script('components/com_fabrik/libs/slideshow2/js/slideshow.kenburns.js');
break;
case 3:
FabrikHelperHTML::script('components/com_fabrik/libs/slideshow2/js/slideshow.push.js');
break;
case 4:
FabrikHelperHTML::script('components/com_fabrik/libs/slideshow2/js/slideshow.fold.js');
break;
default:
break;
}
JHTML::stylesheet('components/com_fabrik/libs/slideshow2/css/slideshow.css');
FabrikHelperHTML::script('plugins/fabrik_visualization/slideshow/slideshow.js');
}
FabrikHelperHTML::addScriptDeclaration($this->js);
$tmplpath = JPATH_ROOT . '/plugins/fabrik_visualization/slideshow/views/slideshow/tmpl/' . $tmpl;
$this->_setPath('template', $tmplpath);
FabrikHelperHTML::stylesheetFromPath('plugins/fabrik_visualization/slideshow/views/slideshow/tmpl/' . $tmpl . '/template.css');
echo parent::display();
}
示例10: display
function display($tmpl = 'default')
{
JHTML::_('behavior.calendar');
FabrikHelperHTML::packageJS();
FabrikHelperHTML::script('table.js', 'media/com_fabrik/js/');
FabrikHelperHTML::script('advanced-search.js', 'media/com_fabrik/js/');
require_once COM_FABRIK_FRONTEND . DS . 'helpers' . DS . 'html.php';
FabrikHelperHTML::mocha();
FabrikHelperHTML::loadCalendar();
$model =& $this->getModel();
$usersConfig =& JComponentHelper::getParams('com_fabrik');
$model->setId(JRequest::getVar('id', $usersConfig->get('visualizationid', JRequest::getInt('visualizationid', 0))));
$this->row =& $model->getVisualization();
$model->setTableIds();
if ($this->row->state == 0) {
JError::raiseWarning(500, JText::_('ALERTNOTAUTH'));
return '';
}
$calendar =& $model->_row;
$this->assign('requiredFiltersFound', $this->get('RequiredFiltersFound'));
if ($this->requiredFiltersFound) {
$this->assign('chart', $this->get('Chart'));
} else {
$this->assign('chart', '');
}
$viewName = $this->getName();
$pluginManager =& JModel::getInstance('Pluginmanager', 'FabrikModel');
$plugin =& $pluginManager->getPlugIn('calendar', 'visualization');
$this->assign('containerId', $this->get('ContainerId'));
$this->assignRef('filters', $this->get('Filters'));
$this->assign('showFilters', JRequest::getInt('showfilters', 1) === 1 ? 1 : 0);
$this->assign('filterFormURL', $this->get('FilterFormURL'));
$pluginParams =& $model->getPluginParams();
$this->assignRef('params', $pluginParams);
JHTML::stylesheet('table.css', 'media/com_fabrik/css/');
$tmpl = $pluginParams->get('chart_layout', $tmpl);
$tmplpath = COM_FABRIK_FRONTEND . DS . 'plugins' . DS . 'visualization' . DS . 'chart' . DS . 'views' . DS . 'chart' . DS . 'tmpl' . DS . $tmpl;
$this->_setPath('template', $tmplpath);
$ab_css_file = $tmplpath . DS . "template.css";
if (JFile::exists($ab_css_file)) {
JHTML::stylesheet('template.css', 'components/com_fabrik/plugins/visualization/chart/views/chart/tmpl/' . $tmpl . '/', true);
}
//check and add a general fabrik custom css file overrides template css and generic table css
FabrikHelperHTML::stylesheetFromPath("media" . DS . "com_fabrik" . DS . "css" . DS . "custom.css");
//check and add a specific biz template css file overrides template css generic table css and generic custom css
FabrikHelperHTML::stylesheetFromPath("components" . DS . "com_fabrik" . DS . "plugins" . DS . "visualization" . DS . "chart" . DS . "views" . DS . "chart" . DS . "tmpl" . DS . $tmpl . DS . "custom.css");
//assign something to oPackage to ensure we can clear filters
$str = "window.addEvent('domready', function(){\n\t\t\tfabrikChart{$this->row->id} = {};";
$str .= "\n" . "oPackage.addBlock('vizualization_{$this->row->id}', fabrikChart{$this->row->id});\n\t\t});";
FabrikHelperHTML::addScriptDeclaration($str);
//ensure we don't have an incorrect version of mootools loaded
FabrikHelperHTML::cleanMootools();
echo parent::display();
}
示例11: display
/**
* Still a wip access the view of subscribed notifications with url:
* http://localhost/fabrik30x/index.php?option=com_fabrik&task=cron.display&id=3
*
* deletion not routing right yet
*
* @param string $tpl Template
*
* @return void
*/
public function display($tpl = 'default')
{
$model = $this->getModel();
$model->loadLang();
$this->rows = $model->getUserNotifications();
$this->id = $model->getId();
$j3 = FabrikWorker::j3();
$viewName = $this->getName();
$tpl = $j3 ? 'bootstrap' : 'default';
$tmplpath = JPATH_ROOT . '/plugins/fabrik_cron/notification/views/notification/tmpl/' . $tpl;
$this->_setPath('template', $tmplpath);
FabrikHelperHTML::stylesheetFromPath('plugins/fabrik_cron/notification/views/notification/tmpl/' . $tpl . '/template.css');
echo parent::display();
}
示例12: display
function display($tmpl = 'default')
{
$app =& JFactory::getApplication();
FabrikHelperHTML::packageJS();
$params =& $app->getParams('com_fabrik');
$document =& JFactory::getDocument();
$usersConfig =& JComponentHelper::getParams('com_fabrik');
$model =& $this->getModel();
$model->setId(JRequest::getVar('id', $usersConfig->get('visualizationid', JRequest::getInt('visualizationid', 0))));
$this->row =& $model->getVisualization();
$this->params =& $model->getParams();
$pluginParams =& $model->getPluginParams();
$this->assignRef('params', $pluginParams);
$tmpl = $pluginParams->get('fb_gm_layout', $tmpl);
$tmplpath = COM_FABRIK_FRONTEND . DS . 'plugins' . DS . 'visualization' . DS . 'kaltura' . DS . 'views' . DS . 'kaltura' . DS . 'tmpl' . DS . $tmpl;
$js = <<<EOT
\t\t<script type="text/javascript" >
function entryClicked ( entry_id )
{
\twindow.location = "./player.php?entry_id=" + entry_id;
}
</script>
EOT;
JHTML::stylesheet('table.css', 'media/com_fabrik/css/');
$this->assign('requiredFiltersFound', $this->get('RequiredFiltersFound'));
if ($this->requiredFiltersFound) {
$this->assignRef('data', $this->get('Data'));
} else {
$this->assignRef('data', '');
}
FabrikHelperHTML::addScriptDeclaration($js);
$ab_css_file = $tmplpath . DS . "template.css";
if (JFile::exists($ab_css_file)) {
JHTML::stylesheet('template.css', 'components/com_fabrik/plugins/visualization/googlemap/views/googlemap/tmpl/' . $tmpl . '/', true);
}
//check and add a general fabrik custom css file overrides template css and generic table css
FabrikHelperHTML::stylesheetFromPath("media" . DS . "com_fabrik" . DS . "css" . DS . "custom.css");
//check and add a specific biz template css file overrides template css generic table css and generic custom css
FabrikHelperHTML::stylesheetFromPath("components" . DS . "com_fabrik" . DS . "plugins" . DS . "visualization" . DS . "kaltura" . DS . "views" . DS . "kaltura" . DS . "tmpl" . DS . $tmpl . DS . "custom.css");
$template = null;
$this->assign('containerId', $this->get('ContainerId'));
$this->assign('showFilters', JRequest::getInt('showfilters', 1) === 1 ? 1 : 0);
$this->assignRef('filters', $this->get('Filters'));
$this->assign('filterFormURL', $this->get('FilterFormURL'));
$this->_setPath('template', $tmplpath);
//ensure we don't have an incorrect version of mootools loaded
FabrikHelperHTML::cleanMootools();
echo parent::display($template);
}
示例13: display
/**
* Execute and display a template script.
*
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return mixed A string if successful, otherwise a JError object.
*/
public function display($tpl = 'default')
{
$app = JFactory::getApplication();
$input = $app->input;
$j3 = FabrikWorker::j3();
$srcs = FabrikHelperHTML::framework();
$usersConfig = JComponentHelper::getParams('com_fabrik');
$model = $this->getModel();
$id = $input->getInt('id', $usersConfig->get('visualizationid', $input->getInt('visualizationid', 0)));
$model->setId($id);
$row = $model->getVisualization();
if (!$model->canView()) {
echo FText::_('JERROR_ALERTNOAUTHOR');
return false;
}
$js = $model->render();
$this->containerId = $this->get('ContainerId');
$this->row = $row;
$this->showFilters = $input->getInt('showfilters', 1) === 1 ? 1 : 0;
$this->filters = $model->getFilters();
$this->advancedSearch = $model->getAdvancedSearchLink();
$this->filterFormURL = $model->getFilterFormURL();
$params = $model->getParams();
$this->params = $params;
$this->width = $params->get('timeline_width', '700');
$this->height = $params->get('timeline_height', '300');
$tpl = $j3 ? 'bootstrap' : 'default';
$tpl = $params->get('timeline_layout', $tpl);
$tmplpath = '/plugins/fabrik_visualization/timeline/views/timeline/tmpl/' . $tpl;
$this->_setPath('template', JPATH_ROOT . $tmplpath);
JHTML::stylesheet('media/com_fabrik/css/list.css');
FabrikHelperHTML::stylesheetFromPath($tmplpath . '/template.css');
$srcs['FbListFilter'] = 'media/com_fabrik/js/listfilter.js';
$srcs['Timeline'] = 'plugins/fabrik_visualization/timeline/timeline.js';
$srcs['AdvancedSearch'] = 'media/com_fabrik/js/advanced-search.js';
$js .= $model->getFilterJs();
FabrikHelperHTML::iniRequireJs($model->getShim());
FabrikHelperHTML::script($srcs, $js);
JText::script('COM_FABRIK_ADVANCED_SEARCH');
JText::script('COM_FABRIK_LOADING');
$opts = array('alt' => 'calendar', 'class' => 'calendarbutton', 'id' => 'timelineDatePicker_cal_img');
$img = FabrikHelperHTML::image('calendar.png', 'form', @$this->tmpl, $opts);
$this->datePicker = '<input type="text" name="timelineDatePicker" id="timelineDatePicker" value="" />' . $img;
// Check and add a general fabrik custom css file overrides template css and generic table css
FabrikHelperHTML::stylesheetFromPath('media/com_fabrik/css/custom.css');
// Check and add a specific biz template css file overrides template css generic table css and generic custom css
FabrikHelperHTML::stylesheetFromPath('plugins/fabrik_visualization/timeline/views/timeline/tmpl/' . $tpl . '/custom.css');
return parent::display();
}
示例14: display
/**
* Execute and display a template script.
*
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return mixed A string if successful, otherwise a JError object.
*/
public function display($tpl = 'default')
{
$app = JFactory::getApplication();
$input = $app->input;
$srcs = FabrikHelperHTML::framework();
$srcs[] = 'media/com_fabrik/js/listfilter.js';
$srcs[] = 'media/com_fabrik/js/advanced-search.js';
$model = $this->getModel();
$usersConfig = JComponentHelper::getParams('com_fabrik');
$model->setId($input->getInt('id', $usersConfig->get('visualizationid', $input->getInt('visualizationid', 0))));
$this->row = $model->getVisualization();
if (!$model->canView()) {
echo FText::_('JERROR_ALERTNOAUTHOR');
return false;
}
if ($this->row->published == 0) {
JError::raiseWarning(500, FText::_('JERROR_ALERTNOAUTHOR'));
return '';
}
$this->requiredFiltersFound = $this->get('RequiredFiltersFound');
if ($this->requiredFiltersFound) {
$this->chart = $this->get('Chart');
} else {
$this->chart = '';
}
$params = $model->getParams();
$this->params = $params;
$viewName = $this->getName();
$pluginManager = FabrikWorker::getPluginManager();
$plugin = $pluginManager->getPlugIn('chart', 'visualization');
$this->containerId = $this->get('ContainerId');
$this->filters = $this->get('Filters');
$this->showFilters = $model->showFilters();
$this->filterFormURL = $this->get('FilterFormURL');
$tpl = $params->get('chart_layout', $tpl);
$tmplpath = JPATH_ROOT . '/plugins/fabrik_visualization/chart/views/chart/tmpl/' . $tpl;
$this->_setPath('template', $tmplpath);
FabrikHelperHTML::stylesheetFromPath('plugins/fabrik_visualization/chart/views/chart/tmpl/' . $tpl . '/template.css');
// Assign something to Fabrik.blocks to ensure we can clear filters
$ref = $model->getJSRenderContext();
$js = "{$ref} = {};";
$js .= "\n" . "Fabrik.addBlock('{$ref}', {$ref});";
$js .= $model->getFilterJs();
FabrikHelperHTML::iniRequireJs($model->getShim());
FabrikHelperHTML::script($srcs, $js);
echo parent::display();
}
示例15: display
/**
* Execute and display a template script.
*
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return mixed A string if successful, otherwise a JError object.
*/
public function display($tpl = 'default')
{
$app = JFactory::getApplication();
$input = $app->input;
$j3 = FabrikWorker::j3();
$srcs = FabrikHelperHTML::framework();
$srcs['FbListFilter'] = 'media/com_fabrik/js/listfilter.js';
$srcs['AdvancedSearch'] = 'media/com_fabrik/js/advanced-search.js';
$model = $this->getModel();
$usersConfig = JComponentHelper::getParams('com_fabrik');
$model->setId($input->getInt('id', $usersConfig->get('visualizationid', $input->getInt('visualizationid', 0))));
$this->row = $model->getVisualization();
if (!$model->canView()) {
echo FText::_('JERROR_ALERTNOAUTHOR');
return false;
}
$this->requiredFiltersFound = $this->get('RequiredFiltersFound');
if ($this->requiredFiltersFound) {
$this->chart = $this->get('Fusionchart');
} else {
$this->chart = '';
}
$params = $model->getParams();
$this->params = $params;
$viewName = $this->getName();
$pluginManager = JModelLegacy::getInstance('Pluginmanager', 'FabrikFEModel');
$plugin = $pluginManager->getPlugIn('calendar', 'visualization');
$this->containerId = $this->get('ContainerId');
$this->filters = $this->get('Filters');
$this->showFilters = $model->showFilters();
$this->filterFormURL = $this->get('FilterFormURL');
$tpl = $j3 ? 'bootstrap' : 'default';
$tpl = $params->get('fusionchart_layout', $tpl);
$this->_setPath('template', JPATH_ROOT . '/plugins/fabrik_visualization/fusionchart/views/fusionchart/tmpl/' . $tpl);
FabrikHelperHTML::stylesheetFromPath('plugins/fabrik_visualization/fusionchart/views/fusionchart/tmpl/' . $tpl . '/template.css');
// Assign something to Fabrik.blocks to ensure we can clear filters
$ref = $model->getJSRenderContext();
$js = "{$ref} = {};";
$js .= "\n" . "Fabrik.addBlock('{$ref}', {$ref});";
$js .= $model->getFilterJs();
FabrikHelperHTML::iniRequireJs($model->getShim());
FabrikHelperHTML::script($srcs, $js);
$text = $this->loadTemplate();
FabrikHelperHTML::runContentPlugins($text);
echo $text;
}