public function updateCalendar() { $month = JRequest::getVar('month'); $year = JRequest::getVar('year'); StreamFactory::load('helpers' . DS . 'calendar'); $html = StreamCalendarHelper::generate_calendar($year, $month); $data = array(); $data['html'] = $html; $data['script'] = '$(\'div.popover\').hide();$(\'td.running\').popmodal({html:true, live:true, placement: \'below\'});'; echo json_encode($data); exit; }
function display($tpl = null) { $doc = JFactory::getDocument(); $doc->setTitle(JText::_("COM_STREAM_LABEL_ALL_EVENTS")); $html = ''; $this->addPathway(JText::_('NAVIGATOR_LABEL_EVENTS'), JRoute::_('index.php?option=com_stream&view=groups')); $this->_attachScripts(); $tmpl = new StreamTemplate(); $html .= $tmpl->fetch('event.page'); $my = JXFactory::getUser(); if (!$my->getParam(ALERT_CALENDAR_INTRO)) { $html .= ' <div class="alert alert-success" data-alert_id="' . ALERT_CALENDAR_INTRO . '"> <a data-dismiss="alert" class="close">×</a> ' . JText::_('COM_STREAM_HELPER_EVENT') . '</div>'; } JXModule::addBuffer('right', $this->getUpcomingHotEvent()); // Show calendar $now = new JDate(); StreamFactory::load('helpers' . DS . 'calendar'); $html .= '<div id="stream-calendar">' . StreamCalendarHelper::generate_calendar($now->format('Y'), $now->format('m')) . '</div>'; echo $html; //echo $this->getStreamDataHTML(); }