Merge branch 'todo' of github.com:xwiki-labs/cryptpad into todo
This commit is contained in:
@@ -478,6 +478,10 @@ define(function () {
|
|||||||
out.download_mt_button = "Download";
|
out.download_mt_button = "Download";
|
||||||
|
|
||||||
out.todo_title = "CryptTodo";
|
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
|
// 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>";
|
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>";
|
||||||
|
|||||||
@@ -10,8 +10,8 @@
|
|||||||
<div id="toolbar" class="toolbar-container"></div>
|
<div id="toolbar" class="toolbar-container"></div>
|
||||||
<div id="container">
|
<div id="container">
|
||||||
<div class="cp-create-form">
|
<div class="cp-create-form">
|
||||||
<input type="text" id="newTodoName" />
|
<input type="text" id="newTodoName" data-localization-placeholder="todo_newTodoNamePlaceholder" />
|
||||||
<button class="btn btn-success">Add the task</button>
|
<button class="btn btn-success" data-localization-title="todo_newTodoNameTitle">Add the task</button>
|
||||||
</div>
|
</div>
|
||||||
<div id="tasksList"></div>
|
<div id="tasksList"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -52,8 +52,13 @@ define([
|
|||||||
var entry = APP.lm.proxy.data[id];
|
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 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>', {
|
return $('<span>', {
|
||||||
'class': 'cp-task-checkbox fa ' + checked,
|
'class': 'cp-task-checkbox fa ' + checked,
|
||||||
|
//title: title,
|
||||||
}).on('click', function () {
|
}).on('click', function () {
|
||||||
entry.state = (entry.state + 1) % 2;
|
entry.state = (entry.state + 1) % 2;
|
||||||
if (typeof(cb) === 'function') {
|
if (typeof(cb) === 'function') {
|
||||||
@@ -82,9 +87,9 @@ define([
|
|||||||
$('<span>', { 'class': 'cp-task-text' })
|
$('<span>', { 'class': 'cp-task-text' })
|
||||||
.text(entry.task)
|
.text(entry.task)
|
||||||
.appendTo($taskDiv);
|
.appendTo($taskDiv);
|
||||||
$('<span>', { 'class': 'cp-task-date' })
|
/*$('<span>', { 'class': 'cp-task-date' })
|
||||||
.text(new Date(entry.ctime).toLocaleString())
|
.text(new Date(entry.ctime).toLocaleString())
|
||||||
.appendTo($taskDiv);
|
.appendTo($taskDiv);*/
|
||||||
$('<button>', {
|
$('<button>', {
|
||||||
'class': 'fa fa-times cp-task-remove btn btn-danger'
|
'class': 'fa fa-times cp-task-remove btn btn-danger'
|
||||||
}).appendTo($taskDiv).on('click', function() {
|
}).appendTo($taskDiv).on('click', function() {
|
||||||
@@ -101,7 +106,6 @@ define([
|
|||||||
};
|
};
|
||||||
var display = APP.display = function () {
|
var display = APP.display = function () {
|
||||||
$list.empty();
|
$list.empty();
|
||||||
|
|
||||||
APP.lm.proxy.order.forEach(function (el) {
|
APP.lm.proxy.order.forEach(function (el) {
|
||||||
addTaskUI(el);
|
addTaskUI(el);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ body {
|
|||||||
min-height: 0;
|
min-height: 0;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
min-width: 40%;
|
min-width: 40%;
|
||||||
|
max-width: 90%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cp-create-form {
|
.cp-create-form {
|
||||||
@@ -85,16 +86,23 @@ body {
|
|||||||
.cp-task-text {
|
.cp-task-text {
|
||||||
margin: @spacing;
|
margin: @spacing;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
word-wrap: break-word;
|
||||||
|
min-width: 0;
|
||||||
}
|
}
|
||||||
.cp-task-date {
|
.cp-task-date {
|
||||||
margin: @spacing;
|
margin: @spacing;
|
||||||
}
|
}
|
||||||
.cp-task-remove {
|
.cp-task-remove {
|
||||||
margin: @spacing;
|
margin: @spacing;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.cp-task-checkbox {
|
.cp-task-checkbox {
|
||||||
font-size: 45px;
|
font-size: 45px;
|
||||||
width: 45px;
|
width: 45px;
|
||||||
|
cursor: pointer;
|
||||||
|
&:hover {
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.cp-task-checkbox-checked {
|
.cp-task-checkbox-checked {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user