1
0
Fork 0
forked from 0x2620/oxjs

misc fixes

This commit is contained in:
rlx 2011-09-20 00:11:16 +00:00
commit b881f74c7e
3 changed files with 18 additions and 9 deletions

View file

@ -66,7 +66,11 @@ Ox.Filter = function(options, self) {
{id: '<', title: 'is less than'},
{id: '>', title: 'is greater than'},
{id: '-', title: 'is between'},
{id: '!-', title: 'is not between'}
{id: '!-', title: 'is not between'}/*,
{id: '^', title: 'starts with'},
{id: '!^', title: 'does not start with'},
{id: '$', title: 'ends with'},
{id: '!$', title: 'does not end with'}*/
],
string: [
{id: '=', title: 'is'},
@ -356,9 +360,9 @@ Ox.Filter = function(options, self) {
: [self.options.query.conditions[pos].conditions[subpos]],
isUseless = false;
Ox.forEach(conditions, function(condition) {
isUseless = Ox.getObjectById(
self.options.findKeys, condition.key
).type == 'text'
isUseless = ['string', 'text'].indexOf(
Ox.getObjectById(self.options.findKeys, condition.key).type
) > -1
&& condition.operator == (self.options.query.operator == '&' ? '' : '!')
&& condition.value == ''
return isUseless;

View file

@ -196,7 +196,7 @@ Ox.Select = function(options, self) {
that.selectItem = function(id) {
//Ox.print('selectItem', id, Ox.getObjectById(self.options.items, id).title)
self.options.type == 'text' && self.$title.html(
Ox.getObjectById(self.options.items, id).title[0] // fixme: title should not have become an array
Ox.getObjectById(self.options.items, id).title
);
self.$menu.checkItem(id);
self.checked = self.optionGroup.checked();