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