update video editor (maps)
This commit is contained in:
parent
408ebf54cb
commit
f5d587cf5b
5 changed files with 81 additions and 44 deletions
|
|
@ -61,7 +61,6 @@ Ox.ArrayEditable = function(options, self) {
|
|||
Ox.print('BLURRED EDITING', self.blurred, self.editing)
|
||||
if ($parent.is('.OxEditableElement')) {
|
||||
// select another item
|
||||
Ox.print('AAAAA')
|
||||
selectItem(
|
||||
e.metaKey && position == self.selected
|
||||
? '' : $parent.data('position')
|
||||
|
|
@ -198,21 +197,27 @@ Ox.ArrayEditable = function(options, self) {
|
|||
}
|
||||
|
||||
function selectItem(idOrPosition) {
|
||||
if (Ox.isString(idOrPosition)) {
|
||||
self.options.selected = idOrPosition;
|
||||
self.selected = getSelectedPosition();
|
||||
} else {
|
||||
self.selected = idOrPosition;
|
||||
self.options.selected = getSelectedId();
|
||||
var isId = Ox.isString(idOrPosition);
|
||||
if (
|
||||
(isId && idOrPosition != self.options.selected)
|
||||
|| (!isId && idOrPosition != self.selected)
|
||||
) {
|
||||
if (isId) {
|
||||
self.options.selected = idOrPosition;
|
||||
self.selected = getSelectedPosition();
|
||||
} else {
|
||||
self.selected = idOrPosition;
|
||||
self.options.selected = getSelectedId();
|
||||
}
|
||||
if (/*self.options.selected == '' && */self.editing) {
|
||||
self.editing = false;
|
||||
that.blurItem();
|
||||
}
|
||||
Ox.print('SELECT ITEM', self.options.selected, self.selected);
|
||||
that.find('.OxSelected').removeClass('OxSelected');
|
||||
self.selected > -1 && self.$items[self.selected].addClass('OxSelected');
|
||||
triggerSelectEvent();
|
||||
}
|
||||
if (/*self.options.selected == '' && */self.editing) {
|
||||
self.editing = false;
|
||||
that.blurItem();
|
||||
}
|
||||
Ox.print('SELECT ITEM', self.options.selected, self.selected);
|
||||
that.find('.OxSelected').removeClass('OxSelected');
|
||||
self.selected > -1 && self.$items[self.selected].addClass('OxSelected');
|
||||
triggerSelectEvent();
|
||||
}
|
||||
|
||||
function selectLast() {
|
||||
|
|
@ -269,6 +274,9 @@ Ox.ArrayEditable = function(options, self) {
|
|||
|
||||
self.setOption = function(key, value) {
|
||||
if (key == 'items') {
|
||||
if (self.options.selected && getSelectedPosition() == -1) {
|
||||
selectNone();
|
||||
}
|
||||
renderItems(true);
|
||||
} else if (key == 'selected') {
|
||||
selectItem(value);
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ Ox.Input = function(options, self) {
|
|||
height: self.options.height + 'px'
|
||||
} : {})
|
||||
)
|
||||
.bindEvent(Ox.extend(self.options.type == 'input' ? {
|
||||
.bindEvent(Ox.extend(self.options.type != 'textarea' ? {
|
||||
key_enter: submit
|
||||
} : {}, {
|
||||
key_control_v: paste,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue