Exemplo n.º 1
0
 function detail($tpl = null)
 {
     JEVHelper::componentStylesheet($this);
     $document = JFactory::getDocument();
     // TODO do this properly
     //$document->setTitle(JText::_( 'BROWSER_TITLE' ));
     $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
     //$this->assign("introduction", $params->get("intro",""));
     $this->data = $this->datamodel->getEventData($this->evid, $this->jevtype, $this->year, $this->month, $this->day);
     // Dynamic pathway
     if (isset($this->data['row'])) {
         $pathway = JFactory::getApplication()->getPathway();
         $pathway->addItem($this->data['row']->title(), "");
         // Set date in view for use in navigation icons
         $this->year = $this->data['row']->yup();
         $this->month = $this->data['row']->mup();
         $this->day = $this->data['row']->dup();
         // seth month and year to be used by mini-calendar if needed
         if (!JRequest::getVar("month", 0)) {
             JRequest::setVar("month", $this->month);
         }
         if (!JRequest::getVar("year", 0)) {
             JRequest::setVar("year", $this->year);
         }
     }
 }
Exemplo n.º 2
0
 function __construct($config = null)
 {
     parent::__construct($config);
     $this->jevlayout = "flat";
     $this->addHelperPath(dirname(__FILE__) . "/../helpers/");
     $this->addHelperPath(JPATH_BASE . '/' . 'templates' . '/' . JFactory::getApplication()->getTemplate() . '/' . 'html' . '/' . JEV_COM_COMPONENT . '/' . "helpers");
     $document = JFactory::getDocument();
     $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
     if ($params->get("flatscalable", "1") == "1" || $params->get("flatwidth", 905) == "scalable") {
         jimport('joomla.environment.browser');
         $browser = JBrowser::getInstance();
         $browserType = $browser->getBrowser();
         $browserVersion = $browser->getMajor();
         if ($browserType == 'msie' && $browserVersion < 9) {
             JEVHelper::componentStylesheet($this, "scalable_ie8.css");
         } else {
             JEVHelper::componentStylesheet($this, "scalable.css");
         }
         JEVHelper::componentStylesheet($this);
     } else {
         JEVHelper::componentStylesheet($this);
         JEVHelper::componentStylesheet($this, "w" . $params->get("flatwidth", 905) . ".css");
     }
     if ($params->get("darktemplate", 0)) {
         JEVHelper::componentStylesheet($this, "dark.css");
     }
     $stylelink = '<!--[if lte IE 6]>' . "\n";
     $stylelink .= '<link rel="stylesheet" href="' . JURI::root() . 'components/com_jevents/views/flat/assets/css/ie6.css" />' . "\n";
     $stylelink .= '<![endif]-->' . "\n";
     $document->addCustomTag($stylelink);
     $this->colourscheme = $params->get("flatcolourscheme", "red");
     if ($this->colourscheme == "gray") {
         //$this->colourscheme = "";
     }
 }
function DefaultViewHelperFooter16($view)
{
    if (JRequest::getInt('pop', 0)) {
        ?>
	<div class="ev_noprint"><p align="center">
	<a href="#close" onclick="if (window.parent==window){self.close();} else {try {window.parent.jQuery('#myEditModal').modal('hide');}catch (e){}try {window.parent.SqueezeBox.close(); return false;} catch(e) {self.close();return false;}}" title="<?php 
        echo JText::_('JEV_CLOSE');
        ?>
"><?php 
        echo JText::_('JEV_CLOSE');
        ?>
</a>
	</p></div>
<?php 
    }
    $view->loadHelper("JevViewCopyright");
    JevViewCopyright();
    ?>
</div>
</div> <!-- close #jevents //-->
<?php 
    $dispatcher = JDispatcher::getInstance();
    $dispatcher->trigger('onJEventsFooter');
    $task = JRequest::getString("jevtask");
    $view->loadModules("jevpostjevents");
    $view->loadModules("jevpostjevents_" . $task);
    JEVHelper::componentStylesheet($view, "extra.css");
    jimport('joomla.filesystem.file');
    // Lets check if we have editted before! if not... rename the custom file.
    if (JFile::exists(JPATH_SITE . "/components/com_jevents/assets/css/jevcustom.css")) {
        // It is definitely now created, lets load it!
        JEVHelper::stylesheet('jevcustom.css', 'components/' . JEV_COM_COMPONENT . '/assets/css/');
    }
}
Exemplo n.º 4
0
 function __construct(&$params = null, $modid)
 {
     $this->_modid = $modid;
     $this->_params =& $params;
     $this->datamodel = new JEventsdatamodel();
     $this->inccss = $params->get('modlatest_inccss', 1);
     $this->disable = $params->get('nonjeventsdisable', 1);
     if ($this->inccss) {
         //JEVHelper::componentStylesheet($this);
         JEVHelper::componentStylesheet($this, "modstyle.css");
     }
     include_once JEV_LIBS . "/modfunctions.php";
     $this->myItemid = $this->datamodel->setupModuleCatids($this->_params);
     $menu = JFactory::getApplication()->getMenu('site');
     $menuItem = $menu->getItem($this->myItemid);
     if ($menuItem && $menuItem->component == JEV_COM_COMPONENT) {
         $this->myTask = isset($menuItem->query["task"]) ? $menuItem->query["task"] : $menuItem->query["view"] . "." . $menuItem->query["layout"];
     } else {
         $this->myTask = "month.calendar";
     }
     static $css;
     if (!isset($css) && $params->get("hideinactivekids", 1)) {
         $document = JFactory::getDocument();
         $document->addStyleDeclaration(".childcat {display:none;}");
         $css = 1;
     }
 }
