Customizing the Client Episode IV “Table Formats”

Up to this point most of the client customization I have talked about for Adobe Contribute involved changes that affected only the user interface. Outside of the custom plugin, none of them had any real effect on the usefulness of the client itself.

This customization is different, and like the addition of the Dublin Core plugin, it can have usefulness even if you are only using the Contribute client itself without the need to deploy it to multiple users in any enterprise situation.

When you create a table in Contribute, you can always setup the style of the table in the normal way by selecting the various rows, columns and cells and changing the backgrounds, font colors, etc. However, this process can be quite tedious when styling a large table, so in order to make this process easier Contribute has a Format Table feature that allows you to apply a pre-set or customized style to the entire table. This dramatically speeds the process up, but if you continually apply the same custom style to tables on your site you might like to add this to the list of pre-set table formats.

In order to do this you need to edit the file tableFormats.js. This file contains the individual table formats listed in the Format Table dialog and can be found here:

Mac – /Applications/Adobe Contribute CS3/Configuration/Commands

Win – C:\Program Files\Adobe\Adobe Contribute CS3\Configuration\Commands

There are two main sections of formats defined in this file:

  • Alternating Rows – table formats where each row has a different background color; may also have a different color for the header row.
  • Non-alternating Rows – table formats where each row has the same background color; may also have a different color for the header row.

Instructions for the creation of new formats are contained as comments in the javascript file, however there are a few things that are not mentioned:

  1. You should define a new variable in the Localized Globals section for you new table format; this is used in the Formats array when building the dialog box.
  2. The values for topRowTextStyle and topRowColor control the look of the header row. If you set these to the null values then this row will match the look set for the variables firstRowColor and will be assigned no special text attributes.
  3. While the supplied formats only show the rowLimit variable set to either 0, 1, or 2 to indicate the number of rows set to each color on an alternating row design, you can actually use larger numbers if desired.

As an example, here is the format used for the table on the Valdosta State University Calendars page:
//VSU Colors Formats[++i] = new Array(); Formats[i].name=alt_vsu; Formats[i].firstRowColor="#CCCCCC"; Formats[i].secondRowColor="#FFFFFF"; Formats[i].topRowTextStyle=BOLD; Formats[i].topRowAlign="center"; Formats[i].topRowColor="#C80F0A"; Formats[i].topRowTextColor="#FFFFFF"; Formats[i].leftColTextStyle=BOLD; Formats[i].leftColAlign=""; Formats[i].border="2"; Formats[i].rowLimit="1";

Adobe Contribute, Software

  • Digg
  • Stumbleupon
  • Del.icio.us
  • Reddit
  • Technorati

If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

Leave Comment

%d bloggers like this: