protected function getInput() { JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php"); JEVHelper::ConditionalFields($this->element, $this->form->getName()); if ($this->fieldname == "rp_id") { // The active event id field. if (0 == (int) $this->value) { $value = ''; } else { $value = (int) $this->value; } return '<input type="text" id="selectedrepeat" name="' . $this->name . '" value="' . $value . '" />'; } // Load the modal behavior script. JevHtmlBootstrap::modal('a.modal'); $js = "\n\t\tfunction jSelectEvent_" . $this->id . "(link, title, Itemid, evid, rpid) {\n\t\t\t\$('selectedeventtitle').value = title;\n\t\t\t\$('selectedevent').value = evid;\n\t\t\t\$('selectedrepeat').value = rpid;\n\t\t\tSqueezeBox.close();\n\t\t\treturn false;\n\t\t}"; // Add the script to the document head. JFactory::getDocument()->addScriptDeclaration($js); // Setup variables for display. $html = array(); $link = 'index.php?option=com_jevents&task=icalevent.select&tmpl=component&' . JSession::getFormToken() . '=1&nomenu=1&function=jSelectEvent_' . $this->id; // get the repeat id $rpidfield = $this->form->getField("rp_id", "request"); $rp_id = $rpidfield->value; $db = JFactory::getDBO(); $db->setQuery('SELECT det.summary as title' . ' FROM #__jevents_vevdetail as det ' . ' LEFT JOIN #__jevents_repetition as rep ON rep.eventdetail_id = det.evdet_id' . ' WHERE rep.rp_id = ' . (int) $rp_id); $title = $db->loadResult(); echo $db->getErrorMsg(); if ($error = $db->getErrorMsg()) { JError::raiseWarning(500, $error); } if (empty($title)) { $title = JText::_('COM_JEVENTS_FIELD_SELECT_EVENT_LABEL'); } $title = htmlspecialchars($title, ENT_QUOTES, 'UTF-8'); // The current user display field. $html[] = '<div class="fltlft">'; $html[] = ' <input type="text" id="selectedeventtitle" value="' . $title . '" disabled="disabled" size="35" />'; $html[] = '</div>'; // The user select button. $html[] = '<div class="button2-left">'; $html[] = ' <div class="blank">'; $html[] = ' <a class="modal" title="' . JText::_('COM_JEVENTS_CHANGE_EVENT') . '" href="' . $link . '" rel="{handler: \'iframe\', size: {x: 800, y: 450}}">' . JText::_('COM_JEVENTS_CHANGE_EVENT_BUTTON') . '</a>'; $html[] = ' </div>'; $html[] = '</div>'; // The active event id field. if (0 == (int) $this->value) { $value = ''; } else { $value = (int) $this->value; } // class='required' for client side validation $class = ''; if ($this->required) { $class = ' class="required modal-value"'; } $html[] = '<input type="hidden" id="selectedevent" ' . $class . ' name="' . $this->name . '" value="' . $value . '" />'; return implode("\n", $html); }
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(); }
function calendarCell(&$currentDay, $year, $month, $i, $slot = "") { // pass $data by reference in order to update countdisplay $cfg = JEVConfig::getInstance(); $Itemid = JEVHelper::getItemid(); $event_day = $this->event->dup(); $event_month = $this->event->mup(); $id = $this->event->id(); // this file controls the events component month calendar display cell output. It is separated from the // showCalendar function in the events.php file to allow users to customize this portion of the code easier. // The event information to be displayed within a month day on the calendar can be modified, as well as any // overlay window information printed with a javascript mouseover event. Each event prints as a separate table // row with a single column, within the month table's cell. // define start and end $cellStart = '<div'; $cellStyle = 'padding:0;'; $cellEnd = '</div>' . "\n"; $linkStyle = ""; // The title is printed as a link to the event's detail page $link = $this->event->viewDetailLink($year, $month, $currentDay['d0'], false); $link = JRoute::_($link . $this->_datamodel->getCatidsOutLink()); $title = $this->event->title(); // [mic] if title is too long, cut 'em for display $tmpTitle = $title; // set truncated title if (!isset($this->event->truncatedtitle)) { if (JString::strlen($title) >= $cfg->get('com_calCutTitle', 50)) { $tmpTitle = JString::substr($title, 0, $cfg->get('com_calCutTitle', 50)) . ' ...'; } $tmpTitle = JEventsHTML::special($tmpTitle); $this->event->truncatedtitle = $tmpTitle; } else { $tmpTitle = $this->event->truncatedtitle; } // [new mic] if amount of displaing events greater than defined, show only a scmall coloured icon // instead of full text - the image could also be "recurring dependig", which means // for each kind of event (one day, multi day, last day) another icon // in this case the dfinition must moved down to be more flexible! // [tstahl] add a graphic symbol for all day events? $tmp_start_time = $this->start_time == $this->stop_time && !$this->event->noendtime() || $this->event->alldayevent() ? '' : $this->start_time; $templatedcell = false; // set truncated title if (!isset($this->event->truncatedtitle)) { $this->event->_title = $tmpTitle; $this->event->truncatedtitle = true; } if ($currentDay['countDisplay'] < $cfg->get('com_calMaxDisplay', 5)) { ob_start(); $templatedcell = $this->loadedFromTemplate('month.calendar_cell', $this->event, 0); $res = ob_get_clean(); if ($templatedcell) { $templatedcell = $res; } else { if ($this->_view) { $this->_view->assignRef("link", $link); $this->_view->assignRef("linkStyle", $linkStyle); $this->_view->assignRef("tmp_start_time", $tmp_start_time); $this->_view->assignRef("tmpTitle", $tmpTitle); } $title_event_link = $this->loadOverride("cellcontent"); // allow fallback to old method if ($title_event_link == "") { $title_event_link = "\n" . '<a class="cal_titlelink" href="' . $link . '" ' . $linkStyle . '>' . ($cfg->get('com_calDisplayStarttime') ? $tmp_start_time : '') . ' ' . $tmpTitle . '</a>' . "\n"; } $cellStyle .= "border-left:8px solid " . $this->event->bgcolor() . ";padding-left:2px;"; } } else { $eventIMG = '<img align="left" src="' . JURI::root() . 'components/' . JEV_COM_COMPONENT . '/images/event.png" alt="" style="height:12px;width:8px;border:1px solid white;background-color:' . $this->event->bgcolor() . '" />'; $title_event_link = "\n" . '<a class="cal_titlelink" href="' . $link . '">' . $eventIMG . '</a>' . "\n"; $cellStyle .= ' float:left;width:10px;'; } $cellString = ''; // allow template overrides for cell popups // only try override if we have a view reference if ($this->_view) { $this->_view->assignRef("ecc", $this); $this->_view->assignRef("cellDate", $currentDay["cellDate"]); } if ($cfg->get("com_enableToolTip", 1)) { if ($cfg->get("tooltiptype", 'overlib') == 'overlib') { $tooltip = $this->loadOverride("overlib"); // allow fallback to old method if ($tooltip == "") { $tooltip = $this->calendarCell_popup($currentDay["cellDate"]); } $cellString .= $tooltip; } else { // TT background if ($cfg->get('com_calTTBackground', 1) == '1') { $bground = $this->event->bgcolor(); $fground = $this->event->fgcolor(); } else { $bground = "#000000"; $fground = "#ffffff"; } JevHtmlBootstrap::popover('.hasjevtip', array("trigger" => "hover focus", "placement" => "top", "container" => "#jevents_body", "delay" => array("hide" => 150))); //$toolTipArray = array('className' => 'jevtip'); //JHTML::_('behavior.tooltip', '.hasjevtip', $toolTipArray); $tooltip = $this->loadOverride("tooltip"); // allow fallback to old method if ($tooltip == "") { $tooltip = $this->calendarCell_tooltip($currentDay["cellDate"]); } if (strpos($tooltip, "templated") === 0) { $title = JString::substr($tooltip, 9); $cellString = ""; } else { $cellString .= '<div class="jevtt_text" >' . $tooltip . '</div>'; $title = '<div class="jevtt_title" style = "color:' . $fground . ';background-color:' . $bground . '">' . $this->title . '</div>'; } if ($templatedcell) { $templatedcell = str_replace("[[TOOLTIP]]", htmlspecialchars($title . $cellString, ENT_QUOTES), $templatedcell); $templatedcell = str_replace("[[TOOLTIPTITLE]]", htmlspecialchars($title, ENT_QUOTES), $templatedcell); $templatedcell = str_replace("[[TOOLTIPCONTENT]]", htmlspecialchars($cellString, ENT_QUOTES), $templatedcell); $time = $cfg->get('com_calDisplayStarttime') ? $tmp_start_time : ""; $templatedcell = str_replace("[[EVTTIME]]", $time, $templatedcell); return $templatedcell; } $html = $cellStart . ' style="' . $cellStyle . '">' . $this->tooltip($title, $cellString, $title_event_link) . $cellEnd; return $html; } } if ($templatedcell) { $templatedcell = str_replace("[[TOOLTIP]]", htmlspecialchars($title . $cellString, ENT_QUOTES), $templatedcell); $templatedcell = str_replace("[[TOOLTIPTITLE]]", htmlspecialchars($title, ENT_QUOTES), $templatedcell); $templatedcell = str_replace("[[TOOLTIPCONTENT]]", htmlspecialchars($cellString, ENT_QUOTES), $templatedcell); $time = $cfg->get('com_calDisplayStarttime') ? $tmp_start_time : ""; $templatedcell = str_replace("[[EVTTIME]]", $time, $templatedcell); return $templatedcell; } // return the whole thing return $cellStart . ' style="' . $cellStyle . '" ' . $cellString . ">\n" . $title_event_link . $cellEnd; }
$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 calendarCell(&$currentDay, $year, $month, $i, $slot = "") { $cfg = JEVConfig::getInstance(); // define start and end $cellStart = '<div'; $cellClass = 'p0 '; $cellEnd = '</div>' . "\n"; // add the event color as the column background color $cellStyle = ' background-color:' . $this->event->bgcolor() . ';color:' . $this->event->fgcolor() . ';'; // MSIE ignores "inherit" color for links - stupid Microsoft!!! $linkStyle = 'style="color:' . $this->event->fgcolor() . ';"'; // The title is printed as a link to the event's detail page $link = $this->event->viewDetailLink($year, $month, $currentDay['d0'], false); $link = JRoute::_($link . $this->_datamodel->getCatidsOutLink()); $title = $this->event->title(); // [mic] if title is too long, cut 'em for display $tmpTitle = $title; // set truncated title if (!isset($this->event->truncatedtitle)) { if (JString::strlen($title) >= $cfg->get('com_calCutTitle', 50)) { $tmpTitle = JString::substr($title, 0, $cfg->get('com_calCutTitle', 50)) . ' ...'; } $tmpTitle = JEventsHTML::special($tmpTitle); $this->event->truncatedtitle = $tmpTitle; } else { $tmpTitle = $this->event->truncatedtitle; } // [new mic] if amount of displaing events greater than defined, show only a scmall coloured icon // instead of full text - the image could also be "recurring dependig", which means // for each kind of event (one day, multi day, last day) another icon // in this case the dfinition must moved down to be more flexible! // [tstahl] add a graphic symbol for all day events? $tmp_start_time = $this->start_time == $this->stop_time && !$this->event->noendtime() || $this->event->alldayevent() ? '' : $this->start_time; $templatedcell = false; if ($currentDay['countDisplay'] < $cfg->get('com_calMaxDisplay', 5)) { ob_start(); $templatedcell = $this->loadedFromTemplate('month.calendar_cell', $this->event, 0); $res = ob_get_clean(); if ($templatedcell) { $templatedcell = $res; } else { if ($this->_view) { $this->_view->assignRef("link", $link); $this->_view->assignRef("linkStyle", $linkStyle); $this->_view->assignRef("tmp_start_time", $tmp_start_time); $this->_view->assignRef("tmpTitle", $tmpTitle); } $title_event_link = $this->loadOverride("cellcontent"); // allow fallback to old method if ($title_event_link == "") { $title_event_link = '<a class="cal_titlelink" href="' . $link . '" ' . $linkStyle . '>' . ($cfg->get('com_calDisplayStarttime') ? $tmp_start_time : '') . ' ' . $tmpTitle . '</a>' . "\n"; } $cellClass .= 'w100'; } } else { $eventIMG = '<img align="left" class="b1sw" src="' . JURI::root() . 'components/' . JEV_COM_COMPONENT . '/images/event.png" class="h12px w8px" alt=""' . ' />'; $title_event_link = '<a class="cal_titlelink" href="' . $link . '">' . $eventIMG . '</a>' . "\n"; $cellClass .= ' fleft w10px'; } $cellString = ''; // allow template overrides for cell popups // only try override if we have a view reference if ($this->_view) { $this->_view->assignRef("ecc", $this); $this->_view->assignRef("cellDate", $currentDay["cellDate"]); } if ($cfg->get("com_enableToolTip", 1)) { if ($cfg->get("tooltiptype", 'joomla') == 'overlib') { $tooltip = $this->loadOverride("overlib"); // allow fallback to old method if ($tooltip == "") { $tooltip = $this->calendarCell_popup($currentDay["cellDate"]); } $cellString .= $tooltip; } else { JevHtmlBootstrap::popover('.hasjevtip', array("trigger" => "hover focus", "placement" => "top", "container" => "#jevents_body", "delay" => array("hide" => 150))); //$toolTipArray = array('className' => 'jevtip'); //JHTML::_('behavior.tooltip', '.hasjevtip', $toolTipArray); $tooltip = $this->loadOverride("tooltip"); // allow fallback to old method if ($tooltip == "") { $tooltip = $this->calendarCell_tooltip($currentDay["cellDate"]); } $tooltip = $this->correctTooltipLanguage($tooltip); if (strpos($tooltip, "templated") === 0) { $title = substr($tooltip, 9); $cellString = ""; } else { // TT background if ($cfg->get('com_calTTBackground', 1) == '1') { $bground = $this->event->bgcolor(); $fground = $this->event->fgcolor(); } else { $bground = "#000000"; $fground = "#ffffff"; } $cellString .= '<div class="jevtt_text" >' . $tooltip . '</div>'; $title = '<div class="jevtt_title" style = "color:' . $fground . ';background-color:' . $bground . '">' . $this->title . '</div>'; } if ($templatedcell) { $templatedcell = str_replace("[[TOOLTIP]]", htmlspecialchars($title . $cellString, ENT_QUOTES), $templatedcell); $templatedcell = str_replace("[[TOOLTIPTITLE]]", htmlspecialchars($title, ENT_QUOTES), $templatedcell); $templatedcell = str_replace("[[TOOLTIPCONTENT]]", htmlspecialchars($cellString, ENT_QUOTES), $templatedcell); $time = $cfg->get('com_calDisplayStarttime') ? $tmp_start_time : ""; $templatedcell = str_replace("[[EVTTIME]]", $time, $templatedcell); return $templatedcell; } $html = $cellStart . ' class="' . $cellClass . '" style="' . $cellStyle . '">' . $this->tooltip($title, $cellString, $title_event_link) . $cellEnd; return $html; } } if ($templatedcell) { $templatedcell = str_replace("[[TOOLTIP]]", htmlspecialchars($title . $cellString, ENT_QUOTES), $templatedcell); $templatedcell = str_replace("[[TOOLTIPTITLE]]", htmlspecialchars($title, ENT_QUOTES), $templatedcell); $templatedcell = str_replace("[[TOOLTIPCONTENT]]", htmlspecialchars($cellString, ENT_QUOTES), $templatedcell); $time = $cfg->get('com_calDisplayStarttime') ? $tmp_start_time : ""; $templatedcell = str_replace("[[EVTTIME]]", $time, $templatedcell); return $templatedcell; } // return the whole thing return $cellStart . ' class="' . $cellClass . '" style="' . $cellStyle . '" ' . $cellString . ">\n" . $title_event_link . $cellEnd; }
protected function translationLinks($row) { if ($this->languages) { JevHtmlBootstrap::modal(); JEVHelper::script('editpopupJQ.js', 'components/' . JEV_COM_COMPONENT . '/assets/js/'); // Any existing translations ? $db = JFactory::getDbo(); $db->setQuery("SELECT language FROM #__jevents_translation where evdet_id= " . $row->evdet_id); $translations = $db->loadColumn(); // test styling for existing translation //$translations[] = "cy-GB"; ?> <ul class="item-associations"> <?php foreach ($this->languages as $id => $item) { $text = strtoupper($item->sef); $url = JRoute::_('index.php?option=com_jevents&task=icalevent.translate&evdet_id=' . $row->evdet_id . '&ev_id=' . $row->ev_id . '&pop=1&tmpl=component&lang=' . $item->lang_code); $img = JHtml::_('image', 'mod_languages/' . $item->image . '.gif', $item->title, array('title' => $item->title), true); $url = "javascript:jevEditTranslation('" . $url . "', '" . JText::sprintf("JEV_TRANSLATE_EVENT_TO", addslashes($item->title), array('jsSafe' => true)) . "'); "; $tooltipParts = array($img, $item->title); $item->link = JHtml::_('tooltip', implode(' ', $tooltipParts), null, null, $text, $url, null, 'hasTooltip label label-association label-' . $item->sef . (in_array($item->lang_code, $translations) ? " hastranslation" : "")); ?> <li> <?php echo $item->link; ?> </li> <?php } ?> </ul> <?php } }
function calendarCell(&$currentDay, $year, $month, $i, $slot = "") { $cfg = JEVConfig::getInstance(); $event = $currentDay["events"][$i]; // Event publication infomation $event_up = new JEventDate($event->startDate()); $event_down = new JEventDate($event->endDate()); // BAR COLOR GENERATION $bgeventcolor = JEV_CommonFunctions::setColor($event); $start_publish = JevDate::mktime(0, 0, 0, $event->mup(), $event->dup(), $event->yup()); $stop_publish = JevDate::mktime(0, 0, 0, $event->mdn(), $event->ddn(), $event->ydn()); // this file controls the events component month calendar display cell output. It is separated from the // showCalendar function in the events.php file to allow users to customize this portion of the code easier. // The event information to be displayed within a month day on the calendar can be modified, as well as any // overlay window information printed with a javascript mouseover event. Each event prints as a separate table // row with a single column, within the month table's cell. // On mouse over date formats // Note that the date formats for the events can be easily changed by modifying the sprintf formatting // string below. These are used for the default overlay window. As well, the JevDate::strftime() function could // also be used instead to provide more powerful date formatting which supports locales if php function // set_locale() is being used. // define start and end $cellStart = '<div class="eventfull"><div class="eventstyle" '; $cellStyle = ''; $cellEnd = '</div></div>' . "\n"; // add the event color as the column background color include_once JPATH_ADMINISTRATOR . "/components/" . JEV_COM_COMPONENT . "/libraries/colorMap.php"; //$colStyle .= $bgeventcolor ? ' background-color:' . $bgeventcolor . ';' : ''; //$colStyle .= $bgeventcolor ? 'color:'.JevMapColor($bgeventcolor) . ';' : ''; // MSIE ignores "inherit" color for links - stupid Microsoft!!! //$linkStyle = $bgeventcolor ? 'style="color:'.JevMapColor($bgeventcolor) . ';"' : ''; $linkStyle = ""; // The title is printed as a link to the event's detail page $link = $this->event->viewDetailLink($year, $month, $currentDay['d0'], false); $link = JRoute::_($link . $this->_datamodel->getCatidsOutLink()); $title = $event->title(); // [mic] if title is too long, cut 'em for display $tmpTitle = $title; // set truncated title if (!isset($this->event->truncatedtitle)) { if (JString::strlen($title) >= $cfg->get('com_calCutTitle', 50)) { $tmpTitle = JString::substr($title, 0, $cfg->get('com_calCutTitle', 50)) . ' ...'; } $tmpTitle = JEventsHTML::special($tmpTitle); $this->event->truncatedtitle = $tmpTitle; } else { $tmpTitle = $this->event->truncatedtitle; } // [new mic] if amount of displaing events greater than defined, show only a scmall coloured icon // instead of full text - the image could also be "recurring dependig", which means // for each kind of event (one day, multi day, last day) another icon // in this case the dfinition must moved down to be more flexible! // [tstahl] add a graphic symbol for all day events? $tmp_start_time = $this->start_time == $this->stop_time && !$this->event->noendtime() || $this->event->alldayevent() ? '' : $this->start_time; $templatedcell = false; if ($currentDay['countDisplay'] < $cfg->get('com_calMaxDisplay', 5)) { ob_start(); $templatedcell = $this->loadedFromTemplate('month.calendar_cell', $this->event, 0); $res = ob_get_clean(); if ($templatedcell) { $templatedcell = $res; } else { if ($this->_view) { $this->_view->assignRef("link", $link); $this->_view->assignRef("linkStyle", $linkStyle); $this->_view->assignRef("tmp_start_time", $tmp_start_time); $this->_view->assignRef("tmpTitle", $tmpTitle); } $title_event_link = $this->loadOverride("cellcontent"); // allow fallback to old method if ($title_event_link == "") { $title_event_link = "\n" . '<a class="cal_titlelink" href="' . $link . '" ' . $linkStyle . '>' . ($cfg->get('com_calDisplayStarttime') ? $tmp_start_time : '') . ' ' . $tmpTitle . '</a>' . "\n"; } $cellStyle .= "border-width:0px 0px 1px 8px;border-color:{$bgeventcolor};padding:0px 0px 1px 2px;"; } } else { $eventIMG = '<img align="left" src="' . JURI::root() . 'components/' . JEV_COM_COMPONENT . '/images/event.png" alt="" style="height:12px;width:8px;border:1px solid white;background-color:' . $bgeventcolor . '" />'; $title_event_link = "\n" . '<a class="cal_titlelink" href="' . $link . '">' . $eventIMG . '</a>' . "\n"; $cellStyle .= ' float:left;width:10px;'; } $cellString = ''; // allow template overrides for cell popups // only try override if we have a view reference if ($this->_view) { $this->_view->assignRef("ecc", $this); $this->_view->assignRef("cellDate", $currentDay["cellDate"]); } if ($cfg->get("com_enableToolTip", 1)) { if ($cfg->get("tooltiptype", 'joomla') == 'overlib') { $tooltip = $this->loadOverride("overlib"); // allow fallback to old method if ($tooltip == "") { $tooltip = $this->calendarCell_popup($currentDay["cellDate"]); } $cellString .= $tooltip; } else { // TT background if ($cfg->get('com_calTTBackground', 1) == '1') { $bground = $this->event->bgcolor(); $fground = $this->event->fgcolor(); } else { $bground = "#000000"; $fground = "#ffffff"; } JevHtmlBootstrap::popover('.hasjevtip', array("trigger" => "hover focus", "placement" => "top", "container" => "#jevents_body", "delay" => array("hide" => 150))); //$toolTipArray = array('className'=>'jevtip'); //JHTML::_('behavior.tooltip', '.hasjevtip', $toolTipArray); $tooltip = $this->loadOverride("tooltip"); // allow fallback to old method if ($tooltip == "") { $tooltip = $this->calendarCell_tooltip($currentDay["cellDate"]); } if (strpos($tooltip, "templated") === 0) { $title = JString::substr($tooltip, 9); $cellString = ""; } else { $cellString .= '<div class="jevtt_text" >' . $tooltip . '</div>'; $title = '<div class="jevtt_title" style = "color:' . $fground . ';background-color:' . $bground . '">' . $this->title . '</div>'; } if ($templatedcell) { $templatedcell = str_replace("[[TOOLTIP]]", htmlspecialchars($title . $cellString, ENT_QUOTES), $templatedcell); $templatedcell = str_replace("[[TOOLTIPTITLE]]", htmlspecialchars($title, ENT_QUOTES), $templatedcell); $templatedcell = str_replace("[[TOOLTIPCONTENT]]", htmlspecialchars($cellString, ENT_QUOTES), $templatedcell); $time = $cfg->get('com_calDisplayStarttime') ? $tmp_start_time : ""; $templatedcell = str_replace("[[EVTTIME]]", $time, $templatedcell); return $templatedcell; } $html = $cellStart . ' style="' . $cellStyle . '">' . $this->tooltip($title, $cellString, $title_event_link) . $cellEnd; return $html; } } if ($templatedcell) { $templatedcell = str_replace("[[TOOLTIP]]", htmlspecialchars($title . $cellString, ENT_QUOTES), $templatedcell); $templatedcell = str_replace("[[TOOLTIPTITLE]]", htmlspecialchars($title, ENT_QUOTES), $templatedcell); $templatedcell = str_replace("[[TOOLTIPCONTENT]]", htmlspecialchars($cellString, ENT_QUOTES), $templatedcell); $time = $cfg->get('com_calDisplayStarttime') ? $tmp_start_time : ""; $templatedcell = str_replace("[[EVTTIME]]", $time, $templatedcell); return $templatedcell; } // return the whole thing return $cellStart . ' style="' . $cellStyle . '" ' . $cellString . ">\n" . $title_event_link . $cellEnd; }
/** * 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; }
/** * Creates mini event dialog for view detail page etc. * note this must be contained in a position:relative block element in order to work * * @param Jevent or descendent $row */ function DefaultEventManagementDialog($view, $row, $mask, $bootstrap = false) { JevHtmlBootstrap::modal("action_dialogJQ" . $row->rp_id()); $user = JFactory::getUser(); if ($user->get("id") == 0) { return ""; } if (JEVHelper::canEditEvent($row) || JEVHelper::canPublishEvent($row) || JEVHelper::canDeleteEvent($row)) { $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; $popupw = $params->get("popupw", 800); $popuph = $params->get("popuph", 600); } if (JRequest::getInt("pop", 0)) { // do not call the modal scripts if already in a popup window! $popup = false; } $hasrepeat = false; $pathIMG = JURI::root() . 'components/' . JEV_COM_COMPONENT . '/assets/images'; $editImg = JHtml::image('com_jevents/icons-32/edit.png', JText::_("EDIT_EVENT"), null, true); $editLink = $row->editLink(); $editLink = $popup ? "javascript:jevEditPopupNoHeader('" . $editLink . "');" : $editLink; $editCopyImg = JHtml::image('com_jevents/icons-32/copy.png', JText::_("COPY_AND_EDIT_EVENT"), null, true); $editCopyLink = $row->editCopyLink(); $editCopyLink = $popup ? "javascript:jevEditPopupNoHeader('" . $editCopyLink . "');" : $editCopyLink; $deleteImg = JHtml::image('com_jevents/icons-32/discard.png', JText::_("DELETE_EVENT"), null, true); $deleteLink = $row->deleteLink(); if ($row->until() != $row->dtstart() || $row->count() > 1) { $hasrepeat = true; $editRepeatImg = JHtml::image('com_jevents/icons-32/edit.png', JText::_("EDIT_REPEAT"), null, true); $editRepeatLink = $row->editRepeatLink(); $editRepeatLink = $popup ? "javascript:jevEditPopupNoHeader('" . $editRepeatLink . "');" : $editRepeatLink; $deleteRepeatImg = JHtml::image('com_jevents/icons-32/discard.png', JText::_("DELETE_THIS_REPEAT"), null, true); $deleteRepeatLink = $row->deleteRepeatLink(); $deleteFutureImg = JHtml::image('com_jevents/icons-32/discards.png', JText::_("JEV_DELETE_FUTURE_REPEATS"), null, true); $deleteFutureLink = $row->deleteFutureLink(); $deleteImg = JHtml::image('com_jevents/icons-32/discards.png', JText::_("DELETE_ALL_REPEATS"), null, true); } else { $editRepeatLink = ""; $deleteRepeatLink = ""; $deleteFutureLink = ""; } if (!JEVHelper::canEditEvent($row)) { $editLink = ""; $editRepeatLink = ""; $editCopyLink = ""; } if (!JEVHelper::canDeleteEvent($row)) { $deleteLink = ""; $deleteRepeatLink = ""; $deleteFutureLink = ""; } $publishLink = ""; if (JEVHelper::canPublishEvent($row)) { if ($row->published() > 0) { $publishImg = JHtml::image('com_jevents/icons-32/cancel.png', JText::_("UNPUBLISH_EVENT"), null, true); $publishLink = $row->unpublishLink(); $publishText = JText::_('UNPUBLISH_EVENT'); } else { $publishImg = JHtml::image('com_jevents/icons-32/accept.png', JText::_("PUBLISH_EVENT"), null, true); $publishLink = $row->publishLink(); $publishText = JText::_('PUBLISH_EVENT'); } } if ($publishLink . $editRepeatLink . $editLink . $deleteRepeatLink . $deleteLink . $deleteFutureLink == "") { return false; } ?> <div id="action_dialogJQ<?php echo $row->rp_id(); ?> " class="action_dialogJQ modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog modal-sm"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title" id="myModalLabel"><?php echo JText::_("JEV_MANAGE_EVENT"); ?> </h4> </div> <div class="modal-body"> <?php if ($publishLink != "") { ?> <a href="<?php echo $publishLink; ?> " id="publish_reccur" title="<?php echo $publishText; ?> " ><?php echo $publishImg; echo $publishText; ?> </a><br/> <?php } ?> <?php if ($editRepeatLink != "") { ?> <a href="<?php echo $editRepeatLink; ?> " id="edit_reccur" title="edit event" ><?php echo $editRepeatImg; echo JText::_('EDIT_REPEAT'); ?> </a><br/> <?php } if ($editLink != "") { ?> <a href="<?php echo $editLink; ?> " id="edit_event" title="edit event" ><?php echo $editImg; echo JText::_('EDIT_EVENT'); ?> </a><br/> <a href="<?php echo $editCopyLink; ?> " id="edit_eventcopy" title="edit event" ><?php echo $editCopyImg; echo JText::_('COPY_AND_EDIT_EVENT'); ?> </a><br/> <?php } if ($deleteRepeatLink != "") { ?> <a href="<?php echo $deleteRepeatLink; ?> " onclick="return confirm('<?php echo JText::_('ARE_YOU_SURE_YOU_WANT_TO_DELETE_THIS_RECURRENCE', true); ?> ')" id="delete_repeat" title="delete repeat" ><?php echo $deleteRepeatImg; echo JText::_('DELETE_THIS_REPEAT'); ?> </a><br/> <?php } if ($deleteLink != "") { ?> <a href="<?php echo $deleteLink; ?> " onclick="return confirm('<?php echo JText::_($hasrepeat ? 'ARE_YOU_SURE_YOU_WISH_TO_DELETE_THIS_EVENT_AND_ALL_ITS_REPEAT' : 'ARE_YOU_SURE_YOU_WISH_TO_DELETE_THIS_EVENT', true); ?> ')" id="delete_event" title="delete event" ><?php echo $deleteImg; echo JText::_($hasrepeat ? "DELETE_ALL_REPEATS" : "DELETE_EVENT"); ?> </a><br/> <?php } if ($deleteFutureLink != "") { ?> <a href="<?php echo $deleteFutureLink; ?> " onclick="return confirm('<?php echo JText::_('ARE_YOU_SURE_YOU_WITH_TO_DELETE_THIS_EVENT_AND_ALL_FUTURE_REPEATS', true); ?> ')" id="delete_eventfuture" title="delete event" ><?php echo $deleteFutureImg; echo JText::_('JEV_DELETE_FUTURE_REPEATS'); ?> </a><br/> <?php } ?> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo JText::_("JEV_CLOSE"); ?> </button> </div> </div> </div> </div> <?php return true; } else { return false; } }
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 } } }
function __construct($view, $today_date, $view_date, $dates, $alts, $option, $task, $Itemid) { global $catidsOut; if (JRequest::getInt('pop', 0)) { return; } $cfg = JEVConfig::getInstance(); $compname = JEV_COM_COMPONENT; //Lets check if we should show the nav on event details if ($task == "icalrepeat.detail" && $cfg->get('shownavbar_detail', 1) == 0) { return; } $this->iconstoshow = $cfg->get('iconstoshow', array('byyear', 'bymonth', 'byweek', 'byday', 'search')); $viewimages = JURI::root() . "components/" . JEV_COM_COMPONENT . "/views/" . $view->getViewName() . "/assets/images"; $cat = ""; $hiddencat = ""; if ($catidsOut != 0) { $cat = '&catids=' . $catidsOut; $hiddencat = '<input type="hidden" name="catids" value="' . $catidsOut . '"/>'; } // for popup editing $view->popup = false; $params = JComponentHelper::getParams(JEV_COM_COMPONENT); if ($params->get("editpopup", 0) && JEVHelper::isEventCreator()) { JevHtmlBootstrap::modal(); JEVHelper::script('editpopup.js', 'components/' . JEV_COM_COMPONENT . '/assets/js/'); $view->popup = true; $view->popupw = $params->get("popupw", 800); $view->popuph = $params->get("popuph", 600); } $link = 'index.php?option=' . $option . '&task=' . $task . $cat . '&Itemid=' . $Itemid . '&'; ?> <table class="ev_navigation" bgcolor="#ffffff" border="0" cellpadding="10" cellspacing="0" width="100%" > <tr> <td class="tableh1" align="center"> <table border="0" cellpadding="0" cellspacing="0"> <tr> <!-- BEGIN add_event --> <!--// <?php if (JEVHelper::isEventCreator()) { list($year, $month, $day) = JEVHelper::getYMD(); $editLink = JRoute::_('index.php?option=' . JEV_COM_COMPONENT . '&task=icalevent.edit' . '&year=' . $year . '&month=' . $month . '&day=' . $day . '&Itemid=' . $view->Itemid, true); $eventlinkadd = $view->popup ? "javascript:jevEditPopup('" . $editLink . "');" : $editLink; ?> <td><img name="spacer" src="<?php echo $viewimages; ?> /spacer.gif" alt="" border="0" height="25" width="10"/></td> <td class="buttontext" align="center" nowrap="nowrap" valign="middle"> <a href="<?php echo $eventlinkadd; ?> " title="Add Event" class="buttontext"> <img src="<?php echo $viewimages; ?> /icon-addevent.gif" alt="Add Event" border="0"/><br/> <?php echo JText::_('JEV_ADD_EVENT'); ?> </a> </td> <?php } ?> //--> <!-- END add_event --> <?php if (in_array("byyear", $this->iconstoshow)) { ?> <td><img name="spacer" src="<?php echo $viewimages; ?> /spacer.gif" alt="" border="0" height="25" width="10"/></td> <td class="buttontext" align="center" nowrap="nowrap" valign="middle"> <a href="<?php echo JRoute::_('index.php?option=' . $option . $cat . '&task=year.listevents&' . $view_date->toDateURL() . '&Itemid=' . $Itemid); ?> " title="<?php echo JText::_('JEV_VIEWBYYEAR'); ?> " class="buttontext"> <img src="<?php echo $viewimages; ?> /icon-flyer.gif" alt="Flat View" border="0"/><br/> <?php echo JText::_('JEV_VIEWBYYEAR'); ?> </a> </td> <?php } ?> <?php if (in_array("bymonth", $this->iconstoshow)) { ?> <td><img name="spacer" src="<?php echo $viewimages; ?> /spacer.gif" alt="" border="0" height="25" width="10"/></td> <td class="buttontext" align="center" nowrap="nowrap" valign="middle"> <a href="<?php echo JRoute::_('index.php?option=' . $option . $cat . '&task=month.calendar&' . $view_date->toDateURL() . '&Itemid=' . $Itemid); ?> " title="<?php echo JText::_('JEV_VIEWBYMONTH'); ?> " class="buttontext"> <img src="<?php echo $viewimages; ?> /icon-calendarview.gif" alt="<?php echo JText::_('MONTHLY_VIEW'); ?> " border="0"/><br/> <?php echo JText::_('JEV_VIEWBYMONTH'); ?> </a> </td> <?php } ?> <?php if (in_array("byweek", $this->iconstoshow)) { ?> <td><img name="spacer" src="<?php echo $viewimages; ?> /spacer.gif" alt="" border="0" height="25" width="10"/></td> <td class="buttontext" align="center" nowrap="nowrap" valign="middle"> <a href="<?php echo JRoute::_('index.php?option=' . $option . $cat . '&task=week.listevents&' . $view_date->toDateURL() . '&Itemid=' . $Itemid); ?> " title="<?php echo JText::_('JEV_VIEWBYWEEK'); ?> " class="buttontext"> <img src="<?php echo $viewimages; ?> /icon-weekly.gif" alt="Weekly View" border="0"/><br/> <?php echo JText::_('JEV_VIEWBYWEEK'); ?> </a> </td> <?php } ?> <?php if (in_array("byday", $this->iconstoshow)) { ?> <td><img name="spacer" src="<?php echo $viewimages; ?> /spacer.gif" alt="" border="0" height="25" width="10"/></td> <td class="buttontext" align="center" nowrap="nowrap" valign="middle"> <a href="<?php echo JRoute::_('index.php?option=' . $option . $cat . '&task=day.listevents&' . $today_date->toDateURL() . '&Itemid=' . $Itemid); ?> " title="<?php echo JText::_('JEV_VIEWTODAY'); ?> " class="buttontext"> <img src="<?php echo $viewimages; ?> /icon-daily.gif" alt="Daily View" border="0"/><br/> <?php echo JText::_('JEV_VIEWTODAY'); ?> </a> </td> <?php } ?> <?php if ($cfg->get('com_hideshowbycats', 0) == '0') { ?> <?php if (in_array("bycat", $this->iconstoshow)) { ?> <td><img name="spacer" src="<?php echo $viewimages; ?> /spacer.gif" alt="" border="0" height="25" width="10"/></td> <td class="buttontext" align="center" nowrap="nowrap" valign="middle"> <a href="<?php echo JRoute::_('index.php?option=' . $option . $cat . '&task=cat.listevents&' . $view_date->toDateURL() . '&Itemid=' . $Itemid); ?> " title="<?php echo JText::_('JEV_VIEWBYCAT'); ?> " class="buttontext"> <img src="<?php echo $viewimages; ?> /icon-cats.gif" alt="Categories" border="0"/><br/> <?php echo JText::_('JEV_VIEWBYCAT'); ?> </a> </td> <?php } ?> <?php } ?> <?php if (in_array("search", $this->iconstoshow)) { ?> <td><img name="spacer" src="<?php echo $viewimages; ?> /spacer.gif" alt="" border="0" height="25" width="10"/></td> <td class="buttontext" align="center" nowrap="nowrap" valign="middle"> <a href="<?php echo JRoute::_('index.php?option=' . $option . $cat . '&task=search.form&' . $view_date->toDateURL() . '&Itemid=' . $Itemid); ?> " title="<?php echo JText::_('JEV_SEARCH_TITLE'); ?> " class="buttontext"> <img src="<?php echo $viewimages; ?> /icon-search.gif" alt="Search" border="0"/><br/> <?php echo JText::_('JEV_SEARCH_TITLE'); ?> </a> </td> <?php } ?> </tr> </table> </td> </tr></table> <?php }
function DefaultViewEventRowAdmin($view, $row, $manage = false) { $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; $popupw = $params->get("popupw", 800); $popuph = $params->get("popuph", 600); } $editLink = $row->editLink(true); $editLink = $popup ? "javascript:jevEditPopup('" . $editLink . "');" : $editLink; $modifylink = ""; if (!$manage && JEVHelper::canEditEvent($row)) { $modifylink = '<a href="' . $row->editlink(true) . '" title="' . JText::_('JEV_MODIFY') . '"><b>' . JText::_('JEV_MODIFY') . "</b></a>\n"; $modifylink = '<a href="' . $editLink . '" title="' . JText::_('JEV_MODIFY') . '"><b>' . JText::_('JEV_MODIFY') . "</b></a>\n"; } $deletelink = ""; if (!$manage && JEVHelper::canDeleteEvent($row)) { $deletelink = '<a href="' . $row->deletelink(false) . "&rettask=admin.listevents" . '" title="' . JText::_('JEV_DELETE') . '"><b>' . JText::_('JEV_DELETE') . "</b></a>\n"; } if (!$manage && JEVHelper::canPublishEvent($row)) { if ($row->published()) { $publishlink = '<a href="' . $row->unpublishlink(false) . "&rettask=admin.listevents" . '" title="' . JText::_('UNPUBLISH') . '"><b>' . JText::_('UNPUBLISH') . "</b></a>\n"; } else { $publishlink = '<a href="' . $row->publishlink(false) . "&rettask=admin.listevents" . '" title="' . JText::_('PUBLISH') . '"><b>' . JText::_('PUBLISH') . "</b></a>\n"; } } else { $publishlink = ""; } $eventlink = $row->viewDetailLink($row->yup(), $row->mup(), $row->dup(), false); $eventlink = JRoute::_($eventlink . $view->datamodel->getCatidsOutLink()); $border = "border-color:" . $row->bgcolor() . ";"; ?> <li class="ev_td_li" style="<?php echo $border; ?> "> <a class="<?php echo $row->state() ? 'ev_link_row' : 'ev_link_unpublished'; ?> " href="<?php echo $eventlink; ?> " title="<?php echo JEventsHTML::special($row->title()) . ($row->state() ? '' : JText::_('JEV_UNPUBLISHED')); ?> "><?php echo $row->title() . ($row->state() ? '' : JText::_('JEV_UNPUBLISHED')); ?> </a> <?php echo JText::_('JEV_BY'); ?> <i><?php echo $row->contactlink('', true); ?> </i> <?php echo $deletelink; ?> <?php echo $modifylink; ?> <?php echo $publishlink; ?> </li> <?php }
echo $output; $this->blanktags[] = ""; } if (count($this->extraTabs) > 0) { foreach ($this->extraTabs as $extraTab) { if (!$cfg->get('com_single_pane_edit', 0)) { echo JevHtmlBootstrap::endPanel(); echo JevHtmlBootstrap::addPanel("myEditTabs", $extraTab['paneid']); } echo "<div class='jevextrablock'>"; echo $extraTab['content']; echo "</div>"; } } if (!$cfg->get('com_single_pane_edit', 0)) { echo JevHtmlBootstrap::endPanel(); echo JevHtmlBootstrap::endPane('myEditTabs'); } ?> </div> <?php $output = ob_get_clean(); if (!$this->loadEditFromTemplate('icalevent.edit_page', $this->row, 0, $this->searchtags, $this->replacetags, $this->blanktags)) { echo $output; } // if (!$this->loadedFromTemplate('icalevent.edit_page', $this->row, 0)){ ?> </form> </div>
function DefaultEventIcalDialog($view, $row, $mask, $bootstrap = false) { if (!$bootstrap) { return $view->eventIcalDialog16($row, $mask); } JevHtmlBootstrap::modal("ical_dialogJQ" . $row->rp_id()); ?> <div id="ical_dialogJQ<?php echo $row->rp_id(); ?> " class="ical_dialogJQ modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog modal-sm"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title" id="myModalLabel"><?php echo JText::_("JEV_EXPORT_EVENT"); ?> </h4> </div> <div class="modal-body"> <?php if ($row->hasRepetition()) { ?> <div id="unstyledical"> <div class="row-fluid"> <a class="span12" href="<?php echo $row->vCalExportLink(false, true); ?> " title="<?php echo JText::_("JEV_SAVEICAL"); ?> " > <?php echo "<span class='span2 text-center'>" . JHtml::image('com_jevents/icons-32/save.png', JText::_("JEV_SAVEICAL"), null, true) . "</span>"; echo "<span class='span10'>" . JText::_("JEV_SAVE_EVENT_AS_ICAL") . "</span>"; ?> </a> </div> <div class="row-fluid"> <a class="span12" href="<?php echo JevExportHelper::getAddToGCal($row); ?> " title="<?php echo JText::_("JEV_SAVE_EVENT_IN_GCAL"); ?> " target="_blank" > <?php echo "<span class='span2 text-center'>" . JHtml::image('com_jevents/icons-32/google.png', JText::_("JEV_ADDTOGCAL"), null, true) . "</span>"; echo "<span class='span10'>" . JText::_("JEV_SAVE_EVENT_IN_GCAL") . "</span>"; ?> </a> </div> <div class="row-fluid"> <a class="span12" href="<?php echo JevExportHelper::getAddToYahooCal($row); ?> " title="<?php echo JText::_("JEV_ADDTOYAHOO"); ?> " target="_blank" > <?php echo "<span class='span2 text-center'>" . JHtml::image('com_jevents/icons-32/yahoo.png', JText::_("JEV_SAVE_EVENT_IN_YAHOO"), null, true) . "</span>"; echo "<span class='span10'>" . JText::_("JEV_SAVE_EVENT_IN_YAHOO") . "</span>"; ?> </a> </div> <div class="row-fluid"> <a class="span12" href="<?php echo $row->vCalExportLink(false, false); ?> " title="<?php echo JText::_("JEV_SAVEICAL"); ?> " > <?php echo "<span class='span2 text-center'>" . JHtml::image('com_jevents/icons-32/ical_repeats.png', JText::_("JEV_SAVEICAL"), null, true) . "</span>"; echo "<span class='span10'>" . JText::_("JEV_SAVE_EVENT_AND_ALL_RECURRENCES_AS_ICAL") . "</span>"; ?> </a> </div> </div> <div id="styledical"> <div class="row-fluid"> <a class="span12" href="<?php echo $row->vCalExportLink(false, true) . "&icf=1"; ?> " title="<?php echo JText::_("JEV_SAVEICAL"); ?> " > <?php echo "<span class='span2 text-center'>" . JHtml::image('com_jevents/icons-32/save.png', JText::_("JEV_SAVEICAL"), null, true) . "</span>"; echo "<span class='span10'>" . JText::_("JEV_SAVE_EVENT_AS_ICAL") . "</span>"; ?> </a> </div> <div class="row-fluid"> <a class="span12" href="<?php echo $row->vCalExportLink(false, false) . "&icf=1"; ?> " title="<?php echo JText::_("JEV_SAVEICAL"); ?> " > <?php echo "<span class='span2 text-center'>" . JHtml::image('com_jevents/icons-32/ical_repeats.png', JText::_("JEV_SAVEICAL"), null, true) . "</span>"; echo "<span class='span10'>" . JText::_("JEV_SAVE_EVENT_AND_ALL_RECURRENCES_AS_ICAL") . "</span>"; ?> </a> </div> </div> <?php } else { ?> <div id="unstyledical"> <div class="row-fluid"> <a class="span12" href="<?php echo $row->vCalExportLink(false, false); ?> " title="<?php echo JText::_("JEV_SAVEICAL"); ?> " > <?php echo "<span class='span2 text-center'>" . JHtml::image('com_jevents/icons-32/save.png', JText::_("JEV_SAVEICAL"), null, true) . "</span>"; echo "<span class='span10'>" . JText::_("JEV_SAVE_EVENT_AS_ICAL") . "</span>"; ?> </a> </div> <div class="row-fluid"> <a class="span12" href="<?php echo JevExportHelper::getAddToGCal($row); ?> " title="<?php echo JText::_("JEV_SAVE_EVENT_IN_GCAL"); ?> " target="_blank" > <?php echo "<span class='span2 text-center'>" . JHtml::image('com_jevents/icons-32/google.png', JText::_("JEV_ADDTOGCAL"), null, true) . "</span>"; echo "<span class='span10'>" . JText::_("JEV_SAVE_EVENT_IN_GCAL") . "</span>"; ?> </a> </div> <div class="row-fluid"> <a class="span12" href="<?php echo JevExportHelper::getAddToYahooCal($row); ?> " title="<?php echo JText::_("JEV_ADDTOYAHOO"); ?> " target="_blank" > <?php echo "<span class='span2 text-center'>" . JHtml::image('com_jevents/icons-32/yahoo.png', JText::_("JEV_SAVE_EVENT_IN_YAHOO"), null, true) . "</span>"; echo "<span class='span10'>" . JText::_("JEV_SAVE_EVENT_IN_YAHOO") . "</span>"; ?> </a> </div> </div> <div id="styledical"> <div class="row-fluid"> <a class="span12" href="<?php echo $row->vCalExportLink(false, false) . "&icf=1"; ?> " title="<?php echo JText::_("JEV_SAVEICAL"); ?> " > <?php echo "<span class='span2 text-center'>" . JHtml::image('com_jevents/icons-32/save.png', JText::_("JEV_SAVEICAL"), null, true) . "</span>"; echo "<span class='span10'>" . JText::_("JEV_SAVE_EVENT_AS_ICAL") . "</span>"; ?> </a> </div> </div> <?php } ?> <label><input name="icf" type="checkbox" value="1" onclick="if (this.checked) { jevjq('#unstyledical').css('display', 'none'); jevjq('#styledical').css('display', 'block'); } else { jevjq('#styledical').css('display', 'none'); jevjq('#unstyledical').css('display', 'block'); }" /><?php echo JText::_("JEV_PRESERVE_HTML_FORMATTING"); ?> </label> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo JText::_("JEV_CLOSE"); ?> </button> </div> </div> </div> </div> <script> jevjq(".ical_dialogJQ a").click(function(){ jevjq('.ical_dialogJQ').modal('hide') }); </script> <?php }
protected function getTooltip($currentDay, $linkattr) { $tooltip = ""; if (!isset($currentDay["events"]) || !is_array($currentDay["events"]) || count($currentDay["events"]) == 0) { return $tooltip; } // load core and extra mootools JHTML::_('behavior.framework'); JHtmlBehavior::framework(); JHtmlBehavior::framework(true); foreach ($currentDay["events"] as $event) { $link = $event->viewDetailLink($event->yup(), $event->mup(), $event->dup(), true, $this->myItemid); //JRoute::_('index.php?option='.$jev_component_name.'&Itemid='.$this->myItemid.$this->cat.'&task=icalrepeat.detail'; $tooltip .= "<a href='" . $link . "'>" . $event->title() . "</a><br/>"; } $tooltip .= "<hr class='jev-click-to-open'/><small class='jev-click-to-open'>" . JText::_("JEV_EVENTS_CLICK_EVENT_FOR_MORE_DETAILS", true) . "</small>"; $tipTitle = '<div class="jevtt_title" >' . JText::_("JEV_EVENTS_THIS_DAY", true) . '</div>'; $tipText = '<div class="jevtt_text">' . $tooltip . '</div>'; $tooltip = htmlspecialchars($tipTitle . $tipText, ENT_QUOTES); $link = $this->htmlLinkCloaking($currentDay["link"], $currentDay['d'], $linkattr); $tooltip = '<span class="editlinktip hasjevtip" title="' . $tooltip . '" >' . $link . '</span>'; static $script; if (!isset($script)) { $script = true; JevHtmlBootstrap::popover('.hasjevtip', array("trigger" => "hover focus", "placement" => "top", "container" => "body", "delay" => array("hide" => 150))); } return $tooltip; }