* Calendar - Add preference to set color of events without category color

This commit is contained in:
nathangray 2017-11-07 10:25:47 -07:00
parent 1237dbf2a8
commit 17f41e5876
3 changed files with 20 additions and 0 deletions

View File

@ -453,6 +453,15 @@ class calendar_hooks
'xmlrpc' => True,
'admin' => False,
),
'no_category_custom_color' => array(
'type' => 'color',
'label' => 'Custom event color',
'no_lang' => true,
'name' => 'no_category_custom_color',
'help' => lang('Custom color for events without category color'),
'xmlrpc' => True,
'admin' => False,
),
'3.section' => array(
'type' => 'section',
'title' => lang('notification settings'),

View File

@ -121,6 +121,15 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
// Scroll
jQuery(jQuery.proxy(this._scroll,this));
jQuery.extend(this.state, this.egw.preference('saved_states','calendar'));
// Set custom color for events without category
if(this.egw.preference('no_category_custom_color','calendar'))
{
this.egw.css(
'.calendar_calEvent:not([class*="cat_"])',
'background-color: '+this.egw.preference('no_category_custom_color','calendar')+' !important'
);
}
},
/**

View File

@ -116,6 +116,8 @@ csv calendar en CSV
csv-fieldname calendar en CSV field name
csv-filename calendar en CSV file name
custom calendar en Custom
custom event color calendar en Custom event color
custom color for events without category color calendar en Custom color for events without category color
custom fields common en Custom fields
custom url for ical with holidays for all users calendar en Custom URL for iCal with holidays for all users
custom_2 common en Free/Busy