1
0
Fork 0
forked from 0x2620/oxjs

changes in video editor and list map

This commit is contained in:
rlx 2012-02-05 01:56:23 +00:00
commit 353fce1f14
5 changed files with 41 additions and 26 deletions

View file

@ -192,7 +192,7 @@ Ox.ArrayEditable = function(options, self) {
self.editing = false;
that.blurItem();
}
Ox.print('AE SELECT ITEM', self.options.selected, self.selected);
Ox.print('SELECT ITEM', self.options.selected, self.selected);
that.find('.OxSelected').removeClass('OxSelected');
self.selected > -1 && self.$items[self.selected].addClass('OxSelected');
triggerSelectEvent();
@ -233,15 +233,16 @@ Ox.ArrayEditable = function(options, self) {
position = $element.data('position');
if (!$target.is('.OxInput')) {
if ($element.length) {
if (!$element.is('.OxSelected')) {
// if clicked on an element
if (position != self.selected) {
// select another item
selectItem(
e.metaKey && position == self.selected
? '' : position
);
selectItem(position);
} else if (e.metaKey) {
// or deselect current item
selectNone();
}
} else if (!self.blurred) {
// if there wasn't an active input element
// otherwise, if there wasn't an active input element
if (self.editing) {
// blur if still in editing mode
that.blurItem();