Exemplo n.º 5
0
 function results($tpl = null)
 {
     JEVHelper::componentStylesheet($this);
     $document =& JFactory::getDocument();
     // TODO do this properly
     //$document->setTitle(JText::_( 'BROWSER_TITLE' ));
     $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
     //$this->assign("introduction", $params->get("intro",""));
 }
Exemplo n.º 6
0
 function detail($tpl = null)
 {
     JEVHelper::componentStylesheet($this);
     $document =& JFactory::getDocument();
     // TODO do this properly
     //$document->setTitle(JText::_( 'BROWSER_TITLE' ));
     $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
     //$this->assign("introduction", $params->get("intro",""));
     $this->data = $this->datamodel->getEventData($this->evid, $this->jevtype, $this->year, $this->month, $this->day, $this->uid);
 }
Exemplo n.º 7
0
 function detail($tpl = null)
 {
     JEVHelper::componentStylesheet($this);
     $document = JFactory::getDocument();
     // TODO do this properly
     //$document->setTitle(JText::_( 'BROWSER_TITLE' ));
     $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
     //$this->assign("introduction", $params->get("intro",""));
     // Set date in view for use in navigation icons
     $this->year = $this->data['row']->yup();
     $this->month = $this->data['row']->mup();
     $this->day = $this->data['row']->dup();
 }
Exemplo n.º 8
0
 function edit($tpl = null)
 {
     $document = JFactory::getDocument();
     include JEV_ADMINLIBS . "/editStrings.php";
     $document->addScriptDeclaration($editStrings);
     JEVHelper::script('editical.js', 'components/' . JEV_COM_COMPONENT . '/assets/js/');
     JEVHelper::script('view_detail.js', 'components/' . JEV_COM_COMPONENT . '/assets/js/');
     JEVHelper::script('JevStdRequiredFields.js', 'components/' . JEV_COM_COMPONENT . '/assets/js/');
     $document->setTitle(JText::_('EDIT_ICAL_REPEAT'));
     // Set toolbar items for the page
     JToolBarHelper::title(JText::_('EDIT_ICAL_REPEAT'), 'jevents');
     $bar = JToolBar::getInstance('toolbar');
     $this->toolbarConfirmButton("icalrepeat.save", JText::_("JEV_SAVE_ICALEVENT_WARNING"), 'save', 'save', 'Save', false);
     if (JEVHelper::isEventEditor()) {
         $this->toolbarConfirmButton("icalrepeat.apply", JText::_("JEV_SAVE_ICALEVENT_WARNING"), 'apply', 'apply', 'jev_Apply', false);
     }
     $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
     if ($params->get("editpopup", 0) && JEVHelper::isEventCreator()) {
         $document->addStyleDeclaration("div#toolbar-box{margin:10px 10px 0px 10px;} div#jevents {margin:0px 10px 10px 10px;} ");
         $this->toolbarButton("icalevent.close", 'cancel', 'cancel', 'Cancel', false);
         JRequest::setVar('tmpl', 'component');
         //force the component template
     } else {
         $this->toolbarButton("icalevent.detail", 'cancel', 'cancel', 'Cancel', false);
     }
     //JToolBarHelper::help( 'screen.icalrepeat.edit', true);
     $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
     JHTML::_('behavior.tooltip');
     $this->_adminStart();
     if (JevJoomlaVersion::isCompatible("3.0")) {
         // load Joomla javascript classes
         JHTML::_('behavior.core');
         $this->setLayout("edit");
     } else {
         $this->setLayout("edit16");
     }
     $this->setupEditForm();
     JEVHelper::componentStylesheet($this, "editextra.css");
     jimport('joomla.filesystem.file');
     // Lets check if we have editted before! if not... rename the custom file.
     if (JFile::exists(JPATH_SITE . "/components/com_jevents/assets/css/jevcustom.css")) {
         // It is definitely now created, lets load it!
         JEVHelper::stylesheet('jevcustom.css', 'components/' . JEV_COM_COMPONENT . '/assets/css/');
     }
     parent::displaytemplate($tpl);
     $this->_adminEnd();
 }
Exemplo n.º 9
0
 function listevents($tpl = null)
 {
     JEVHelper::componentStylesheet($this);
     $params =& JComponentHelper::getParams(JEV_COM_COMPONENT);
     $value = trim($params->get("relstart", ""));
     if ($value != "") {
         $value = str_replace(",", " ", $value);
         $value = str_replace("y", "year", $value);
         $value = str_replace("d", "day", $value);
         $value = str_replace("w", "week", $value);
         $value = str_replace("m", "month", $value);
         $value = new JevDate($value);
         $startdate = $value->toFormat("%Y-%m-%d");
         list($startyear, $startmonth, $startday) = explode("-", $startdate);
     } else {
         $startyear = $params->get("com_earliestyear", 2008);
         $startdate = $startyear . "-01-01";
         $startmonth = 1;
         $startday = 1;
     }
     if ($value != "") {
         $value = trim($params->get("relend", ""));
         $value = str_replace(",", " ", $value);
         $value = str_replace("y", "year", $value);
         $value = str_replace("d", "day", $value);
         $value = str_replace("w", "week", $value);
         $value = str_replace("m", "month", $value);
         $value = new JevDate($value);
         $enddate = $value->toFormat("%Y-%m-%d");
         list($endyear, $endmonth, $endday) = explode("-", $enddate);
     } else {
         $endyear = $params->get("com_latestyear", 2020);
         $enddate = $endyear . "-12-31";
         $endmonth = 12;
         $endday = 31;
     }
     $this->assign("startdate", $startdate);
     $this->assign("startyear", $startyear);
     $this->assign("startmonth", $startmonth);
     $this->assign("startday", $startday);
     $this->assign("enddate", $enddate);
     $this->assign("endyear", $endyear);
     $this->assign("endmonth", $endmonth);
     $this->assign("endday", $endday);
     // Note that using a $limit value of -1 the limit is ignored in the query
     $this->assign("data", $this->datamodel->getRangeData($startdate, $enddate, $this->limit, $this->limitstart));
 }
Exemplo n.º 10
0
 function listevents($tpl = null)
 {
     JEVHelper::componentStylesheet($this);
     $params =& JComponentHelper::getParams(JEV_COM_COMPONENT);
     list($startdate, $enddate) = $this->getStartEndDates();
     list($startyear, $startmonth, $startday) = explode("-", $startdate);
     list($endyear, $endmonth, $endday) = explode("-", $enddate);
     $this->assign("startdate", $startdate);
     $this->assign("startyear", $startyear);
     $this->assign("startmonth", $startmonth);
     $this->assign("startday", $startday);
     $this->assign("enddate", $enddate);
     $this->assign("endyear", $endyear);
     $this->assign("endmonth", $endmonth);
     $this->assign("endday", $endday);
     // Note that using a $limit value of -1 the limit is ignored in the query
     $this->assign("data", $this->datamodel->getRangeData($startdate, $enddate, $this->limit, $this->limitstart));
 }
Exemplo n.º 11
0
 function ical($tpl = null)
 {
     JEVHelper::componentStylesheet($this);
     $document = JFactory::getDocument();
     // TODO do this properly
     //$document->setTitle(JText::_( 'BROWSER_TITLE' ));
     $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
     //$this->assign("introduction", $params->get("intro",""));
     $this->data = $this->datamodel->getCalendarData($this->year, $this->month, $this->day);
     // for adding events in day cell
     $this->popup = false;
     if ($params->get("editpopup", 0) && JEVHelper::isEventCreator()) {
         JevHtmlBootstrap::modal();
         JEVHelper::script('editpopup.js', 'components/' . JEV_COM_COMPONENT . '/assets/js/');
         $this->popup = true;
         $this->popupw = $params->get("popupw", 800);
         $this->popuph = $params->get("popuph", 600);
     }
     $this->is_event_creator = JEVHelper::isEventCreator();
 }
