, ,

structured-filter: Generic Web UI for building structured search or filter queries.

structured-filter is a generic Web UI for building structured search or filter queries. With it you can build structured search queries like “Contacts where Firstname starts with ‘A’ and Birthday after 1/1/1980 and State in (CA, NY, FL)”… It is a full jQuery UI widget, supporting various configurations and themes.

Download: https://github.com/evoluteur/structured-filter

Demonstration: https://evoluteur.github.io/structured-filter/index.html

Plugin homepage: https://github.com/evoluteur/structured-filter

Implementation:

Options:

buttonLabelsBooleanDefault : false – The labels of buttons used to manipulate filters. This options applies to the 3 buttons, “New filter”, “Add filter”/”Update filter” and “Cancel” which use icons if the option is set to false.
dateFormatStringDefault : mm/dd/yy – The format for parsed and displayed dates. This attribute is one of the regionalisation attributes. Common formats are: Default – “mm/dd/yy”, ISO 8601 – “yy-mm-dd”, Short – “d M, y”, Medium – “d MM, y”, Full – “DD, d MM, yy”. For a full list of the possib
fieldsObjectDefault : [ ] – The list of fields (as an array of objects with id, label and type) to participate in the query definition. Possible types are: text, boolean, number, date, time, and list.
submitButtonBooleanDefault : false – Shows or hides the “Submit” button.
submitReadyBooleanDefault : false – Provides hidden fields with the conditions’ values to be submitted with the form (as an alternative to an AJAX call).

Methods:

addCondition(data)FunctionReturns : Object – Adds a new filter condition.
clear()FunctionRemoves all conditions.
length()FunctionGets the number of conditions.
removeCondition(index)FunctionReturns : Integer – Removes the condition of the specified index.
val([data])FunctionGets or sets the filter definition (as an array of filters).
valText()FunctionGets the filter definition (as a readable text string).
valUrl()FunctionGets the filter definition (as a URL string).

Screenshots:

Creating a JavaScript Library

I recently wrote a JavaScript library for creating random colors and color schemes, and while I foun…

jQuery Flash Plugin

This jQuery plugin is for embedding Flash movies. Pages are progressively enhanced when Flash and Ja…

jQuery Optimization: Optimize Selector

We can also optimize our selector other than being a bit specific on our selector. The key to optimi…

jQuery drop down menu: droppy

Quick and dirty nested drop-down menu in the jQuery style. I needed a nav like this for a recent pro…

jQuery slideViewerPro: A “pro” jQuery image slider

slideViewerPro is a fully customizable jQuery image gallery engine which allows to create outstandin…

jQuery Optimization: Avoid Unnecessary Styling

This is another common mistake that many jQuery developer made. jQuery provides us with the ability …