[LON-CAPA-cvs] cvs: loncom /interface domainprefs.pm
raeburn
raeburn at source.lon-capa.org
Thu Aug 3 12:51:55 EDT 2017
raeburn Thu Aug 3 16:51:55 2017 EDT
Modified files:
/loncom/interface domainprefs.pm
Log:
- Replace valign and align attributes for <th> and <td> with CSS.
-------------- next part --------------
Index: loncom/interface/domainprefs.pm
diff -u loncom/interface/domainprefs.pm:1.305 loncom/interface/domainprefs.pm:1.306
--- loncom/interface/domainprefs.pm:1.305 Thu Aug 3 16:22:08 2017
+++ loncom/interface/domainprefs.pm Thu Aug 3 16:51:53 2017
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set domain-wide configuration settings
#
-# $Id: domainprefs.pm,v 1.305 2017/08/03 16:22:08 raeburn Exp $
+# $Id: domainprefs.pm,v 1.306 2017/08/03 16:51:53 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -762,7 +762,7 @@
$output .=
'<table class="LC_nested_outer">
<tr>
- <th align="left" valign="middle"><span class="LC_nobreak">'.
+ <th class="LC_left_item LC_middle"><span class="LC_nobreak">'.
&mt($item->{text}).' '.
&Apache::loncommon::help_open_topic($item->{'help'}).'</span></th>'."\n".
'</tr>';
@@ -978,8 +978,8 @@
<td>
<table class="LC_nested">
<tr class="LC_info_row">
- <td class="LC_left_item"'.$colspan.' valign="top">'.&mt($item->{'header'}->[4]->{'col1'}).'</td>
- <td class="LC_right_item" valign="top">'.&mt($item->{'header'}->[4]->{'col2'}).'</td>
+ <td class="LC_left_item"'.$colspan.' style="vertical-align: top">'.&mt($item->{'header'}->[4]->{'col1'}).'</td>
+ <td class="LC_right_item" style="vertical-align: top">'.&mt($item->{'header'}->[4]->{'col2'}).'</td>
</tr>'.
&print_validation_rows('requestcourses',$dom,$settings,\$rowtotal);
} elsif ($action eq 'requestauthor') {
@@ -994,9 +994,9 @@
<td>
<table class="LC_nested">
<tr class="LC_info_row">
- <td class="LC_left_item"'.$colspan.' valign="top">'.
+ <td class="LC_left_item"'.$colspan.' style="vertical-align: top">'.
&mt($item->{'header'}->[2]->{'col1'}).'</td>
- <td class="LC_right_item" valign="top">'.
+ <td class="LC_right_item" style="vertical-align: top">'.
&mt($item->{'header'}->[2]->{'col2'}).'</td>
</tr>'.
&print_rolecolors($phase,'author',$dom,$confname,$settings,\$rowtotal).'
@@ -1024,30 +1024,30 @@
<td class="LC_left_item" colspan="2">'.&mt($item->{'header'}->[0]->{'col1'}).'</td>';
} elsif ($action eq 'serverstatuses') {
$output .= '
- <td class="LC_left_item" valign="top">'.&mt($item->{'header'}->[0]->{'col1'}).
+ <td class="LC_left_item" style="vertical-align: top">'.&mt($item->{'header'}->[0]->{'col1'}).
'<br />('.&mt('Automatic access for Dom. Coords.').')</td>';
} else {
$output .= '
- <td class="LC_left_item" valign="top">'.&mt($item->{'header'}->[0]->{'col1'}).'</td>';
+ <td class="LC_left_item" style="vertical-align: top">'.&mt($item->{'header'}->[0]->{'col1'}).'</td>';
}
if (defined($item->{'header'}->[0]->{'col3'})) {
- $output .= '<td class="LC_left_item" valign="top">'.
+ $output .= '<td class="LC_left_item" style="vertical-align: top">'.
&mt($item->{'header'}->[0]->{'col2'});
if ($action eq 'serverstatuses') {
$output .= '<br />(<tt>'.&mt('user1:domain1,user2:domain2 etc.').'</tt>)';
}
} else {
- $output .= '<td class="LC_right_item" valign="top">'.
+ $output .= '<td class="LC_right_item" style="vertical-align: top">'.
&mt($item->{'header'}->[0]->{'col2'});
}
$output .= '</td>';
if ($item->{'header'}->[0]->{'col3'}) {
if (defined($item->{'header'}->[0]->{'col4'})) {
- $output .= '<td class="LC_left_item" valign="top">'.
+ $output .= '<td class="LC_left_item" style="vertical-align: top">'.
&mt($item->{'header'}->[0]->{'col3'});
} else {
- $output .= '<td class="LC_right_item" valign="top">'.
+ $output .= '<td class="LC_right_item" style="vertical-align: top">'.
&mt($item->{'header'}->[0]->{'col3'});
}
if ($action eq 'serverstatuses') {
@@ -1056,7 +1056,7 @@
$output .= '</td>';
}
if ($item->{'header'}->[0]->{'col4'}) {
- $output .= '<td class="LC_right_item" valign="top">'.
+ $output .= '<td class="LC_right_item" style="vertical-align: top">'.
&mt($item->{'header'}->[0]->{'col4'});
}
$output .= '</tr>';
@@ -1089,7 +1089,7 @@
my $choice = $choices{'disallowlogin'};
$css_class = ' class="LC_odd_row"';
$datatable .= '<tr'.$css_class.'><td>'.$choice.'</td>'.
- '<td align="right"><table><tr><th>'.$choices{'hostid'}.'</th>'.
+ '<td style="text-align: right"><table><tr><th>'.$choices{'hostid'}.'</th>'.
'<th>'.$choices{'server'}.'</th>'.
'<th>'.$choices{'serverpath'}.'</th>'.
'<th>'.$choices{'custompath'}.'</th>'.
@@ -1370,7 +1370,7 @@
my $choice = $choices{'headtag'};
$css_class = ' class="LC_odd_row"';
$datatable .= '<tr'.$css_class.'><td colspan="2">'.$choice.'</td>'.
- '<td align="left"><table><tr><th>'.$choices{'hostid'}.'</th>'.
+ '<td style="text-align: left"><table><tr><th>'.$choices{'hostid'}.'</th>'.
'<th>'.$choices{'current'}.'</th>'.
'<th>'.$choices{'action'}.'</th>'.
'<th>'.$choices{'exempt'}.'</th></tr>'."\n";
@@ -1726,7 +1726,7 @@
'<table border="0"><tr>';
foreach my $item (@{$bgs}) {
- $datatable .= '<td align="center">'.$choices->{$item};
+ $datatable .= '<td style="text-align: center">'.$choices->{$item};
my $color = $designs->{'bgs'}{$item} ? $designs->{'bgs'}{$item} : $defaults->{'bgs'}{$item};
if ($designs->{'bgs'}{$item}) {
$datatable .= ' ';
@@ -1754,7 +1754,7 @@
'<table border="0"><tr>';
foreach my $item (@{$links}) {
my $color = $designs->{'links'}{$item} ? $designs->{'links'}{$item} : $defaults->{'links'}{$item};
- $datatable .= '<td align="center">'.$choices->{$item}."\n";
+ $datatable .= '<td style="text-align: center">'.$choices->{$item}."\n";
if ($designs->{'links'}{$item}) {
$datatable.=' ';
}
@@ -1815,7 +1815,7 @@
my ($img,$role,$logintext,$phase,$choices,$designs,$defaults) = @_;
my $color_menu = '<table border="0"><tr>';
foreach my $item (@{$logintext}) {
- $color_menu .= '<td align="center">'.$choices->{$item};
+ $color_menu .= '<td style="text-align: center">'.$choices->{$item};
my $color = $designs->{'logintext'}{$item} ? $designs->{'logintext'}{$item} : $defaults->{'logintext'}{$item};
$color_menu .= '<br /><input type="text" class="colorchooser" size="8" name="'.$role.'_'.$item.'" value="'.$color.
'" onblur = "javascript:colchg_span('."'css_".$role.'_'.$item."'".',this);" /></td>';
@@ -1850,7 +1850,7 @@
$role.'_del_'.$img.'" value="1" />'.&mt('Delete?').
'</label> '.&mt('Replace:').'</span><br />';
} else {
- $output .= '<td valign="middle">'.$logincolors.&mt('Upload:').'<br />';
+ $output .= '<td class="LC_middle">'.$logincolors.&mt('Upload:').'<br />';
}
}
return $output;
@@ -3356,7 +3356,7 @@
my @templateroles = &Apache::lonuserutils::custom_template_roles($context,$crstype);
$css_class = $itemcount%2?' class="LC_odd_row"':'';
my $chgstr = ' onchange="javascript:reorderHelpRoles(this.form,'."'helproles_".$num."_pos'".');"';
- $datatable .= '<tr '.$css_class.'><td valign="top"><b>'.$role.'</b><br />'.
+ $datatable .= '<tr '.$css_class.'><td style="vertical-align: top"><b>'.$role.'</b><br />'.
'<select name="helproles_'.$num.'_pos"'.$chgstr.'>';
for (my $k=0; $k<=$maxnum; $k++) {
my $vpos = $k+1;
@@ -3395,7 +3395,7 @@
&Apache::lonuserutils::custom_role_privs(\%privs,\%full,\%levels,\%levelscurrent);
my @templateroles = &Apache::lonuserutils::custom_template_roles($context,$crstype);
my $chgstr = ' onchange="javascript:reorderHelpRoles(this.form,'."'helproles_".$count."_pos'".');"';
- $datatable .= '<tr '.$css_class.'><td valign="top"><span class="LC_nobreak"><label>'.
+ $datatable .= '<tr '.$css_class.'><td style="vertical-align: top"><span class="LC_nobreak"><label>'.
'<input type="hidden" name="helproles_maxnum" value="'.$maxnum.'" />'."\n".
'<select name="helproles_'.$count.'_pos"'.$chgstr.'>';
for (my $k=0; $k<$maxnum+1; $k++) {
@@ -3674,7 +3674,7 @@
foreach my $item (@{$toggles}) {
$css_class = $itemcount%2?' class="LC_odd_row"':'';
$datatable .=
- '<tr'.$css_class.'><td valign="top">'.
+ '<tr'.$css_class.'><td style="vertical-align: top">'.
'<span class="LC_nobreak">'.$choices->{$item}.
'</span></td>';
if ($align eq 'left') {
@@ -3865,7 +3865,7 @@
if (!$rolemaps{$role}) {
$selectnone = ' selected="selected"';
}
- $datatable .= '<td align="center">'.
+ $datatable .= '<td style="text-align: center">'.
&Apache::lonnet::plaintext($role,'Course').'<br />'.
'<select name="ltitools_roles_'.$role.'_'.$i.'">'.
'<option value=""'.$selectnone.'>'.&mt('Select').'</option>';
@@ -3999,7 +3999,7 @@
'<fieldset><legend>'.&mt('Role mapping').'</legend><table><tr>';
foreach my $role (@courseroles) {
my ($checked,$checkednone);
- $datatable .= '<td align="center">'.
+ $datatable .= '<td style="text-align: center">'.
&Apache::lonnet::plaintext($role,'Course').'<br />'.
'<select name="ltitools_add_roles_'.$role.'">'.
'<option value="" selected="selected">'.&mt('Select').'</option>';
@@ -4095,7 +4095,7 @@
\%choices,$itemcount);
$css_class = $itemcount%2?' class="LC_odd_row"':'';
$datatable .=
- '<tr'.$css_class.'><td valign="top">'.
+ '<tr'.$css_class.'><td style="vertical-align: top">'.
'<span class="LC_nobreak">'.$choices{'canclone'}.
'</span></td><td class="LC_left_item">';
my $currcanclone = 'none';
@@ -4247,10 +4247,10 @@
$datatable .= '<tr'.$css_class.'><td><span class="LC_nobreak">'.
$choices{'uploadquota'}.
'</span></td>'.
- '<td align="right" class="LC_right_item">'.
+ '<td style="text-align: right" class="LC_right_item">'.
'<table><tr>';
foreach my $type (@types) {
- $datatable .= '<td align="center">'.&mt($type).'<br />'.
+ $datatable .= '<td style="text-align: center">'.&mt($type).'<br />'.
'<input type="text" name="uploadquota_'.$type.'"'.
' value="'.$curruploadquota{$type}.'" size="5" /></td>';
}
@@ -4265,7 +4265,7 @@
'<i>'.&mt('Default credits').'</i><br /><table><tr>';
foreach my $type (@types) {
next if ($type eq 'community');
- $additional .= '<td align="center">'.&mt($type).'<br />'.
+ $additional .= '<td style="text-align: center">'.&mt($type).'<br />'.
'<input type="text" name="'.$type.'_credits"'.
' value="'.$defcredits{$type}.'" size="3" /></td>';
}
@@ -4289,7 +4289,7 @@
'<i>'.&mt('Enter 0 to remain disabled until page reload.').'</i><br />'.
'<table><tr>';
foreach my $type (@types) {
- $additional .= '<td align="center">'.&mt($type).'<br />'.
+ $additional .= '<td style="text-align: center">'.&mt($type).'<br />'.
'<input type="text" name="'.$type.'_timeout" value="'.
$deftimeout{$type}.'" size="5" /></td>';
}
@@ -4307,10 +4307,10 @@
$datatable .= '<tr'.$css_class.'><td><span class="LC_nobreak">'.
$choices{'mysqltables'}.
'</span></td>'.
- '<td align="right" class="LC_right_item">'.
+ '<td style="text-align: right" class="LC_right_item">'.
'<table><tr>';
foreach my $type (@types) {
- $datatable .= '<td align="center">'.&mt($type).'<br />'.
+ $datatable .= '<td style="text-align: center">'.&mt($type).'<br />'.
'<input type="text" name="mysqltables_'.$type.'"'.
' value="'.$currmysql{$type}.'" size="8" /></td>';
}
@@ -5209,7 +5209,7 @@
my $disabled_div_style = 'display: block';
my $homedom_div_style = 'display: none';
$datatable .= '<tr class="'.$css_class[$cssidx].'">'.
- '<td rowspan="'.$rownum.'" valign="top">'.
+ '<td rowspan="'.$rownum.'" style="vertical-align: top">'.
'<p>';
if ($lonhost eq '') {
$datatable .= '<span class="LC_nobreak">';
@@ -5242,7 +5242,7 @@
$homedom_div_style = 'display: block';
}
}
- $datatable .= '</p></td><td rowspan="'.$rownum.'" valign="top">'.
+ $datatable .= '</p></td><td rowspan="'.$rownum.'" style="vertical-align: top">'.
'<div id="loadbalancing_disabled_'.$balnum.'" style="'.
$disabled_div_style.'">'.$disabledtext.'</div>'."\n".
'<div id="loadbalancing_targets_'.$balnum.'" style="'.$targets_div_style.'">'.&mt('Offloads to:').'<br />';
@@ -5457,7 +5457,7 @@
$space = '<div display="inline-block"> </div>';
}
my $output =
- '<tr class="'.$css_class.'" id="balanceruletr_'.$balnum.'_'.$num.'"><td valign="top">'.$space.
+ '<tr class="'.$css_class.'" id="balanceruletr_'.$balnum.'_'.$num.'"><td style="vertical-align: top">'.$space.
'<div id="balanceruletitle_'.$balnum.'_'.$type.'" style="'.$style.'">'.$title.'</div></td>'."\n".
'<td valaign="top">'.$space.
'<div id="balancerule_'.$balnum.'_'.$type.'" style="'.$style.'">'."\n";
@@ -5694,7 +5694,7 @@
}
$datatable .= '<tr'.$css_class.'>'.
'<td><span class="LC_nobreak">'.$lt{$item}.
- '</span></td><td align="right">';
+ '</span></td><td style="text-align: right">';
my @options = ('any');
if (ref($rules) eq 'HASH') {
if (keys(%{$rules}) > 0) {
@@ -6137,7 +6137,7 @@
}
$output .= '</tr><tr>';
foreach my $item ('approve','email','username') {
- $output .= '<td valign="top">';
+ $output .= '<td style="vertical-align: top">';
my (%choices, at options,$hashref,$defoption,$name,$onclick,$hascustom);
if ($item eq 'approve') {
%choices = &Apache::lonlocal::texthash (
@@ -6849,7 +6849,7 @@
}
$datatable .= '</span></td>';
if (keys(%error) == 0) {
- $datatable .= '<td valign="bottom">';
+ $datatable .= '<td style="vertical-align: bottom">';
if (!$switchserver) {
$datatable .= &mt('Upload:').'<br />';
}
@@ -8736,7 +8736,7 @@
} else {
my $newitem = $confhash->{$role}{$item};
if ($key eq 'images') {
- $newitem = '<img src="'.$confhash->{$role}{$item}.'" alt="'.$choices{$item}.'" valign="bottom" />';
+ $newitem = '<img src="'.$confhash->{$role}{$item}.'" alt="'.$choices{$item}.'" style="vertical-align: bottom" />';
}
$resulttext .= '<li>'.&mt("$choices{$item} set to [_1]",$newitem).'</li>';
}
More information about the LON-CAPA-cvs
mailing list