Exemplo n.º 12
0
 function __construct($config = null)
 {
     parent::__construct($config);
     $this->jevlayout = "flat";
     $this->addHelperPath(dirname(__FILE__) . "/../helpers/");
     $this->addHelperPath(JPATH_BASE . '/' . 'templates' . '/' . JFactory::getApplication()->getTemplate() . '/' . 'html' . '/' . JEV_COM_COMPONENT . '/' . "helpers");
     $document = JFactory::getDocument();
     $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
     JEVHelper::componentStylesheet($this);
     if ($params->get("darktemplate", 0)) {
         JEVHelper::componentStylesheet($this, "dark.css");
     }
     $stylelink = '<!--[if lte IE 6]>' . "\n";
     $stylelink .= '<link rel="stylesheet" href="' . JURI::root() . 'components/com_jevents/views/flat/assets/css/ie6.css" />' . "\n";
     $stylelink .= '<![endif]-->' . "\n";
     $document->addCustomTag($stylelink);
     $this->colourscheme = $params->get("flatcolourscheme", "red");
     if ($this->colourscheme == "gray") {
         //$this->colourscheme = "";
     }
 }
Exemplo n.º 13
0
 function edit($tpl = null)
 {
     $document = JFactory::getDocument();
     include JEV_ADMINLIBS . "/editStrings.php";
     $document->addScriptDeclaration($editStrings);
     JEVHelper::script('editicalJQ.js', 'components/' . JEV_COM_COMPONENT . '/assets/js/');
     JEVHelper::script('JevStdRequiredFieldsJQ.js', 'components/' . JEV_COM_COMPONENT . '/assets/js/');
     if ($this->row->title() <= "") {
         // Set toolbar items for the page
         JToolBarHelper::title(JText::_('CREATE_ICAL_EVENT'), 'jevents');
         $document->setTitle(JText::_('CREATE_ICAL_EVENT'));
     } else {
         // Set toolbar items for the page
         JToolBarHelper::title(JText::_('EDIT_ICAL_EVENT'), 'jevents');
         $document->setTitle(JText::_('EDIT_ICAL_EVENT'));
     }
     $bar = JToolBar::getInstance('toolbar');
     if ($this->id > 0) {
         if ($this->editCopy) {
             if (JEVHelper::isEventEditor() || JEVHelper::canEditEvent($this->row)) {
                 $this->toolbarConfirmButton("icalevent.apply", JText::_("JEV_SAVE_COPY_WARNING"), 'apply', 'apply', 'JEV_SAVE', false);
             }
             //$this->toolbarConfirmButton("icalevent.savenew", JText::_("JEV_SAVE_COPY_WARNING"), 'save', 'save', 'JEV_SAVE_NEW', false);
             $this->toolbarConfirmButton("icalevent.save", JText::_("JEV_SAVE_COPY_WARNING"), 'save', 'save', 'JEV_SAVE_CLOSE', false);
         } else {
             if (JEVHelper::isEventEditor() || JEVHelper::canEditEvent($this->row)) {
                 $this->toolbarConfirmButton("icalevent.apply", JText::_("JEV_SAVE_ICALEVENT_WARNING"), 'apply', 'apply', 'JEV_SAVE', false);
             }
             //$this->toolbarConfirmButton("icalevent.savenew", JText::_("JEV_SAVE_ICALEVENT_WARNING"), 'save', 'save', 'JEV_SAVE_NEW', false);
             $this->toolbarConfirmButton("icalevent.save", JText::_("JEV_SAVE_ICALEVENT_WARNING"), 'save', 'save', 'JEV_SAVE_CLOSE', false);
         }
     } else {
         $canEditOwn = false;
         $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
         if (!$params->get("authorisedonly", 0)) {
             $juser = JFactory::getUser();
             $canEditOwn = $juser->authorise('core.edit.own', 'com_jevents');
         }
         if (JEVHelper::isEventEditor() || $canEditOwn) {
             $this->toolbarButton("icalevent.apply", 'apply', 'apply', 'JEV_SAVE', false);
         }
         //JToolBarHelper::save('icalevent.savenew', "JEV_Save_New");
         $this->toolbarButton("icalevent.save", 'save', 'save', 'JEV_SAVE_CLOSE', false);
     }
     $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
     $evedrd = $params->get("editreturnto", "day.listevents");
     if ($params->get("editpopup", 0)) {
         $document->addStyleDeclaration("div#toolbar-box{margin:10px 10px 0px 10px;} div#jevents {margin:0px 10px 10px 10px;} ");
         $this->toolbarButton("icalevent.close", 'cancel', 'cancel', 'Cancel', false);
         JRequest::setVar('tmpl', 'component');
         //force the component template
     } else {
         if ($this->id > 0) {
             $this->toolbarButton("icalrepeat.detail", 'cancel', 'cancel', 'Cancel', false);
         } else {
             $this->toolbarButton($evedrd, 'cancel', 'cancel', 'Cancel', false);
         }
     }
     // I pass in the rp_id so that I can return to the repeat I was viewing before editing
     $this->assign("rp_id", JRequest::getInt("rp_id", 0));
     $this->_adminStart();
     // load Joomla javascript classes
     JHTML::_('behavior.core');
     $this->setLayout("edit");
     JEVHelper::componentStylesheet($this, "editextra.css");
     jimport('joomla.filesystem.file');
     // Lets check if we have editted before! if not... rename the custom file.
     if (JFile::exists(JPATH_SITE . "/components/com_jevents/assets/css/jevcustom.css")) {
         // It is definitely now created, lets load it!
         JEVHelper::stylesheet('jevcustom.css', 'components/' . JEV_COM_COMPONENT . '/assets/css/');
     }
     $this->setupEditForm();
     parent::displaytemplate($tpl);
     $this->_adminEnd();
 }
Exemplo n.º 14
0
function FlatViewHelperFooter16($view)
{
    if (JRequest::getInt('pop', 0)) {
        ?>
		<div class="ev_noprint"><p align="center">
				<a href="#close" onclick="if (window.parent == window) {
									self.close();
								} else
									try {
										window.parent.SqueezeBox.close();
										return false;
									} catch (e) {
										self.close();
										return false;
									}" title="<?php 
        echo JText::_('JEV_CLOSE');
        ?>
"><?php 
        echo JText::_('JEV_CLOSE');
        ?>
</a>
			</p></div>
		<?php 
    }
    $view->loadHelper("JevViewCopyright");
    JevViewCopyright();
    ?>
	</div>
	<?php 
    $dispatcher = JDispatcher::getInstance();
    $dispatcher->trigger('onJEventsFooter');
    $task = JRequest::getString("jevtask");
    $view->loadModules("jevpostjevents");
    $view->loadModules("jevpostjevents_" . $task);
    $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
    if (($params->get('flatscalable', 0) == 1 || $params->get("flatwidth", 905) == "scalable") && ($task == "month.calendar" && !$params->get('flatlistmonth', 0) || $task == "week.listevents" && $params->get('flattabularweek', 0))) {
        $baseurl = JURI::root();
        ?>
        
		<script type="text/javascript">
					var myCSS = false;
					var processedClones = false;
					function setJEventsSize() {

						var jeventsBody = $("jevents_body");
						var jeventsBodyParent = jeventsBody.getParent();
						var size = jeventsBodyParent.getSize();
						var narrow = false;
						if (!myCSS) {
							if (size.x < 485) {
								myCSS = Asset.css('<?php 
        echo $baseurl;
        ?>
components/com_jevents/views/flat/assets/css/narrowscalable.css', {id: 'myStyle', title: 'myStyle'});
								narrow = true;
							}
						}
						else {
							if (size.x < 485) {
								myCSS.href = '<?php 
        echo $baseurl;
        ?>
components/com_jevents/views/flat/assets/css/narrowscalable.css';
								narrow = true;
							}
							else {
								myCSS.href = '<?php 
        echo $baseurl;
        ?>
components/com_jevents/views/flat/assets/css/scalable.css';
								narrow = false;
							}
						}
						if (narrow) {
							cloneEvents();
							var listrowblock = document.getElement(".jev_listrowblock");
							if (listrowblock) {
								listrowblock.style.display = "block";
							}
						}
						else {
							var listrowblock = document.getElement(".jev_listrowblock");
							if (listrowblock) {
								listrowblock.style.display = "none";
							}
							setOutOfMonthSize.delay(1000);
						}
					}
					function setOutOfMonthSize() {
						$$(".jev_dayoutofmonth").each(
								function(el) {
									if (el.getParent().hasClass("slots1")) {
										el.style.minHeight = "81px";
									}
									else {
										var psize = el.getParent().getSize();
										el.style.minHeight = psize.y + "px";
									}
								}, this);
					}
					function cloneEvents() {
						if (!processedClones) {
							processedClones = true;

							var myEvents = $$(".eventfull");
							// sort these to be safe!!
							myEvents.sort(function(a, b) {
								if (!a.sortval) {
									var aparentclasses = a.getParent().className.split(" ");
									for (var i = 0; i < aparentclasses.length; i++) {
										if (aparentclasses[i].indexOf("jevstart_") >= 0) {
											a.sortval = aparentclasses[i].replace("jevstart_", "");
										}
									}
								}
								if (!b.sortval) {
									var bparentclasses = b.getParent().className.split(" ");
									for (var i = 0; i < bparentclasses.length; i++) {
										if (bparentclasses[i].indexOf("jevstart_") >= 0) {
											b.sortval = bparentclasses[i].replace("jevstart_", "");
										}
									}
								}
								if (a.sortval == b.sortval) {
									var asiblings = a.getParent().childNodes;
									for (var i = 0; i < asiblings.length; i++) {
										if (asiblings[i].className && asiblings[i].className.indexOf("hiddendayname") >= 0) {
											return -1;
										}
									}
									var bsiblings = b.getParent().childNodes;
									for (var i = 0; i < bsiblings.length; i++) {
										if (bsiblings[i].className && bsiblings[i].className.indexOf("hiddendayname") >= 0) {
											return 1;
										}
									}
								}
								return (a.sortval < b.sortval) ? -1 : (a.sortval > b.sortval) ? 1 : 0;
								//return a.sortval>b.sortval;
							});

							if (myEvents.length == 0) {
								return;
							}
							var listrowblock = new Element('div', {'class': 'jev_listrowblock'});

							var event_legend_container = document.getElement(".event_legend_container");
							if (event_legend_container) {
								listrowblock.inject(event_legend_container, 'before');
							}
							else {
								var toprow = $("jev_maincal").getElement(".jev_toprow");
								listrowblock.inject(toprow, 'after');
								var clearrow = new Element('div', {'class': 'jev_clear'});
								clearrow.inject(listrowblock, 'after');
							}

							var listrow = new Element('div', {'class': 'jev_listrow'});
							var hasdaynames = false;
							myEvents.each(function(el) {
								if (!hasdaynames) {
									var dayname = el.getParent().getElement(".hiddendayname");
									if (dayname) {
										hasdaynames = true;
									}
								}
							});

							myEvents.each(function(el) {

								var dayname = el.getParent().getElement(".hiddendayname");
								if (dayname) {
									dayname.style.display = "block";
									dayname.inject(listrowblock, 'bottom');
								}
								if (dayname || !hasdaynames) {
									// really should be for each separate date!
									listrow = new Element('div', {'class': 'jev_listrow'});
									listrow.style.marginBottom = "10px";
									listrow.style.marginTop = "5px";
									listrow.inject(listrowblock, 'bottom');
								}

								var hiddentime = el.getParent().getElement(".hiddentime");
								hiddentime = hiddentime.getElement("a");
								hiddentime.removeClass("hiddentime");
								hiddentime.inject(listrow, 'bottom');

								var myClone = el.getParent().clone();
								myClone.addClass("jev_daywithevents");
								myClone.removeClass("jev_dayoutofmonth");
								myClone.removeClass("jevblocks0");
								myClone.removeClass("jevblocks1");
								myClone.removeClass("jevblocks2");
								myClone.removeClass("jevblocks3");
								myClone.removeClass("jevblocks4");
								myClone.removeClass("jevblocks5");
								myClone.removeClass("jevblocks6");
								myClone.removeClass("jevblocks7");
								myClone.style.height = "inherit";
								myClone.inject(listrow, 'bottom');

								var clearrow = new Element('div', {'class': 'jev_clear'});
								clearrow.inject(listrow, 'bottom');
							});
						}
					}
					window.addEvent("domready", setJEventsSize);
					// set load event too incase template sets its own domready trigger
					window.addEvent("load", setJEventsSize);
					window.addEvent("resize", setJEventsSize);
		</script>
		<?php 
    }
    JEVHelper::componentStylesheet($view, "extra.css");
    jimport('joomla.filesystem.file');
    // Lets check if we have editted before! if not... rename the custom file.
    if (JFile::exists(JPATH_SITE . "/components/com_jevents/assets/css/jevcustom.css")) {
        // It is definitely now created, lets load it!
        JEVHelper::stylesheet('jevcustom.css', 'components/' . JEV_COM_COMPONENT . '/assets/css/');
    }
}
Exemplo n.º 15
0
 function listevents($tpl = null)
 {
     JEVHelper::componentStylesheet($this);
     $document =& JFactory::getDocument();
     $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
 }
Exemplo n.º 16
0
 function getCal($modid = 0)
 {
     // capture module id so that we can use it for ajax type navigation
     if ($modid != 0) {
         $this->_modid = $modid;
     }
     $user =& JFactory::getUser();
     $db =& JFactory::getDBO();
     // this will get the viewname based on which classes have been implemented
     $viewname = $this->getTheme();
     $cfg =& JEVConfig::getInstance();
     $compname = JEV_COM_COMPONENT;
     $viewpath = "components/" . JEV_COM_COMPONENT . "/views/" . $viewname . "/assets/css/";
     // get array
     $day_name = JEVHelper::getWeekdayLetter(null, 1);
     $day_name[0] = '<span class="sunday">' . $day_name[0] . '</span>';
     $day_name[6] = '<span class="saturday">' . $day_name[6] . '</span>';
     $content = '<div class="calendar-wrapper">';
     if ($this->inc_ec_css) {
         JEVHelper::componentStylesheet($this, "modstyle.css");
     }
     $thisDayOfMonth = date("j", $this->timeWithOffset);
     $daysLeftInMonth = date("t", $this->timeWithOffset) - date("j", $this->timeWithOffset) + 1;
     // calculate month offset from first of month
     $first_of_current_month = JevDate::strtotime(date('Y-m-01', $this->timeWithOffset));
     $mod = "";
     if (isset($this->_modid) && $this->_modid > 0) {
         $mod = 'id="modid_' . $this->_modid . '" ';
         $content .= "<span id='testspan" . $this->_modid . "' style='display:none'></span>\n";
     }
     if ($this->disp_lastMonth && (!$this->disp_lastMonthDays || $thisDayOfMonth <= $this->disp_lastMonthDays)) {
         $content .= $this->_displayCalendarMod(JevDate::strtotime("-1 month", $first_of_current_month), $this->com_starday, JText::_('JEV_LAST_MONTH'), $day_name, $this->disp_lastMonth == 2, $this->timeWithOffset);
     }
     $content .= $this->_displayCalendarMod($this->timeWithOffset, $this->com_starday, JText::_('JEV_THIS_MONTH'), $day_name, false, $this->timeWithOffset);
     if ($this->disp_nextMonth && (!$this->disp_nextMonthDays || $daysLeftInMonth <= $this->disp_nextMonthDays)) {
         $content .= $this->_displayCalendarMod(JevDate::strtotime("+1 month", $first_of_current_month), $this->com_starday, JText::_('JEV_NEXT_MONTH'), $day_name, $this->disp_nextMonth == 2, $this->timeWithOffset);
     }
     $content .= '</div>';
     return $content;
 }
Exemplo n.º 17
0
 function DefaultModLatestView($params, $modid)
 {
     $this->_modid = $modid;
     $this->modparams =& $params;
     $jevents_config =& JEVConfig::getInstance();
     $this->datamodel = new JEventsDataModel();
     // find appropriate Itemid and setup catids for datamodel
     $this->myItemid = $this->datamodel->setupModuleCatids($this->modparams);
     $this->catout = $this->datamodel->getCatidsOutLink(true);
     $user =& JFactory::getUser();
     $this->aid = $user->aid;
     // Can't use getCfg since this cannot be changed by Joomfish etc.
     $tmplang =& JFactory::getLanguage();
     $this->langtag = $tmplang->getTag();
     // get params exclusive to module
     $this->inccss = $params->get('modlatest_inccss', 0);
     if ($this->inccss) {
         JEVHelper::componentStylesheet($this, "modstyle.css");
     }
     // get params exclusive to component
     $this->com_starday = intval($jevents_config->get('com_starday', 0));
     $this->com_calUseStdTime = intval($jevents_config->get('com_calUseStdTime', 1));
     if ($this->com_calUseStdTime) {
         $this->defaultfFormatStr = $this->_defaultfFormatStr12;
     } else {
         $this->defaultfFormatStr = $this->_defaultfFormatStr24;
     }
     // get params depending on switch
     if (intval($params->get('modlatest_useLocalParam', 0)) == 1) {
         $myparam =& $params;
     } else {
         $myparam =& $jevents_config;
     }
     $this->maxEvents = intval($myparam->get('modlatest_MaxEvents', 15));
     $this->dispMode = intval($myparam->get('modlatest_Mode', 0));
     $this->startNow = intval($myparam->get('startnow', 0));
     $this->pastOnly = intval($myparam->get('pastonly', 0));
     $this->rangeDays = intval($myparam->get('modlatest_Days', 30));
     $this->norepeat = intval($myparam->get('modlatest_NoRepeat', 0));
     $this->multiday = intval($myparam->get('modlatest_multiday', 0));
     $this->displayLinks = intval($myparam->get('modlatest_DispLinks', 1));
     $this->displayYear = intval($myparam->get('modlatest_DispYear', 0));
     $this->disableDateStyle = intval($myparam->get('modlatest_DisDateStyle', 0));
     $this->disableTitleStyle = intval($myparam->get('modlatest_DisTitleStyle', 0));
     $this->linkCloaking = intval($myparam->get('modlatest_LinkCloaking', 0));
     $this->linkToCal = intval($myparam->get('modlatest_LinkToCal', 0));
     $this->customFormatStr = $myparam->get('modlatest_CustFmtStr', '');
     $this->displayRSS = intval($myparam->get('modlatest_RSS', 0));
     $this->sortReverse = intval($myparam->get('modlatest_SortReverse', 0));
     if ($this->dispMode > 6) {
         $this->dispMode = 0;
     }
     // $maxEvents hardcoded to 105 for now to avoid bad mistakes in params
     if ($this->maxEvents > 150) {
         $this->maxEvents = 150;
     }
     if ($this->displayRSS) {
         if ($modid > 0) {
             // do not use JRoute since this creates .rss link which normal sef can't deal with
             $this->rsslink = JURI::root() . 'index.php?option=' . JEV_COM_COMPONENT . '&amp;task=modlatest.rss&amp;format=feed&amp;type=rss&amp;modid=' . $modid;
         } else {
             $this->displayRSS = false;
         }
     }
 }
Exemplo n.º 18
0
 function __construct($params, $modid)
 {
     $this->_modid = $modid;
     $this->modparams =& $params;
     $jevents_config = JEVConfig::getInstance();
     $this->datamodel = new JEventsDataModel();
     // find appropriate Itemid and setup catids for datamodel
     $this->myItemid = $this->datamodel->setupModuleCatids($this->modparams);
     $this->catout = $this->datamodel->getCatidsOutLink(true);
     $user = JFactory::getUser();
     // Can't use getCfg since this cannot be changed by Joomfish etc.
     $tmplang = JFactory::getLanguage();
     $this->langtag = $tmplang->getTag();
     // get params exclusive to module
     $this->inccss = $params->get('modlatest_inccss', 0);
     if ($this->inccss) {
         $modtheme = $params->get("com_calViewName", "");
         if ($modtheme == "" || $modtheme == "global") {
             $modtheme = JEV_CommonFunctions::getJEventsViewName();
         }
         $this->jevlayout = $modtheme;
         JEVHelper::componentStylesheet($this, "modstyle.css");
     }
     // get params exclusive to component
     $this->com_starday = intval($jevents_config->get('com_starday', 0));
     $this->com_calUseStdTime = intval($jevents_config->get('com_calUseStdTime', 1));
     if ($this->com_calUseStdTime) {
         $this->defaultfFormatStr = IS_WIN ? $this->_defaultfFormatStr12winos : $this->_defaultfFormatStr12;
     } else {
         $this->defaultfFormatStr = $this->_defaultfFormatStr24;
     }
     // get params depending on switch
     if (intval($params->get('modlatest_useLocalParam', 0)) == 1) {
         $myparam =& $params;
     } else {
         $myparam =& $jevents_config;
     }
     $this->maxEvents = intval($myparam->get('modlatest_MaxEvents', 15));
     $this->dispMode = intval($myparam->get('modlatest_Mode', 0));
     $this->startNow = intval($myparam->get('startnow', 0));
     $this->pastOnly = intval($myparam->get('pastonly', 0));
     $this->rangeDays = intval($myparam->get('modlatest_Days', 30));
     $this->norepeat = intval($myparam->get('modlatest_NoRepeat', 0));
     $this->multiday = intval($myparam->get('modlatest_multiday', 0));
     $this->displayLinks = intval($myparam->get('modlatest_DispLinks', 1));
     $this->displayYear = intval($myparam->get('modlatest_DispYear', 0));
     $this->disableDateStyle = intval($myparam->get('modlatest_DisDateStyle', 0));
     $this->disableTitleStyle = intval($myparam->get('modlatest_DisTitleStyle', 0));
     $this->linkCloaking = intval($myparam->get('modlatest_LinkCloaking', 0));
     $this->linkToCal = intval($myparam->get('modlatest_LinkToCal', 0));
     $this->customFormatStr = $myparam->get('modlatest_CustFmtStr', '');
     $this->displayRSS = intval($myparam->get('modlatest_RSS', 0));
     $this->sortReverse = intval($myparam->get('modlatest_SortReverse', 0));
     if ($myparam->get("bootstrapcss", 1) == 1) {
         // This version of bootstrap has maximum compatibility with JEvents due to enhanced namespacing
         JHTML::stylesheet("com_jevents/bootstrap.css", array(), true);
         // Responsive version of bootstrap with maximum compatibility with JEvents due to enhanced namespacing
         JHTML::stylesheet("com_jevents/bootstrap-responsive.css", array(), true);
     }
     if (JFile::exists(JPATH_SITE . "/components/com_jevents/assets/css/jevcustom.css")) {
         $document = JFactory::getDocument();
         JHTML::stylesheet("components/com_jevents/assets/css/jevcustom.css");
     }
     if ($myparam->get("modlatest_customcss", false)) {
         JFactory::getDocument()->addStyleDeclaration($myparam->get("modlatest_customcss", false));
     }
     if ($this->dispMode > 7) {
         $this->dispMode = 0;
     }
     // $maxEvents hardcoded to 105 for now to avoid bad mistakes in params
     if ($this->maxEvents > 150) {
         $this->maxEvents = 150;
     }
     if ($this->displayRSS) {
         if ($modid > 0) {
             // do not use JRoute since this creates .rss link which normal sef can't deal with
             $this->rsslink = JURI::root() . 'index.php?option=' . JEV_COM_COMPONENT . '&amp;task=modlatest.rss&amp;format=feed&amp;type=rss&amp;modid=' . $modid;
         } else {
             $this->displayRSS = false;
         }
     }
 }