summaryrefslogtreecommitdiffstats
path: root/apps/tasks
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-04-18 17:28:16 +0200
committerBart Visscher <bartv@thisnet.nl>2012-04-18 17:28:16 +0200
commit921fc59d8fb6f11b377531d60d3f956e90a5e617 (patch)
tree68d64cc5f01f29a87c1f1813ad0ba20057785a01 /apps/tasks
parent6ba30cb713b4abd0500fb692f6227284f620e74a (diff)
downloadnextcloud-server-921fc59d8fb6f11b377531d60d3f956e90a5e617.tar.gz
nextcloud-server-921fc59d8fb6f11b377531d60d3f956e90a5e617.zip
Tasks: Add "more" block containing description
Diffstat (limited to 'apps/tasks')
-rw-r--r--apps/tasks/css/style.css13
-rw-r--r--apps/tasks/js/tasks.js15
-rw-r--r--apps/tasks/templates/tasks.php10
3 files changed, 30 insertions, 8 deletions
diff --git a/apps/tasks/css/style.css b/apps/tasks/css/style.css
index f5c3378bc4f..9185c52f779 100644
--- a/apps/tasks/css/style.css
+++ b/apps/tasks/css/style.css
@@ -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;}
diff --git a/apps/tasks/js/tasks.js b/apps/tasks/js/tasks.js
index c6b99ac408d..1381a356fb8 100644
--- a/apps/tasks/js/tasks.js
+++ b/apps/tasks/js/tasks.js
@@ -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'),
diff --git a/apps/tasks/templates/tasks.php b/apps/tasks/templates/tasks.php
index 63e0629e6af..1371d5947a5 100644
--- a/apps/tasks/templates/tasks.php
+++ b/apps/tasks/templates/tasks.php
@@ -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>
- &nbsp;<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'>