mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 09:05:16 +01:00
Always include date sub-template, and just disable it when not needed.
Fixes date widgets not validated.
This commit is contained in:
parent
60b02ccb4b
commit
300263e534
@ -115,22 +115,33 @@ app.classes.infolog = AppJS.extend(
|
||||
},
|
||||
|
||||
/**
|
||||
* Enable or disable the date filter
|
||||
*
|
||||
* If the filter is set to something that needs dates, we enable the
|
||||
* header_left template. Otherwise, it is disabled.
|
||||
*/
|
||||
filter_change: function()
|
||||
{
|
||||
var filter = this.et2.getWidgetById('filter');
|
||||
var nm = this.et2.getWidgetById('nm');
|
||||
var dates = this.et2.getWidgetById('infolog.index.dates');
|
||||
if(nm && filter)
|
||||
{
|
||||
switch(filter.getValue())
|
||||
{
|
||||
case 'bydate':
|
||||
case 'duedate':
|
||||
nm.set_header_left('infolog.index.dates');
|
||||
|
||||
if (filter && dates)
|
||||
{
|
||||
dates.set_disabled(false);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
nm.set_header_left();
|
||||
if (dates)
|
||||
{
|
||||
dates.set_disabled(true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -163,7 +163,7 @@
|
||||
<template id="header_right"/>
|
||||
</row>
|
||||
<row>
|
||||
<nextmatch id="nm" template="infolog.index.rows" span="all"/>
|
||||
<nextmatch id="nm" template="infolog.index.rows" header_left="infolog.index.dates" span="all"/>
|
||||
</row>
|
||||
<row>
|
||||
<hbox class=" ">
|
||||
|
Loading…
Reference in New Issue
Block a user