Ox.List: fix keyboard event names

This commit is contained in:
rlx 2013-07-14 17:45:45 +00:00
parent cd0e9c8151
commit dd9fd84bdf

View file

@ -168,8 +168,10 @@ Ox.List = function(options, self) {
isAsync: !self.options._tree,
itemMargin: self.options.type == 'text' ? 0 : 8, // 2 x 4 px margin ... fixme: the 2x should be computed later
keyboardEvents: {
key_control_c: copyItems,
key_shift_control_c: function() {
key_control_c: function() {
copyItems();
},
key_control_shift_c: function() {
copyItems(true);
},
key_control_e: editItems,
@ -179,15 +181,15 @@ Ox.List = function(options, self) {
key_alt_control_n: function() {
addItem('alt');
},
key_alt_shift_control_n: function() {
key_alt_control_shift_n: function() {
addItem('alt_shift');
},
key_shift_control_n: function() {
key_control_shift_n: function() {
addItem('shift');
},
key_control_v: pasteItems,
key_control_x: cutItems,
key_shift_control_x: function() {
key_control_shift_x: function() {
cutItems(true);
},
key_delete: deleteItems,
@ -381,7 +383,7 @@ Ox.List = function(options, self) {
}
function copyItems(add) {
self.options.selected.length && that.triggerEvent('copy' + (add ? 'add': ''), {
self.options.selected.length && that.triggerEvent('copy' + (add ? 'add' : ''), {
ids: self.options.selected
});
}