示例#1
0
 function display($tmpl = 'default')
 {
     JHTML::_('behavior.calendar');
     FabrikHelperHTML::script('media/com_fabrik/js/list.js', true);
     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->setListIds();
     if ($this->row->published == 0) {
         JError::raiseWarning(500, JText::_('ALERTNOTAUTH'));
         return '';
     }
     $calendar =& $model->_row;
     $this->media = $model->getMedia();
     $viewName = $this->getName();
     $pluginManager =& JModel::getInstance('Pluginmanager', 'FabrikFEModel');
     $plugin =& $pluginManager->getPlugIn('calendar', 'visualization');
     $this->assign('containerId', $this->get('ContainerId'));
     $this->assign('showFilters', JRequest::getInt('showfilters', 1) === 1 ? 1 : 0);
     $this->assignRef('filters', $this->get('Filters'));
     $pluginParams =& $model->getPluginParams();
     $tmpl = $pluginParams->get('media_layout', $tmpl);
     $tmplpath = JPATH_ROOT . DS . 'plugins' . DS . 'fabrik_visualization' . DS . 'media' . DS . 'views' . DS . 'media' . DS . 'tmpl' . DS . $tmpl;
     $this->_setPath('template', $tmplpath);
     $ab_css_file = $tmplpath . DS . "template.css";
     if (JFile::exists($ab_css_file)) {
         JHTML::stylesheet('plugins/fabrik_visualization/media/views/media/tmpl/' . $tmpl . '/template.css');
     }
     echo parent::display();
 }
示例#2
0
 function display($tmpl = 'default')
 {
     JHTML::_('behavior.calendar');
     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))));
     echo $model->getEvents();
 }
示例#3
0
	function display($tmpl = 'default')
	{
		JHTML::_('behavior.calendar');
		FabrikHelperHTML::script('media/com_fabrik/js/list.js');
		FabrikHelperHTML::script('media/com_fabrik/js/advanced-search.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->setListIds();

		if ($this->row->published == 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', 'FabrikFEModel');
		$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);
		$tmpl = $pluginParams->get('chart_layout', $tmpl);
		$tmplpath = JPATH_ROOT.DS.'plugins'.DS.'fabrik_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('plugins/fabrik_visualization/chart/views/chart/tmpl/'.$tmpl.'/template.css', true);
		}

		//assign something to Fabrik.blocks to ensure we can clear filters
		$str = "head.ready(function() {
			fabrikChart{$this->row->id} = {};";
		$str .= "\n" . "Fabrik.addBlock('vizualization_{$this->row->id}', fabrikChart{$this->row->id});
		});";
		FabrikHelperHTML::addScriptDeclaration($str);
		echo parent::display();
	}
示例#4
0
 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();
 }
示例#5
0
    /**
     * Display the form to add or edit a cronjob
     * @param object cronjob
     * @param object parameters from attributes
     * @param array lists
     * @param object pluginmanager
     */
    function edit($row, $params, $lists, &$pluginManager)
    {
        JRequest::setVar('hidemainmenu', 1);
        FabrikHelperHTML::script('namespace.js', 'administrator/components/com_fabrik/views/', true);
        FabrikHelperHTML::script('admincron.js', 'administrator/components/com_fabrik/views/', true);
        FabrikHelperHTML::tips();
        $document =& JFactory::getDocument();
        FabrikHelperHTML::addScriptDeclaration("\n\t\t\twindow.addEvent('domready', function(e) {\n\t\t\t\tnew adminCron({'sel':'" . $row->plugin . "'});\n\t\t\t});\n\n\t\t\tfunction submitbutton(pressbutton) {\n\t\t\t\tvar form = document.adminForm;\n\t\t\t\tif (pressbutton == 'cancel') {\n\t\t\t\t\tsubmitform( pressbutton);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t/* do field validation */\n\t\t\t\tif (form.label.value == '') {\n\t\t\t\t\talert( '" . JText::_('PLEASE ENTER A LABEL', true) . "');\n\t\t\t\t} else {\n\t\t\t\t\tsubmitform( pressbutton);\n\t\t\t\t}\n\t\t\t}\n\t\t\t");
        FabrikViewCron::setCronToolbar();
        FabrikHelperHTML::loadCalendar();
        FabrikHelperHTML::cleanMootools();
        ?>
		<form action="index.php" method="post" name="adminForm">
		<div class="col100">
			<fieldset class="adminform">
				<legend><?php 
        echo JText::_('DETAILS');
        ?>
</legend>
			<table class="admintable">

				<tr>
					<td class="key"><label for="label"><?php 
        echo JText::_('LABEL');
        ?>
</label></td>
					<td><input class="inputbox" type="text" id="label" name="label" size="75" value="<?php 
        echo $row->label;
        ?>
" /></td>
				</tr>

				<tr>
					<td class="key"><label for="frequency"><?php 
        echo JText::_('EVERY');
        ?>
</label></td>
					<td><input class="inputbox" type="text" id="frequency" name="frequency" size="4" value="<?php 
        echo $row->frequency;
        ?>
" /></td>
				</tr>

				<tr>
					<td class="key"><label for="unit"><?php 
        echo JText::_('UNIT');
        ?>
</label></td>
					<td><?php 
        echo $lists['unit'];
        ?>
</td>
				</tr>

				<tr>
					<td class="key"><label for="lastrun"><?php 
        echo JText::_('STARTING FROM');
        ?>
</label></td>
					<td><?php 
        echo JHTML::calendar($row->lastrun, 'lastrun', 'lastrun', '%Y-%m-%d %H:%M:%S', array('size' => 23));
        ?>
</td>
				</tr>

				<tr>
					<td class="key"><label for="state"><?php 
        echo JText::_('PUBLISHED');
        ?>
</label></td>
					<td>
					<input type="checkbox" id="state" name="state" value="1" <?php 
        echo $row->state ? 'checked="checked"' : '';
        ?>
 />
					</td>
				</tr>
				<tr>
					<td colspan="2">
					<?php 
        echo stripslashes($params->render());
        ?>
					</td>
				</tr>
				<tr>
					<td class="key">
						<label for=""><?php 
        echo JText::_('PLUGIN');
        ?>
</label>
					</td>
					<td>
						<?php 
        echo $lists['plugins'];
        ?>
					</td>
				</tr>
				<?php 
        foreach ($pluginManager->_plugIns['cron'] as $oPlugin) {
            $oPlugin->setId($row->id);
            ?>
					<tr>
					<td colspan="2">
						<?php 
            $oPlugin->renderAdminSettings();
            ?>
						</td>
					</tr>
					<?php 
        }
        ?>
			</table>
			</fieldset>
				<input type="hidden" name="option" value="com_fabrik" />
				<input type="hidden" name="c" value="cron" />
				<input type="hidden" name="task" />
				<input type="hidden" name="id" value="<?php 
        echo $row->id;
        ?>
" />
			</div>
			<?php 
        echo JHTML::_('form.token');
        echo JHTML::_('behavior.keepalive');
        ?>
		</form>
	<?php 
    }
示例#6
0
 function display($tmpl = 'default')
 {
     global $Itemid;
     $app =& JFactory::getApplication();
     JHTML::_('behavior.calendar');
     require_once COM_FABRIK_FRONTEND . DS . 'helpers' . DS . 'html.php';
     $pluginManager =& JModel::getInstance('Pluginmanager', 'FabrikModel');
     $plugin =& $pluginManager->getPlugIn('calendar', 'visualization');
     if (FabrikWorker::nativeMootools12()) {
         FabrikHelperHTML::script('Mootools.Lang.js', 'components/com_fabrik/libs/mootools1.2/', true);
         FabrikHelperHTML::script('date.js', 'components/com_fabrik/plugins/element/fabrikdate/', false);
         FabrikHelperHTML::addScriptDeclaration("Date.defineParsers('%d([-./]%m([-./]%Y((T| )%X)?)?)?');");
     }
     FabrikHelperHTML::mocha();
     FabrikHelperHTML::loadCalendar();
     $model =& $this->getModel();
     $usersConfig =& JComponentHelper::getParams('com_fabrik');
     $id = JRequest::getVar('id', $usersConfig->get('visualizationid', JRequest::getInt('visualizationid', 0)));
     $model->setId($id);
     $this->row =& $model->getVisualization();
     $model->setTableIds();
     $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'));
     $calendar =& $model->_row;
     $this->calName = $model->getCalName();
     $config =& JFactory::getConfig();
     $document =& JFactory::getDocument();
     $canAdd = $this->get('CanAdd');
     $this->assign('requiredFiltersFound', $this->get('RequiredFiltersFound'));
     if ($canAdd && $this->requiredFiltersFound) {
         $app->enqueueMessage(JText::_('COM_FABRIK_DOUBLE_CLICK_TO_ADD_EVENT'));
     }
     $this->assign('canAdd', $canAdd);
     //FabrikHelperHTML::mocha();
     FabrikHelperHTML::packageJS();
     $fbConfig =& JComponentHelper::getParams('com_fabrik');
     JHTML::stylesheet('table.css', 'media/com_fabrik/css/');
     FabrikHelperHTML::script('element.js', 'media/com_fabrik/js/', true);
     FabrikHelperHTML::script('form.js', 'media/com_fabrik/js/', true);
     FabrikHelperHTML::script('table.js', 'media/com_fabrik/js/', true);
     FabrikHelperHTML::script('calendar.js', 'components/com_fabrik/plugins/visualization/calendar/', true);
     $params =& $model->getParams();
     //Get the active menu item
     $usersConfig =& JComponentHelper::getParams('com_fabrik');
     $urlfilters = JRequest::get('get');
     unset($urlfilters['option']);
     unset($urlfilters['view']);
     unset($urlfilters['controller']);
     unset($urlfilters['Itemid']);
     unset($urlfilters['visualizationid']);
     unset($urlfilters['format']);
     if (empty($urlfilters)) {
         $urlfilters = new stdClass();
     }
     $urls = new stdClass();
     //dont JRoute as its wont load with sef?
     $urls->del = 'index.php?option=com_fabrik&controller=visualization.calendar&view=visualization&task=deleteEvent&format=raw&Itemid=' . $Itemid . '&id=' . $id;
     $urls->add = 'index.php?option=com_fabrik&view=visualization&controller=visualization.calendar&format=raw&Itemid=' . $Itemid . '&id=' . $id;
     $user =& JFactory::getUser();
     $legend = $params->get('show_calendar_legend', 0) ? $model->getLegend() : '';
     $tmpl = $params->get('calendar_layout', 'default');
     $pluginManager->loadJS();
     $options = new stdClass();
     $options->url = $urls;
     $options->eventTables =& $model->getEventTables();
     $options->calendarId = $calendar->id;
     $options->popwiny = $params->get('yoffset', 0);
     $options->urlfilters = $urlfilters;
     $options->canAdd = $canAdd;
     $options->tmpl = $tmpl;
     $formView =& $this->_formView;
     $formView->_isMambot = true;
     $o = $model->getAddStandardEventFormInfo();
     if ($o != null) {
         $options->tableid = $o->id;
         $formView->setId($o->form_id);
         $options->formid = $o->form_id;
     }
     $formModel =& $formView->getModel();
     $form =& $formModel->getForm();
     $options->mooversion = FabrikWorker::getMooVersion() == 1 ? 1.2 : 1.1;
     $model->setRequestFilters();
     $options->filters =& $model->filters;
     // end not sure
     $options->Itemid = $Itemid;
     $options->standard_event_form = $params->get('use_standard_event_table', 0) == 1 ? true : false;
     $options->show_day = $params->get('show_day', true);
     $options->show_week = $params->get('show_week', true);
     $options->days = array(JText::_('Sunday'), JText::_('Monday'), JText::_('Tuesday'), JText::_('Wednesday'), JText::_('Thursday'), JText::_('Friday'), JText::_('Saturday'));
     $options->shortDays = array(JText::_('Sun'), JText::_('Mon'), JText::_('Tue'), JText::_('Wed'), JText::_('Thu'), JText::_('Fri'), JText::_('Sat'));
     $options->months = array(JText::_('January'), JText::_('February'), JText::_('March'), JText::_('April'), JText::_('May'), JText::_('June'), JText::_('July'), JText::_('August'), JText::_('September'), JText::_('October'), JText::_('November'), JText::_('December'));
     $options->shortMonths = array(JText::_('Jan'), JText::_('Feb'), JText::_('Mar'), JText::_('Apr'), JText::_('May'), JText::_('Jun'), JText::_('Jul'), JText::_('Aug'), JText::_('Sept'), JText::_('Oct'), JText::_('Nov'), JText::_('Dec'));
     $options->first_week_day = (int) $params->get('first_week_day', 0);
     $options->monthday = new stdClass();
     $options->monthday->width = (int) $params->get('calendar-monthday-width', 90);
     $options->monthday->height = (int) $params->get('calendar-monthday-height', 90);
     $options->greyscaledweekend = $params->get('greyscaled-week-end', 0);
     $options->viewType = $params->get('calendar_default_view', 'month');
     $json = json_encode($options);
     $lang = new stdClass();
     $lang->next = htmlspecialchars(JText::_('Next'));
     $lang->previous = JText::_('Previous');
     $lang->day = JText::_('Day');
     $lang->week = JText::_('Week');
     $lang->month = JText::_('Month');
     $lang->key = htmlspecialchars(JText::_('Key'));
     $lang->today = JText::_('Today');
     $lang->start = JText::_('Start');
     $lang->end = JText::_('End');
     $lang->deleteConf = JText::_('Are you sure you want to delete this?');
     $lang->del = JText::_('delete');
     $lang->view = JText::_('view');
     $lang->edit = JText::_('edit');
     $lang->windowtitle = JText::_('add/edit event');
     $lang = json_encode($lang);
     //$$$ rob - was assigning 'calendar_x' to oPackage.blocks,
     // but now assigning as 'visualization_x' to enable filter clear link
     $str = "window.addEvent('domready', function(e) {\n" . "  //var m = new MochaUI.Modal();\n" . "  {$this->calName} = new fabrikCalendar('calendar_{$calendar->id}');\n" . "  {$this->calName}.render({}, {$json}, {$lang});\n" . "  oPackage.addBlock('vizualization_" . $calendar->id . "', {$this->calName});\n";
     if ($o != null) {
         $str .= "  {$this->calName}.addListenTo('form_{$o->form_id}');\n";
     }
     $fids =& $model->getLinkedFormIds();
     foreach ($fids as $fid) {
         $str .= "  {$this->calName}.addListenTo('form_{$fid}');\n";
     }
     $str .= $legend . "\n});\n";
     FabrikHelperHTML::addScriptDeclaration($str);
     $viewName = $this->getName();
     $pluginParams =& $model->getPluginParams();
     $this->assignRef('params', $pluginParams);
     $tmpl = $pluginParams->get('calendar_layout', $tmpl);
     $tmplpath = COM_FABRIK_FRONTEND . DS . 'plugins' . DS . 'visualization' . DS . 'calendar' . DS . 'views' . DS . 'calendar' . 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/calendar/views/calendar/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 . "calendar" . DS . "views" . DS . "calendar" . DS . "tmpl" . DS . $tmpl . DS . "custom.css");
     //ensure we don't have an incorrect version of mootools loaded
     FabrikHelperHTML::cleanMootools();
     echo parent::display();
 }
示例#7
0
 function display($tmpl = 'default')
 {
     FabrikHelperHTML::framework();
     $app = JFactory::getApplication();
     $Itemid = (int) @$app->getMenu('site')->getActive()->id;
     JHTML::_('behavior.calendar');
     require_once COM_FABRIK_FRONTEND . DS . 'helpers' . DS . 'html.php';
     FabrikHelperHTML::mocha();
     FabrikHelperHTML::loadCalendar();
     $model =& $this->getModel();
     $usersConfig = JComponentHelper::getParams('com_fabrik');
     $id = JRequest::getVar('id', $usersConfig->get('visualizationid', JRequest::getInt('visualizationid', 0)));
     $model->setId($id);
     $this->row =& $model->getVisualization();
     $model->setListIds();
     $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'));
     $calendar =& $model->_row;
     $this->calName = $model->getCalName();
     $canAdd = $this->get('CanAdd');
     $this->assign('requiredFiltersFound', $this->get('RequiredFiltersFound'));
     if ($canAdd && $this->requiredFiltersFound) {
         $app->enqueueMessage(JText::_('PLG_VISUALIZATION_CALENDAR_DOUBLE_CLICK_TO_ADD'));
     }
     $this->assign('canAdd', $canAdd);
     $fbConfig =& JComponentHelper::getParams('com_fabrik');
     JHTML::stylesheet('media/com_fabrik/css/list.css');
     FabrikHelperHTML::script('media/com_fabrik/js/element.js', true);
     FabrikHelperHTML::script('media/com_fabrik/js/form.js', true);
     FabrikHelperHTML::script('media/com_fabrik/js/list.js', true);
     FabrikHelperHTML::script('plugins/fabrik_visualization/calendar/calendar.js', true);
     $params =& $model->getParams();
     //Get the active menu item
     $urlfilters = JRequest::get('get');
     unset($urlfilters['option']);
     unset($urlfilters['view']);
     unset($urlfilters['controller']);
     unset($urlfilters['Itemid']);
     unset($urlfilters['visualizationid']);
     unset($urlfilters['format']);
     if (empty($urlfilters)) {
         $urlfilters = new stdClass();
     }
     $urls = new stdClass();
     //dont JRoute as its wont load with sef?
     $urls->del = 'index.php?option=com_fabrik&controller=visualization.calendar&view=visualization&task=deleteEvent&format=raw&Itemid=' . $Itemid . '&id=' . $id;
     $urls->add = 'index.php?option=com_fabrik&view=visualization&controller=visualization.calendar&format=raw&Itemid=' . $Itemid . '&id=' . $id;
     $user =& JFactory::getUser();
     $legend = $params->get('show_calendar_legend', 0) ? $model->getLegend() : '';
     $tmpl = $params->get('calendar_layout', 'default');
     $pluginManager->loadJS();
     $options = new stdClass();
     $options->url = $urls;
     $options->eventLists = $this->get('eventLists');
     $options->calendarId = $calendar->id;
     $options->popwiny = $params->get('yoffset', 0);
     $options->urlfilters = $urlfilters;
     $options->canAdd = $canAdd;
     $options->tmpl = $tmpl;
     //$formView =& $this->_formView;
     $o = $model->getAddStandardEventFormInfo();
     if ($o != null) {
         $options->listid = $o->id;
         //$formView->setId($o->form_id);
         //$options->formid = $o->form_id;
     }
     //$formModel =& $formView->getModel();
     //$form =& $formModel->getForm();
     //$$$rob @TODO not sure this is need - it isnt in the timeline viz
     $model->setRequestFilters();
     $options->filters =& $model->filters;
     // end not sure
     $options->Itemid = $Itemid;
     $options->show_day = $params->get('show_day', true);
     $options->show_week = $params->get('show_week', true);
     $options->days = array(JText::_('SUNDAY'), JText::_('MONDAY'), JText::_('TUESDAY'), JText::_('WEDNESDAY'), JText::_('THURSDAY'), JText::_('FRIDAY'), JText::_('SATURDAY'));
     $options->shortDays = array(JText::_('SUN'), JText::_('MON'), JText::_('TUE'), JText::_('WED'), JText::_('THU'), JText::_('FRI'), JText::_('SAT'));
     $options->months = array(JText::_('JANUARY'), JText::_('FEBRUARY'), JText::_('MARCH'), JText::_('APRIL'), JText::_('MAY'), JText::_('JUNE'), JText::_('JULY'), JText::_('AUGUST'), JText::_('SEPTEMBER'), JText::_('OCTOBER'), JText::_('NOVEMBER'), JText::_('DECEMBER'));
     $options->shortMonths = array(JText::_('JANUARY_SHORT'), JText::_('FEBRUARY_SHORT'), JText::_('MARCH_SHORT'), JText::_('APRIL_SHORT'), JText::_('MAY_SHORT'), JText::_('JUNE_SHORT'), JText::_('JULY_SHORT'), JText::_('AUGUST_SHORT'), JText::_('SEPTEMBER_SHORT'), JText::_('OCTOBER_SHORT'), JText::_('NOVEMBER_SHORT'), JText::_('DECEMBER_SHORT'));
     $options->first_week_day = (int) $params->get('first_week_day', 0);
     $options->monthday = new stdClass();
     $options->monthday->width = (int) $params->get('calendar-monthday-width', 90);
     $options->monthday->height = (int) $params->get('calendar-monthday-height', 90);
     $options->greyscaledweekend = $params->get('greyscaled-week-end', 0);
     $options->viewType = $params->get('calendar_default_view', 'month');
     $json = json_encode($options);
     JText::script('PLG_VISUALIZATION_CALENDAR_NEXT');
     JText::script('PLG_VISUALIZATION_CALENDAR_PREVIOUS');
     JText::script('PLG_VISUALIZATION_CALENDAR_DAY');
     JText::script('PLG_VISUALIZATION_CALENDAR_WEEK');
     JText::script('PLG_VISUALIZATION_CALENDAR_MONTH');
     JText::script('PLG_VISUALIZATION_CALENDAR_KEY');
     JText::script('PLG_VISUALIZATION_CALENDAR_TODAY');
     JText::script('PLG_VISUALIZATION_CALENDAR_CONF_DELETE');
     JText::script('PLG_VISUALIZATION_CALENDAR_DELETE');
     JText::script('PLG_VISUALIZATION_CALENDAR_VIEW');
     JText::script('PLG_VISUALIZATION_CALENDAR_EDIT');
     JText::script('PLG_VISUALIZATION_CALENDAR_ADD_EDIT_EVENT');
     $str = "head.ready(function() {\n" . "  {$this->calName} = new fabrikCalendar('calendar_{$calendar->id}');\n" . "  {$this->calName}.render({$json});\n" . "  Fabrik.addBlock('calendar_" . $calendar->id . "', {$this->calName});\n";
     /*if ($o != null) {
     			$str .="  $this->calName.addListenTo('form_{$o->form_id}');\n";
     		}
     		$fids =& $model->getLinkedFormIds();
     		foreach ($fids as $fid) {
     			$str .= "  $this->calName.addListenTo('form_$fid');\n";
     		}*/
     $str .= $legend . "\n});\n";
     FabrikHelperHTML::addScriptDeclaration($str);
     $viewName = $this->getName();
     $pluginParams =& $model->getPluginParams();
     $this->assignRef('params', $pluginParams);
     $tmpl = $pluginParams->get('calendar_layout', $tmpl);
     $tmplpath = JPATH_ROOT . DS . 'plugins' . DS . 'fabrik_visualization' . DS . 'calendar' . DS . 'views' . DS . 'calendar' . DS . 'tmpl' . DS . $tmpl;
     $this->_setPath('template', $tmplpath);
     $ab_css_file = $tmplpath . DS . "template.css";
     if (JFile::exists($ab_css_file)) {
         JHTML::stylesheet('plugins/fabrik_visualization/calendar/views/calendar/tmpl/' . $tmpl . '/template.css');
     }
     return parent::display();
 }