Tasks: Add "more" block containing description
This commit is contained in:
parent
6ba30cb713
commit
921fc59d8f
|
@ -11,12 +11,16 @@
|
|||
.error{border-color:red;border-width:2px;}
|
||||
#tasks_lists div{position:relative;padding:0.5em 1em;}
|
||||
#tasks_lists .active{font-weight:bold;}
|
||||
.task_actions{display:none;}
|
||||
#tasks 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;}
|
||||
|
||||
.task_actions{display:none;position:absolute;right:33.3333%;top:0.2em;}
|
||||
.task:hover .task_actions {display:block}
|
||||
.task_actions img{vertical-align:middle;}
|
||||
.task_actions span{cursor:pointer;}
|
||||
|
||||
.task .priority{background-color:black;color:white;position:absolute;top:0.5em}
|
||||
.task .priority-n{height:2.66ex;width:0.6em;}
|
||||
.task .priority-1{background:rgb(255,0,0);}
|
||||
|
@ -32,9 +36,10 @@
|
|||
.task .completed {position:absolute;left:3em;top:0.3em;}
|
||||
|
||||
.task .summary{padding-left:4em;}
|
||||
.task .summary input{position:relative;left:5px;}
|
||||
.task.done .summary{text-decoration:line-through;}
|
||||
|
||||
.task .tag{border-radius:0.4em;display:inline-block;opacity:0.2;margin:0 0.2em;border:1px solid transparent;padding:0 0.4em;}
|
||||
.task .tag{border-radius:0.4em;display:inline-block;opacity:0.2;margin:0 0.2em;border:1px solid transparent;padding:0 0.4em;cursor:pointer;}
|
||||
.task .tag:hover{opacity:0.5;}
|
||||
.task .tag.active{border-color:black;opacity:0.6;}
|
||||
.task .tag.active:hover{opacity:0.8;}
|
||||
|
@ -44,3 +49,7 @@
|
|||
.task .categories .tag.active{display:none}
|
||||
|
||||
.task .location{background-color:#442d44;color:white;position:absolute;right:0.6em;width:4.2em;text-align:left;top:0.4em}
|
||||
|
||||
.task .more{display:none;}
|
||||
|
||||
.task .description{position:relative;left:4em;}
|
||||
|
|
|
@ -23,7 +23,7 @@ OC.Tasks = {
|
|||
.data('show_count', 0)
|
||||
.attr('data-id', task.id)
|
||||
.append(summary_container)
|
||||
//.append(actions.clone().removeAttr('id'))
|
||||
.append(actions.clone().removeAttr('id'))
|
||||
;
|
||||
task_container.find('.summary a').click(OC.Tasks.summaryClickHandler);
|
||||
var checkbox = $('<input type="checkbox">')
|
||||
|
@ -61,6 +61,14 @@ OC.Tasks = {
|
|||
);
|
||||
});
|
||||
}
|
||||
task_container.find('.task_more').click(OC.Tasks.moreClickHandler);
|
||||
var description = $('<textarea>')
|
||||
.addClass('description')
|
||||
.text(task.description);
|
||||
$('<div>')
|
||||
.addClass('more')
|
||||
.append(description)
|
||||
.appendTo(task_container);
|
||||
return task_container;
|
||||
},
|
||||
filter:function(tag, find_filter) {
|
||||
|
@ -148,6 +156,11 @@ OC.Tasks = {
|
|||
input.focus();
|
||||
return false;
|
||||
},
|
||||
moreClickHandler:function(event){
|
||||
var $task = $(this).closest('.task'),
|
||||
task = $task.data('task');
|
||||
$task.find('.more').show();
|
||||
},
|
||||
complete_task:function() {
|
||||
var $task = $(this).closest('.task'),
|
||||
task = $task.data('task'),
|
||||
|
|
|
@ -19,11 +19,11 @@
|
|||
<div id="task_details">
|
||||
</div>
|
||||
<p id="task_actions_template" class="task_actions">
|
||||
<span class="task_delete">
|
||||
<img title="Delete" src="<?php echo image_path('core', 'actions/delete.svg') ?>" class="svg">
|
||||
</span>
|
||||
<span class="task_edit">
|
||||
<img title="Edit" src="<?php echo image_path('core', 'actions/rename.svg') ?>" class="svg">
|
||||
<!-- 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') ?>
|
||||
</span -->
|
||||
<span class="task_more">
|
||||
<img title="<?php echo $l->t('More') ?>" src="<?php echo image_path('core', 'actions/triangle-s.svg') ?>" class="svg"><?php echo $l->t('More') ?>
|
||||
</span>
|
||||
</p>
|
||||
<script type='text/javascript'>
|
||||
|
|
Loading…
Reference in New Issue