jega
|
|
« on: December 21, 2022, 04:59:55 PM » |
|
Hi.
Can't find the right way to get all the operators into the status field. The combobox is fine, but it uses the op: 'equal. text: 'Equal'
Of course i can write all into the field operators, but if i have more fields, i think it's not the way writing all operators over and over again..
$(function(){ $('#fb').filterbuilder({ rules: [{ op: 'or', children: [{ field: 'status', op: 'contains', value: '1' }] }], fields: [ {field:'status',title:'Status', operators: [ {op:'equal',text:'Equal',editor:{ type:'combobox', options:{ editable:false, width: '200px', data:[ {value:'0',text:'Under udvikling'}, {value:'1',text:'Aktiv'}, {value:'2',text:'Afsluttet'}, {value:'3',text:'Pause'} ] } }} ] } ], operators: [ { op: 'contains', text: 'Indeholder' }, { op: 'equal', text: 'Lig med' }, { op: 'notequal', text: 'Forskellig fra' }, { op: 'beginwith', text: 'begynder med' }, { op: 'endwith', text: 'Slutter med' }, { op: 'less', text: 'Mindre end' }, { op: 'lessorequal', text: 'Mindre end eller lig med' }, { op: 'greater', text: 'Større end' }, { op: 'greaterorequal', text: 'Større end eller lig med' } ] }) });
Jesper
|