allow for getting 'save list' values from filter

This commit is contained in:
rlx 2011-11-11 15:48:54 +00:00
parent 571e3a3512
commit 21b505b4c8
3 changed files with 15 additions and 2 deletions

View file

@ -181,6 +181,7 @@ Ox.Filter = function(options, self) {
}),
Ox.Input({
id: 'list',
placeholder: 'Untitled',
width: 128
})
],
@ -823,6 +824,18 @@ Ox.Filter = function(options, self) {
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;
};

View file

@ -35,7 +35,7 @@ Ox.ListItem = function(options, self) {
function constructItem(update) {
var $element = self.options.construct(self.options.data)
.addClass('OxItem LISTITEM')
.addClass('OxItem')
.data({
id: self.options.data[self.options.unique],
position: self.options.position

View file

@ -42,7 +42,7 @@ Ox.MenuItem = function(options, self) {
keyboard: parseKeyboard(options.keyboard || self.defaults.keyboard),
title: Ox.toArray(options.title || self.defaults.title)
}))
.addClass('OxItem' + (self.options.disabled ? ' OxDisabled' : '') + ' MENUITEM')
.addClass('OxItem' + (self.options.disabled ? ' OxDisabled' : ''))
/*
.attr({
id: Ox.toCamelCase(self.options.menu.options('id') + '/' + self.options.id)