pull in bootstrap. submit form on enter

pull/1/head
ansuz 7 years ago
parent 83f79a3883
commit 3efb9d21f5

@ -1,7 +1,7 @@
define([
'jquery',
'css!/bower_components/components-font-awesome/css/font-awesome.min.css',
//'css!/bower_components/bootstrap/dist/css/bootstrap.min.css',
'css!/bower_components/bootstrap/dist/css/bootstrap.min.css',
'less!/todo/todo.less',
//'less!/customize/src/less/cryptpad.less',
'less!/customize/src/less/toolbar.less',

@ -48,7 +48,7 @@ define([
.text(new Date(APP.lm.proxy.data[el].ctime).toLocaleString())
.appendTo($taskDiv);
$('<button>', {
'class': 'fa fa-times cp-task-remove'
'class': 'fa fa-times cp-task-remove btn btn-danger'
}).appendTo($taskDiv).on('click', function() {
deleteTask(el);
});
@ -71,7 +71,16 @@ define([
display();
};
$iframe.find('.cp-create-form button').on('click', addTask);
var $formSubmit = $iframe.find('.cp-create-form button').on('click', addTask);
var $input = $iframe.find('#newTodoName').on('keypress', function (e) {
switch (e.which) {
case 13:
$formSubmit.click();
break;
default:
console.log(e.which);
}
});
var editTask = function () {

Loading…
Cancel
Save