* Finish task #4480,4490
This commit is contained in:
@@ -495,11 +495,19 @@ class block extends control
|
||||
*/
|
||||
public function printTodoBlock()
|
||||
{
|
||||
$uri = $this->server->http_referer;
|
||||
$limit = $this->viewType == 'json' ? 0 : (int)$this->params->num;
|
||||
$todos = $this->loadModel('todo')->getList('all', $this->app->user->account, 'wait, doing', $limit, $pager = null, $orderBy = 'date, begin');
|
||||
$uri = $this->server->http_referer;
|
||||
$this->session->set('todoList', $uri);
|
||||
$this->session->set('bugList', $uri);
|
||||
$this->session->set('taskList', $uri);
|
||||
$this->view->todos = $this->loadModel('todo')->getList('all', $this->app->user->account, 'wait, doing', $this->viewType == 'json' ? 0 : (int)$this->params->num);
|
||||
|
||||
foreach($todos as $key => $todo)
|
||||
{
|
||||
if($todo->date == '2030-01-01') unset($todos[$key]);
|
||||
}
|
||||
|
||||
$this->view->todos = $todos;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -20,11 +20,10 @@
|
||||
.block-todoes .todoes {padding: 0 10px 10px 10px; margin: 0 -20px; max-height: 350px; overflow: auto;}
|
||||
.block-todoes .todoes > li {position: relative; padding: 5px 10px 5px 35px; list-style: none;}
|
||||
.block-todoes .todoes > li:hover {background-color: #e9f2fb;}
|
||||
.block-todoes .todo-title {display: block; padding: 5px;}
|
||||
.block-todoes .todo-pri {display: inline-block; padding: 0 5px; font-size: 12px; color: #3c4353;}
|
||||
.block-todoes .todo-pri-1 {color: #ff5d5d;}
|
||||
.block-todoes .todo-time {display: inline-block; padding: 0 5px; font-size: 12px; color: #8e939a;}
|
||||
.block-todoes .todo-check {position: absolute; top: 10px; left: 10px; display: block; width: 20px; height: 20px; font-size: 20px; color: transparent; cursor: pointer; background: #fff; border: 2px solid #eee; border-radius: 50%;}
|
||||
.block-todoes .todo-title {padding: 5px;}
|
||||
.block-todoes .todo-pri {margin: 0 5px;}
|
||||
.block-todoes .todo-time {display: inline-block; padding: 0 5px; font-size: 12px; color: #8e939a; width: 90px;}
|
||||
.block-todoes .todo-check {position: absolute; top: 5px; left: 10px; display: block; width: 20px; height: 20px; font-size: 20px; color: transparent; cursor: pointer; background: #fff; border: 2px solid #eee; border-radius: 50%;}
|
||||
.block-todoes .todo-check:hover {border-color: #8e939a;}
|
||||
.block-todoes .active > .todo-check {color: #00da88; background: transparent;border: none;}
|
||||
.block-todoes .todoes-form {position: absolute; top: -45px; right: 0; left: 0; z-index: 15; max-width: 500px; padding: 12px 20px 20px; visibility: hidden; background: #fff; -webkit-box-shadow: 0 0 20px 0 #bdc9d8; box-shadow: 0 0 20px 0 #bdc9d8; opacity: 0;-webkit-transition: .4s cubic-bezier(.175, .885, .32, 1); -o-transition: .4s cubic-bezier(.175, .885, .32, 1); transition: .4s cubic-bezier(.175, .885, .32, 1); -webkit-transition-property: opacity, visibility; -o-transition-property: opacity, visibility; transition-property: opacity, visibility;}
|
||||
@@ -34,7 +33,7 @@
|
||||
.block-todoes .todoes-form > h3 {padding: 0 20px 15px; margin: 0 -20px 5px; font-size: 14px; line-height: 20px;}
|
||||
.block-todoes.show-form .todoes-form {visibility: visible; opacity: 1;}
|
||||
</style>
|
||||
<div class='block-todoes' id="block <?php echo ($block->block)?>">
|
||||
<div class='block-todoes'>
|
||||
<div class='panel-body'>
|
||||
<div class="todoes-input">
|
||||
<div class="todo-form-trigger"><input type="text" placeholder="<?php echo $lang->todo->lblClickCreate?>" class="form-control"></div>
|
||||
@@ -97,13 +96,13 @@
|
||||
<li data-id='<?php echo $todo->id?>'>
|
||||
<span class="todo-check icon icon-check-circle"></span>
|
||||
<a href="<?php echo empty($sso) ? $viewLink : $sso . $sign . 'referer=' . base64_encode($viewLink);?>" class='iframe' <?php echo $appid?>>
|
||||
<span class="todo-title"><?php echo $todo->name;?></span>
|
||||
<span class="todo-pri todo-pri-<?php echo $todo->pri?>"><?php echo zget($lang->todo->priList, $todo->pri);?></span>
|
||||
<?php if ($todo->date == '2030-01-01') :?>
|
||||
<span class="c-date"><?php echo $lang->todo->periods['future'] ?></span>
|
||||
<?php else:?>
|
||||
<span class="todo-time"><?php echo date(DT_DATE4, strtotime($todo->date)) . ' ' . $todo->begin;?></span>
|
||||
<?php endif;?>
|
||||
<span class="todo-pri label-pri label-pri-<?php echo $todo->pri?>" title="<?php echo zget($lang->todo->priList, $todo->pri);?>"><?php echo $todo->pri;?></span>
|
||||
<span class="todo-title"><?php echo $todo->name;?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach;?>
|
||||
@@ -178,16 +177,8 @@
|
||||
data: $form.serialize(),
|
||||
success: function(todo)
|
||||
{
|
||||
var item = "<li data-id='" + todo.id + "'>";
|
||||
item += '<span class="todo-check icon icon-check-circle"></span>';
|
||||
item += '<a href="' + createLink('todo', 'view', "todoID=" + todo.id + "&from=my", 'html', true) + '" class="iframe">';
|
||||
item += '<span class="todo-title">' + todo.name + '</span>';
|
||||
item += '<span class="todo-pri todo-pri-' + todo.pri + '">' + todo.priName + '</span><span class="todo-time">' + todo.time + '</span></a></li>';
|
||||
$todoes.find('ul.todoes').prepend(item);
|
||||
$todoes.removeClass('show-form');
|
||||
$todoes.find('ul.todoes li:first a').modalTrigger();
|
||||
$form.find('input[name="name"]').val('');
|
||||
$form.find('#todoDate').val('');
|
||||
refreshBlock($todoes.parent());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -398,8 +398,8 @@ class todoModel extends model
|
||||
|
||||
while($todo = $stmt->fetch())
|
||||
{
|
||||
if($this->config->global->flow == 'onlyTest' and $todo->type == 'task') continue;
|
||||
if($this->config->global->flow == 'onlyTask' and $todo->type == 'bug') continue;
|
||||
if($this->config->global->flow == 'onlyTest' and $todo->type == 'task') continue;
|
||||
if($this->config->global->flow == 'onlyTask' and $todo->type == 'bug') continue;
|
||||
if($this->config->global->flow == 'onlyStory' and $todo->type != 'custom') continue;
|
||||
|
||||
if($todo->type == 'story') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_STORY)->fetch('title');
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user