Skip to content

Commit

Permalink
Give Meeting different colors (file-patch-1), see github salesagility…
Browse files Browse the repository at this point in the history
…#3273 salesagility#3337

File change 1 of two for "Give Meeting different colors (patch-2), see github salesagility#3273 salesagility#3337"
  • Loading branch information
jobst committed May 24, 2017
1 parent ca78c0c commit 3a50fe7
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions modules/Calendar/CalendarDisplay.php
Expand Up @@ -228,12 +228,22 @@ function checkActivity($activity = ""){

}
foreach($activity as $key => $activityItem){
if(isset($GLOBALS['app_list_strings']['moduleList'][ $key ]) && !empty($GLOBALS['app_list_strings']['moduleList'][ $key ]) && !empty($this->cal->activityList[ $key ]) ){
$activity[ $key ]['label'] = $GLOBALS['app_list_strings']['moduleList'][ $key ];
}else{
unset($activity[ $key ]);
}
}
// Check whether it is defined in the custom color definitions or part of the standard colors in this file
if(!empty($this->cal->activityList[ $key ])) {
// this is IN the default activity list (i.e. DEFINED in CalendarDisplay.php)
if(isset($GLOBALS['app_list_strings']['moduleList'][ $key ]) && !empty($GLOBALS['app_list_strings']['moduleList'][ $key ]) ){
$activity[ $key ]['label'] = $GLOBALS['app_list_strings']['moduleList'][ $key ];
} else {
unset($activity[ $key ]);
}
} else {
// this is NOT in the default activity list (i.e. NOT defined in CalendarDisplay.php)
if( !isset($GLOBALS['sugar_config']['CalendarColors'][$key]['body']) || $GLOBALS['sugar_config']['CalendarColors'][$key]['body']=='') {
unset($activity[ $key ]);
}
}
}

if(isset($activity) && !empty($activity)){
$this->activity_colors = $activity;
}
Expand Down

0 comments on commit 3a50fe7

Please sign in to comment.