本文整理汇总了PHP中JEventsHTML类的典型用法代码示例。如果您正苦于以下问题:PHP JEventsHTML类的具体用法?PHP JEventsHTML怎么用?PHP JEventsHTML使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了JEventsHTML类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: DefaultViewEventCatRowNew
function DefaultViewEventCatRowNew($view, $row, $args = "")
{
// I choost not to use $row->fgcolor()
$fgcolor = "inherit";
$router = JRouter::getInstance("site");
$vars = $router->getVars();
$vars["catids"] = $row->catid();
if (array_key_exists("Itemid", $vars) && is_null($vars["Itemid"])) {
$vars["Itemid"] = JRequest::getInt("Itemid", 0);
}
$eventlink = "index.php?";
foreach ($vars as $key => $val) {
$eventlink .= $key . "=" . $val . "&";
}
$eventlink = substr($eventlink, 0, strlen($eventlink) - 1);
$eventlink = JRoute::_($eventlink);
?>
<a class="ev_link_cat" href="<?php
echo $eventlink;
?>
" style="color:<?php
echo $fgcolor;
?>
;" title="<?php
echo JEventsHTML::special($row->catname());
?>
"><?php
echo $row->catname();
?>
</a>
<?php
}
示例2: DefaultdateFormattedDateRange
function DefaultdateFormattedDateRange($view)
{
$params = JComponentHelper::getParams(JEV_COM_COMPONENT);
if ($params->get("daterangeformat", "") == "") {
$return = JEventsHTML::getDateFormat($view->startyear, $view->startmonth, $view->startday, 1) . " - " . JEventsHTML::getDateFormat($view->endyear, $view->endmonth, $view->endday, 1);
} else {
$return = $params->get("daterangeformat", "");
$startmatches = array();
preg_match_all('|{START(.*?)}|', $return, $startmatches);
if (count($startmatches) == 2 && count($startmatches[1]) == 1) {
$replace = str_replace(array("(", ")"), "", $startmatches[1][0]);
$datestp = JevDate::mktime(0, 0, 0, $view->startmonth, $view->startday, $view->startyear);
$replace = JEV_CommonFunctions::jev_strftime($replace, $datestp);
$return = str_replace($startmatches[0][0], $replace, $return);
}
$endmatches = array();
preg_match_all('|{END(.*?)}|', $return, $endmatches);
if (count($endmatches) == 2 && count($endmatches[1]) == 1) {
$replace = str_replace(array("(", ")"), "", $endmatches[1][0]);
$datestp = JevDate::mktime(0, 0, 0, $view->endmonth, $view->endday, $view->endyear);
$replace = JEV_CommonFunctions::jev_strftime($replace, $datestp);
$return = str_replace($endmatches[0][0], $replace, $return);
}
//$return = $params->get("daterangeformat", "");
}
return $return;
}
示例3: _createfilterHTML
function _createfilterHTML()
{
$params = JComponentHelper::getParams(JEV_COM_COMPONENT);
$separator = $params->get("catseparator", "|");
$catidsIn = JRequest::getVar('catids', 'NONE');
$catidsIn = explode($separator, $catidsIn);
JArrayHelper::toInteger($catidsIn);
$filterList = array();
$filterList["title"] = JText::_("Select_Category");
//$filterList["html"] = JEventsHTML::buildCategorySelect( $filter_value, 'multiple="multiple" size="5" onchange="if ($(\'catidsfv\')) $(\'catidsfv\').value=this.value;submit(this.form)" ',$this->allAccessibleCategories,false,false,0,$this->filterType.'_fv' );
// Not auto submitting
$content = '<script type="text/javascript">';
$content .= "function setmulticatfilter(){\n\t\t\t\tvar selects = \$('multicatfilter');\n\t\t\t\tvar catids = \$('multicatcatids');\n\t\t\t\tcatids.value = '';\n\t\t\t\t\$A(selects.options).each(function(opt) {\n\t\t\t\t\tif (opt.selected) {\n\t\t\t\t\t\tif (catids.value == ''){\n\t\t\t\t\t\t\tcatids.value = opt.value;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tcatids.value += '{$separator}'+opt.value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}";
$content .= '</script>';
$filterList["html"] = JEventsHTML::buildCategorySelect($catidsIn, 'multiple="multiple" size="5" id="multicatfilter" onchange="setmulticatfilter()" ', $this->allAccessibleCategories, false, false, 0, $this->filterType . '_fv[]');
$filterList["html"] .= '<br/><input type="text" name="catids" id="multicatcatids" value="' . implode($separator, $catidsIn) . '" />';
$filterList["html"] .= $content;
//$script = "function reset".$this->filterType."_fvs(){document.getElements('option',\$('".$this->filterType."_fv')).each(function(item){item.selected=(item.value==0)?true:false;})};\n";
//$script .= "try {JeventsFilters.filters.push({action:'reset".$this->filterType."_fvs()',id:'".$this->filterType."_fv',value:".$this->filterNullValue."});} catch (e) {}\n";
// try/catch incase this is called without a filter module!
$script = "try {JeventsFilters.filters.push({id:'" . $this->filterType . "_fv',value:0});} catch (e) {}\n";
$document = JFactory::getDocument();
$document->addScriptDeclaration($script);
return $filterList;
}
示例4: getInput
/**
* Method to get the field input markup.
*
* @return string The field input markup.
* @since 1.6
*/
protected function getInput()
{
if ($this->form->jevdata[$this->name]["repeatId"] == 0) {
if (!isset($this->form->jevdata[$this->name]["excats"])) {
$this->form->jevdata[$this->name]["excats"] = false;
}
$input = JEventsHTML::buildCategorySelect($this->value, 'id="catid" ', $this->form->jevdata[$this->name]["dataModel"]->accessibleCategoryList(), $this->form->jevdata[$this->name]["with_unpublished_cat"], true, 0, 'catid', JEV_COM_COMPONENT, $this->form->jevdata[$this->name]["excats"], "ordering", true);
} else {
$input = "";
}
JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php");
JEVHelper::ConditionalFields($this->element, $this->form->getName());
return $input;
}
示例5: buildReccurDaySelect
public static function buildReccurDaySelect($reccurday, $tag_name, $args)
{
// 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>';
$daynamelist[] = JHTML::_('select.option', '-1', ' ' . JText::_('JEV_BYDAYNUMBER') . '<br />');
for ($a = 0; $a < 7; $a++) {
$name_of_day = ' ' . $day_name[$a];
//getDayName($a);
$daynamelist[] = JHTML::_('select.option', $a, $name_of_day);
}
$tosend = JEventsHTML::buildRadioOption($daynamelist, $tag_name, $args, 'value', 'text', $reccurday);
echo $tosend;
}
示例6: _createfilterHTML
/**
* Creates javascript session memory reset action
*
*/
function _createfilterHTML()
{
if (!$this->filterField) {
return "";
}
$filterList = array();
$filterList["title"] = JText::_("Select_Category");
$filterList["html"] = JEventsHTML::buildCategorySelect($this->filter_value, 'onchange="submit(this.form)" style="font-size:10px;"', $this->allAccessibleCategories, false, false, 0, $this->filterType . '_fv');
//$script = "function reset".$this->filterType."_fvs(){document.getElements('option',\$('".$this->filterType."_fv')).each(function(item){item.selected=(item.value==0)?true:false;})};\n";
//$script .= "try {JeventsFilters.filters.push({action:'reset".$this->filterType."_fvs()',id:'".$this->filterType."_fv',value:".$this->filterNullValue."});} catch (e) {}\n";
// try/catch incase this is called without a filter module!
$script = "try {JeventsFilters.filters.push({id:'" . $this->filterType . "_fv',value:0});} catch (e) {}\n";
$document = JFactory::getDocument();
$document->addScriptDeclaration($script);
return $filterList;
}
示例7: calendarCell
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) {
//.........这里部分代码省略.........
示例8: count
?>
<table align="center" width="90%" cellspacing="0" cellpadding="0" class="ev_table">
<tr valign="top">
<td colspan="2" align="center" class="cal_td_daysnames">
<!-- <div class="cal_daysnames"> -->
<?php
echo $data["year"];
?>
<!-- </div> -->
</td>
</tr>
<?php
for ($month = 1; $month <= 12; $month++) {
$num_events = count($data["months"][$month]["rows"]);
if ($num_events > 0) {
echo "<tr><td class='ev_td_left'>" . JEventsHTML::getDateFormat($this->year, $month, '', 3) . "</td>\n";
echo "<td class='ev_td_right'>\n";
echo "<ul class='ev_ul'>\n";
for ($r = 0; $r < $num_events; $r++) {
if (!isset($data["months"][$month]["rows"][$r])) {
continue;
}
$row =& $data["months"][$month]["rows"][$r];
$listyle = 'style="border-color:' . $row->bgcolor() . ';"';
echo "<li class='ev_td_li' {$listyle}>\n";
if (!$this->loadedFromTemplate('icalevent.list_row', $row, 0)) {
$this->viewEventRowNEW($row);
echo " :: ";
$this->viewEventCatRowNEW($row);
}
echo "</li>\n";
示例9: _viewHiddenJumpto
function _viewHiddenJumpto($this_date)
{
$cfg =& JEVConfig::getInstance();
$hiddencat = "";
if ($this->view->datamodel->catidsOut != 0) {
$hiddencat = '<input type="hidden" name="catids" value="' . $this->view->datamodel->catidsOut . '"/>';
}
?>
<tr align="center" valign="top">
<?php
if ($cfg->get('com_calUseIconic', 1) != 2) {
?>
<td colspan="10" align="center" valign="top">
<?php
} else {
?>
<td colspan="6" align="center" valign="top">
<?php
}
$index = JRoute::_("index.php");
?>
<div id="jumpto" style="display:none">
<form name="BarNav" action="<?php
echo $index;
?>
" method="get">
<input type="hidden" name="option" value="<?php
echo JEV_COM_COMPONENT;
?>
" />
<input type="hidden" name="task" value="month.calendar" />
<?php
echo $hiddencat;
/*Day Select*/
// JEventsHTML::buildDaySelect( $this_date->getYear(1), $this_date->getMonth(1), $this_date->getDay(1), ' style="font-size:10px;"' );
/*Month Select*/
JEventsHTML::buildMonthSelect($this_date->getMonth(1), 'style="font-size:10px;"');
/*Year Select*/
JEventsHTML::buildYearSelect($this_date->getYear(1), 'style="font-size:10px;"');
?>
<button onclick="submit(this.form)"><?php
echo JText::_('JEV_JUMPTO');
?>
</button>
<input type="hidden" name="Itemid" value="<?php
echo $this->Itemid;
?>
" />
</form>
</div>
</td>
</tr>
<?php
}
示例10: edit
function edit($key = NULL, $urlVar = NULL)
{
// get the view
$this->view = $this->getView("icalrepeat", "html");
// Get/Create the model
if ($model = $this->getModel("icalevent", "icaleventsModel")) {
// Push the model into the view (as default)
$this->view->setModel($model, true);
}
$db = JFactory::getDBO();
$cid = JRequest::getVar('cid', array(0));
JArrayHelper::toInteger($cid);
if (is_array($cid) && count($cid) > 0) {
$id = $cid[0];
} else {
$id = $cid;
}
if (!JEVHelper::isEventCreator()) {
throw new Exception(JText::_('ALERTNOTAUTH'), 403);
return false;
}
// front end passes the id as evid
if ($id == 0) {
$id = JRequest::getInt("evid", 0);
}
$db = JFactory::getDBO();
$query = "SELECT rpt.eventid" . "\n FROM (#__jevents_vevent as ev, #__jevents_icsfile as icsf)" . "\n LEFT JOIN #__jevents_repetition as rpt ON rpt.eventid = ev.ev_id" . "\n LEFT JOIN #__jevents_vevdetail as det ON det.evdet_id = rpt.eventdetail_id" . "\n LEFT JOIN #__jevents_rrule as rr ON rr.eventid = ev.ev_id" . "\n WHERE rpt.rp_id=" . $id . "\n AND icsf.ics_id=ev.icsid AND icsf.state=1";
$db->setQuery($query);
$ev_id = $db->loadResult();
if ($ev_id == 0 || $id == 0) {
$this->setRedirect('index.php?option=' . JEV_COM_COMPONENT . '&task=icalrepeat.list&cid[]=' . $ev_id, "ICal repeat does not exist");
$this->redirect();
}
$repeatId = $id;
$row = $this->queryModel->listEventsById($repeatId, true, "icaldb");
if (!JEVHelper::canEditEvent($row)) {
throw new Exception(JText::_('ALERTNOTAUTH'), 403);
return false;
}
/*
$db = JFactory::getDBO();
// get list of groups
$query = "SELECT id AS value, name AS text"
. "\n FROM #__groups"
. "\n ORDER BY id" ;
$db->setQuery( $query );
$groups = $db->loadObjectList();
// build the html select list
$glist = JHTML::_('select.genericlist', $groups, 'access', 'class="inputbox" size="1"',
'value', 'text', intval( $row->access() ) );
*/
$glist = JEventsHTML::buildAccessSelect(intval($row->access()), 'class="inputbox" size="1"');
// For repeats don't offer choice of ical or category
// get all the raw native calendars
$nativeCals = $this->dataModel->queryModel->getNativeIcalendars();
$icsid = $row->icsid() > 0 ? $row->icsid() : current($nativeCals)->ics_id;
$clist = '<input type="hidden" name="ics_id" value="' . $icsid . '" />';
$this->view->assign('clistChoice', false);
$this->view->assign('defaultCat', 0);
// Set the layout
$this->view->setLayout('edit');
$this->view->assign('ev_id', $ev_id);
$this->view->assign('rp_id', $repeatId);
$this->view->assign('row', $row);
$this->view->assign('nativeCals', $nativeCals);
$this->view->assign('clist', $clist);
$this->view->assign('repeatId', $repeatId);
$this->view->assign('glist', $glist);
$this->view->assignRef('dataModel', $this->dataModel);
$this->view->assign('editCopy', false);
// only those who can publish globally can set priority field
if (JEVHelper::isEventPublisher(true)) {
$list = array();
for ($i = 0; $i < 10; $i++) {
$list[] = JHTML::_('select.option', $i, $i, 'val', 'text');
}
$priorities = JHTML::_('select.genericlist', $list, 'priority', "", 'val', 'text', $row->priority());
$this->view->assign('setPriority', true);
$this->view->assign('priority', $priorities);
} else {
$this->view->assign('setPriority', false);
}
// for Admin interface only
$this->view->assign('with_unpublished_cat', JFactory::getApplication()->isAdmin());
$this->view->display();
}
示例11: count
<div class="jev_clear"></div>
<div id='jev_maincal' class='jev_listview'>
<?php
$num_events = count($data['rows']);
$chdate = "";
if ($num_events > 0) {
$hasevents = true;
for ($r = 0; $r < $num_events; $r++) {
$row = $data['rows'][$r];
$event_day_month_year = $row->dup() . $row->mup() . $row->yup();
// Ensure we reflect multiday setting
if (!$row->eventOnDate(JevDate::mktime(0, 0, 0, $row->mup(), $row->dup(), $row->yup()))) {
continue;
}
$date = JEventsHTML::getDateFormat($row->yup(), $row->mup(), $row->dup(), 1);
?>
<div class="jev_listrow">
<ul class='ev_ul'>
<?php
$listyle = 'style="border-color:' . $row->bgcolor() . ';"';
echo "<li class='ev_td_li' {$listyle}>\n";
if (!$this->loadedFromTemplate('icalevent.list_row', $row, 0)) {
$this->viewEventRowNEW($row);
echo " :: ";
$this->viewEventCatRowNEW($row);
}
echo "</li>";
?>
示例12: calendarCell
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
//.........这里部分代码省略.........
示例13: overview
/**
* List Icals
*
*/
function overview()
{
// get the view
$this->view =& $this->getView("icals", "html");
$this->_checkValidCategories();
$option = JEV_COM_COMPONENT;
$db =& JFactory::getDBO();
$catid = intval(JFactory::getApplication()->getUserStateFromRequest("catid{$option}", 'catid', 0));
$limit = intval(JFactory::getApplication()->getUserStateFromRequest("viewlistlimit", 'limit', 10));
$limitstart = intval(JFactory::getApplication()->getUserStateFromRequest("view{$option}limitstart", 'limitstart', 0));
$search = JFactory::getApplication()->getUserStateFromRequest("search{$option}", 'search', '');
$search = $db->getEscaped(trim(strtolower($search)));
$where = array();
if ($search) {
$where[] = "LOWER(icsf.label) LIKE '%{$search}%'";
}
if ($catid > 0) {
$where[] = "catid = {$catid}";
}
// get the total number of records
$query = "SELECT count(*)" . "\n FROM #__jevents_icsfile AS icsf" . (count($where) ? "\n WHERE " . implode(' AND ', $where) : '');
$db->setQuery($query);
$total = $db->loadResult();
echo $db->getErrorMsg();
if ($limitstart > $total) {
$limitstart = 0;
}
if (JVersion::isCompatible("1.6.0")) {
$query = "SELECT icsf.*, a.title as _groupname" . "\n FROM #__jevents_icsfile as icsf " . "\n LEFT JOIN #__viewlevels AS a ON a.id = icsf.access" . (count($where) ? "\n WHERE " . implode(' AND ', $where) : '');
} else {
$query = "SELECT icsf.*, g.name AS _groupname" . "\n FROM #__jevents_icsfile as icsf " . "\n LEFT JOIN #__groups AS g ON g.id = icsf.access" . (count($where) ? "\n WHERE " . implode(' AND ', $where) : '');
}
$query .= "\n ORDER BY icsf.isdefault DESC, icsf.label ASC";
if ($limit > 0) {
$query .= "\n LIMIT {$limitstart}, {$limit}";
}
$db->setQuery($query);
$rows = $db->loadObjectList();
$catData = JEV_CommonFunctions::getCategoryData();
for ($s = 0; $s < count($rows); $s++) {
$row =& $rows[$s];
if (array_key_exists($row->catid, $catData)) {
$row->category = $catData[$row->catid]->name;
} else {
$row->category = "?";
}
}
if ($this->_debug) {
echo '[DEBUG]<br />';
echo 'query:';
echo '<pre>';
echo $query;
echo '-----------<br />';
echo 'option "' . $option . '"<br />';
echo '</pre>';
//die( 'userbreak - mic ' );
}
if ($db->getErrorNum()) {
echo $db->stderr();
return false;
}
// get list of categories
$attribs = 'class="inputbox" size="1" onchange="document.adminForm.submit();"';
$clist = JEventsHTML::buildCategorySelect($catid, $attribs, null, true, false, 0, 'catid');
jimport('joomla.html.pagination');
$pageNav = new JPagination($total, $limitstart, $limit);
// Set the layout
$this->view->setLayout('overview');
$this->view->assign('option', JEV_COM_COMPONENT);
$this->view->assign('rows', $rows);
$this->view->assign('clist', $clist);
$this->view->assign('search', $search);
$this->view->assign('pageNav', $pageNav);
$this->view->display();
}
示例14: count
</div>
</div>
<div class="jev_clear" ></div>
<div id='jev_maincal' class='jev_listview'>
<?php
$hasevents = false;
for ($month = 1; $month <= 12; $month++) {
$num_events = count($data["months"][$month]["rows"]);
if ($num_events > 0) {
$hasevents = true;
?>
<div class="jev_daysnames">
<?php
echo JEventsHTML::getDateFormat($this->year, $month, '', 3);
?>
</div>
<div class="jev_listrow">
<?php
echo "<ul class='ev_ul'>\n";
for ($r = 0; $r < $num_events; $r++) {
if (!isset($data["months"][$month]["rows"][$r])) {
continue;
}
$row =& $data["months"][$month]["rows"][$r];
$listyle = 'style="border-color:' . $row->bgcolor() . ';"';
echo "<li class='ev_td_li' {$listyle}>\n";
if (!$this->loadedFromTemplate('icalevent.list_row', $row, 0)) {
$this->viewEventRowNEW($row);
echo " :: ";
示例15:
<td style="font-weight:bold"> <?php
echo JText::_("JEV_CALENDAR_OWNER");
?>
</td>
<td><?php
echo $this->users;
?>
</td>
</tr>
<tr>
<td style="font-weight:bold" > <?php
echo JText::_("Select_Default_Category");
?>
</td>
<td><?php
echo JEventsHTML::buildCategorySelect($catid, "", null, $this->with_unpublished_cat, true, 0, 'catid');
?>
</td>
</tr>
<tr>
<td style="font-weight:bold"><?php
echo JText::_('JEV_EVENT_ACCESSLEVEL');
?>
</td>
<td><?php
echo $glist;
?>
</td>
</tr>
<?php
if (!isset($this->editItem->ignoreembedcat) || $this->editItem->ignoreembedcat == 0) {