Ox.List: fix keyboard event names
This commit is contained in:
parent
cd0e9c8151
commit
dd9fd84bdf
1 changed files with 8 additions and 6 deletions
|
@ -168,8 +168,10 @@ Ox.List = function(options, self) {
|
||||||
isAsync: !self.options._tree,
|
isAsync: !self.options._tree,
|
||||||
itemMargin: self.options.type == 'text' ? 0 : 8, // 2 x 4 px margin ... fixme: the 2x should be computed later
|
itemMargin: self.options.type == 'text' ? 0 : 8, // 2 x 4 px margin ... fixme: the 2x should be computed later
|
||||||
keyboardEvents: {
|
keyboardEvents: {
|
||||||
key_control_c: copyItems,
|
key_control_c: function() {
|
||||||
key_shift_control_c: function() {
|
copyItems();
|
||||||
|
},
|
||||||
|
key_control_shift_c: function() {
|
||||||
copyItems(true);
|
copyItems(true);
|
||||||
},
|
},
|
||||||
key_control_e: editItems,
|
key_control_e: editItems,
|
||||||
|
@ -179,15 +181,15 @@ Ox.List = function(options, self) {
|
||||||
key_alt_control_n: function() {
|
key_alt_control_n: function() {
|
||||||
addItem('alt');
|
addItem('alt');
|
||||||
},
|
},
|
||||||
key_alt_shift_control_n: function() {
|
key_alt_control_shift_n: function() {
|
||||||
addItem('alt_shift');
|
addItem('alt_shift');
|
||||||
},
|
},
|
||||||
key_shift_control_n: function() {
|
key_control_shift_n: function() {
|
||||||
addItem('shift');
|
addItem('shift');
|
||||||
},
|
},
|
||||||
key_control_v: pasteItems,
|
key_control_v: pasteItems,
|
||||||
key_control_x: cutItems,
|
key_control_x: cutItems,
|
||||||
key_shift_control_x: function() {
|
key_control_shift_x: function() {
|
||||||
cutItems(true);
|
cutItems(true);
|
||||||
},
|
},
|
||||||
key_delete: deleteItems,
|
key_delete: deleteItems,
|
||||||
|
@ -381,7 +383,7 @@ Ox.List = function(options, self) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function copyItems(add) {
|
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
|
ids: self.options.selected
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue