gotcha, but I can't do without modifyng sqlhtml.py

Added also a few px of margin to align "search" and "clear" to the input, 
made it look similar to the "add, back & Co.", enlarged the search input a 
little bit (a requirement from all my users)

On Monday, September 3, 2012 9:12:00 PM UTC+2, Massimo Di Pierro wrote:
>
> No always two rows, no cols but "records found" should be on the same row 
> as [add] but right-aligned.
>
> On Monday, 3 September 2012 13:54:18 UTC-5, Niphlod wrote:
>>
>> you mean "always two rows, with two columns every row", i.e. always:
>>
>> row1-col1: input  row1-col2:search clear
>> row2-col1: add    row2-col2: records found
>>
>> ? 
>>
>> On Monday, September 3, 2012 8:17:51 PM UTC+2, Massimo Di Pierro wrote:
>>>
>>> Right now the gird console (defined in sqlhtml.py) looks like
>>>
>>> [add] [input.... ] [search] [clear]
>>>         [hidden popup]
>>>         (records found ...)
>>>  
>>> but some times it shows up as
>>>
>>> [add]
>>> [input ...] [search] [clear]
>>>         [hidden popup]
>>>         (records found ...)
>>>
>>> I would like it to consistently look like this
>>>
>>> [input ...] [search] [clear]
>>>         [hidden popup]
>>> [add]  (records found ...)
>>>
>>> always to cols with popup in between, never 3 cols.
>>>
>>> Can somebody help with this?
>>>
>>>
>>>

-- 



@@ -1854,12 +1854,6 @@
 
         session['_web2py_grid_referrer_'+formname] = url2(vars=request.vars)
         console = DIV(_class='web2py_console %(header)s %(cornertop)s' % ui)
-        if create:
-            console.append(gridbutton(
-                    buttonclass='buttonadd',
-                    buttontext='Add',
-                    buttonurl=url(args=['new',tablename])))
-
         error = None
         if searchable:
             sfields = reduce(lambda a,b:a+b,
@@ -1984,10 +1978,17 @@
         except SyntaxError:
             rows = None
             error = T("Query Not Supported")
+
+        serviceconsole = DIV(_class="web2py_service_console")
+        if create:
+            serviceconsole.append(gridbutton(
+                    buttonclass='buttonadd',
+                    buttontext='Add',
+                    buttonurl=url(args=['new',tablename])))
         if nrows:
             message = error or T('%(nrows)s records found') % dict(nrows=nrows)
-            console.append(DIV(message,_class='web2py_counter'))
-
+            serviceconsole.append(DIV(message,_class='web2py_counter'))
+        console.append(serviceconsole)
         if rows:
             htmltable = TABLE(THEAD(head))
             tbody = TBODY()
@@ -214,7 +214,7 @@
 
 .web2py_console form {
     width: 100%;
-    display: inline;
+    display: inline-block;
     vertical-align: middle;
     margin: 0 0 0 5px;
 }
@@ -251,6 +251,14 @@
     padding:3px 5px 3px 5px;
 }
 
+.web2py_console form input.btn {
+    margin-bottom: 10px;
+    padding: 4px 10px;
+}
+
+#web2py_keywords {
+    width: 60%;
+}
 .web2py_counter {
     margin-top:5px;
     margin-right:5px;

Reply via email to