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: '',
|
||||
id: '',
|
||||
items: [],
|
||||
// FIXME: don't pass function,
|
||||
// listen to event instead!
|
||||
submit: null
|
||||
})
|
||||
.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)
|
||||
var pos = Ox.isNumber(id) ? id : getPositionById(id),
|
||||
$item = self.$items[pos],
|
||||
data = $item.options('data');
|
||||
data = $item ? $item.options('data') : {};
|
||||
if (arguments.length == 1) {
|
||||
return data;
|
||||
} else if (arguments.length == 2) {
|
||||
return data[key];
|
||||
} else {
|
||||
} else if ($item) {
|
||||
if (key == self.options.unique) {
|
||||
// unique id has changed
|
||||
self.options.selected = self.options.selected.map(function(id_) {
|
||||
|
|
|
@ -140,8 +140,7 @@ Ox.MainMenu = function(options, self) {
|
|||
checkItem <f> checkItem
|
||||
@*/
|
||||
that.checkItem = function(id) {
|
||||
var ids = id.split('_');
|
||||
that.getMenu(ids.shift()).checkItem(ids.join('_'));
|
||||
that.getItem(id).options({checked: true});
|
||||
return that;
|
||||
};
|
||||
|
||||
|
|
|
@ -315,8 +315,7 @@ Ox.VideoEditor = function(options, self) {
|
|||
selectAnnotation(data);
|
||||
},
|
||||
submit: updateAnnotation
|
||||
});
|
||||
self.$annotationPanel[i]
|
||||
})
|
||||
.appendTo(self.$annotations);
|
||||
});
|
||||
|
||||
|
|
|
@ -721,6 +721,9 @@ Miscellaneous
|
|||
.OxThemeClassic .OxSelectable.OxSelected {
|
||||
background: rgb(224, 224, 224);
|
||||
}
|
||||
.OxThemeClassic .OxSelectable.OxSelected.OxFocus {
|
||||
background: rgb(208, 208, 208);
|
||||
}
|
||||
|
||||
.OxThemeClassic .OxScreen {
|
||||
background: rgb(224, 224, 224);
|
||||
|
|
Loading…
Reference in a new issue