* Fix bug #2019
This commit is contained in:
@@ -115,7 +115,6 @@ class my extends control
|
||||
$this->view->pager = $pager;
|
||||
$this->view->times = date::buildTimeList($this->config->todo->times->begin, $this->config->todo->times->end, $this->config->todo->times->delta);
|
||||
$this->view->time = date::now();
|
||||
$this->view->members = $this->loadModel('user')->getPairs();
|
||||
$this->view->importFuture = ($type != 'today');
|
||||
|
||||
$this->display();
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
common::printIcon('todo', 'assignto', "todoID=$todo->id", $todo, 'list', 'hand-right', '', "btn-icon", '', "data-toggle='assigntoModal' data-width='500'", $lang->todo->assignTo);
|
||||
common::printIcon('todo', 'assignto', "todoID=$todo->id", $todo, 'list', 'hand-right', '', "iframe", false, "data-width='600'");
|
||||
common::printIcon('todo', 'finish', "id=$todo->id", $todo, 'list', 'checked', 'hiddenwin');
|
||||
}
|
||||
common::printIcon('todo', 'edit', "id=$todo->id", '', 'list', 'edit', '', 'iframe', true);
|
||||
@@ -166,6 +166,5 @@
|
||||
</form>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php include '../../todo/view/assignto.html.php';?>
|
||||
<?php js::set('listName', 'todoList')?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -287,8 +287,14 @@ class todo extends control
|
||||
if(empty($_POST['assignedTo'])) die(js::error($this->lang->todo->noAssignedTo));
|
||||
$this->todo->assignTo($todoID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
die(js::reload('parent'));
|
||||
die(js::reload('parent.parent'));
|
||||
}
|
||||
|
||||
$this->view->todo = $this->todo->getById($todoID);
|
||||
$this->view->members = $this->loadModel('user')->getPairs();
|
||||
$this->view->times = date::buildTimeList($this->config->todo->times->begin, $this->config->todo->times->end, $this->config->todo->times->delta);
|
||||
$this->view->time = date::now();
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
#end_chosen .chosen-single {border-left: none;}
|
||||
#begin_chosen .chosen-results, #end_chosen .chosen-results {max-height: 150px}
|
||||
#todoAssignForm {margin-bottom: 110px;}
|
||||
@@ -10,25 +10,31 @@
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<div class="modal fade" id="assigntoModal">
|
||||
<div class="modal-dialog mw-600px">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="icon icon-close"></i></button>
|
||||
<h4 class="modal-title"><?php echo $lang->todo->assignTo;?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<?php include '../../common/view/chosen.html.php';?>
|
||||
<?php include '../../common/view/datepicker.html.php';?>
|
||||
<div id="main">
|
||||
<div class="container">
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->todo->assignTo;?></h2>
|
||||
</div>
|
||||
<form class='load-indicator main-form' method='post' target='hiddenwin' id="todoAssignForm">
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th class='w-80px'><?php echo $lang->todo->assignTo;?></th>
|
||||
<td>
|
||||
<?php echo html::select('assignedTo', $members, '', "class='form-control chosen'");?>
|
||||
</td><td></td>
|
||||
<td><?php echo html::select('assignedTo', $members, $todo->assignedTo, "class='form-control chosen'");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->todo->date;?></th>
|
||||
<td><?php echo html::input('date', $date, "class='form-control form-date' id='todoDate'");?></td>
|
||||
<td>
|
||||
<div class='input-group has-icon-right'>
|
||||
<?php echo html::input('date', date('Y-m-d', strtotime($todo->date)), "class='form-control form-date'");?>
|
||||
<label for="date" class="input-control-icon-right"><i class="icon icon-delay"></i></label>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class='checkbox-primary'>
|
||||
<input type='checkbox' name="future" id='switchDate' onclick='switchDateTodo(this);' />
|
||||
@@ -40,7 +46,7 @@
|
||||
<th><?php echo $lang->todo->beginAndEnd;?></th>
|
||||
<td>
|
||||
<div class='w-p50 pull-left'>
|
||||
<?php echo html::select('begin', $times, date('Y-m-d') != $date ? key($times) : $time, 'onchange=selectNext(); class="form-control chosen"');?>
|
||||
<?php echo html::select('begin', $times, date('Y-m-d') != $todo->date ? key($times) : $time, 'onchange=selectNext(); class="form-control chosen"');?>
|
||||
</div>
|
||||
<div class='w-p50 pull-left'>
|
||||
<?php echo html::select('end', $times, '', 'class="form-control chosen" margin-left:-1px"');?>
|
||||
@@ -62,37 +68,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$("a[data-toggle='assigntoModal']").on('click', function(){
|
||||
$('#assigntoModal').modal('show');
|
||||
$('#todoAssignForm').attr('action', $(this).attr('href'));
|
||||
return false;
|
||||
});
|
||||
function switchDateTodo(switcher)
|
||||
{
|
||||
if(switcher.checked)
|
||||
{
|
||||
$('#todoDate').attr('disabled','disabled');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#todoDate').removeAttr('disabled');
|
||||
}
|
||||
}
|
||||
|
||||
function switchDateFeature(switcher)
|
||||
{
|
||||
if(switcher.checked)
|
||||
{
|
||||
$('#begin').attr('disabled','disabled').trigger('chosen:updated');
|
||||
$('#end').attr('disabled','disabled').trigger('chosen:updated');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#begin').removeAttr('disabled').trigger('chosen:updated');
|
||||
$('#end').removeAttr('disabled').trigger('chosen:updated');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>#end_chosen .chosen-single{border-left: none;}</style>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
<?php if(isset($todo->assignedTo)):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->todo->assignTo;?></th>
|
||||
<td><?php echo $todo->assignedTo;?></td>
|
||||
<td><?php echo zget($users, $todo->assignedTo);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->todo->assignTo . $lang->todo->date;?></th>
|
||||
|
||||
Reference in New Issue
Block a user