allow for getting 'save list' values from filter
This commit is contained in:
parent
571e3a3512
commit
21b505b4c8
3 changed files with 15 additions and 2 deletions
|
@ -181,6 +181,7 @@ Ox.Filter = function(options, self) {
|
||||||
}),
|
}),
|
||||||
Ox.Input({
|
Ox.Input({
|
||||||
id: 'list',
|
id: 'list',
|
||||||
|
placeholder: 'Untitled',
|
||||||
width: 128
|
width: 128
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
|
@ -823,6 +824,18 @@ Ox.Filter = function(options, self) {
|
||||||
that.triggerEvent('change', {query: query});
|
that.triggerEvent('change', {query: query});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// fixme: is this the best way/name?
|
||||||
|
that.getList = function() {
|
||||||
|
if (self.$save) {
|
||||||
|
var value = self.$save.value();
|
||||||
|
return {
|
||||||
|
save: value[0],
|
||||||
|
name: value[1],
|
||||||
|
query: self.options.query
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
return that;
|
return that;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -35,7 +35,7 @@ Ox.ListItem = function(options, self) {
|
||||||
|
|
||||||
function constructItem(update) {
|
function constructItem(update) {
|
||||||
var $element = self.options.construct(self.options.data)
|
var $element = self.options.construct(self.options.data)
|
||||||
.addClass('OxItem LISTITEM')
|
.addClass('OxItem')
|
||||||
.data({
|
.data({
|
||||||
id: self.options.data[self.options.unique],
|
id: self.options.data[self.options.unique],
|
||||||
position: self.options.position
|
position: self.options.position
|
||||||
|
|
|
@ -42,7 +42,7 @@ Ox.MenuItem = function(options, self) {
|
||||||
keyboard: parseKeyboard(options.keyboard || self.defaults.keyboard),
|
keyboard: parseKeyboard(options.keyboard || self.defaults.keyboard),
|
||||||
title: Ox.toArray(options.title || self.defaults.title)
|
title: Ox.toArray(options.title || self.defaults.title)
|
||||||
}))
|
}))
|
||||||
.addClass('OxItem' + (self.options.disabled ? ' OxDisabled' : '') + ' MENUITEM')
|
.addClass('OxItem' + (self.options.disabled ? ' OxDisabled' : ''))
|
||||||
/*
|
/*
|
||||||
.attr({
|
.attr({
|
||||||
id: Ox.toCamelCase(self.options.menu.options('id') + '/' + self.options.id)
|
id: Ox.toCamelCase(self.options.menu.options('id') + '/' + self.options.id)
|
||||||
|
|
Loading…
Reference in a new issue