forked from extern/egroupware
Mark categories with children in planner by category
This commit is contained in:
parent
f08cfee22c
commit
ad689951a2
@ -601,7 +601,9 @@ var et2_calendar_planner = et2_calendar_view.extend([et2_IDetachedDOM, et2_IResi
|
|||||||
egw.json(
|
egw.json(
|
||||||
this.getInstanceManager().app+'.etemplate_widget_menupopup.ajax_get_options.etemplate',
|
this.getInstanceManager().app+'.etemplate_widget_menupopup.ajax_get_options.etemplate',
|
||||||
['select-cat',',,,calendar,'+cat_id[i]],
|
['select-cat',',,,calendar,'+cat_id[i]],
|
||||||
function(data) {labels = labels.concat(data);}
|
function(data) {
|
||||||
|
labels = labels.concat(data);
|
||||||
|
}
|
||||||
).sendRequest(false);
|
).sendRequest(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -613,6 +615,10 @@ var et2_calendar_planner = et2_calendar_view.extend([et2_IDetachedDOM, et2_IResi
|
|||||||
cat_id: labels[i].id,
|
cat_id: labels[i].id,
|
||||||
main: labels[i].value==labels[i].main
|
main: labels[i].value==labels[i].main
|
||||||
};
|
};
|
||||||
|
if(labels[i].children && labels[i].children.length)
|
||||||
|
{
|
||||||
|
labels[i].data.has_children = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return labels;
|
return labels;
|
||||||
},
|
},
|
||||||
|
@ -47,7 +47,6 @@ var et2_calendar_planner_row = et2_valueWidget.extend([et2_IDetachedDOM],
|
|||||||
.css('width',this.options.width);
|
.css('width',this.options.width);
|
||||||
this.title = $j(document.createElement('div'))
|
this.title = $j(document.createElement('div'))
|
||||||
.addClass("calendar_plannerRowHeader")
|
.addClass("calendar_plannerRowHeader")
|
||||||
.css('width', '15%')
|
|
||||||
.appendTo(this.div);
|
.appendTo(this.div);
|
||||||
this.rows = $j(document.createElement('div'))
|
this.rows = $j(document.createElement('div'))
|
||||||
.addClass("calendar_eventRows")
|
.addClass("calendar_eventRows")
|
||||||
|
@ -655,6 +655,15 @@ e.g. the div with class calendar_calTimeGrid is generated by the timeGridWidget
|
|||||||
.calendar_plannerRowWidget:nth-child(even) {
|
.calendar_plannerRowWidget:nth-child(even) {
|
||||||
background-color: #f2f2f2;
|
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 {
|
.calendar_plannerRowWidget:hover {
|
||||||
background-color: rgba(103, 159, 210, 0.2);
|
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;
|
position: absolute;
|
||||||
top: 0px;
|
top: 0px;
|
||||||
left: 0%;
|
left: 0%;
|
||||||
width: 100%;
|
width: 150px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
border-right: 1px solid white;
|
border-right: 1px solid white;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space:nowrap;
|
white-space:nowrap;
|
||||||
overflow:hidden;
|
overflow:hidden;
|
||||||
|
margin-left: 20px;
|
||||||
|
padding-right: 2px;
|
||||||
}
|
}
|
||||||
.calendar_plannerRowHeader:hover {
|
.calendar_plannerRowHeader:hover {
|
||||||
width: initial !important;
|
width: initial !important;
|
||||||
|
@ -570,7 +570,10 @@ class etemplate_widget_menupopup extends etemplate_widget
|
|||||||
$options[$cat['id']] = array(
|
$options[$cat['id']] = array(
|
||||||
'label' => $s,
|
'label' => $s,
|
||||||
'title' => $cat['description'],
|
'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
|
// Send data too
|
||||||
if(is_array($cat['data']))
|
if(is_array($cat['data']))
|
||||||
|
Loading…
Reference in New Issue
Block a user