* Finish task #61965.
This commit is contained in:
@@ -10,15 +10,21 @@ $(function()
|
||||
$selector.find('.pri-text').html('<span class="label-pri label-pri-' + value + '" title="' + value + '">' + value + '</span>');
|
||||
});
|
||||
|
||||
resetDateWidth();
|
||||
alignWidth();
|
||||
|
||||
$(window).resize(function()
|
||||
{
|
||||
resetDateWidth();
|
||||
alignWidth();
|
||||
});
|
||||
});
|
||||
|
||||
function resetDateWidth()
|
||||
/**
|
||||
* Align with the date width.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function alignWidth()
|
||||
{
|
||||
var dateWidth = $('#date').parent().width();
|
||||
$('.dateWidth').width(dateWidth);
|
||||
|
||||
@@ -326,8 +326,11 @@ class todoModel extends model
|
||||
if(!empty($todoIDList))
|
||||
{
|
||||
/* Initialize todos from the post data. */
|
||||
$oldTodos = $this->dao->select('*')->from(TABLE_TODO)->where('id')->in(array_keys($todos))->fetchAll('id');
|
||||
foreach($todoIDList as $todoID)
|
||||
{
|
||||
$oldTodo = $oldTodos[$todoID];
|
||||
|
||||
$todo = new stdclass();
|
||||
$todo->date = $data->dates[$todoID];
|
||||
$todo->type = $data->types[$todoID];
|
||||
@@ -336,7 +339,7 @@ class todoModel extends model
|
||||
$todo->name = !in_array($todo->type, $this->config->todo->moduleList) ? $data->names[$todoID] : '';
|
||||
$todo->begin = isset($data->begins[$todoID]) ? $data->begins[$todoID] : 2400;
|
||||
$todo->end = isset($data->ends[$todoID]) ? $data->ends[$todoID] : 2400;
|
||||
$todo->assignedTo = isset($data->assignedTos[$todoID]) ? $data->assignedTos[$todoID] : $this->app->user->account;
|
||||
$todo->assignedTo = isset($data->assignedTos[$todoID]) ? $data->assignedTos[$todoID] : $oldTodo->assignedTo;
|
||||
|
||||
if(in_array($todo->type, $this->config->todo->moduleList))
|
||||
{
|
||||
@@ -347,7 +350,6 @@ class todoModel extends model
|
||||
$todos[$todoID] = $todo;
|
||||
}
|
||||
|
||||
$oldTodos = $this->dao->select('*')->from(TABLE_TODO)->where('id')->in(array_keys($todos))->fetchAll('id');
|
||||
foreach($todos as $todoID => $todo)
|
||||
{
|
||||
$oldTodo = $oldTodos[$todoID];
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
<th class='col-desc<?php echo zget($visibleFields, 'desc', ' hidden');?>'><?php echo $lang->todo->desc;?></th>
|
||||
<th class='col-assignedTo'><?php echo $lang->todo->assignTo;?></th>
|
||||
<th class='col-date<?php echo zget($visibleFields, 'beginAndEnd', ' hidden')?>'><?php echo $lang->todo->beginAndEnd;?></th>
|
||||
<th class='col-future'><div class='checkbox-primary check-all<?php echo zget($visibleFields, 'beginAndEnd', ' hidden')?>' id="select-all"><label><?php echo $lang->todo->periods['future']?></label></div></th>
|
||||
<th class='col-future'><div class='checkbox-primary check-all visible<?php echo zget($visibleFields, 'beginAndEnd', ' hidden')?>' id="select-all"><label><?php echo $lang->todo->periods['future']?></label></div></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td class="visible <?php echo zget($visibleFields, 'pri', ' hidden')?>"><?php echo html::select("pris[$todo->id]", $lang->todo->priList, $todo->pri, "class='form-control chosen'");?></td>
|
||||
<td class="visible <?php echo zget($visibleFields, 'pri', 'hidden')?>"><?php echo html::select("pris[$todo->id]", $lang->todo->priList, $todo->pri, "class='form-control chosen'");?></td>
|
||||
<td class='visible'>
|
||||
<div id='<?php echo "nameBox" . $todo->id;?>' class='hidden'><?php echo html::input("names[$todo->id]", $todo->name, "class='text-left form-control hiddenwin'"); ?></div>
|
||||
<div class='<?php echo "nameBox" . $todo->id;?> text-left'>
|
||||
@@ -115,7 +115,7 @@
|
||||
</div>
|
||||
</td>
|
||||
<td class='visible'><?php echo html::select("assignedTos[$todo->id]", $users, $todo->assignedTo, "class='form-control chosen'");?></td>
|
||||
<td class="visible <?php echo zget($visibleFields, 'beginAndEnd', ' hidden')?>">
|
||||
<td class="visible <?php echo zget($visibleFields, 'beginAndEnd', 'hidden')?>">
|
||||
<div class='input-group'>
|
||||
<?php
|
||||
echo html::select("begins[$todo->id]", $times, substr($todo->begin, 0, 2) . substr($todo->begin, 3, 2), "onchange=\"setBeginsAndEnds($todo->id, 'begin');\" class='form-control chosen control-time-begin'" . ((isset($visibleFields['beginAndEnd']) && $todo->begin != '') ? '' : " disabled"));
|
||||
@@ -130,7 +130,7 @@
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="visible <?php echo zget($visibleFields, 'status', ' hidden')?>"><?php echo html::select("status[$todo->id]", $lang->todo->statusList, $todo->status, "class='form-control chosen'");?></td>
|
||||
<td class="visible <?php echo zget($visibleFields, 'status', 'hidden')?>"><?php echo html::select("status[$todo->id]", $lang->todo->statusList, $todo->status, "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user