* 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 f33ce2d9f5
commit f53c60c141
3 changed files with 20 additions and 0 deletions

View File

@ -453,6 +453,15 @@ class calendar_hooks
'xmlrpc' => True, 'xmlrpc' => True,
'admin' => False, '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( '3.section' => array(
'type' => 'section', 'type' => 'section',
'title' => lang('notification settings'), 'title' => lang('notification settings'),

View File

@ -121,6 +121,15 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
// Scroll // Scroll
jQuery(jQuery.proxy(this._scroll,this)); jQuery(jQuery.proxy(this._scroll,this));
jQuery.extend(this.state, this.egw.preference('saved_states','calendar')); 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-fieldname calendar en CSV field name
csv-filename calendar en CSV file name csv-filename calendar en CSV file name
custom calendar en Custom 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 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 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 custom_2 common en Free/Busy