* add the feature of disable date when create todo.

* remove the task list and story list.
This commit is contained in:
wangchunsheng
2009-10-27 09:33:53 +00:00
parent fae37d39eb
commit 7f6d7ec5c3
5 changed files with 36 additions and 7 deletions

View File

@@ -69,11 +69,15 @@ class my extends control
$header['title'] = $this->lang->my->common . $this->lang->colon . $this->lang->my->task;
$position[] = $this->lang->my->task;
/* 记录用户当前选择的列表。*/
$this->app->session->set('taskList', $this->app->getURI(true));
$this->app->session->set('storyList', $this->app->getURI(true));
/* 赋值。*/
$this->assign('header', $header);
$this->assign('position', $position);
$this->assign('tabID', 'task');
$this->assign('tasks', $this->user->getTasks($this->app->user->account));
$this->assign('tasks', $this->task->getUserTasks($this->app->user->account));
$this->display();
}

View File

@@ -26,12 +26,13 @@
<table class='table-1 tablesorter'>
<thead>
<tr class='rowhead'>
<th><?php echo $lang->task->id;?></th>
<th><?php echo $lang->task->name;?></th>
<th><?php echo $lang->task->project;?></th>
<th><?php echo $lang->task->story;?></th>
<th><?php echo $lang->task->pri;?></th>
<th><?php echo $lang->task->estimate;?></th>
<th><?php echo $lang->task->consumed;?></th>
<th><?php echo $lang->task->story;?></th>
<th><?php echo $lang->task->status;?></th>
<th><?php echo $lang->action;?></th>
</tr>
@@ -39,12 +40,13 @@
<tbody>
<?php foreach($tasks as $task):?>
<tr>
<td><?php echo html::a($this->createLink('task', 'edit', "taskID=$task->id"), $task->name);?></td>
<td><?php echo html::a($this->createLink('task', 'view', "taskID=$task->id"), sprintf('%03d', $task->id));?></td>
<td><?php echo $task->name;?></td>
<td><?php echo html::a($this->createLink('project', 'browse', "projectid=$task->projectID"), $task->projectName);?></th>
<td><?php echo $task->storyTitle;?></td>
<td><?php echo $task->pri;?></td>
<td><?php echo $task->estimate;?></td>
<td><?php echo $task->consumed;?></td>
<td><?php echo html::a($this->createLink('story', 'view', "storyID=$task->storyID"), $task->storyTitle);?></td>
<td><?php echo $lang->task->statusList->{$task->status};?></td>
<td><?php echo html::a($this->createLink('task', 'edit', "taskID=$task->id"), $lang->task->edit, '_blank');?></td>
</tr>

View File

@@ -27,12 +27,14 @@ $lang->todo->create = "新增TODO";
$lang->todo->edit = "更新";
$lang->todo->markDone = "未完成";
$lang->todo->markWait = "已完成";
$lang->todo->markDoing = "已完成";
$lang->todo->mark = "更改状态";
$lang->todo->delete = "删除";
$lang->todo->browse = "浏览TODO";
$lang->todo->confirmDelete = "您确定要删除这个todo吗";
$lang->todo->successMarked = "成功切换状态!";
$lang->todo->confirmDelete = "您确定要删除这个todo吗";
$lang->todo->successMarked = "成功切换状态!";
$lang->todo->lblDisableDate = '暂时不设定时间';
$lang->todo->id = '编号';
$lang->todo->date = '日期';

View File

@@ -50,7 +50,10 @@
</tr>
<tr>
<th class='rowhead'><?php echo $lang->todo->beginAndEnd;?></th>
<td><?php echo html::select('begin', $times, $time, 'onchange=selectNext(); class=select-2') . html::select('end', $times, '', 'class=select-2');?></td>
<td>
<?php echo html::select('begin', $times, $time, 'onchange=selectNext(); class=select-2') . html::select('end', $times, '', 'class=select-2');?>
<input type='checkbox' onclick='switchDateFeature(this);'><?php echo $lang->todo->lblDisableDate;?>
</td>
</tr>
<tr>
<td colspan='2' class='a-center'>
@@ -89,6 +92,20 @@ function selectNext()
endIndex = $("#begin ").get(0).selectedIndex + 2;
$("#end ").get(0).selectedIndex = endIndex;
}
function switchDateFeature(switcher)
{
if(switcher.checked)
{
$('#begin').attr('disabled','disabled');
$('#end').attr('disabled','disabled');
}
else
{
$('#begin').removeAttr('disabled');
$('#end').removeAttr('disabled');
}
}
selectNext();
</script>

View File

@@ -44,6 +44,10 @@
<th class='rowhead'><?php echo $lang->todo->pri;?></th>
<td><?php echo html::select('pri', $lang->todo->priList, $todo->pri, 'class=select-3');?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->todo->status;?></th>
<td><?php echo html::select('status', $lang->todo->statusList, $todo->status, 'class=select-3');?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->todo->beginAndEnd;?></th>
<td><?php echo html::select('begin', $times, $todo->begin, 'onchange=selectNext(); class=select-2') . html::select('end', $times, $todo->end, 'class=select-2');?></td>