Tasks: Fix the display of the list of tasks

This commit is contained in:
Bart Visscher 2012-04-27 17:48:08 +02:00
parent b704ff1bc7
commit c627657fc6
3 changed files with 12 additions and 22 deletions

View file

@ -1,9 +1,5 @@
#tasks p.loading{margin:15px;}
#tasks{position:fixed; overflow: auto; top:6.4em;width:71em;}
#tasks_lists,#tasks_list{height:100%;background:#f8f8f8; border-right:1px solid #ddd;float:left;}
#tasks_lists{width:20em;}
#tasks_list p.loading{margin:15px;}
#tasks_lists .done{color:#C7C7C7;}
#tasks_list{width:50em;}
#task_details{position:absolute;left:63em;top:6.4em;}
#task_details th{padding:2px;text-align:right;vertical-align:top; }
#task_details td{padding:2px;text-align:left;vertical-align:top; }
@ -11,7 +7,7 @@
.error{border-color:red;border-width:2px;}
#tasks_lists div{position:relative;padding:0.5em 1em;}
#tasks_lists .active{font-weight:bold;}
#tasks h1{background-color:#1D2D44;color:white;font-size:120%;padding:0 0.5em;}
#tasks_list h1{background-color:#1D2D44;color:white;font-size:120%;padding:0 0.5em;}
.task{border-radius:0.4em;position:relative;padding:0.5em 1em;}
.task:hover {background-color:#DDDDDD;}

View file

@ -137,7 +137,7 @@ OC.Tasks = {
var show_count = $('#tasks_list').data('show_count');
show_count += filter ? +1 : -1;
$('#tasks_list').data('show_count', show_count);
$('#tasks .task').each(function(i, task_container){
$('#tasks_lists .task, #tasks_list .task').each(function(i, task_container){
task_container = $(task_container);
var task = task_container.data('task');
var found = find_filter(task_container);
@ -158,7 +158,7 @@ OC.Tasks = {
});
},
order:function(sort, get_property, empty_label) {
var tasks = $('#tasks .task').not('.clone');
var tasks = $('#tasks_list .task').not('.clone');
tasks.sort(sort);
var current = null;
tasks.detach();
@ -275,10 +275,8 @@ OC.Tasks = {
};
$(document).ready(function(){
fillHeight($('#tasks'));
//fillHeight($('#tasks_lists'));
//fillHeight($('#tasks_list'));
//fillWindow($('#task_details'));
fillHeight($('#tasks_lists'));
fillWindow($('#tasks_list'));
/*-------------------------------------------------------------------------
* Actions for startup
@ -311,7 +309,7 @@ $(document).ready(function(){
/*-------------------------------------------------------------------------
* Event handlers
*-----------------------------------------------------------------------*/
$('#tasks div.categories .tag').live('click',function(){
$('#tasks_list div.categories .tag').live('click',function(){
OC.Tasks.filter(this, 'div.categories .tag');
var tag_text = $(this).text();
$('#tasks_lists div:not(".all"):not(".done")').each(function(){
@ -321,16 +319,16 @@ $(document).ready(function(){
});
});
$('#tasks .priority.tag').live('click',function(){
$('#tasks_list .priority.tag').live('click',function(){
OC.Tasks.filter(this, '.priority.tag');
});
$('#tasks .location.tag').live('click',function(){
$('#tasks_list .location.tag').live('click',function(){
OC.Tasks.filter(this, '.location.tag');
});
$('#tasks_order_category').click(function(){
var tasks = $('#tasks .task').not('.clone');
var tasks = $('#tasks_list .task').not('.clone');
var collection = {};
tasks.each(function(i, task) {
var categories = $(task).data('task').categories;

View file

@ -8,17 +8,13 @@
<input type="button" id="tasks_order_prio" value="<?php echo $l->t('Order Priority'); ?>">
<input type="button" id="tasks_order_label" value="<?php echo $l->t('Order Label'); ?>">
</div>
<div id="tasks">
<div id="tasks_lists">
<div id="tasks_lists" class="leftcontent">
<div class="all">All</div>
<div class="done">Done</div>
</div>
<div id="tasks_list">
<div id="tasks_list" class="rightcontent">
<p class="loading"><?php echo $l->t('Loading tasks...') ?></p>
</div>
</div>
<div id="task_details">
</div>
<p id="task_actions_template" class="task_actions">
<!-- span class="task_star">
<img title="<?php echo $l->t('Important') ?>" src="<?php echo image_path('core', 'actions/add.svg') ?>" class="svg"><?php echo $l->t('Important') ?>