fix text list so that it doesn't throw errors in its value function
This commit is contained in:
parent
77d2d22505
commit
12622724ee
5 changed files with 9 additions and 6 deletions
|
@ -23,6 +23,8 @@ Ox.Form = function(options, self) {
|
||||||
error: '',
|
error: '',
|
||||||
id: '',
|
id: '',
|
||||||
items: [],
|
items: [],
|
||||||
|
// FIXME: don't pass function,
|
||||||
|
// listen to event instead!
|
||||||
submit: null
|
submit: null
|
||||||
})
|
})
|
||||||
.options(options || {}) // fixme: the || {} can be done once, in the options function
|
.options(options || {}) // fixme: the || {} can be done once, in the options function
|
||||||
|
|
|
@ -1694,12 +1694,12 @@ Ox.List = function(options, self) {
|
||||||
Ox.Log('List', 'that.value id key value', id, key, value)
|
Ox.Log('List', 'that.value id key value', id, key, value)
|
||||||
var pos = Ox.isNumber(id) ? id : getPositionById(id),
|
var pos = Ox.isNumber(id) ? id : getPositionById(id),
|
||||||
$item = self.$items[pos],
|
$item = self.$items[pos],
|
||||||
data = $item.options('data');
|
data = $item ? $item.options('data') : {};
|
||||||
if (arguments.length == 1) {
|
if (arguments.length == 1) {
|
||||||
return data;
|
return data;
|
||||||
} else if (arguments.length == 2) {
|
} else if (arguments.length == 2) {
|
||||||
return data[key];
|
return data[key];
|
||||||
} else {
|
} else if ($item) {
|
||||||
if (key == self.options.unique) {
|
if (key == self.options.unique) {
|
||||||
// unique id has changed
|
// unique id has changed
|
||||||
self.options.selected = self.options.selected.map(function(id_) {
|
self.options.selected = self.options.selected.map(function(id_) {
|
||||||
|
|
|
@ -140,8 +140,7 @@ Ox.MainMenu = function(options, self) {
|
||||||
checkItem <f> checkItem
|
checkItem <f> checkItem
|
||||||
@*/
|
@*/
|
||||||
that.checkItem = function(id) {
|
that.checkItem = function(id) {
|
||||||
var ids = id.split('_');
|
that.getItem(id).options({checked: true});
|
||||||
that.getMenu(ids.shift()).checkItem(ids.join('_'));
|
|
||||||
return that;
|
return that;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -315,8 +315,7 @@ Ox.VideoEditor = function(options, self) {
|
||||||
selectAnnotation(data);
|
selectAnnotation(data);
|
||||||
},
|
},
|
||||||
submit: updateAnnotation
|
submit: updateAnnotation
|
||||||
});
|
})
|
||||||
self.$annotationPanel[i]
|
|
||||||
.appendTo(self.$annotations);
|
.appendTo(self.$annotations);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -721,6 +721,9 @@ Miscellaneous
|
||||||
.OxThemeClassic .OxSelectable.OxSelected {
|
.OxThemeClassic .OxSelectable.OxSelected {
|
||||||
background: rgb(224, 224, 224);
|
background: rgb(224, 224, 224);
|
||||||
}
|
}
|
||||||
|
.OxThemeClassic .OxSelectable.OxSelected.OxFocus {
|
||||||
|
background: rgb(208, 208, 208);
|
||||||
|
}
|
||||||
|
|
||||||
.OxThemeClassic .OxScreen {
|
.OxThemeClassic .OxScreen {
|
||||||
background: rgb(224, 224, 224);
|
background: rgb(224, 224, 224);
|
||||||
|
|
Loading…
Reference in a new issue