diff --git a/calendar/js/et2_widget_planner.js b/calendar/js/et2_widget_planner.js index a6d84c0833..e3fd36a686 100644 --- a/calendar/js/et2_widget_planner.js +++ b/calendar/js/et2_widget_planner.js @@ -601,7 +601,9 @@ var et2_calendar_planner = et2_calendar_view.extend([et2_IDetachedDOM, et2_IResi egw.json( this.getInstanceManager().app+'.etemplate_widget_menupopup.ajax_get_options.etemplate', ['select-cat',',,,calendar,'+cat_id[i]], - function(data) {labels = labels.concat(data);} + function(data) { + labels = labels.concat(data); + } ).sendRequest(false); } } @@ -613,6 +615,10 @@ var et2_calendar_planner = et2_calendar_view.extend([et2_IDetachedDOM, et2_IResi cat_id: labels[i].id, main: labels[i].value==labels[i].main }; + if(labels[i].children && labels[i].children.length) + { + labels[i].data.has_children = true; + } } return labels; }, diff --git a/calendar/js/et2_widget_planner_row.js b/calendar/js/et2_widget_planner_row.js index cccf88c0ba..1f59d07795 100644 --- a/calendar/js/et2_widget_planner_row.js +++ b/calendar/js/et2_widget_planner_row.js @@ -47,7 +47,6 @@ var et2_calendar_planner_row = et2_valueWidget.extend([et2_IDetachedDOM], .css('width',this.options.width); this.title = $j(document.createElement('div')) .addClass("calendar_plannerRowHeader") - .css('width', '15%') .appendTo(this.div); this.rows = $j(document.createElement('div')) .addClass("calendar_eventRows") diff --git a/calendar/templates/default/app.css b/calendar/templates/default/app.css index db7cf6a4b9..d73a81d20e 100644 --- a/calendar/templates/default/app.css +++ b/calendar/templates/default/app.css @@ -655,6 +655,15 @@ e.g. the div with class calendar_calTimeGrid is generated by the timeGridWidget .calendar_plannerRowWidget:nth-child(even) { background-color: #f2f2f2; } +.calendar_plannerRowWidget[data-has_children]:before { + padding-right: 20px; + position: absolute; + content: " \29EB"; + background-repeat: no-repeat; + left: 10px; + top: 2px; +} + .calendar_plannerRowWidget:hover { background-color: rgba(103, 159, 210, 0.2); } @@ -707,13 +716,15 @@ e.g. the div with class calendar_calTimeGrid is generated by the timeGridWidget position: absolute; top: 0px; left: 0%; - width: 100%; + width: 150px; height: 100%; line-height: 20px; border-right: 1px solid white; text-overflow: ellipsis; white-space:nowrap; overflow:hidden; + margin-left: 20px; + padding-right: 2px; } .calendar_plannerRowHeader:hover { width: initial !important; diff --git a/etemplate/inc/class.etemplate_widget_menupopup.inc.php b/etemplate/inc/class.etemplate_widget_menupopup.inc.php index 1fb2524830..81b8517f65 100644 --- a/etemplate/inc/class.etemplate_widget_menupopup.inc.php +++ b/etemplate/inc/class.etemplate_widget_menupopup.inc.php @@ -570,7 +570,10 @@ class etemplate_widget_menupopup extends etemplate_widget $options[$cat['id']] = array( 'label' => $s, 'title' => $cat['description'], - 'main' => (int)$cat['main'] + // These are extra info for easy dealing with categories + // client side, without extra loading + 'main' => (int)$cat['main'], + 'children' => $cat['children'] ); // Send data too if(is_array($cat['data']))