/** * Method to load the Bootstrap JavaScript framework into the document head * * If debugging mode is on an uncompressed version of Bootstrap is included for easier debugging. * * @param mixed $debug Is debugging mode on? [optional] * * @return void * * @since 3.0 */ public static function framework($debug = null) { // Use Joomla version first if (JevJoomlaVersion::isCompatible("3.0")) { JHtmlBootstrap::framework($debug); return; } // Fall back to JEvents version JLoader::register('JevHtmlBootstrap', JEV_PATH . "libraries/bootstrap.php"); try { JevHtmlBootstrap::framework($debug); return; } catch (Exception $ex) { } // Finally use library version as last resort // Only load once if (!empty(static::$loaded[__METHOD__])) { return; } // Load jQuery JevHtmlJquery::framework(); // If no debugging value is set, use the configuration setting if ($debug === null) { $config = JFactory::getConfig(); $debug = (bool) $config->get('debug'); } JHtml::_('script', 'libraries/jevents/bootstrap/js/bootstrap.min.js', false, false, false, false, $debug); static::$loaded[__METHOD__] = true; return; }
$db->setQuery("SET SESSION query_cache_type = OFF"); $db->execute(); $cfg = JEVConfig::getInstance(); $cfg->set('jev_debug', 1); */ include_once JPATH_COMPONENT . '/' . "jevents.defines.php"; $isMobile = false; jimport("joomla.environment.browser"); $browser = JBrowser::getInstance(); $registry = JRegistry::getInstance("jevents"); // In Joomla 1.6 JComponentHelper::getParams(JEV_COM_COMPONENT) is a clone so the menu params do not propagate so we force this here! // Load Joomla Core scripts for sites that don't load MooTools; JHtml::_('behavior.core', true); // This loads jQuery too! JevHtmlBootstrap::framework(); // jQnc not only fixes noConflict it creates the jQuery alias we use in JEvents "jevqc" so we always need it JEVHelper::script("components/com_jevents/assets/js/jQnc.js"); if (JComponentHelper::getParams(JEV_COM_COMPONENT)->get("fixjquery", 1)) { // this script should come after all the URL based scripts in Joomla so should be a safe place to know that noConflict has been set JFactory::getDocument()->addScriptDeclaration("checkJQ();"); } if (JComponentHelper::getParams(JEV_COM_COMPONENT)->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); } else { if (JComponentHelper::getParams(JEV_COM_COMPONENT)->get("bootstrapcss", 1) == 2) { JHtmlBootstrap::loadCss(); }
function DefaultViewHelperViewNavAdminPanel($view) { $cfg = JEVConfig::getInstance(); if ($cfg->get('show_adminpanel', 1) == 1) { $is_event_editor = JEVHelper::isEventCreator(); $user = JFactory::getUser(); JEVHelper::script('view_detailJQ.js', 'components/' . JEV_COM_COMPONENT . "/assets/js/"); JLoader::register('jevFilterProcessing', JEV_PATH . "/libraries/filters.php"); $pluginsDir = JPATH_ROOT . '/' . 'plugins' . '/' . 'jevents'; $filters = jevFilterProcessing::getInstance(array("published", "justmine", "category", "reset")); $cfg = JEVConfig::getInstance(); if (JRequest::getInt('pop', 0)) { return; } if ($is_event_editor) { if ($cfg->get("bootstrapchosen", 1)) { // Load Bootstrap JevHtmlBootstrap::framework(); JHtml::_('formbehavior.chosen', '#jevents select:not(.notchosen)'); } if ($cfg->get("bootstrapcss", 1) == 1) { // This version of bootstrap has maximum compatability with JEvents due to enhanced namespacing JHTML::stylesheet("com_jevents/bootstrap.css", array(), true); } else { if ($cfg->get("bootstrapcss", 1) == 2) { JHtmlBootstrap::loadCss(); } } // Load event adding language string JText::script('JEV_ADD_EVENT'); JText::script('JEV_IMPORT_ICALEVENT'); ?> <div class="ev_adminpanel"> <div align="left" class="nav_bar_cell"> <?php $editLink = JRoute::_('index.php?option=' . JEV_COM_COMPONENT . '&task=icalevent.edit' . '&year=' . $view->year . '&month=' . $view->month . '&day=' . $view->day . '&Itemid=' . $view->Itemid, true); $popup = false; $params = JComponentHelper::getParams(JEV_COM_COMPONENT); if ($params->get("editpopup", 0) && JEVHelper::isEventCreator()) { //JevHtmlBootstrap::modal(); JEVHelper::script('editpopupJQ.js', 'components/' . JEV_COM_COMPONENT . '/assets/js/'); $popup = true; } $eventlinkadd = $popup ? "javascript:jevEditPopup('" . $editLink . "');" : $editLink; ?> <a href="<?php echo $eventlinkadd; ?> " title="<?php echo JText::_('JEV_ADDEVENT'); ?> "> <b><?php echo JText::_('JEV_ADDEVENT'); ?> </b> </a> <?php // offer frontend import ? if ($params->get("feimport", 0)) { $importLink = JRoute::_('index.php?option=' . JEV_COM_COMPONENT . '&task=icals.importform&tmpl=component&Itemid=' . $view->Itemid, true); //JevHtmlBootstrap::modal(); JEVHelper::script('editpopupJQ.js', 'components/' . JEV_COM_COMPONENT . '/assets/js/'); $eventimport = "javascript:jevImportPopup('" . $importLink . "');"; ?> <br/><a href="<?php echo $eventimport; ?> " title="<?php echo JText::_('JEV_IMPORT_ICALEVENT', true); ?> "> <b><?php echo JText::_('JEV_IMPORT_ICALEVENT'); ?> </b> </a> <?php } if ($user->id > 0) { $datamodel = new JEventsDataModel(); // find appropriate Itemid and setup catids for datamodel $myItemid = JEVHelper::getItemid(); $datamodel->setupComponentCatids(); list($year, $month, $day) = JEVHelper::getYMD(); $evid = JRequest::getVar("evid", false); $jevtype = JRequest::getVar("jevtype", false); // FORM for filter submission $form_link = JRoute::_('index.php?option=' . JEV_COM_COMPONENT . '&task=' . JRequest::getVar("jevtask", "month.calendar") . ($evid ? '&evid=' . $evid : '') . ($jevtype ? '&jevtype=' . $jevtype : '') . ($year ? '&year=' . $year : '') . ($month ? '&month=' . $month : '') . ($day ? '&day=' . $day : '') . "&Itemid=" . $myItemid, false); ?> <form action="<?php echo $form_link; ?> " method="post"> <?php $filterHTML = $filters->getFilterHTML(); $Itemid = JEVHelper::getItemid(); foreach ($filterHTML as $filter) { echo "<div>" . $filter["title"] . " " . $filter["html"] . "</div>"; } /* $eventmylinks = JRoute::_( 'index.php?option=' . JEV_COM_COMPONENT . '&task=admin.listevents' . '&year=' . $view->year . '&month=' . $view->month . '&day=' . $view->day . '&Itemid=' . $view->Itemid ); ?> <a href="<?php echo $eventmylinks; ?>" title="<?php echo JText::_('JEV_MYEVENTS'); ?>"> <b><?php echo JText::_('JEV_MYEVENTS'); ?></b> </a> <?php */ ?> </form> <?php } ?> </div> </div> <?php } } }