Monthly Archives: December 2009

How to correct font size problem with tables in jQuery UI widgets

I just recently used jQuery UI tabs in an application. Within a couple of the tabs I used tables for content (let’s not have a religious debate about using tables for layout, please). Anyway, the font size came out much bigger than for text in a paragraph, for example- in FireFox. I looked at the custom.css file (generated by themeroller, called jquery-ui-1.7.2.custom.css) and found this line:

.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1em; }

This line is designed to handle form input types, to make sure the font size matches text in other tags such as paragraphs, etc. However, text in tables also needs to have these rules applied. To fix the problem, I copied this line and added table as a descendant selector, like so:

.ui-widget table { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1em; }

(You could also just add .ui-widget table to the overall selector).

Problem solved.

You might also be interested in reading this earlier post on How to scale the jQuery UI font size just for just the ui widgets.

Joomla 1.5 has wrong path for css, js files – edit your configuration.php file

I just moved a Joomla 1.5 install from my iMac to a hosted site. The home page showed up fine, but subsequent pages were missing all styles. It turns out that I needed to change the variable $live_site in configuration.php from ” to = ‘http://www.example.com/mypath’. I’m not clear on why it worked on my MAMP install but not on the ISP, but apparently this is a common Joomla 1.5 install problem, as noted at this Joomla forum thread. (Scroll down to see Anthony Ferrara’s (aka ircmaxell) response on Feb 21, 2008 – ignore all the other bogus parts of the thread). Anthony is apparently a member of the core development team, on the bug squad. Thanks, Anthony!

Using Aptana Studio 2.0 and PDT Plugin for Drupal Module Development

Aptana now uses the official Eclipse PDT (PHP Development Tools) plugin instead of their own PHP editor. I have Aptana 2.0.2, build date November 10 2009 on my Macbook.  I’m building a Drupal module, so I need to have PDT recognize (and correctly color-code) files with .module, .info and .install extensions.  There is a Drupal Article on configuring PDT as an Eclipse Plugin, but the steps are different for doing it in Aptana Studio.

The process is quite simple – basically 3 steps. Here they are (assuming you’ve got the PDT plugin installed already):

In Aptana Studio, click on the Aptana Studio/Preferences, expand the General link and click on Content Types: Aptana Preferences General tab

Next, expand the Text link. This will show you a list of content types supported in the editor. Scroll down until you see the PHP entry:

Aptana Content Types Associated with Editor

You’ll see the usual PHP extensions listed in the bottom box, such as php, php3, php5. Click on the Add button to the right to add an extension needed for Drupal Module development. You’ll see a dialog like this:

Aptana Define New Content Type Association

Click OK. Repeat this step for *.info and *.install (assuming these extensions are not already used for some other language or tool). That’s it! Now, when you open a .module file, it will have the same color-coding and editing as a .php file.