Thanks will look at it asap.
On Oct 7, 12:06 pm, Richard Vézina <[email protected]> wrote: > On Fri, Oct 7, 2011 at 1:00 PM, Richard Vézina > <[email protected]>wrote: > > > > > > > > > and change in sqlhtml the init call for the query of superfish... > > > Richard > > > On Fri, Oct 7, 2011 at 12:59 PM, Richard Vézina < > > [email protected]> wrote: > > >> Oh forget to mention... It needs that we fork superfish.css and js and > >> rename every class in superfish.css and their call in superfish.js... It's > >> not pretty nice but it allow to play with the query builder... > > >> I not convinced with a menu a proper ui for a query builder since when > >> your mice fall outside the menu everything unwrap and you have to start > >> everything over... > > >> Richard > > >> On Fri, Oct 7, 2011 at 12:50 PM, Richard Vézina < > >> [email protected]> wrote: > > >>> Finally find a little fix so you can play with the query builder with a > >>> "correct" superfish display (pretty ugly) but... > > >>> Add this to base.css : > > >>> .web2py-menu-expand .sfHover { > >>> width: 275px; > >>> } > > >>> .web2py-menu-vertical li a input { > >>> margin: 5px; > >>> } > > >>> Change this in superfis.css : > > >>> .sf-menu-query ul { > >>> width: *275px*; /* left offset of submenus need to match (see below) */ > > >>> ul.sf-menu-query li li.sfHover-query ul { > >>> left: *275px*; /* match ul width */ > > >>> ul.sf-menu-query li li li:hover ul, > >>> ul.sf-menu-query li li li.sfHover-query ul { > >>> left: *275px*; /* match ul width */ > > >>> It should make the each menu level 275px so the last level will be > >>> displaying the input and add button on the same line with the appropriate > >>> background. > > >>> Hope I didn't forget anything... > > >>> Richard > > >>> On Fri, Oct 7, 2011 at 12:22 PM, Richard Vézina < > >>> [email protected]> wrote: > > >>>> 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/12fc24f... > > >>>> 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 < > >>>> [email protected]> 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 < > >>>>> [email protected]> 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 <[email protected]> > >>>>>> 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 > >>>>>> > <[email protected]>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 < > >>>>>> > > [email protected]> 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 < > >>>>>> > >> [email protected]> 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 > > > > css.zip > 40KViewDownload

