protected function getLabel() { $html = array(); // Get the label text from the XML element, defaulting to the element name. $text = $this->element['label'] ? (string) $this->element['label'] : (string) $this->element['name']; $html[] = '<label id="pick1064797275" for="' . $this->id . '" class="hasTip" style="color:' . JevMapColor($this->value) . ';background-color:' . $this->value . ';" ' . ' title="' . htmlspecialchars(trim(JText::_($text), ':') . '::' . JText::_($this->description), ENT_COMPAT, 'UTF-8') . '" >'; $html[] = '<a id="colorPickButton" href="javascript:void(0)" class=".jev_colour_picker_b" style="color:' . JevMapColor($this->value) . ';background-color:' . $this->value . ';">' . JText::_('JEV_COLOR_PICKER') . '</a>'; $html[] = '</label>'; return implode($html); }
protected function getLabel() { $html = array(); // Get the label text from the XML element, defaulting to the element name. $text = $this->element['label'] ? (string) $this->element['label'] : (string) $this->element['name']; $html[] = '<label id="pick1064797275" for="' . $this->id . '" class="hasTip" ' . ' title="' . htmlspecialchars(trim(JText::_($text), ':') . '::' . JText::_($this->description), ENT_COMPAT, 'UTF-8') . '" >'; $html[] = '<a id="colorPickButton" name ="colorPickButton" href="javascript:void(0)" onclick="document.getElementById(\'fred\').style.display=\'block\';" style="color:' . JevMapColor($this->value) . ';background-color:' . $this->value . ';font-weight:bold;padding:3px;">' . JText::_('JEV_COLOR_PICKER') . '</a>'; $html[] = '</label>'; return implode($html); }
/** * Method to get the field input markup. * * @return string The field input markup. * @since 1.6 */ protected function getInput() { $cfg = JEVConfig::getInstance(); $hideColour = false; if ($cfg->get('com_calForceCatColorEventForm', 0) == 1 && !JFactory::getApplication()->isAdmin()) { $hideColour = true; } else { if ($cfg->get('com_calForceCatColorEventForm', 0) == 2) { $hideColour = true; } else { $hideColour = false; } } if (!$hideColour) { JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php"); JEVHelper::ConditionalFields($this->element, $this->form->getName()); ob_start(); ?> <table id="pick1064797275" style="background-color:<?php echo $this->value . ';color:' . JevMapColor($this->value); ?> ;border:solid 1px black;"> <tr> <td nowrap="nowrap"> <input type="hidden" id="pick1064797275field" name="color" value="<?php echo $this->value; ?> "/> <a id="colorPickButton" href="javascript:void(0)" onclick="document.getElementById('fred').style.visibility='visible';" style="visibility:visible;color:<?php echo JevMapColor($this->value); ?> ;font-weight:bold;"><?php echo JText::_('JEV_COLOR_PICKER'); ?> </a> </td> <td> <div style="position:relative;z-index:9999;"> <iframe id="fred" src="<?php echo JURI::root() . "components/" . JEV_COM_COMPONENT . "/libraries/colours.html?id=fred"; ?> " class="jev_ev_colour_picker_i"></iframe> </div> </td> </tr> </table> <?php return ob_get_clean(); } return ""; }
function fgcolor($val = "") { if (JString::strlen($val) == 0) { include_once JPATH_ADMINISTRATOR . "/components/" . JEV_COM_COMPONENT . "/libraries/colorMap.php"; if (!isset($this->_fgcolor)) { $this->_fgcolor = JevMapColor($this->bgcolor()); } return $this->_fgcolor; } else { $this->_fgcolor = $val; } }
function getDataForAdmin($creator_id, $limit, $limitstart, $showrepeats = false, $orderby = "") { $data = array(); $is_event_editor = JEVHelper::isEventCreator(); $user =& JFactory::getUser(); $Itemid = JEVHelper::getItemid(); $user =& JFactory::getUser(); $db =& JFactory::getDBO(); $cfg =& JEVConfig::getInstance(); include_once JPATH_ADMINISTRATOR . "/components/" . JEV_COM_COMPONENT . "/libraries/colorMap.php"; // Note that these are the vevents not the repeats if (!$showrepeats) { $total = $this->queryModel->countIcalEventsByCreator($creator_id); } else { $total = $this->queryModel->countIcalEventRepeatsByCreator($creator_id); } $data['total'] = $total; $data['limit'] = $limit; if ($data["total"] <= $data["limit"]) { $limitstart = 0; } $data["limitstart"] = $limitstart; // Note that these are the vevents not the repeats if (!$showrepeats) { $rows = $this->queryModel->listIcalEventsByCreator($creator_id, $limitstart, $limit, $orderby); } else { $rows = $this->queryModel->listIcalEventRepeatsByCreator($creator_id, $limitstart, $limit, $orderby); } $adminView = true; $num_events = count($rows); if ($num_events > 0) { for ($r = 0; $r < $num_events; $r++) { $row =& $rows[$r]; $row->catname($row->getCategoryName()); $row->contactlink(JEventsHTML::getUserMailtoLink($row->id(), $row->created_by(), true)); $row->bgcolor = JEV_CommonFunctions::setColor($row); $row->fgcolor = JevMapColor($row->bgcolor); } } $data['rows'] = $rows; return $data; }
function listKids($row, $itm, $tsk, $availableCatsIds, $activeParent = false, $activeSubCat = 0) { $catclass = ""; if ($row->parent_id > 0) { $catclass = "childcat"; } if ($row->parent_id > 0 && isset($row->activeBranch)) { $catclass = "activechildcat"; } if ($row->parent_id > 0 && $activeParent) { $catclass = "activechildcat"; } if ($row->parent_id > 0 && $activeSubCat > 0 && $row->id != $activeSubCat && !isset($row->activeNode)) { $catclass = "childcat"; } $st1 = "background-color:" . $row->color . ";color:" . JevMapColor($row->color); //$cat = $row->id > 0 ? "&catids=$row->id" : "&catids=$availableCatsIds"; $cat = $row->id > 0 ? "&catids={$row->id}" : ""; $content = "\n<li style='list-style:none;margin-top:5px;'>" . "<div class='event_legend_name' style='" . $st1 . "'>" . "<a href='" . JRoute::_("index.php?option=" . JEV_COM_COMPONENT . "{$cat}{$itm}{$tsk}") . "' title='" . JEventsHTML::special($row->name) . "' style='color:inherit'>" . JEventsHTML::special($row->name) . "</a></div>"; if (JString::strlen($row->description) > 0) { $content .= "<div class='event_legend_desc'>{$row->description}</div>"; } $content .= "</li>"; if (isset($row->activeBranch) && isset($row->subcats)) { $activeSubCat = 0; foreach ($row->subcats as $subcatid => $subcat) { if (isset($subcat->activeBranch)) { $activeSubCat = $subcatid; } } foreach ($row->subcats as $subcatid => $subcat) { $content .= $this->listKids($subcat, $itm, $tsk, $availableCatsIds, isset($row->activeNode), $activeSubCat); } } return $content; }
echo JText::_('JEV_EVENT_COLOR'); ?> </td> <td colspan="3"> <table id="pick1064797275" style="background-color:<?php echo $this->row->color() . ';color:' . JevMapColor($this->row->color()); ?> ;border:solid 1px black;"> <tr> <td nowrap="nowrap"> <input type="hidden" id="pick1064797275field" name="color" value="<?php echo $this->row->color(); ?> "/> <a id="colorPickButton" href="javascript:void(0)" onclick="document.getElementById('fred').style.visibility='visible';" style="visibility:visible;color:<?php echo JevMapColor($this->row->color()); ?> ;font-weight:bold;"><?php echo JText::_('JEV_COLOR_PICKER'); ?> </a> </td> <td> <div style="position:relative;z-index:9999;"> <iframe id="fred" src="<?php echo JURI::root() . "administrator/components/" . JEV_COM_COMPONENT . "/libraries/colours.html?id=fred"; ?> " style="position:absolute;width:300px!important;height:250px!important;visibility:hidden;z-index:9999;left:20px;top:-60px;overflow:visible!important;border:none!important;"></iframe> </div> </td> </tr>
;border:solid 1px black;"> <tr> <td width="80"> <div><?php echo JText::_('JEV_EVENT_COLOR'); ?> </div> <input type="hidden" id="pick1064797275field" name="color" value="<?php echo $this->cat->getColor(); ?> "/> </td> <td nowrap> <a id="colorPickButton" name ="colorPickButton" href="javascript:void(0)" onclick="document.getElementById('fred').style.visibility='visible';" style="visibility:visible;color:<?php echo JevMapColor($this->cat->getColor()); ?> ;font-weight:bold;"><?php echo JText::_('JEV_COLOR_PICKER'); ?> </a> </td> <td> <div style="position:relative;z-index:9999;"> <iframe id="fred" frameborder="0" src="<?php echo JURI::root() . "administrator/components/" . JEV_COM_COMPONENT . "/libraries/colours.html?id=fred"; ?> " style="position:absolute;width:300px!important;height:250px!important;visibility:hidden;z-index:9999;right:0px;top:0px;overflow:visible!important;"></iframe> </div> </td> </tr>