/** * @see parent::updateFormFields() */ function updateFormFields() { parent::updateFormFields(); $this->_view = $this->libelle ? $this->libelle : $this->code; $this->_shortview = $this->code; $this->_font_color = CColorSpec::get_text_color($this->color) > 130 ? '000000' : "ffffff"; }
/** * @see parent::updateFormFields() */ function updateFormFields() { parent::updateFormFields(); $parent = $this->loadRefParent(); $this->_view = ($parent->_id ? "{$parent->_view} » " : "") . $this->name; $this->_font_color = "000000"; if ($this->color && CColorSpec::get_text_color($this->color) < 130) { $this->_font_color = "ffffff"; } }
$smarty->assign("anesth", $anesth); $smarty->assign("count_atcd", $count_atcd); $smarty->assign("besoins", $besoins); $smarty->assign("interv_en_urgence", $interv_en_urgence); $smartyL = $smarty->fetch("inc_planning/libelle_plage.tpl"); //@todo : UGLY, find a global better way ! $smartyL = htmlspecialchars_decode(CMbString::htmlEntities($smartyL, ENT_NOQUOTES), ENT_NOQUOTES); // couleurs $color = CAppUI::conf("hospi colors " . $sejour->type); $important = true; $css = null; if ($charge->_id) { $color = $charge->color; } // font color if (CColorSpec::get_text_color($color) < 130) { $css .= "invert_color"; } if (CAppUI::conf("dPplanningOp CSejour use_recuse") && $sejour->recuse == -1) { $css .= "plage_recuse "; } if ($sejour->annule || $_operation->annulee) { $css .= "hatching "; $important = false; } $event = new CPlanningEvent($_operation->_guid, $debut, $duree, $smartyL, "#{$color}", $important, $css, $_operation->_guid, false); if ($can_edit) { $event->addMenuItem("edit", "Modifier cette intervention"); $event->addMenuItem("cut", "Couper cette intervention"); $event->addMenuItem("copy", "Copier cette intervention"); $event->addMenuItem("clock", utf8_encode("Modifier les dates d'entrée et sortie du séjour"));
/** * Utilisation de la couleur de l'utilisateur si définie * sinon de la fonction * * @return string User color */ function updateColor() { $function_color = $this->_ref_function ? $this->_ref_function->color : null; $this->_color = $this->color ? $this->color : $function_color; $this->_font_color = CColorSpec::get_text_color($this->_color) > 130 ? "000000" : "ffffff"; return $this->_color; }
/** * load color for astreinte * * @return mixed */ function loadRefColor() { $color = CAppUI::conf("astreintes astreinte_" . $this->type . "_color"); $this->_font_color = CColorSpec::get_text_color($color) > 130 ? '000000' : 'ffffff'; return $this->_color = CAppUI::conf("astreintes astreinte_" . $this->type . "_color"); }