Massimo,

I need a class somewhere here, but can't find how to insert it :

for option in options:
                    menu[-1][-1].append((T(option),False,False,
                                         [(SPAN(INPUT(_type=field.type),

INPUT(_type="button",_value=T('add'),

_onclick="w2p_build_search('"+field.name+" "+option+" ',this,event);")),
                                           False,False)]), *_class='NEW
CLASS'*)

I try this :
https://mail.google.com/mail/?shva=1#search/add+class+to+menu/12fc24f2a966a78c

That works to rename menu class, but can't add a class to the li() that
contain the a() that contain the value to be search field and the add
button.

Richard

On Fri, Oct 7, 2011 at 9:44 AM, Richard Vézina
<ml.richard.vez...@gmail.com>wrote:

> Yeah I tried it... I said that need == because at least with the yesterday
> trunk single = didn't returns any result...
>
> By a la Access I mean the query builder that let you write SQL query by not
> writing SQL (you pick the table, then cross check the field, etc.)... I
> think the only difference is that it is multitable.
>
> I can have a look to improve the actual CSS you drop on for now.
>
> I was asking myself if it could be possible to implement a kind of REGEX
> search functionnality like Datatables... With Datatables grid search field
> you can put any character and the records are filtered base on the presence
> absence of each group of character or single character (not sure exactly).
> So for example, you can filter like this :
>
> 7.49 2010-09-09
>
> That will return the rows that contain 7.49 value for the given date...
>
> It mays what you try to achieve with more power by allowing the possibility
> to the user to specify the exact columns he wants it value to be search.
>
> I try to improve the CSS.
>
> Ciao!
>
> Richard
>
>
> On Thu, Oct 6, 2011 at 5:19 PM, Massimo Di Pierro <
> massimo.dipie...@gmail.com> wrote:
>
>> My problem is the css. The rest we can discuss later.
>>
>> Anyway, field = value is correct.
>>
>> The search string is not DAL syntax, it is english. You can even write
>> "field equals value and otherfield starts with something" without =
>> and without quotes around values.
>>
>> We can add OR support later but AND is automatic. Did you try add two
>> queries?
>> I am not trying to copy Access. I am trying to create a pluggable and
>> customizable way to built the search strings.
>> Massimo
>>
>> On Oct 6, 2:28 pm, Richard Vézina <ml.richard.vez...@gmail.com> wrote:
>> > I just think for 2 min about it... A popup grid seems to me the
>> appropriate
>> > display for this query builder...
>> >
>> > Grid :
>> >
>> > Field to search  Wich type of constrainer   Searched value  Add
>> createria
>> > button
>> > Drop box          =, <, >, etc.                     User input         +
>> > button
>> > New row
>> >
>> > Maybe a 'AND' or 'OR' is needed for createria (between line)
>> >
>> > Maybe the table should just add a column at the begining when more then
>> one
>> > creteria is entered user has to specify the AND or OR...
>> >
>> > So...
>> >
>> > AND/OR    Field to search  Wich type of constrainer   Searched value
>>  Add
>> > createria button
>> >                 Drop box          =, <, >, etc.                     User
>> > input         + button
>> > Dropbox    New row
>> >
>> > Query completed (button)
>> >
>> > What about that?!
>> >
>> > jQuery UI dialog
>> >
>> > Richard
>> >
>> > On Thu, Oct 6, 2011 at 3:17 PM, Richard Vézina
>> > <ml.richard.vez...@gmail.com>wrote:
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > > Ok, not exactly a la access... Pretty good I notice this :
>> >
>> > > "=" create : "name = 'something'" should be "name == 'something'"
>> >
>> > > I don't think about to much about the background complexity of what
>> you try
>> > > to achieve, but I don't understand why menu is an appropriate way to
>> display
>> > > this query building thing.
>> >
>> > > Richard
>> >
>> > > On Thu, Oct 6, 2011 at 2:30 PM, Richard Vézina <
>> > > ml.richard.vez...@gmail.com> wrote:
>> >
>> > >> A la Access?! Great...
>> >
>> > >> I will try to give a ride to the new smartgrid to see that... Do you
>> have
>> > >> a test app or do the code you publish earlier to try the new
>> smartgrid
>> > >> enable automatically the searhcable function?...
>> >
>> > >> I try anyway.
>> >
>> > >> Richard
>> >
>> > >> On Thu, Oct 6, 2011 at 12:01 AM, Massimo Di Pierro <
>> > >> massimo.dipie...@gmail.com> wrote:
>> >
>> > >>> There is a new feature in trunk. When you make a searchable grid, it
>> will
>> > >>> now show a button before the search input field. It says "Query".
>> Hover over
>> > >>> it and it will create a popup menu so that you can build the query
>> with the
>> > >>> mouse.
>> >
>> > >>> It works but the css is horrible and I could use some help fixing
>> it.
>> > >>> The code is generated by a single function in sqlhtml.py
>> build_search()
>> >
>> > >>> Massimo
>>
>
>

Reply via email to