Layout improvements. Change default inner padding for html_frame_start() from 5 to 0, this

lets us eliminate the white spacing between frames and their contents. Add in a
div.default_container class that has a 5px padding to replace the now not present default
spacing.
This commit is contained in:
Chris Morgan
2007-05-02 01:08:22 +00:00
committed by WineHQ
parent 11ecfa230b
commit 25edd78c73
24 changed files with 106 additions and 28 deletions

View File

@@ -27,6 +27,8 @@ if(!empty($aClean['sSubmit']))
apidb_header("Edit Application Version");
echo "<div class='default_container'>\n";
echo "<form method=post action='editAppVersion.php'>\n";
if($_SESSION['current']->hasPriv("admin"))
@@ -65,6 +67,9 @@ if(!empty($aClean['sSubmit']))
}
echo html_back_link(1,$oVersion->objectMakeUrl());
echo "</div>\n";
apidb_footer();
}
?>

View File

@@ -220,6 +220,9 @@ TD.app_name { width: 150px }
/* Note box */
.note { padding: 7px; }
/* Default div style */
div.default_container { padding: 5px; }
/*******************************************************************/
/* Specific elements */
/*******************************************************************/

View File

@@ -36,6 +36,8 @@ if($_SESSION['current']->hasPriv("admin") && $aClean['iCatId'] != 0)
//output header
apidb_header("Browse Applications");
echo "<div class='default_container'>\n";
if($subs)
{
echo html_frame_start("",'98%','',2);
@@ -125,6 +127,8 @@ if($apps)
echo p();
echo "</div>\n";
apidb_footer();
?>

View File

@@ -8,7 +8,10 @@ require(BASE."include/incl.php");
require_once(BASE."include/user.php");
apidb_header("Appdb Statistics");
echo html_frame_start("","60%","",0);
echo "<div class='default_container'>\n";
echo html_frame_start("","60%","");
echo "<table width='100%' border=1 cellpadding=3 cellspacing=0>\n\n";
/* Display the number of users */
@@ -85,6 +88,9 @@ echo " <td>".appData::objectGetEntriesCount("false", false, "screenshot")."</
echo "</tr>\n\n";
echo "</table>\n\n";
echo "</div>\n";
echo html_frame_end("&nbsp;");
apidb_footer();
?>

View File

@@ -11,6 +11,8 @@ require_once(BASE."include/application.php");
apidb_header("Browse Applications by Rating");
echo "<div class='default_container'>\n";
$sPathtrail = "<a href=\"browse_by_rating.php\">Main</a>";
echo html_frame_start("", '98%', '', 2);
@@ -175,6 +177,7 @@ if (empty($aClean['sRating']))
echo "</center>";
}
echo "</div>\n";
apidb_footer();

View File

@@ -9,6 +9,8 @@ require(BASE."include/incl.php");
apidb_header("Browse Downloadable Applications");
echo "<div class='default_container'>\n";
/* Match specific license? */
$sLicense = version::checkLicense($aClean['sLicense']);
@@ -129,4 +131,6 @@ if($hResult && mysql_num_rows($hResult))
echo html_frame_end("&nbsp;");
}
echo "</div>\n";
?>

View File

@@ -21,6 +21,8 @@ function display_index ()
apidb_header("Documentation Index");
echo "<div class='default_container'>\n";
echo "<p><b>Providing all the help you need 24x7</b><p><hr noshade>\n";
echo "<ul>\n";
@@ -52,7 +54,9 @@ function display_index ()
echo "</ul><hr noshade>\n";
echo "<p>Need more help? Contact us at <a href='mailto:".APPDB_OWNER_EMAIL."'>".APPDB_OWNER_EMAIL."</a><p>\n";
echo "</div>\n";
apidb_footer();
}
@@ -68,11 +72,13 @@ function display_help ($topic)
}
apidb_header($title);
echo "<div class='default_container'>\n";
if(file_exists($file)) {
include($file);
} else {
echo "<p><b> No help available on that topic </b><p>\n";
}
echo "</div>\n";
apidb_footer();
}

View File

@@ -515,7 +515,7 @@ class Application {
echo '<input type="hidden" name="bMainAppForm" value="true" />'."\n";
echo html_frame_start("Application Form", "90%", "", 0);
echo "<table width='100%' border=0 cellpadding=2 cellspacing=0>\n";
echo "<table class='color0' width='100%' border=0 cellpadding=2 cellspacing=0>\n";
echo '<tr valign=top><td class="color0"><b>Application name</b></td>',"\n";
echo '<td><input size="20" type="text" name="sAppName" value="'.$this->sName.'"></td></tr>',"\n";
@@ -542,7 +542,7 @@ class Application {
echo '<td><input size="20" type=text name="sAppWebpage" value="'.$this->sWebpage.'"></td></tr>',"\n";
echo '<tr valign=top><td class="color0"><b>Keywords</b></td>',"\n";
echo '<td><input size="90%" type="text" name="sAppKeywords" value="'.$this->sKeywords.'"></td></tr>',"\n";
echo '<td><input size="75%" type="text" name="sAppKeywords" value="'.$this->sKeywords.'"></td></tr>',"\n";
echo '<tr valign=top><td class="color0"><b>Application description</b></td>',"\n";
echo '<td><p><textarea cols="80" rows="20" id="app_editor" name="shAppDescription">';

View File

@@ -138,9 +138,16 @@ class application_queue
submissons; a list of potential duplicates is displayed on the next page */
if(!$this->oApp->sName)
{
echo "<input type=\"text\" name=\"sAppName\" size=\"60\" />\n";
echo "<div style='margin:auto; width: 500px; border:1px solid; background-color:#eee; padding:2px; '>\n";
echo "<div style='font-weight:bold; padding:3px;'>\n";
echo "Application name:\n";
echo "</div>\n";
echo "<div style='padding:5px;'>\n";
echo "<center><input type=\"text\" name=\"sAppName\" style='width:485px;' /></center>\n";
echo "</div>\n";
echo "<input type=\"hidden\" name=\"sSub\" value=\"view\" />\n";
echo "<input type=\"hidden\" name=\"sAppType\" value=\"application\" />\n";
echo "</div>\n";
} else
{
/* Show potential duplicates */

View File

@@ -343,16 +343,16 @@ class distribution {
$this->sName = str_replace('"', '&quot;', $this->sName);
// Name
echo html_tr(array(
array("<b>Distribution Name</b>", 'class="color1"'),
array("<b>Distribution Name:</b>", 'align=right class="color0"'),
array('<input type=text name="sDistribution" value="'.$this->sName.
'" size="50" />', 'class="color0"')
'" size="60" />', 'class="color0"')
));
// URL
echo html_tr(array(
array("<b>Distribution URL</b>", 'class="color1"'),
array("<b>Distribution URL:</b>", 'align=right class="color0"'),
array('<input type=text name="sUrl" value="'.$this->sUrl.
'" size="50" />', 'class="color0"')
'" size="60" />', 'class="color0"')
));

View File

@@ -67,7 +67,7 @@ class downloadurl
$sReturn .= html_frame_start("Download URL", "90%", "", 0);
$sReturn .= "<form method=\"post\" action=\"$sFormAction\">\n";
$sReturn .= html_table_begin("width=100%");
$sReturn .= html_table_begin("border=0 cellpadding=5 cellspacing=0 width=100%");
$sReturn .= html_tr(array(
array("<b>Remove</b>", "width=\"90\""),
"<b>Description</b>",
@@ -242,20 +242,20 @@ class downloadurl
$sReturn .= html_frame_start("Download URL","90%");
$sReturn .= html_table_begin("");
$sReturn .= html_table_begin("width='100%' border=0 cellpadding=2 cellspacing=0");
$sReturn .= "A place where this version can be downloaded for free".
" (if applicable). You can add more links later.<br />";
$sReturn .= html_tr(array(
array("Download URL", "valign=\"top\""),
array("<b>Download URL:</b>", "align=right"),
array("<input type=\"text\" name=\"sDownloadUrlUrl\" ".
"value=\"$sDownloadUrlUrl\" size=\"60\" />",
"class=\"color4\"")),
"color0");
$sReturn .= html_tr(array(
array("Download URL Description", "valign=\"top\""),
array("<b>Download URL Description:</b>", "align=right"),
array("<input type=\"text\" name=\"sDownloadUrlDescription\" ".
"value=\"$sDownloadUrlDescription\" size=\"60\" />",
"class=\"color4\"")),

View File

@@ -4,6 +4,7 @@ require_once(BASE."include/util.php");
/**************/
/* Login Form */
/**************/
echo "<div class='default_container'>\n";
echo '<form method="post" name="sFlogin" action="account.php">',"\n";
echo html_frame_start("Login to Application DB","400","",0)
?>
@@ -42,6 +43,7 @@ echo html_frame_end("&nbsp;");
echo '<input type="hidden" name="sCmd" value="do_login">',"\n";
echo '<input type="hidden" name="sExtReferer" value="'.$_SERVER['HTTP_REFERER'].'">',"\n";
echo '</form>',"\n";
echo "</div>\n";
?>

View File

@@ -5,6 +5,7 @@ require_once(BASE."include/util.php");
/* New Account Form */
/********************/
echo "<div class='default_container'>\n";
echo '<form method="post" action="account.php">',"\n";
echo html_frame_start("Create New Application DB Account","400","",0)
?>
@@ -48,6 +49,7 @@ echo html_frame_start("Create New Application DB Account","400","",0)
echo html_frame_end("&nbsp;");
echo '<input type="hidden" name="sCmd" value="do_new">',"\n";
echo '</form>',"\n";
echo "</div>\n";
echo p(),p(),p();

View File

@@ -160,7 +160,7 @@ function html_imagebutton($text, $url, $extra = "")
}
function html_frame_start($title = "", $width = "", $extra = "", $innerPad = 5)
function html_frame_start($title = "", $width = "", $extra = "", $innerPad = 0)
{
if ($width) { $width = 'width="'.$width.'"'; }

View File

@@ -121,6 +121,9 @@ class ObjectManager
$this->checkMethods(array("outputEditor", "getOutputEditorValues",
"update", "create"));
// open up the div for the default container
echo "<div class='default_container'>\n";
// link back to the previous page
echo html_back_link(1, $sBackLink);
@@ -191,6 +194,8 @@ class ObjectManager
echo '</form>';
echo "</div>\n";
}
/* Display help for queue processing */
@@ -304,6 +309,8 @@ class ObjectManager
$oObject = new $this->sClass();
echo "<div class='default_container'>\n";
/* Display errors, if any, and fetch form data */
if($this->displayErrors($sErrors))
{
@@ -328,6 +335,8 @@ class ObjectManager
echo "</div></form>\n";
echo html_back_link(1, $sBackLink);
echo "</div>\n";
}
function handle_anonymous_submission()

View File

@@ -619,7 +619,7 @@ class testData{
echo '<a href="'.BASE.'/help/?sTopic=maintainer_ratings" target="_blank">Rating definitions</a></td></tr>',"\n";
// extra comments
echo '<tr valign=top><td class="color1"><b>Extra comments</b></td>',"\n";
echo '<td class="color0"><textarea name="sComments" rows=10 cols=35>';
echo '<td class="color0"><textarea name="sComments" rows=10 cols=65>';
echo $this->sComments.'</textarea></td></tr>',"\n";
echo '<input type="hidden" name="iVersionId" value="'.$this->iVersionId.'" >';

View File

@@ -276,7 +276,7 @@ class Url {
$sReturn .= html_frame_start("URLs", "90%", "", 0);
$sReturn .= "<form method=\"post\" action=\"$sFormAction\">\n";
$sReturn .= html_table_begin("width=100%");
$sReturn .= html_table_begin("border=0 cellpadding=5 cellspacing=0 width=100%");
$sReturn .= html_tr(array(
array("<b>Remove</b>", "width=\"90\""),
"<b>Description</b>",

View File

@@ -154,11 +154,15 @@ class Vendor {
echo "<table width='100%' border=0 cellpadding=2 cellspacing=0>\n";
// Name
echo '<tr valign=top><td class="color1" width="20%"><b>Vendor Name</b></td>',"\n";
echo '<td class="color0"><input type=text name="sVendorName" value="'.$this->sName.'" size="50"></td></tr>',"\n";
echo html_tr(array(
array("<b>Vendor Name:</b>", 'align=right class="color0"'),
array('<input type=text name="sVendorName" value="'.$this->sName.'" size="60">', 'class="color0"')
));
// Url
echo '<tr valign=top><td class="color1"><b>Vendor Url</b></td>',"\n";
echo '<td class="color0"><input type=text name="sVendorWebpage" value="'.$this->sWebpage.'" size="50"></td></tr>',"\n";
echo html_tr(array(
array("<b>Vendor URL:</b>", 'align=right class="color0"'),
array('<input type=text name="sVendorWebpage" value="'.$this->sWebpage.'" size="60">', 'class="color0"')
));
echo '<input type="hidden" name="iVendorId" value="'.$this->iVendorId.'">',"\n";

View File

@@ -591,7 +591,7 @@ class Version {
{
HtmlAreaLoaderScript(array("version_editor"));
echo html_frame_start("Version Form", "90%", "", 0);
echo "<table width='100%' border=0 cellpadding=2 cellspacing=0>\n";
echo "<table class='color0' width='100%' border=0 cellpadding=2 cellspacing=0>\n";
echo '<input type="hidden" name="iVersionId" value="'.$this->iVersionId.'" />';

View File

@@ -73,6 +73,8 @@ class version_queue
{
global $aClean;
echo "<div class='default_container'>\n";
/* Display duplicate list if this is a an existing version */
if($this->oVersion->iVersionId)
$this->displayMoveTestTable();
@@ -85,22 +87,28 @@ class version_queue
if(!$this->oVersion->iVersionId && $this->oVersion->iAppId)
{
echo html_frame_start("Become Maintainer", "90%");
echo "<table>";
echo "<div style='padding:5px;' class='color0'>\n";
echo "<table width='100%' cellpadding=0 cellspacing=0>";
if($this->oVersion->iMaintainerRequest == MAINTAINER_REQUEST)
$sRequestMaintainerChecked = 'checked="checked"';
echo html_tr(array(
array("<b>Become maintainer?</b>", "class=\"color0\""),
"<input type=\"checkbox\" $sRequestMaintainerChecked".
"name=\"iMaintainerRequest\" value=\"".MAINTAINER_REQUEST."\" /> ".
"Check this box to request being a maintainer for this version"),
"","valign=\"top\"");
array("<b>Become maintainer?</b>", ""),
array(
"<input type=\"checkbox\" $sRequestMaintainerChecked".
"name=\"iMaintainerRequest\" value=\"".MAINTAINER_REQUEST."\" /> ".
"Check this box to request being a maintainer for this version",
"")
));
echo "</table>";
echo "</div\n";
echo html_frame_end();
}
echo $this->oDownloadUrl->outputEditorSingle($this->oVersion->iVersionId,
$aClean);
$this->oTestDataQueue->outputEditor();
echo "</div>\n";
}
function getOutputEditorValues($aClean)

View File

@@ -14,7 +14,8 @@ require(BASE."include/incl.php");
apidb_header("Wine Application Database");
?>
<img src="images/appdb_montage.jpg" width=391 height=266 align=right alt="Wine AppDB">
<div class='default_container'>
<h1>Welcome</h1>
<p>This is the Wine Application Database (AppDB). From here you get info on application
@@ -129,6 +130,7 @@ If you have screenshots or links to contribute, please browse the database and u
<a href="http://frankscorner.org"><b>Frank's Corner</b></a>: Frank has a fantastic Wine
application site, with tips and how-to's on getting listed apps to run.
</p>
</div>
<?php
apidb_footer();
?>

View File

@@ -154,6 +154,8 @@ if($aClean['sSubmit'] == "Update")
apidb_header("User Preferences");
echo "<div class='default_container'>\n";
echo "<form method=\"post\" action=\"preferences.php\">\n";
// if we manage another user we give the parameters to go back to the admin
@@ -178,5 +180,7 @@ echo html_frame_end();
echo "<br /> <div align=center> <input type=\"submit\" name='sSubmit' value=\"Update\" /> </div> <br />\n";
echo "</form>\n";
echo "</div>\n";
apidb_footer();
?>

View File

@@ -10,6 +10,9 @@ require_once(BASE."include/screenshot.php");
require_once(BASE."include/application.php");
apidb_header("View Screenshots");
echo "<div class='default_container'>\n";
/* display a range of 10 pages */
$pageRange = 10;
@@ -90,6 +93,8 @@ display_page_range($currentPage, $pageRange, $totalPages,
$_SERVER['PHP_SELF']."?iItemsPerPage=".$ItemsPerPage);
echo "</center>";
echo "</div>\n";
apidb_footer();
?>

View File

@@ -20,6 +20,8 @@ if(empty($aClean['iCategoryId']))
apidb_header("Vote Stats - Top ".$aClean['iTopNumber']." Applications");
echo "<div class='default_container'>\n";
/* display the selection for the top number of apps to view */
echo "<form method=\"post\" name=\"sMessage\" action=\"".$_SERVER['PHP_SELF']."\">";
echo "<b>Number of top apps to display:</b>";
@@ -187,5 +189,7 @@ if($hResult)
echo '<p align="center"><a href="help/?sTopic=voting">What does this screen mean?</a></p>';
}
echo "</div>\n";
apidb_footer();
?>