* code for task#1889.
This commit is contained in:
@@ -12,3 +12,17 @@ function updateAction(date)
|
||||
link = createLink('todo', 'batchCreate', 'date=' + date);
|
||||
location.href=link;
|
||||
}
|
||||
|
||||
function switchDateList(number)
|
||||
{
|
||||
if($('#switchDate' + number).attr('checked') == 'checked')
|
||||
{
|
||||
$('#begins' + number).attr('disabled', 'disabled');
|
||||
$('#ends' + number).attr('disabled', 'disabled');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#begins' + number).removeAttr('disabled');
|
||||
$('#ends' + number).removeAttr('disabled');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,8 +71,8 @@ class todoModel extends model
|
||||
$todo->pri = $todos->pris[$i];
|
||||
$todo->name = isset($todos->names[$i]) ? htmlspecialchars($todos->names[$i]) : '';
|
||||
$todo->desc = htmlspecialchars($todos->descs[$i]);
|
||||
$todo->begin = $todos->begins[$i];
|
||||
$todo->end = $todos->ends[$i];
|
||||
$todo->begin = isset($todos->begins[$i]) ? $todos->begins[$i] : 2400;
|
||||
$todo->end = isset($todos->ends[$i]) ? $todos->ends[$i] : 2400;
|
||||
$todo->status = "wait";
|
||||
$todo->private = 0;
|
||||
$todo->idvalue = 0;
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<th class='w-80px'><?php echo $lang->todo->pri;?></th>
|
||||
<th class='w-p40 red'><?php echo $lang->todo->name;?></th>
|
||||
<th><?php echo $lang->todo->desc;?></th>
|
||||
<th class='w-200px'><?php echo $lang->todo->beginAndEnd;?></th>
|
||||
<th class='w-300ox'><?php echo $lang->todo->beginAndEnd;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php $pri = 3;?>
|
||||
@@ -49,6 +49,7 @@
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<?php echo html::select("begins[$i]", $times, $time, "onchange=\"setBeginsAndEnds($i, 'begin');\" class='form-control' style='width: 50%'") . html::select("ends[$i]", $times, '', "onchange=\"setBeginsAndEnds($i, 'end');\" class='form-control' style='width: 50%'");?>
|
||||
<span class='input-group-addon'><input type='checkbox' name="switchDate[<?php echo $i?>]" id="switchDate<?php echo $i?>" onclick='switchDateList(<?php echo $i?>);'><?php echo $lang->todo->periods['future'];?></span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user