Page 1 of 1

Bug Fix: IWP Module

PostPosted: Thu Sep 06, 2007 4:28 pm
by John Sindelar
The Issue

FileMaker Server 9 renders our iPhone buttons a little differently than Server 8 so we've changed our custom functions so the buttons work in both versions. We've also fixed a broken link on the iPhone Contact's screen in the IWP Module.

This affects versions of the IWP Module for SeedCode Complete prior to 2.2

The Fix

You'll change the definition of two custom functions. If you're not using FileMaker Advanced, please get in touch so that we can make these changes for you (at no charge).

Here are the new definitions...

SeedCode_WebViewerButton
Code: Select all
/*

Label: The text of the button like "Cancel".
Color: The hex value of the button color, suvh as "#FFFFFF" for white.
Size: The text size in pixels, such as "48px".

*/


"data:text/html," &


"<html>
<head>
<STYLE TYPE=text/css>
body {
    font-family: Helvetica;
    //background: #CCCCCC;
}
.button {
    padding: 0;
    height: 28px;
    line-height: 38px;
    font-size: " & Size & ";
    font-weight: bold;
    color: " & Color & ";
    text-shadow: rgba(0, 0, 0, 0.8) 0px -1px 0;
    text-decoration: none;
    background: none;
}
</STYLE>
</head>
<BODY>
<center>
<a class=button>" & Label & "</a>
</center>
</html>"


SeedCode_WebViewerLink
Code: Select all
/*

Content: Any phone number, email address, or URL.
Size: The text size in pixels, such as "38px".

*/

If ( not IsEmpty ( Content ) and Content ≠ "?" ;

"data:text/html," &
"<html>
<head>
<STYLE TYPE=text/css>
p { padding: 0px;
   text-align: left;
   font-size: " & Size & ";   
        font-family: helvetica, sans-serif;
   font-weight: normal;
   list-style: none;
}
</STYLE>
</head>
<BODY>" &

Case (

PatternCount ( Content ; "@" ) ; "<p><a href=mailto:" & Content &">" & Content & "</a></p>" ;
PatternCount ( Content ; "http" ) ; "<p><a href=" & Content &">" & Content & "</a></p>" ;
PatternCount ( Content ; "www" ) ; "<p><a href=http://" & Content &">" & Content & "</a></p>" ;
"<p>" & Content & "</p>"

)// End Case

& "</BODY>
</html>"

)


When it comes to the broken link on the contact's screen (layout no. 7), remove the field for the contact's email address (the one below their phone number). In its place, copy ant paste one of the web viewers from the "other phone..." section further down the screen. Change the web viewer's address to [code]SeedCode_WebViewerLink ( Contact::ContactEmailMainCalc ; "38px" )[code]. Position this so that the left edge is at 280px and the top at 455px.

That's it!