1
0
Fork 0
forked from 0x2620/oxjs

make doubleclicking on non-editable annotation 'open' it, i.e. go to its in point

This commit is contained in:
rlx 2012-02-19 11:06:03 +00:00
commit 529184887a
6 changed files with 21 additions and 2 deletions

View file

@ -161,16 +161,19 @@ Ox.ArrayEditable = function(options, self) {
value: data.value
});
},
edit: function(data) {
edit: function() {
if (item.id != self.options.selected) {
selectItem(item.id);
}
self.editing = true;
that.triggerEvent('edit', data);
that.triggerEvent('edit');
},
insert: function(data) {
that.triggerEvent('insert', data);
},
open: function(data) {
that.triggerEvent('open');
},
submit: function(data) {
self.editing = false;
that.gainFocus();
@ -362,6 +365,8 @@ Ox.ArrayEditable = function(options, self) {
if (self.options.editable && self.options.selected) {
self.editing = true;
self.$items[self.selected].options({editing: true});
} else if (!self.options.editable) {
that.triggerEvent('open');
}
return that;
};