Move the default due date time to be configurable in the IDF config file
This commit is contained in:
parent
9168a26a72
commit
1690fa8416
@ -475,7 +475,8 @@ class IDF_Views_Issue
|
|||||||
'page_title' => $title,
|
'page_title' => $title,
|
||||||
'preview' => $preview,
|
'preview' => $preview,
|
||||||
'issue' => new IDF_Issue(),
|
'issue' => new IDF_Issue(),
|
||||||
'date_today' => date('Y-m-d 23:59')
|
'date_today' => date('Y-m-d'),
|
||||||
|
'default_time' => Pluf::f('issue_default_due_date_time'),
|
||||||
),
|
),
|
||||||
self::autoCompleteArrays($prj)
|
self::autoCompleteArrays($prj)
|
||||||
);
|
);
|
||||||
@ -713,7 +714,8 @@ class IDF_Views_Issue
|
|||||||
'previous_issue_id' => $previous_issue_id,
|
'previous_issue_id' => $previous_issue_id,
|
||||||
'next_issue_id' => $next_issue_id,
|
'next_issue_id' => $next_issue_id,
|
||||||
'related_issues' => $related_issues,
|
'related_issues' => $related_issues,
|
||||||
'date_today' => date('Y-m-d 23:59'),
|
'date_today' => date('Y-m-d'),
|
||||||
|
'default_time' => Pluf::f('issue_default_due_date_time'),
|
||||||
),
|
),
|
||||||
$arrays),
|
$arrays),
|
||||||
$request);
|
$request);
|
||||||
|
@ -544,5 +544,9 @@ $cfg['activity_section_weights'] = array(
|
|||||||
# high enough to show a proper activity index for those projects as well.
|
# high enough to show a proper activity index for those projects as well.
|
||||||
$cfg['activity_lookback'] = 7;
|
$cfg['activity_lookback'] = 7;
|
||||||
|
|
||||||
|
# Configure the default time that should be used when setting an issue due date
|
||||||
|
# via the quick (COB, EOW, etc) menu or via the date picker
|
||||||
|
$cfg['issue_default_due_date_time'] = '17:30';
|
||||||
|
|
||||||
return $cfg;
|
return $cfg;
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@
|
|||||||
<th>{$form.f.due_dtime.labelTag}:</th>
|
<th>{$form.f.due_dtime.labelTag}:</th>
|
||||||
<td>{if $form.f.due_dtime.errors}{$form.f.due_dtime.fieldErrors}{/if}
|
<td>{if $form.f.due_dtime.errors}{$form.f.due_dtime.fieldErrors}{/if}
|
||||||
{$form.f.due_dtime|unsafe}
|
{$form.f.due_dtime|unsafe}
|
||||||
<a href="#" rel="{$date_today}" id="due_dtime_today">Today</a>
|
<a href="#" rel="{$date_today} {$default_time}" id="due_dtime_today">Today</a>
|
||||||
</td>
|
</td>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{$form.f.relation_type0.labelTag}:</th>
|
<th>{$form.f.relation_type0.labelTag}:</th>
|
||||||
@ -112,6 +112,7 @@
|
|||||||
{/block}
|
{/block}
|
||||||
{block javascript}
|
{block javascript}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
var default_time = '{$default_time}';
|
||||||
document.getElementById('id_summary').focus();{literal}
|
document.getElementById('id_summary').focus();{literal}
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$("#id_due_dtime").datepicker({
|
$("#id_due_dtime").datepicker({
|
||||||
@ -121,7 +122,7 @@ $(document).ready(function(){
|
|||||||
constrainInput: false,
|
constrainInput: false,
|
||||||
dateFormat: 'yy-mm-dd',
|
dateFormat: 'yy-mm-dd',
|
||||||
onSelect: function(dateText, inst) {
|
onSelect: function(dateText, inst) {
|
||||||
this.value = dateText + ' 23:59';
|
this.value = dateText + ' ' + default_time;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$("#due_dtime_today").click(function(){
|
$("#due_dtime_today").click(function(){
|
||||||
|
@ -131,7 +131,7 @@
|
|||||||
<th>{$form.f.due_dtime.labelTag}:</th>
|
<th>{$form.f.due_dtime.labelTag}:</th>
|
||||||
<td>{if $form.f.due_dtime.errors}{$form.f.due_dtime.fieldErrors}{/if}
|
<td>{if $form.f.due_dtime.errors}{$form.f.due_dtime.fieldErrors}{/if}
|
||||||
{$form.f.due_dtime|unsafe}
|
{$form.f.due_dtime|unsafe}
|
||||||
<a href="#" rel="{$date_today}" id="due_dtime_today">Today</a>
|
<a href="#" rel="{$date_today} {$default_time}" id="due_dtime_today">Today</a>
|
||||||
</td>
|
</td>
|
||||||
<tr>
|
<tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -213,6 +213,7 @@
|
|||||||
{/block}
|
{/block}
|
||||||
{block javascript}{if $form}{include 'idf/issues/js-autocomplete.html'}
|
{block javascript}{if $form}{include 'idf/issues/js-autocomplete.html'}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
var default_time = '{$default_time}';
|
||||||
{literal}
|
{literal}
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$("#id_due_dtime").datepicker({
|
$("#id_due_dtime").datepicker({
|
||||||
@ -222,7 +223,7 @@ $(document).ready(function(){
|
|||||||
constrainInput: false,
|
constrainInput: false,
|
||||||
dateFormat: 'yy-mm-dd',
|
dateFormat: 'yy-mm-dd',
|
||||||
onSelect: function(dateText, inst) {
|
onSelect: function(dateText, inst) {
|
||||||
this.value = dateText + ' 23:59';
|
this.value = dateText + ' ' + default_time;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$("#due_dtime_today").click(function(){
|
$("#due_dtime_today").click(function(){
|
||||||
|
Loading…
Reference in New Issue
Block a user