Forum
Hello all,
After many requests and of course the problems which causes current search module we have made a decision to rewrite them.
This actually is not standard task, because all existing features should be saved.
I can not guarantee that 100% of the existing features will be available, but we will do our best to save them
Three more important thing are the goal of this rewrite:
- We do not more will use jQuery clone function to create new row (the most important) , but after every change the filter will be recreated using the functions from common grid module
- Again with the available standard search like by example:
...WHERE a=1 AND b=2
now we can do more complex where clauses like this
... WHERE ( (a=1 AND b=2) or c=3)
This mean more than one group operator can be used. - Implementing a checking modules for the data input in the filter
We have placed the code in GitHub.
https://github.com/tonytomov/jqGrid/commit/0002a389ffbeab00e536c02ecade03c72ba2a6e6
Any comments, recommendations, fixes are welcome during the development of this plugin.
Note that it can be used separately.
Kind Regards
Tony
13:04
10/08/2009
It is very good new, Tony!
To help you to improve the new code I used JSlint and found following small errors or suggestions:
line 67 ended with ',' before ']' in the next line. One should remove the ','
in line 145,154,296,462,493,519,523,527,531,534 one should replace ',' with ';' at the end of line.
in line 309 will be defined unused variables o and df.
In line 516 the code '+ ""' (at the end of line) should be removed
in lines 82,119,164,184,354,377 one should add ';' at the end of lines
in line 219,354,433,468,490,492,511-514,516,517,545,547,557,559,568,570,626 insert {}
in lines 32,166,183,197,218,232,255,282,327,338,344,370,395,410,415,449,489,498,505,511-514,516,544,556,567,576 replace "==" to "==="
in lines 249,269,287,466,477,481,541,553 replace "!=" to "!=="
if would be better to move this.getStringForGroup from the line 464 after the line 494 where
the function this.getStringForRule will be defined because in lines 472,482
the function this.getStringForRule will be used inside of this.getStringForGroup
In the same way the function getStringForRule defined in the line 572 will be better to move before the line 538
where the function getStringForGroup defined which use it
I used the code loaded today so I hope the line numbers stay unchanged in your code.
I next days I want to look the new module more carefully and to test it.
Best regards
Oleg
16:40
Moderators
30/10/2007
Thank you Oleg.
The most of corrections are implemented.
Will do the rest later.
Now we are on the final lap for the alfa.
Other modules will be changed at once.
I love the new module (I have a little problems with the local searching, but have already solution)
Thanks again
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
14:02
Moderators
30/10/2007
Hello,
If someone is interested on the new search filter a simple demo can be downloaded from this link
Kind Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
05:39
23/02/2011
H Tony
Very good so far!
I haven't looked at the resulting where clause, but I hope you know to parameterize the user values and not concatenate them into a query string. That leads to SQL Injection and no amount of escaping the user-entered values is foolproof.
In the demo, I think there should be and/or drop down after each condition. I'd like to see the filter represented in a grid with a vertical scrollbar as well as the results grid with a vertical scrollbar.
Mike
19:56
10/08/2009
Hi Tony!
Just one idea. It would be nice to implement some kind of "filter collection": the list of some predefined filters with the name and description which could be easy loaded or saved (first in the internal parameter of jqGrid, next in qookie and which can be easy exported).
Having the possibility to define a complex query in a nice feature (what one has in the new filter module), but it could be too complex for standard users. The usage of predefined "filter collection" could simplify the work and improve users satisfaction. One could allow to switch from "standard mode" of choosing only predefined queries to "advanced mode" where full posibilities of the new filter module could be used.
Best regards
Oleg
Most Users Ever Online: 715
Currently Online:
56 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66