[web2py] Re: SQLFORM.grid CSS help

2012-09-04 Thread Massimo Di Pierro
People are not supposed to update static files in old apps, that is why the 
grid contains alignment info but not other style info. On the other side we 
do not guaranteed backward compatibility for the grid look and feel.

It should be possible to generate a grid console with the right alignment 
(perhaps not the right padding, colors, button) that works with every style.

On Tuesday, 4 September 2012 02:40:42 UTC-5, Niphlod wrote:

 the thing here is: are web2py.css, web2py.js, appadmin.html, appadmin.py 
 files that needs updating when you update the framework or not ? This kind 
 of problem keeps popping up all the time because of styling incompatibility.

 Il giorno lunedì 3 settembre 2012 23:19:32 UTC+2, Massimo Di Pierro ha 
 scritto:

 You are right but now I am running into another problem...

 I am using a grid on an older 1.99.7 apps using skeleton. The console is 
 messed up badly, even after replacing web2py.css. There should be a way to 
 make this work that does not break the 1.99.7 scaffolding apps.

 Massimo

 On Monday, 3 September 2012 14:44:26 UTC-5, Niphlod wrote:

 that should definitely not happen. tested on ff and chromium.
 that happened before I switched from
 .web2py_console form {
 width: 100%;
 display: inline;
 vertical-align: middle;
 margin: 0 0 0 5px;
 }
 to 
 .web2py_console form {
 width: 100%;
 display: inline-block;
 vertical-align: middle;
 margin: 0 0 0 5px;
 }
 Can you please check if form is displayed as inline-block ? (maybe 
 refresh your browser cache...)

 On Monday, September 3, 2012 9:39:58 PM UTC+2, Massimo Di Pierro wrote:

 When I click on the [input] search field, and the popup appears, the 
 [add] button moves to the right of the popup. :-(


 On Monday, 3 September 2012 14:24:26 UTC-5, Niphlod wrote:

 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: addrow2-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?




-- 





[web2py] Re: SQLFORM.grid CSS help

2012-09-04 Thread Niphlod
I'll try to work that out but it's gonna take more time.

Il giorno martedì 4 settembre 2012 17:19:16 UTC+2, Massimo Di Pierro ha 
scritto:

 People are not supposed to update static files in old apps, that is why 
 the grid contains alignment info but not other style info. On the other 
 side we do not guaranteed backward compatibility for the grid look and feel.

 It should be possible to generate a grid console with the right alignment 
 (perhaps not the right padding, colors, button) that works with every style.

 On Tuesday, 4 September 2012 02:40:42 UTC-5, Niphlod wrote:

 the thing here is: are web2py.css, web2py.js, appadmin.html, appadmin.py 
 files that needs updating when you update the framework or not ? This kind 
 of problem keeps popping up all the time because of styling incompatibility.

 Il giorno lunedì 3 settembre 2012 23:19:32 UTC+2, Massimo Di Pierro ha 
 scritto:

 You are right but now I am running into another problem...

 I am using a grid on an older 1.99.7 apps using skeleton. The console is 
 messed up badly, even after replacing web2py.css. There should be a way to 
 make this work that does not break the 1.99.7 scaffolding apps.

 Massimo

 On Monday, 3 September 2012 14:44:26 UTC-5, Niphlod wrote:

 that should definitely not happen. tested on ff and chromium.
 that happened before I switched from
 .web2py_console form {
 width: 100%;
 display: inline;
 vertical-align: middle;
 margin: 0 0 0 5px;
 }
 to 
 .web2py_console form {
 width: 100%;
 display: inline-block;
 vertical-align: middle;
 margin: 0 0 0 5px;
 }
 Can you please check if form is displayed as inline-block ? (maybe 
 refresh your browser cache...)

 On Monday, September 3, 2012 9:39:58 PM UTC+2, Massimo Di Pierro wrote:

 When I click on the [input] search field, and the popup appears, the 
 [add] button moves to the right of the popup. :-(


 On Monday, 3 September 2012 14:24:26 UTC-5, Niphlod wrote:

 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: addrow2-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?




-- 





[web2py] Re: SQLFORM.grid CSS help

2012-09-03 Thread Niphlod
you mean always two rows, with two columns every row, i.e. always:

row1-col1: input  row1-col2:search clear
row2-col1: addrow2-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?




-- 





[web2py] Re: SQLFORM.grid CSS help

2012-09-03 Thread Massimo Di Pierro
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: addrow2-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?




-- 





[web2py] Re: SQLFORM.grid CSS help

2012-09-03 Thread Niphlod
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: addrow2-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;


[web2py] Re: SQLFORM.grid CSS help

2012-09-03 Thread Massimo Di Pierro
When I click on the [input] search field, and the popup appears, the [add] 
button moves to the right of the popup. :-(


On Monday, 3 September 2012 14:24:26 UTC-5, Niphlod wrote:

 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: addrow2-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?




-- 





[web2py] Re: SQLFORM.grid CSS help

2012-09-03 Thread Niphlod
that should definitely not happen. tested on ff and chromium.
that happened before I switched from
.web2py_console form {
width: 100%;
display: inline;
vertical-align: middle;
margin: 0 0 0 5px;
}
to 
.web2py_console form {
width: 100%;
display: inline-block;
vertical-align: middle;
margin: 0 0 0 5px;
}
Can you please check if form is displayed as inline-block ? (maybe 
refresh your browser cache...)

On Monday, September 3, 2012 9:39:58 PM UTC+2, Massimo Di Pierro wrote:

 When I click on the [input] search field, and the popup appears, the [add] 
 button moves to the right of the popup. :-(


 On Monday, 3 September 2012 14:24:26 UTC-5, Niphlod wrote:

 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: addrow2-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?




-- 





[web2py] Re: SQLFORM.grid CSS help

2012-09-03 Thread Massimo Di Pierro
You are right but now I am running into another problem...

I am using a grid on an older 1.99.7 apps using skeleton. The console is 
messed up badly, even after replacing web2py.css. There should be a way to 
make this work that does not break the 1.99.7 scaffolding apps.

Massimo

On Monday, 3 September 2012 14:44:26 UTC-5, Niphlod wrote:

 that should definitely not happen. tested on ff and chromium.
 that happened before I switched from
 .web2py_console form {
 width: 100%;
 display: inline;
 vertical-align: middle;
 margin: 0 0 0 5px;
 }
 to 
 .web2py_console form {
 width: 100%;
 display: inline-block;
 vertical-align: middle;
 margin: 0 0 0 5px;
 }
 Can you please check if form is displayed as inline-block ? (maybe 
 refresh your browser cache...)

 On Monday, September 3, 2012 9:39:58 PM UTC+2, Massimo Di Pierro wrote:

 When I click on the [input] search field, and the popup appears, the 
 [add] button moves to the right of the popup. :-(


 On Monday, 3 September 2012 14:24:26 UTC-5, Niphlod wrote:

 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: addrow2-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?




--