mirror of https://github.com/xwiki-labs/cryptpad
append new items to the top of the todo
This commit is contained in:
parent
69eaccbdef
commit
9734a4db80
|
@ -77,7 +77,12 @@ define([
|
||||||
var addTaskUI = function (el, animate) {
|
var addTaskUI = function (el, animate) {
|
||||||
var $taskDiv = $('<div>', {
|
var $taskDiv = $('<div>', {
|
||||||
'class': 'cp-task'
|
'class': 'cp-task'
|
||||||
}).appendTo($list);
|
});
|
||||||
|
if (animate) {
|
||||||
|
$taskDiv.prependTo($list);
|
||||||
|
} else {
|
||||||
|
$taskDiv.appendTo($list);
|
||||||
|
}
|
||||||
$taskDiv.data('id', el);
|
$taskDiv.data('id', el);
|
||||||
|
|
||||||
makeCheckbox(el, function (/*state*/) {
|
makeCheckbox(el, function (/*state*/) {
|
||||||
|
|
|
@ -47,7 +47,7 @@ define([
|
||||||
if (!Array.isArray(proxy.order)) {
|
if (!Array.isArray(proxy.order)) {
|
||||||
throw new Error('expected an array');
|
throw new Error('expected an array');
|
||||||
}
|
}
|
||||||
proxy.order.push(id);
|
proxy.order.unshift(id);
|
||||||
proxy.data[id] = obj;
|
proxy.data[id] = obj;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue