minor changes for filter dialog
This commit is contained in:
parent
3e03e00a72
commit
9366bdc6d5
1 changed files with 45 additions and 47 deletions
|
@ -15,8 +15,8 @@ Ox.Filter <f:Ox.Element> Filter Element
|
||||||
|
|
||||||
Ox.Filter = function(options, self) {
|
Ox.Filter = function(options, self) {
|
||||||
|
|
||||||
var self = self || {},
|
self = self || {};
|
||||||
that = Ox.Element({}, self)
|
var that = Ox.Element({}, self)
|
||||||
.defaults({
|
.defaults({
|
||||||
findKeys: [],
|
findKeys: [],
|
||||||
query: {
|
query: {
|
||||||
|
@ -30,48 +30,46 @@ Ox.Filter = function(options, self) {
|
||||||
|
|
||||||
Ox.print('Ox.Filter self.options', self.options)
|
Ox.print('Ox.Filter self.options', self.options)
|
||||||
|
|
||||||
$.extend(self, {
|
self.conditionOperators = {
|
||||||
conditionOperators: {
|
date: [
|
||||||
date: [
|
{id: '', title: 'is'},
|
||||||
{id: '', title: 'is'},
|
{id: '!', title: 'is not'},
|
||||||
{id: '!', title: 'is not'},
|
{id: '<', title: 'is before'},
|
||||||
{id: '<', title: 'is before'},
|
{id: '>', title: 'is after'},
|
||||||
{id: '>', title: 'is after'},
|
{id: '-', title: 'is between'},
|
||||||
{id: '-', title: 'is between'},
|
{id: '!-', title: 'is not between'}
|
||||||
{id: '!-', title: 'is not between'}
|
],
|
||||||
],
|
list: [
|
||||||
list: [
|
{id: '', title: 'is'},
|
||||||
{id: '', title: 'is'},
|
{id: '!', title: 'is not'}
|
||||||
{id: '!', title: 'is not'}
|
],
|
||||||
],
|
number: [
|
||||||
number: [
|
{id: '', title: 'is'},
|
||||||
{id: '', title: 'is'},
|
{id: '!', title: 'is not'},
|
||||||
{id: '!', title: 'is not'},
|
{id: '<', title: 'is less than'},
|
||||||
{id: '<', title: 'is less than'},
|
{id: '>', title: 'is greater than'},
|
||||||
{id: '>', title: 'is greater than'},
|
{id: '-', title: 'is between'},
|
||||||
{id: '-', title: 'is between'},
|
{id: '!-', title: 'is not between'}
|
||||||
{id: '!-', title: 'is not between'}
|
],
|
||||||
],
|
string: [
|
||||||
string: [
|
{id: '=', title: 'is'},
|
||||||
{id: '=', title: 'is'},
|
{id: '!=', title: 'is not'},
|
||||||
{id: '!=', title: 'is not'},
|
{id: '', title: 'contains'},
|
||||||
{id: '', title: 'contains'},
|
{id: '!', title: 'does not contain'},
|
||||||
{id: '!', title: 'does not contain'},
|
{id: '^', title: 'starts with'},
|
||||||
{id: '^', title: 'starts with'},
|
{id: '!^', title: 'does not start with'},
|
||||||
{id: '!^', title: 'does not start with'},
|
{id: '$', title: 'ends with'},
|
||||||
{id: '$', title: 'ends with'},
|
{id: '!$', title: 'does not end with'}
|
||||||
{id: '!$', title: 'does not end with'}
|
],
|
||||||
],
|
text: [
|
||||||
text: [
|
{id: '', title: 'contains'},
|
||||||
{id: '', title: 'contains'},
|
{id: '!', title: 'does not contain'}
|
||||||
{id: '!', title: 'does not contain'}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
operators: [
|
|
||||||
{id: '&', title: 'all'},
|
|
||||||
{id: '|', title: 'any'}
|
|
||||||
]
|
]
|
||||||
});
|
};
|
||||||
|
self.operators = [
|
||||||
|
{id: '&', title: 'all'},
|
||||||
|
{id: '|', title: 'any'}
|
||||||
|
];
|
||||||
|
|
||||||
if (!self.options.query.conditions.length) {
|
if (!self.options.query.conditions.length) {
|
||||||
self.options.query.conditions = [{
|
self.options.query.conditions = [{
|
||||||
|
@ -154,7 +152,7 @@ Ox.Filter = function(options, self) {
|
||||||
{id: 'ascending', title: 'ascending'},
|
{id: 'ascending', title: 'ascending'},
|
||||||
{id: 'descending', title: 'descending'}
|
{id: 'descending', title: 'descending'}
|
||||||
],
|
],
|
||||||
width: 96
|
width: 128
|
||||||
}),
|
}),
|
||||||
Ox.Label({
|
Ox.Label({
|
||||||
overlap: 'left',
|
overlap: 'left',
|
||||||
|
@ -163,7 +161,7 @@ Ox.Filter = function(options, self) {
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
float: 'right',
|
float: 'right',
|
||||||
width: 168
|
width: 200
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
separators: [
|
separators: [
|
||||||
|
@ -410,14 +408,14 @@ Ox.Filter = function(options, self) {
|
||||||
var $input
|
var $input
|
||||||
if (!isBetween) {
|
if (!isBetween) {
|
||||||
$input = Ox.Input({
|
$input = Ox.Input({
|
||||||
width: 256
|
width: 288
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
$input = Ox.InputGroup({
|
$input = Ox.InputGroup({
|
||||||
inputs: [
|
inputs: [
|
||||||
Ox.Input({
|
Ox.Input({
|
||||||
id: 'start',
|
id: 'start',
|
||||||
width: 112
|
width: 128
|
||||||
}),
|
}),
|
||||||
/*
|
/*
|
||||||
Ox.TimeInput({
|
Ox.TimeInput({
|
||||||
|
|
Loading…
Reference in a new issue