Merge branch 'todo' of github.com:xwiki-labs/cryptpad into todo
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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 {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user