Merge branch 'todo' of github.com:xwiki-labs/cryptpad into todo

This commit is contained in:
yflory 2017-07-26 13:07:41 +02:00
commit 77d6da841f
4 changed files with 21 additions and 5 deletions

View file

@ -478,6 +478,10 @@ define(function () {
out.download_mt_button = "Download";
out.todo_title = "CryptTodo";
out.todo_newTodoNamePlaceholder = "Describe your task...";
out.todo_newTodoNameTitle = "Add this task to your todo list";
out.todo_markAsCompleteTitle = "Mark this task as complete";
out.todo_markAsIncompleteTitle = "Mark this task as incomplete";
// general warnings
out.warn_notPinned = "This pad is not in anyone's CryptDrive. It will expire after 3 months. <a href='/about.html#pinning'>Learn more...</a>";

View file

@ -10,8 +10,8 @@
<div id="toolbar" class="toolbar-container"></div>
<div id="container">
<div class="cp-create-form">
<input type="text" id="newTodoName" />
<button class="btn btn-success">Add the task</button>
<input type="text" id="newTodoName" data-localization-placeholder="todo_newTodoNamePlaceholder" />
<button class="btn btn-success" data-localization-title="todo_newTodoNameTitle">Add the task</button>
</div>
<div id="tasksList"></div>
</div>

View file

@ -52,8 +52,13 @@ define([
var entry = APP.lm.proxy.data[id];
var checked = entry.state === 1? 'cp-task-checkbox-checked fa-check-square-o': 'cp-task-checkbox-unchecked fa-square-o';
var title = entry.state === 1?
Messages.todo_markAsIncompleteTitle:
Messages.todo_markAsCompleteTitle;
return $('<span>', {
'class': 'cp-task-checkbox fa ' + checked,
//title: title,
}).on('click', function () {
entry.state = (entry.state + 1) % 2;
if (typeof(cb) === 'function') {
@ -82,9 +87,9 @@ define([
$('<span>', { 'class': 'cp-task-text' })
.text(entry.task)
.appendTo($taskDiv);
$('<span>', { 'class': 'cp-task-date' })
/*$('<span>', { 'class': 'cp-task-date' })
.text(new Date(entry.ctime).toLocaleString())
.appendTo($taskDiv);
.appendTo($taskDiv);*/
$('<button>', {
'class': 'fa fa-times cp-task-remove btn btn-danger'
}).appendTo($taskDiv).on('click', function() {
@ -101,7 +106,6 @@ define([
};
var display = APP.display = function () {
$list.empty();
APP.lm.proxy.order.forEach(function (el) {
addTaskUI(el);
});

View file

@ -43,6 +43,7 @@ body {
min-height: 0;
overflow-y: auto;
min-width: 40%;
max-width: 90%;
}
.cp-create-form {
@ -85,16 +86,23 @@ body {
.cp-task-text {
margin: @spacing;
flex: 1;
word-wrap: break-word;
min-width: 0;
}
.cp-task-date {
margin: @spacing;
}
.cp-task-remove {
margin: @spacing;
cursor: pointer;
}
.cp-task-checkbox {
font-size: 45px;
width: 45px;
cursor: pointer;
&:hover {
color: #999;
}
}
.cp-task-checkbox-checked {