Trying to change table colum label (capitalization problem)

A place for users and developers of the Xataface to discuss and receive support.

Trying to change table colum label (capitalization problem)

Postby kokoro » Thu Mar 12, 2009 3:52 am

Hello,

I am trying to customize the title that is displayed for the title of columns in my table by using the following:

[studentid]
widget:label="Student ID"

in the fields.ini file located in the table directory.

When I go to my Xataface app and click on the corresponding tab to view the table that contains the studentid column, the column title changes to

student id (space appears)

but the capitalization is not reflected. I'm sure this is a very simple setting/command but I couldn't manage to find anything in the documentation wiki or on the forums.

Any help will be appreciated as always.

Jason
kokoro
 
Posts: 39
Joined: Fri Feb 06, 2009 6:17 am

Postby shannah » Thu Mar 12, 2009 10:41 am

This is a stylesheet issue. Originally I adapted the plone 2.0.5 stylesheet for Xataface and it uses the text-transform css directive to make all column headings lower case.

To fix this, you can do a find in plone.css for "text-transform" and see where this is being set. The robust way to fix this is to override this directive in your own stylesheet (so that you don't need to change the Xataface sources and upgrading will be easier).

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby kokoro » Fri Mar 13, 2009 12:11 am

Steve,

Thanks but I can't seem to find the appropriate "text-transform" setting. There are 18 occurrences of "text-transform" in the plone.css file but I couldn't manage to identify the one that controls the formatting of the column titles...so I set all of them to "none" but that didn't make any changes.

Since the setting in the fields.ini file that does seem to modify the formatting somewhat is

[studentid]
widget:label="Student ID"

I looked for widget settings in the plone.css file and found a section listed under widgets with settings for

.standalone
.context
.destructive

and a few others but I don't think these are related to the table column text issue...?

I know this is a pretty minor cosmetic issue that I'm trying to tackle here but if you have any quick ideas they would be appreciated.

If I can't figure it out I'll move on to more important things like continuing with my database construction :D

Jason

P.S. I even tried commenting all the text-transform lines out :shock: but that didn't have any effect either.
kokoro
 
Posts: 39
Joined: Fri Feb 06, 2009 6:17 am

Postby shannah » Fri Mar 13, 2009 7:56 am

It looks like this is the particular rule that does it:

Code: Select all
.listing th,
.stx table th {
    background: #dee7ec;
    border-top: 1px solid #8cacbb;
    border-bottom: 1px solid #8cacbb;
    border-right: 1px solid #8cacbb;
    font-weight: normal;
    padding: 0em 1em 0em 1em;
    text-transform: lowercase;
}


You could override this easily in your own stylesheet with the rule:
Code: Select all
th {
    text-transform: none !important;
}
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby kokoro » Fri Mar 13, 2009 2:01 pm

Steve,

Thanks but I guess I am doing something incorrectly... Actually I am quite confused about how the plone.css style sheet functions in the Xataface directory. I tried modifying the line you refer to here but wasn't able to achieve any change.

In the search for the line of code that would allow for capitalized table column titles I wasn't having any luck with any of the changes I made to the stylesheet. In fact, nothing was changing at all, no matter how drastically I modified the sheet. It was at that point that I tried something drastic and removed the stylesheet completely from the directory and reloaded my application. I was surprised to see nothing change....?

Do I need to restart my webserver to get changes implemented...? Surely not...

Jason
kokoro
 
Posts: 39
Joined: Fri Feb 06, 2009 6:17 am

Postby shannah » Fri Mar 13, 2009 2:04 pm

No you don't need to restart your server. Try instead to refresh your browser, or clear your browser cache (i.e. temporary internet files) or - that failing - to consider the possibility that you are looking at the wrong plone.css file. Look a the HTML source for the resulting Xataface page and take note of the full path to plone.css to see which one is in use.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby kokoro » Fri Mar 13, 2009 8:37 pm

Steve,

I didn't think so but I was/am confused about what role the plone.css file plays. I did check the source and the plone.css file located in the Xataface directory is the one that is being used.

The strange thing is that completely removing this file has no effect on the appearance of my site/app. I took it completely out of the directory and cleared everything in my browser (cache, cookies, etc.) and rebooted the page and nothing changed. Thought that maybe I had not completely cleared everything so I tried accessing it with a different browser and still got everything as normal....

Way beyond me at this point. :(

Jason
kokoro
 
Posts: 39
Joined: Fri Feb 06, 2009 6:17 am

Postby shannah » Sat Mar 14, 2009 8:24 am

Clearly, then you are modifying a different instance of plone.css than you are using in your app. Check the HTML source of your resulting pages in Xataface to see the correct path to the plone.css file in use.

e.g.
it will havce something like
<link rel="stylesheet" href="path/to/plone.css"/>

It will be using the plone.css contained in the xataface installation that you referenced in the 2nd parameter of your df_init() method in your index.php file.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby kokoro » Sat Mar 14, 2009 5:12 pm

Steve,

Wow! I had a mess and you were correct, the plone.css file that my application was using was in a folder outside of the application....sounds strange huh

I had initially setup the Xataface application in a folder called "Myapp" in my server root as I followed the instructions here on the website and then later decided to put the application inside of a different directory below the root on my server. I guess that when I did that I somehow managed to get the index.php file pointing to the wrong directory in the df_init() code line.

So, I removed the original "myapp" directory all together and sure enough, the site broke :-) Reset the df_init() to the correct location and I am back in action.

No wonder the changes I was making to the css file weren't having any effect :oops: I really feel like a goofball now :wink:

Jason
kokoro
 
Posts: 39
Joined: Fri Feb 06, 2009 6:17 am


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 15 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved