slightly better styles

pull/1/head
ansuz 7 years ago
parent 180e643af9
commit 83f79a3883

@ -9,13 +9,11 @@
<body class="loading-hidden"> <body class="loading-hidden">
<div id="toolbar" class="toolbar-container"></div> <div id="toolbar" class="toolbar-container"></div>
<div id="container"> <div id="container">
<div class="create-form"> <div class="cp-create-form">
<input type="text" id="newTodoName" /> <input type="text" id="newTodoName" />
<button class="btn btn-success">Add the task</button> <button class="btn btn-success">Add the task</button>
</div> </div>
<div id="tasksList"> <div id="tasksList"></div>
</div>
</div> </div>
</body> </body>
</html> </html>

@ -41,14 +41,14 @@ define([
'class': 'cp-task' 'class': 'cp-task'
}).appendTo($list); }).appendTo($list);
$('<span>', {}) $('<span>', { 'class': 'cp-task-text' })
.text(APP.lm.proxy.data[el].task) .text(APP.lm.proxy.data[el].task)
.appendTo($taskDiv); .appendTo($taskDiv);
$('<span>', {}) $('<span>', { 'class': 'cp-task-date' })
.text(new Date(APP.lm.proxy.data[el].ctime).toLocaleString()) .text(new Date(APP.lm.proxy.data[el].ctime).toLocaleString())
.appendTo($taskDiv); .appendTo($taskDiv);
$('<button>', { $('<button>', {
'class': 'fa fa-times' 'class': 'fa fa-times cp-task-remove'
}).appendTo($taskDiv).on('click', function() { }).appendTo($taskDiv).on('click', function() {
deleteTask(el); deleteTask(el);
}); });
@ -67,12 +67,11 @@ define([
todo.add(Cryptpad.createChannelId(), obj); todo.add(Cryptpad.createChannelId(), obj);
$input.empty(); $input.val("");
display(); display();
}; };
$iframe.find('.create-form button').on('click', addTask); $iframe.find('.cp-create-form button').on('click', addTask);
var editTask = function () { var editTask = function () {

@ -32,4 +32,30 @@ body {
flex-flow: column; flex-flow: column;
padding: 20px; padding: 20px;
align-items: center; align-items: center;
background-color: lighten(@toolbar-todo-bg, 15%);
}
@spacing: 15px;
.cp-create-form {
margin: @spacing;
}
.cp-task {
border: 1px solid black;
padding: @spacing;
display: flex;
align-items: center;
background-color: white;
.cp-task-text {
margin: @spacing;
flex: 1;
}
.cp-task-date {
margin: @spacing;
}
.cp-task-remove {
margin: @spacing;
}
} }
Loading…
Cancel
Save