Field Alignment and formatting [message #2745] |
Tue, 19 July 2011 09:12 |
grim
Messages: 11 Registered: July 2011 Location: Surrey, UK
|
Junior Member |
|
|
Hi, I am very new to Radicore. I was drawn to it because of its workflow capabilities. I have installed Radicore on one of my Linux servers and its working fine. I am investigating its features and trying to get my head round them!!
I have a question around formating. I am displaying some figures using pattern list 1. I would like to be able to display the date as dd/mm/yyyy and to right justify the content of some numeric fields.
I have made all of the list 1 fields right justify by adding text-align: right to tr.even td and tr.odd td in the stype_custom.css. I haven't managed to do it for a single column yet. Am I going about this the correct way or should I be doing the mod somewhere else?
With regards to the date format change, I am not at all sure where I should be making these changes.
Any help will be greatly appreciated.
Thanks and regards
Graham Jones
|
|
|
|
|
|
|
Re: Field Alignment and formatting [message #2751 is a reply to message #2750] |
Wed, 20 July 2011 14:21 |
AJM
Messages: 2368 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
That code causes <COL ALIGN="RIGHT" /> to be inserted into the HTML output, and this has always worked in IE (certainly up to version 7) and Opera. This is in accordance with the HTML specification in section 11.2.4 and 11.3.2.
This does not work in Firefox due to bug#915, and I have just noticed that it no longer works in Safari.
It does not work in Google Chrome due to bug#12094.
I *DO* wish these browser developers would learn to read the W3C specifications and implement them properly!!!
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
Re: Field Alignment and formatting [message #2752 is a reply to message #2751] |
Thu, 21 July 2011 11:25 |
AJM
Messages: 2368 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
If <COL ALIGN="RIGHT" /> does not work then <COL CLASS="right" /> should, as both are valid according to the HTML 4.01 specification. It would appear that <COL ALIGN="RIGHT" /> will not be supported in HTML 5, but <COL CLASS="right" /> is still there, so *should* be supported by *ALL* browsers.
Note that CLASS="right" indicates a CSS class with the following contents:
.right {
text-align: right;
}
This works in IE7, but not in IE8 (I don't know about IE9). It also does *NOT* work in Safari 5.0.5, Opera 11.50 and Firefox 5.0. Does anybody know a method of achieving this which *IS* supported by all browsers? Or is that too much to hope for?
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
Re: Field Alignment and formatting [message #2753 is a reply to message #2752] |
Thu, 21 July 2011 13:41 |
AJM
Messages: 2368 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
After playing around the only solution I have found that works in all the browsers at my disposal (IE7, IE8, Firefox, Opera and Safari) is to move the attribute from the <COL> element and add it to every <TD> element in the relevant column.
I have changed my code so that the 'align' and 'valign' attributes will be changed to 'class' instead. This means that:
'align' => 'left|center|right|justify' and'valign' => 'top|middle|bottom'
will be inserted into the XML file as if it were
'class' => 'left|center|right|justify|top|middle|bottom'
This means that existing screen structure files will produce the desired results without having to be modified manually to change 'align/valign' to 'class'.
I will release these modifications at the end of the month, but in the meantime you can test them out in the online demo application.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
|
|
|
Re: Field Alignment and formatting [message #2760 is a reply to message #2758] |
Fri, 22 July 2011 12:41 |
AJM
Messages: 2368 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
Each release contains a copy of all the files, not just the ones that have changed since the previous release. You may re-install the whole kit and caboodle, or you may sort the zip file by date and extract only those files which have a change date which is greater than that of the release which you have currently loaded.
There is a file in the root directory called 'radicore-CCYY-MM-DD.txt' which contains a complete history of all changes. This may contain instructions on running an SQL script to update one of the databases.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
|
|
|