1
0
Fork 0
forked from 0x2620/oxjs

edit annotations

This commit is contained in:
j 2011-06-15 16:36:01 +02:00
commit 218eeaf47a
4 changed files with 24 additions and 11 deletions

View file

@ -1390,6 +1390,7 @@ Ox.List = function(options, self) {
width: width
}).bindEvent({
cancel: cancel,
remove: remove,
save: submit
}).appendTo($item.$element);
/*
@ -1400,7 +1401,11 @@ Ox.List = function(options, self) {
*/
function cancel() {
$item.options('data', item);
//fixme: trigger event to reset i/o points
that.triggerEvent('cancel', item);
loadItems();
}
function remove() {
that.triggerEvent('remove', item.id);
}
function submit(event, data) {
item.value = data.value;
@ -1408,6 +1413,7 @@ Ox.List = function(options, self) {
// fixme: leaky, inputs remain in focus stack
$item.options('data', item);
that.triggerEvent('submit', item);
loadItems();
}
}

View file

@ -204,6 +204,9 @@ Ox.TextList = function(options, self) {
edit: function(data) {
that.editCell(data.id, data.key);
},
cancel: function(data) {
Ox.print('cancel edit', data);
},
init: function(data) {
// fixme: why does this never reach?
//Ox.print('INIT????')