Skip to content

Commit

Permalink
A handful of HTML improvements from David Adams.
Browse files Browse the repository at this point in the history
Jon added a Knar value for the URL behind the "About" button and turned
off extra "Ok" and "Cancel" buttons at top of UI_STD_DBEDIT_TABLE unless
there are more than 4 rows displayed on the screen.
  • Loading branch information
jonjensen committed Sep 22, 2000
1 parent e265d7b commit d301d4f
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 50 deletions.
90 changes: 45 additions & 45 deletions dist/lib/UI/vars/UI_STD_DBEDIT_TABLE
Expand Up @@ -40,33 +40,41 @@ EOF
[/else]
[/if-key-exists]

<table width="60%" border="" cellspacing="0" cellpadding="0" bordercolor="__UI_C_TITLEBARBG__">
<tr>
<td>

<table cellspacing=0 cellmargin=0 width="100%" cellpadding="2" align="center" border="0">
<table width="95%"><tr><td BGCOLOR="__UI_C_TOPBLOCKBAR__">
<table width="100%"><tr><td BGCOLOR="__UI_C_TITLEBARBG__">
<table CELLSPACING=0 CELLMARGIN=0 WIDTH="100%">

<tr bgcolor="__UI_C_TITLEBARBG__">
<td align=right colspan=2><img src="admin/bg.gif" width=1 height=3></td>
</tr>

<TR BGCOLOR="__UI_T_ROW_EVEN__">
<td>&nbsp;</td>
<td align=left>
<B>[button text=" Ok "]
[comment]
Display an extra Ok/Cancel button pair if there are more than
4 rows of input, so user doesn't have to scroll to bottom of page.
[/comment]
[calc]
my $linecount = (split / /, $CGI->{ui_data_fields}) - 1;
my $out = '';
$out .= <<'EOF' if $linecount > 4;
<TR BGCOLOR="__UI_T_ROW_ODD__">
<TD BGCOLOR="__UI_C_TITLEBARBG__" ALIGN=right>
&nbsp;
</TD>
<TD VALIGN=TOP>
<B>[button text="Ok"]
[return-to click]
[/button]</B>
&nbsp;
[button text=" Cancel "]
&nbsp;
[button text="Cancel"]
mv_todo=return
[return-to click]
mv_data_table=[cgi mv_data_table]
[/button]
</TD>
</TR>
EOF
return $out;
[/calc]

<tr BGCOLOR="__UI_C_TITLEBARBG__">
<td colspan=2><img src="admin/bg.gif" width=1 height=3></td>
<tr>
<td colspan=2 BGCOLOR="__UI_C_TOPBLOCKBAR__"><img src="admin/bg.gif" height=3></td>
</tr>

[seti extra_tables]
Expand Down Expand Up @@ -163,21 +171,14 @@ EOF
arbitrary => $CGI->{ui_meta_view},
fallback => 1,
template => q(
<TR BGCOLOR="__UI_T_ROW_EVEN__">
<td align=left width=150>
<font color="__UI_C_TEXT__" size="-1"><b>$LABEL$</b>~META~
</td>
<td valign=TOP>
<table cellspacing=0 cellmargin=0>
<tr>
<td>
<FONT SIZE="-1">$WIDGET$</FONT>
</td>
<td><FONT SIZE="-1"><i>$HELP$</i>{HELPURL}<BR><A HREF="$HELP_URL$">help</A>{/HELPURL}</FONT></td>
</tr>
</table>
</td>
</tr>
<TR BGCOLOR="__UI_T_ROW_ODD__">
<TD BGCOLOR="__UI_C_TITLEBARBG__" ALIGN=right>
<FONT COLOR="__UI_C_TITLEBARTXT__"><B>$LABEL$</B>~META~</FONT>
</TD>
<TD VALIGN=TOP>
<TABLE CELLSPACING=0 CELLMARGIN=0><TR><TD>$WIDGET$</TD><TD><I>$HELP$</I>{HELPURL}<BR><A HREF="$HELP_URL$">help</A>{/HELPURL}</TD></TR></TABLE>
</TD>
</TR>
),
});
if($super and ($Variable->{UI_META_LINK} || $Values->{ui_meta_force}) ) {
Expand Down Expand Up @@ -214,23 +215,24 @@ EOF
#next;
#}
$Document->write(<<EOF) if $break{$col};
<TR BGCOLOR="__UI_T_ROW_ODD__">
<TD ALIGN=RIGHT COLSPAN=2><IMG SRC="admin/bg.gif" WIDTH=1 HEIGHT=1></TD>
</TR>
<tr>
<td colspan=2 BGCOLOR="__UI_C_TOPBLOCKBAR__"><img src="admin/bg.gif" height=3></td>
</tr>
EOF
$display =~ s/\~META\~/$meta/g;
$Document->write($display);
}
%>
[/mvasp]

<tr>
<td colspan=2 BGCOLOR="__UI_C_TITLEBARBG__"><img src="admin/bg.gif" height=3></td>
<td colspan=2 BGCOLOR="__UI_C_TOPBLOCKBAR__"><img src="admin/bg.gif" height=3></td>
</tr>

<TR BGCOLOR="__UI_T_ROW_EVEN__">
<td>&nbsp;</td>
<td align=left>
<TR BGCOLOR="__UI_T_ROW_ODD__">
<TD BGCOLOR="__UI_C_TITLEBARBG__" ALIGN=right>
&nbsp;
</TD>
<TD VALIGN=TOP>
<B>[button text="Ok"]
[return-to click]
[/button]</B>
Expand All @@ -241,6 +243,7 @@ mv_todo=return
[return-to click]
mv_data_table=[cgi mv_data_table]
[/button]

[if-mm tables =x]
<small>
&nbsp;
Expand All @@ -259,15 +262,12 @@ mv_data_table=[cgi mv_data_table]
[/if]
[/if-mm]
</small>
</td>
</tr>

<tr>
<td colspan=2 BGCOLOR="__UI_C_TITLEBARBG__"><img src="admin/bg.gif" height=3></td>
</tr>
</TD>
</TR>

</table>
</td></tr></table>
</td></tr></table>

</form>

Expand Down
11 changes: 6 additions & 5 deletions dist/lib/UI/vars/UI_STD_HEAD
Expand Up @@ -86,7 +86,7 @@ function MM_swapImage() { //v3.0
<!-- ----- BEGIN TITLEBAR ----- -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><A HREF="http://www.akopia.com"><img src="@_UI_IMG_@navigation/akopia_logo.gif" width="69" height="53" border=0></A></td><td align="right" valign="bottom" nowrap><a href="[if session logged_in][area __UI_BASE__/genconfig][else]http://developer.akopia.com/[/else][/if]" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('About','','@_UI_IMG_@navigation/A1_b.gif',1)"><img name="About" border="0" src="@_UI_IMG_@navigation/A1.gif" width="102" height="38"></a><a href="[area __UI_BASE__/index]" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Index','','@_UI_IMG_@navigation/A2_b.gif',1)"><img name="Index" border="0" src="@_UI_IMG_@navigation/A2.gif" width="294" height="38"></a><a href="javascript:open_help('__UI_HELP_BASE_URL__/[scratch help_name].html')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Help','','@_UI_IMG_@navigation/A3_b.gif',1)"><img name="Help" border="0" src="@_UI_IMG_@navigation/A3.gif" width="125" height="38"></a></td>
<td><A HREF="http://www.akopia.com"><img src="@_UI_IMG_@navigation/akopia_logo.gif" width="69" height="53" border=0></A></td><td align="right" valign="bottom" nowrap><a href="[if session logged_in]@_UI_ABOUT_NORMAL_URL_@[else]@_UI_ABOUT_LOGIN_URL_@[/else][/if]" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('About','','@_UI_IMG_@navigation/A1_b.gif',1)"><img name="About" border="0" src="@_UI_IMG_@navigation/A1.gif" width="102" height="38"></a><a href="[area __UI_BASE__/index]" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Index','','@_UI_IMG_@navigation/A2_b.gif',1)"><img name="Index" border="0" src="@_UI_IMG_@navigation/A2.gif" width="294" height="38"></a><a href="javascript:open_help('__UI_HELP_BASE_URL__/[scratch help_name].html')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Help','','@_UI_IMG_@navigation/A3_b.gif',1)"><img name="Help" border="0" src="@_UI_IMG_@navigation/A3.gif" width="125" height="38"></a></td>
</tr></table>

[tmp ui_menu_content]code img_dn img_up img_sel page url alt name
Expand Down Expand Up @@ -145,15 +145,15 @@ function MM_swapImage() { //v3.0
#Log("Form is: $form");
my $out = '';
$out .= <<'EOF' if ! $sm_once++;
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="__UI_C_TOPBLOCKBAR__"><img src="@_UI_IMG_@navigation/spacer3.gif" width=1 height=1></td>
</tr>
<tr bgcolor="A1C6FF">
<td><img src="@_UI_IMG_@navigation/spacer4.gif" width=1 height=1></td>
</tr>
<tr bgcolor="__UI_C_TITLEBARBG__">
<td valign=center nowrap><font face="Verdana, Arial, Helvetica, sans-serif" size="-1"><img src="admin/bg.gif" height=19 width=3 align=middle><b>&nbsp;&nbsp;&nbsp;&nbsp;
<td valign=center nowrap><font face="Verdana, Arial, Helvetica, sans-serif" size="-1"><img src="admin/bg.gif" height=19 width=3 align=middle>&nbsp;&nbsp;&nbsp;&nbsp;
EOF
$out .= $pre;
$out .= q{</td></tr><tr bgcolor="__UI_C_INTBLOCKBAR__"><td nowrap valign=center><img src="admin/bg.gif" height=19 width=3 align=middle>}
Expand Down Expand Up @@ -182,13 +182,14 @@ EOF
$fc = q{__UI_C_TITLEBARTXT__};
}

$out .= qq{<FONT COLOR="$fc" SIZE="-1">$name</FONT>};
$out .= qq{<FONT face="Verdana, Arial, Helvetica, sans-serif" COLOR="$fc" SIZE="-1">$name</FONT>};
$out .= '</A>' if $page;
$out .= $post;
[/sm-calc]&nbsp;&nbsp;&nbsp; [/loop]
[calc]
return unless $sm_once;
return '</td></tr></table>';
return q!<tr bgcolor="#000000"><td colspan=2><IMG SRC="/akopia/ui/navigation/cleardot.gif" WIDTH="1" HEIGHT="1"></td></tr>
</td></tr></table>!;
[/calc]
<!-- ----- END MENUBAR ----- -->
[if !scratch ui_no_title]
Expand Down

0 comments on commit d301d4f

Please sign in to comment.