Skip to content
Snippets Groups Projects
Commit 2e9714e7 authored by yogeshwar's avatar yogeshwar
Browse files

Fixes::157692300::yogeshwar::changes Removed

parent 7d92f6d6
No related branches found
No related tags found
No related merge requests found
...@@ -99,7 +99,7 @@ class Calendar_TaskManagement_View extends Vtiger_Index_View { ...@@ -99,7 +99,7 @@ class Calendar_TaskManagement_View extends Vtiger_Index_View {
if (!$request->get('colors')) { if (!$request->get('colors')) {
$colors = array(); $colors = array();
foreach ($priorities as $key => $value) { foreach ($priorities as $key => $value) {
$colors[$key] = $this->getColor($key,$field->getName()); $colors[$key] = $this->getColor($key);
} }
} else { } else {
$colors = $request->get('colors'); $colors = $request->get('colors');
...@@ -107,35 +107,18 @@ class Calendar_TaskManagement_View extends Vtiger_Index_View { ...@@ -107,35 +107,18 @@ class Calendar_TaskManagement_View extends Vtiger_Index_View {
return $colors; return $colors;
} }
public function getColor($priorities,$fieldname){ public function getColor($priority) {
$db=PearDatabase::getInstance(); $color = '';
if(isset($priorities)){ switch ($priority) {
$tableName = "vtiger_$fieldname"; case 'High' : $color = '#FF5555'; break;
$result=$db->pquery("SELECT color FROM $tableName WHERE $fieldname=?",array($priorities)); case 'Medium' : $color = '#03C04A'; break;
$no_of_row=$db->num_rows($result); case 'Low' : $color = '#54A7F5'; break;
for($i=0;$i<$no_of_row;$i++){ default : $color = '#'.dechex(rand(0x000000, 0xFFFFFF));
$color = $db->query_result($result,$i,'color'); break;
}
}
if(($color=='#ffffff') || ($color=' '))
{
$color = '#'.dechex(rand(0x000000, 0xFFFFFF));
} }
return $color; return $color;
} }
// public function getColor($priority) {
// $color = '';
// switch ($priority) {
// case 'High' : $color = '#FF5555'; break;
// case 'Medium' : $color = '#03C04A'; break;
// case 'Low' : $color = '#54A7F5'; break;
// default : $color = '#'.dechex(rand(0x000000, 0xFFFFFF));
// break;
// }
// return $color;
// }
protected function setFiltersInSession($filters) { protected function setFiltersInSession($filters) {
if (!isset($filters['status'])) { if (!isset($filters['status'])) {
$filters['status'] = array(); $filters['status'] = array();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment