forked from science-ation/science-ation
- Replace class "tableedit" with class "editor", undo the alignment on class tableedit
This commit is contained in:
parent
40a49c8567
commit
21d3dcd054
@ -577,7 +577,7 @@ $(document).ready(function() {
|
||||
</form>
|
||||
<form id="awardinfo">
|
||||
<input type="hidden" name="id" id="awardinfo_id" value="0" />
|
||||
<table class="tableedit">
|
||||
<table class="editor">
|
||||
<tr><td><?=i18n("Name")?>:</td>
|
||||
<td><input class="translatable" type="text" id="awardinfo_name" name="name" value="Loading..." size="50" maxlength="128">
|
||||
</td></tr>
|
||||
@ -606,27 +606,26 @@ $(document).ready(function() {
|
||||
}
|
||||
?>
|
||||
</select></td></tr>
|
||||
<tr><td><?=i18n("Criteria")?>:</td>
|
||||
<tr><td><label><?=i18n("Criteria")?>:</label></td>
|
||||
<td><textarea class="translatable" id="awardinfo_criteria" name="criteria" rows="3" cols="50">Loading...</textarea></td></tr>
|
||||
<tr><td><?=i18n("Description")?>:</td>
|
||||
<td><textarea class="translatable" id="awardinfo_description" name="description" rows="3" cols="50">Loading...</textarea></td></tr>
|
||||
</table>
|
||||
|
||||
<h4>Options</h4>
|
||||
<table class="tableedit">
|
||||
<tr><td>
|
||||
<input type="checkbox" id="awardinfo_excludefromac" name="excludefromac" value="1"></td>
|
||||
<td><?=i18n("Exclude this award from the award ceremony script")?></td></tr>
|
||||
<tr><td>
|
||||
<input type="checkbox" id="awardinfo_cwsfaward" name="cwsfaward" value="1"></td>
|
||||
<td><?=i18n("This award identifies the students that will be attending the Canada-Wide Science Fair")?></td></tr>
|
||||
<tr><td>
|
||||
<input type="checkbox" id="awardinfo_selfnominate" name="self_nominate" value="yes"></td>
|
||||
<td><?=i18n("Students can self-nominate for this award (this is usually checked for special awards)")?></td></tr>
|
||||
<tr><td>
|
||||
<input type="checkbox" id="awardinfo_schedulejudges" name="schedule_judges" value="yes"></td>
|
||||
<td><?=i18n("Allow the Automatic Judge Scheduler to assign judges to this award (usually checked)")?></td></tr>
|
||||
</table>
|
||||
<table class="editor">
|
||||
<tr> <td><input type="checkbox" id="awardinfo_excludefromac" name="excludefromac" value="1"></td>
|
||||
<td><?=i18n("Exclude this award from the award ceremony script")?></td>
|
||||
</tr><tr>
|
||||
<td><input type="checkbox" id="awardinfo_cwsfaward" name="cwsfaward" value="1"></td>
|
||||
<td><?=i18n("This award identifies the students that will be attending the Canada-Wide Science Fair")?></td>
|
||||
</tr><tr>
|
||||
<td><input type="checkbox" id="awardinfo_selfnominate" name="self_nominate" value="yes"></td>
|
||||
<td><?=i18n("Students can self-nominate for this award (this is usually checked for special awards)")?></td>
|
||||
</tr><tr>
|
||||
<td><input type="checkbox" id="awardinfo_schedulejudges" name="schedule_judges" value="yes"></td>
|
||||
<td><?=i18n("Allow the Automatic Judge Scheduler to assign judges to this award (usually checked)")?></td>
|
||||
</tr></table>
|
||||
<input type="submit" onClick="awardinfo_save();return false;" value="Save" />
|
||||
</form>
|
||||
</div>
|
||||
@ -637,7 +636,7 @@ $(document).ready(function() {
|
||||
<br />
|
||||
<form id="eligibility">
|
||||
<input type="hidden" id="eligibility_award_awards_id" name="award_awards_id" value="" />
|
||||
<table class="tableedit">
|
||||
<table class="editor">
|
||||
<tr><td><?=i18n("Age Categories")?>:</td><td>
|
||||
<?
|
||||
// if(count($currentcategories)==0) $class="class=\"error\""; else $class="";
|
||||
@ -691,7 +690,7 @@ $(document).ready(function() {
|
||||
<form id="prizeinfo">
|
||||
<input type="hidden" id="prizeinfo_id" name="id" value=""/>
|
||||
<input type="hidden" id="prizeinfo_award_awards_id" name="award_awards_id" value=""/>
|
||||
<table class="tableedit">
|
||||
<table class="editor">
|
||||
<tr>
|
||||
<td><?=i18n("Number available")?>:</td>
|
||||
<td><input type="text" id="prizeinfo_number" class="prizeinfo" name="number" value="" size="3" maxlength="5" disabled="disabled" /></td>
|
||||
@ -708,12 +707,12 @@ $(document).ready(function() {
|
||||
<td><?=i18n("Prize Value")?> ($):</td>
|
||||
<td><input type="text" id="prizeinfo_value" class="prizeinfo" name="value" value="" size="10" maxlength="10" disabled="disabled" /></td>
|
||||
</tr><tr>
|
||||
<td valign="top"><?=i18n("Plaque/Trophy")?>:</td>
|
||||
<td><?=i18n("Plaque/Trophy")?>:</td>
|
||||
<td>
|
||||
<table>
|
||||
<tr> <td style="width:5%;"><input type="checkbox" id="prizeinfo_trophystudentkeeper" class="prizeinfo" name="trophystudentkeeper" value="1" disabled="disabled"></td>
|
||||
<td style="width:45%"><?=i18n("Student(s) keeper trophy")?></td>
|
||||
<td style="width:5%;"><input type="checkbox" id="prizeinfo_trophystudentreturn" class="prizeinfo" name="trophystudentreturn" value="1" disabled="disabled"></td>
|
||||
<td style="width:5%;"><input type="checkbox" id="prizeinfo_trophystudentreturn" class="prizeinfo" name="trophystudentreturn" value="1" disabled="disabled"></td>
|
||||
<td style="width:45%"><?=i18n("Student(s) annual return/reuse trophy")?></td>
|
||||
</tr><tr>
|
||||
<td style="width:5%;"><input type="checkbox" id="prizeinfo_trophyschoolkeeper" class="prizeinfo" name="trophyschoolkeeper" value="1" disabled="disabled"></td>
|
||||
@ -741,7 +740,7 @@ $(document).ready(function() {
|
||||
<input type="hidden" id="feeder_id" name="award_awards_id" value=""/>
|
||||
<p><input type="checkbox" id="feeder_enable" name="enable" value="yes" onchange="update_feeder_enable()" />
|
||||
<?=i18n("Allow feeder fairs to download this award.")?></p>
|
||||
<table class="tableedit">
|
||||
<table class="editor">
|
||||
<tr><td><?=i18n('Unique Name')?>:</td>
|
||||
<td><input type="text" id="feeder_identifier" name="identifier" value="" size="40" maxlength="128" /></td></tr>
|
||||
<tr><td><input type="checkbox" id="feeder_register_winners" name="register_winners" value="1" /></td>
|
||||
|
@ -419,7 +419,7 @@ $(document).ready(function() {
|
||||
<input type="hidden" name="award_source_fairs_id" id="award_source_fairs_id" value="0" />
|
||||
<h4><?=i18n("Category Mapping")?></h4>
|
||||
<br />
|
||||
<table class="tableedit">
|
||||
<table class="editor">
|
||||
<tr><th><?=i18n("Our Category")?></th><th><?=i18n("Server Category")?></th></tr>
|
||||
<?
|
||||
$q = mysql_query("SELECT * FROM projectcategories WHERE year='{$config['FAIRYEAR']}' ORDER BY mingrade");
|
||||
@ -436,7 +436,7 @@ $(document).ready(function() {
|
||||
<br />
|
||||
<h4><?=i18n("Division Mapping")?></h4>
|
||||
<br />
|
||||
<table class="tableedit">
|
||||
<table class="editor">
|
||||
<tr><th style="width: 50%;"><?=i18n("Our Division")?></th><th><?=i18n("Server Division")?></th></tr>
|
||||
<?
|
||||
$q = mysql_query("SELECT * FROM projectdivisions WHERE year='{$config['FAIRYEAR']}' ORDER BY division");
|
||||
|
@ -90,7 +90,7 @@ function stats_save()
|
||||
?>
|
||||
<form id="gather_stats">
|
||||
<input type="hidden" name="fairs_id" value="<?=$f['id']?>" />
|
||||
<table class="tableedit">
|
||||
<table class="editor">
|
||||
<?
|
||||
$selected_stats = split(',', $f['gather_stats']);
|
||||
foreach($stats as $s=>$d) {
|
||||
@ -101,7 +101,9 @@ function stats_save()
|
||||
?>
|
||||
|
||||
</table>
|
||||
<br />
|
||||
<input type="submit" onClick="stats_save();return false;" value="Save" />
|
||||
</form>
|
||||
<input type="submit" onClick="stats_save();" value="Save" />
|
||||
|
||||
|
||||
|
||||
|
@ -137,19 +137,19 @@ function fairinfo_save()
|
||||
|
||||
echo "<form name=\"fairinfo\" id=\"fairinfo_form\" >\n";
|
||||
echo "<input type=\"hidden\" name=\"users_id\" value=\"{$u['id']}\" />\n";
|
||||
echo "<table class=\"tableedit\">\n";
|
||||
echo '<tr><td class="left">'.i18n('Fair Type').':</td><td class="right">';
|
||||
echo "<table class=\"editor\">\n";
|
||||
echo '<tr><td class="label">'.i18n('Fair Type').':</td><td class="right">';
|
||||
echo "<select name=\"type\" id=\"type\" >";
|
||||
foreach($fair_type as $k=>$o) {
|
||||
$s = ($f['type'] == $k) ? 'selected="selected"' : '';
|
||||
echo "<option value=\"$k\" $s >".i18n($o)."</option>";
|
||||
}
|
||||
echo "</select></td></tr>";
|
||||
echo '<tr><td class="left">'.i18n('Fair Name').':</td><td class="right">';
|
||||
echo '<tr><td class="label">'.i18n('Fair Name').':</td><td class="right">';
|
||||
echo "<input type=\"text\" name=\"name\" value=\"{$f['name']}\" size=\"40\" />";
|
||||
echo '<tr><td class="left">'.i18n('Fair Abbreviation').':</td><td class="right">';
|
||||
echo '<tr><td class="label">'.i18n('Fair Abbreviation').':</td><td class="right">';
|
||||
echo "<input type=\"text\" name=\"abbrv\" value=\"{$f['abbrv']}\" size=\"7\" />";
|
||||
echo '<tr><td class="left">'.i18n('Fair Website').':</td><td class="right">';
|
||||
echo '<tr><td class="label">'.i18n('Fair Website').':</td><td class="right">';
|
||||
if($f['website'] == '') $f['website'] = 'http://';
|
||||
echo "<input type=\"text\" name=\"website\" value=\"{$f['website']}\" size=\"40\" />";
|
||||
echo '</td></tr>';
|
||||
@ -157,28 +157,28 @@ function fairinfo_save()
|
||||
|
||||
/* All upstream stuff */
|
||||
echo '<div id="upstream">';
|
||||
echo "<table class=\"tableedit\">\n";
|
||||
echo '<tr><td class="left">'.i18n('Upstream URL').':</td><td class="right">';
|
||||
echo "<table class=\"editor\">\n";
|
||||
echo '<tr><td class="label">'.i18n('Upstream URL').':</td><td class="right">';
|
||||
if($f['url'] == '') $f['url'] = 'http://';
|
||||
echo "<input type=\"text\" name=\"url\" value=\"{$f['url']}\" size=\"40\" />";
|
||||
echo '</td></tr>';
|
||||
echo '<tr><td class="left">';
|
||||
echo '<tr><td class="label">';
|
||||
echo i18n(($f['type'] == 'ysc') ? 'YSC Region ID' : 'Upstream Username');
|
||||
echo ':</td><td class="right">';
|
||||
echo "<input type=\"text\" name=\"username\" value=\"{$f['username']}\" size=\"20\" />";
|
||||
echo '</td></tr>';
|
||||
echo '<tr><td class="left">';
|
||||
echo '<tr><td class="label">';
|
||||
echo i18n(($f['type'] == 'ysc') ? 'YSC Region Password' : 'Upstream Password');
|
||||
echo ':</td><td class="right">';
|
||||
echo "<input type=\"text\" name=\"password\" value=\"{$f['password']}\" size=\"15\" />";
|
||||
echo '</td></tr>';
|
||||
echo '<tr><td class="left">'.i18n('Enable stats upload').':</td><td class="right">';
|
||||
echo '<tr><td class="label">'.i18n('Enable stats upload').':</td><td class="right">';
|
||||
yesno('enable_stats', $f['enable_stats']);
|
||||
echo '</td></tr>';
|
||||
echo '<tr><td class="left">'.i18n('Enable awards download').':</td><td class="right">';
|
||||
echo '<tr><td class="label">'.i18n('Enable awards download').':</td><td class="right">';
|
||||
yesno('enable_awards', $f['enable_awards']);
|
||||
echo '</td></tr>';
|
||||
echo '<tr><td class="left">'.i18n('Enable winners upload').':</td><td class="right">';
|
||||
echo '<tr><td class="label">'.i18n('Enable winners upload').':</td><td class="right">';
|
||||
yesno('enable_winners', $f['enable_winners']);
|
||||
echo '</td></tr>';
|
||||
/* End upstream stuff */
|
||||
|
@ -120,10 +120,10 @@ echo "<input type=\"hidden\" name=\"users_id\" value=\"{$u['id']}\">\n";
|
||||
|
||||
$q=mysql_query("SELECT * FROM projectcategories WHERE year='{$config['FAIRYEAR']}' ORDER BY mingrade");
|
||||
echo "<h4>".i18n("Age Category Preferences")."</h4><br>";
|
||||
echo "<table class=\"tableedit\" >";
|
||||
echo "<table class=\"editor\" >";
|
||||
while($r=mysql_fetch_object($q))
|
||||
{
|
||||
echo "<tr><td class=\"left\" >";
|
||||
echo "<tr><td class=\"label\" >";
|
||||
echo i18n("%1 (Grades %2-%3)",array(i18n($r->category),$r->mingrade,$r->maxgrade));
|
||||
echo ":</td>";
|
||||
echo "<td>";
|
||||
|
@ -100,9 +100,9 @@ if($_SESSION['embed'] != true) {
|
||||
|
||||
<form name="otherform" id="judgeother_form">
|
||||
<input type="hidden" name="users_id" value="<?=$u['id']?>">
|
||||
<table class="tableedit">
|
||||
<table class="editor">
|
||||
<tr>
|
||||
<td style="width:50%"><?=i18n("I can judge in the following languages")." ".REQUIREDFIELD?></td>
|
||||
<td style="width:50%"><?=i18n("I can judge in the following languages")." ".REQUIREDFIELD?>: </td>
|
||||
<td>
|
||||
<?
|
||||
$q=mysql_query("SELECT * FROM languages WHERE active='Y' ORDER BY langname");
|
||||
@ -121,7 +121,7 @@ if($config['judges_specialaward_only_enable'] == 'yes') {
|
||||
?>
|
||||
<tr><td colspan="2"><hr /></td></tr>
|
||||
<tr><td><?=i18n("I am a judge for a specific special award")?><br />
|
||||
<font size=-1>(<?=i18n("Check this box if you are supposed to judge a specific special award, and please select that award on the Special Award Preferences page.")?>
|
||||
<font size=-1>(<?=i18n("Check this box if you are supposed to judge a specific special award, and please select that award on the Special Award Preferences page.")?>)
|
||||
</font></td>
|
||||
<td>
|
||||
<?
|
||||
@ -154,7 +154,7 @@ if($config['judges_specialaward_only_enable'] == 'yes') {
|
||||
</tr><tr>
|
||||
<td colspan="2"><hr /></td></tr>
|
||||
</table>
|
||||
<table class="tableedit">
|
||||
<table class="editor">
|
||||
<?
|
||||
questions_print_answer_editor('judgereg', $u, 'questions');
|
||||
?>
|
||||
|
10
sfiab.js
10
sfiab.js
@ -65,9 +65,13 @@ function notice_(str)
|
||||
/* Stuff to do after the document loads */
|
||||
$(document).ready(function()
|
||||
{
|
||||
/* Do left/right on all tableedits */
|
||||
$(".tableedit tr td:even").addClass('left');
|
||||
$(".tableedit tr td:odd").addClass('right');
|
||||
/* Do label/input styles on all edit tables */
|
||||
$(".editor tr td:first-child").addClass('label');
|
||||
$(".editor tr td:nth-child(2)").addClass('input');
|
||||
|
||||
/* Stripe tableviews */
|
||||
$(".tableview tr:even").addClass('even');
|
||||
$(".tableview tr:odd").addClass('odd');
|
||||
});
|
||||
|
||||
|
||||
|
@ -78,23 +78,48 @@ input {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.tableedit th {
|
||||
font-weight: bold;
|
||||
text-align: left;
|
||||
color: #FFFFFF;
|
||||
background-color: #5C6F90;
|
||||
padding: 1px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
/* Replacement for tableedit */
|
||||
.editor {
|
||||
color: black;
|
||||
margin-left: 20px;
|
||||
margin-right: 20px;
|
||||
font-size: 0.8em;
|
||||
border: 0px;
|
||||
border-collapse: collapse;
|
||||
/* width: 100%;*/
|
||||
}
|
||||
|
||||
.editor td {
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
/* vertical align top, then use top padding to bring it down
|
||||
* so that the text is in the middle of the first line compared
|
||||
* to an input box */
|
||||
.tableedit td.left {
|
||||
.editor td.label {
|
||||
width: 25%;
|
||||
vertical-align: top;
|
||||
text-align: right;
|
||||
padding-right: 5px;
|
||||
padding-top: 5px;
|
||||
}
|
||||
.tableedit td.right {
|
||||
width: 75%;
|
||||
vertical-align: middle;
|
||||
text-align: left;
|
||||
/* padding-right: 5px;
|
||||
padding-top: 5px;*/
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.tableedit th {
|
||||
.editor td.input {
|
||||
width: 75%;
|
||||
text-align: left;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.editor th {
|
||||
font-weight: bold;
|
||||
text-align: left;
|
||||
color: #FFFFFF;
|
||||
@ -106,3 +131,4 @@ input {
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user