Thursday, July 31, 2008

Genie: GlobalResource.RESX post amended

I have amended the text of the following post based on information from Jean Billingham at Inmagic, Inc. that Genie automatically uses the GlobalResource.en-US.RESX file if it is present. Thanks, Jean!

Genie: changing the text of messages not configurable elsewhere

Thursday, July 24, 2008

Genie: Adding fields to the Edit Catalog Record page so they appear regardless of which tab is selected

The Edit Catalog Record page has tabs, each of which shows a different subset of fields. Sometimes it's helpful to have fields that are always visible, regardless of which tab is selected, as in the screenshot below.


To do this, you add the fields above the first <SubSection> tag. For example:

<!-- ========CATALOG Edit Screen======== -->
<inmg:EditScreen Name="catalog_edit" TitleForAdd="Add New Catalog Record" TitleForEdit="Edit Catalog Record" TitleCss="tblheader">
<Toolbar Title="Data Entry Toolbar">
<Button Name="Add" Text="Add Record"/>
<Button Name="Save" Text="Save"/>
<Button Name="New" Text="New"/>
<Button Name="Delete" Text="Delete"/>
<Button Name="Duplicate" Text="Duplicate"/>
<Button Name="EditItem" Text="Edit Items" NewRow="true"/>
<!--<Button Name="GenerateItems" Text="Generate Items"/>-->
</Toolbar>
<EditSection SectionType="TabStrip">
<Field Style= "font-weight: bold" CellSpacing="0" CellPadding="6" Width="100%" Align="center">%%StartTable</Field>
<Field>%%StartRow</Field>
<Field Width="50%" Name="CatDateCreated" Type="TextBox" CssClass="catalog_readonly" NumLines="1"/>
<Field Width="50%" Name="CatDateModified" Type="TextBox" CssClass="catalog_readonly" NumLines="1"/>
<Field>%%EndRow</Field>

<Field>%%EndTable</Field>
<SubSection Name="Biblio1" Title="Biblio 1">
...

With the code above, the added boxes line up with the boxes on the tabs at the minimum supported screen resolution for Genie (1024x768). However, if you use a higher screen resolution, the two added boxes start creeping towards the right.

To address this, remove the following:

  • Width="100%" in the %%StartTable line
  • Align="center" in the %%StartTable line
  • Width="50%" in the line for each textbase field

Then add to the Style= as shown below.

<EditSection SectionType="TabStrip">
<Field Style="width:700px;align:left;font-weight: bold" CellSpacing="0" CellPadding="6">%%StartTable</Field>
<Field>%%StartRow</Field>
<Field Name="CatDateCreated" Type="TextBox" CssClass="catalog_readonly" NumLines="1"/>
<Field Name="CatDateModified" Type="TextBox" CssClass="catalog_readonly" NumLines="1"/>
<Field>%%EndRow</Field>
<Field>%%EndTable</Field>
<SubSection Name="Biblio1" Title="Biblio 1">

Thursday, July 17, 2008

Genie: Using hanging indentation for TipContent in MyEditScreens.config

The How To tips on the Loans Check Items In and Check Items Out pages use numbered steps. Changing the steps to use hanging indentation is as simple as using an HTML ordered list (<ol>). However, by default an ordered list has inherent indentation that causes the tips to wrap more than necessary.

I used a style= in my <ol> tag to specify a margin-left value with less indentation. See the screenshot and sample MyEditScreens.config snippet below.



<EditTips ShowIcon="true" Title="How To Check Out" ImageURL="Images/xp_bulb.gif"
TipContent="&lt;ol style=&quot;margin-left:25px;&quot;&gt;&lt;li&gt;&lt;p&gt;Enter the borrower name or number.&lt;/li&gt;&lt;br&gt;&lt;br&gt;
&lt;li&gt;Type or scan item bar codes into the Items box, each on a separate line. &lt;/li&gt;&lt;br&gt;&lt;br&gt;
&lt;li&gt;Select a loan term from the Term of Loan drop-down list.&lt;/li&gt;&lt;br&gt;&lt;br&gt;
&lt;li&gt;Click the &lt;b&gt;Check Out&lt;/b&gt; button.&lt;/li&gt;&lt;/ol&gt;"/>

Note: I used two <br> instead of <p>stuff</p> because it resulted in less vertical space between steps, and was easier than tracking down the line-spacing style for the <p> tag.