version 1.586, 2007/09/19 06:24:26
|
version 1.595, 2007/10/26 00:22:36
|
Line 407 sub coursebrowser_javascript {
|
Line 407 sub coursebrowser_javascript {
|
'&cdomelement='+udom+ |
'&cdomelement='+udom+ |
'&cnameelement='+desc; |
'&cnameelement='+desc; |
if (extra_element !=null && extra_element != '') { |
if (extra_element !=null && extra_element != '') { |
if (formname == 'rolechoice') { |
if (formname == 'rolechoice' || formname == 'studentform') { |
url += '&roleelement='+extra_element; |
url += '&roleelement='+extra_element; |
if (domainfilter == null || domainfilter == '') { |
if (domainfilter == null || domainfilter == '') { |
url += '&domainfilter='+extra_element; |
url += '&domainfilter='+extra_element; |
Line 1074 sub changable_area {
|
Line 1074 sub changable_area {
|
|
|
=pod |
=pod |
|
|
|
=item * viewport_geometry_js { |
|
|
|
Provides javascript object (Geometry) which can provide information about the viewport geometry for the client browser. |
|
|
|
=cut |
|
|
|
|
|
sub viewport_geometry_js { |
|
return <<"GEOMETRY"; |
|
var Geometry = {}; |
|
function init_geometry() { |
|
if (Geometry.init) { return }; |
|
Geometry.init=1; |
|
if (window.innerHeight) { |
|
Geometry.getViewportHeight = function() { return window.innerHeight; }; |
|
Geometry.getViewportWidth = function() { return window.innerWidth; }; |
|
Geometry.getHorizontalScroll = function() { return window.pageXOffset; }; |
|
Geometry.getVerticalScroll = function() { return window.pageYOffset; }; |
|
} |
|
else if (document.documentElement && document.documentElement.clientHeight) { |
|
Geometry.getViewportHeight = |
|
function() { return document.documentElement.clientHeight; }; |
|
Geometry.getViewportWidth = |
|
function() { return document.documentElement.clientWidth; }; |
|
|
|
Geometry.getHorizontalScroll = |
|
function() { return document.documentElement.scrollLeft; }; |
|
Geometry.getVerticalScroll = |
|
function() { return document.documentElement.scrollTop; }; |
|
} |
|
else if (document.body.clientHeight) { |
|
Geometry.getViewportHeight = |
|
function() { return document.body.clientHeight; }; |
|
Geometry.getViewportWidth = |
|
function() { return document.body.clientWidth; }; |
|
Geometry.getHorizontalScroll = |
|
function() { return document.body.scrollLeft; }; |
|
Geometry.getVerticalScroll = |
|
function() { return document.body.scrollTop; }; |
|
} |
|
} |
|
|
|
GEOMETRY |
|
} |
|
|
|
=pod |
|
|
|
=item * viewport_size_js { |
|
|
|
Provides a javascript function to set values of two form elements - width and height (elements are passed in as arguments to the javascript function) to the dimensions of the user's browser window. |
|
|
|
=cut |
|
|
|
sub viewport_size_js { |
|
my $geometry = &viewport_geometry_js(); |
|
return <<"DIMS"; |
|
|
|
$geometry |
|
|
|
function getViewportDims(width,height) { |
|
init_geometry(); |
|
width.value = Geometry.getViewportWidth(); |
|
height.value = Geometry.getViewportHeight(); |
|
return; |
|
} |
|
|
|
DIMS |
|
} |
|
|
|
=pod |
|
|
=item * resize_textarea_js |
=item * resize_textarea_js |
|
|
emits the needed javascript to resize a textarea to be as big as possible |
emits the needed javascript to resize a textarea to be as big as possible |
Line 1087 to be attached to the <body> for the onl
|
Line 1158 to be attached to the <body> for the onl
|
=cut |
=cut |
|
|
sub resize_textarea_js { |
sub resize_textarea_js { |
|
my $geometry = &viewport_geometry_js(); |
return <<"RESIZE"; |
return <<"RESIZE"; |
<script type="text/javascript"> |
<script type="text/javascript"> |
var Geometry = {}; |
$geometry |
function init_geometry() { |
|
if (Geometry.init) { return }; |
function getX(element) { |
Geometry.init=1; |
var x = 0; |
if (window.innerHeight) { |
while (element) { |
Geometry.getViewportHeight = function() { return window.innerHeight; }; |
x += element.offsetLeft; |
} |
element = element.offsetParent; |
else if (document.documentElement && document.documentElement.clientHeight) { |
} |
Geometry.getViewportHeight = |
return x; |
function() { return document.documentElement.clientHeight; }; |
} |
} |
function getY(element) { |
else if (document.body.clientHeight) { |
var y = 0; |
Geometry.getViewportHeight = |
while (element) { |
function() { return document.body.clientHeight; }; |
y += element.offsetTop; |
|
element = element.offsetParent; |
} |
} |
|
return y; |
} |
} |
|
|
|
|
function resize_textarea(textarea_id,bottom_id) { |
function resize_textarea(textarea_id,bottom_id) { |
init_geometry(); |
init_geometry(); |
var textarea = document.getElementById(textarea_id); |
var textarea = document.getElementById(textarea_id); |
//alert(textarea); |
//alert(textarea); |
|
|
var textarea_top = textarea.offsetTop; |
var textarea_top = getY(textarea); |
var textarea_height = textarea.offsetHeight; |
var textarea_height = textarea.offsetHeight; |
var bottom = document.getElementById(bottom_id); |
var bottom = document.getElementById(bottom_id); |
var bottom_top = bottom.offsetTop; |
var bottom_top = getY(bottom); |
var bottom_height = bottom.offsetHeight; |
var bottom_height = bottom.offsetHeight; |
var window_height = Geometry.getViewportHeight(); |
var window_height = Geometry.getViewportHeight(); |
var fudge = 23; |
var fudge = 23; |
var new_height = window_height-fudge-textarea_top-bottom_height; |
var new_height = window_height-fudge-textarea_top-bottom_height; |
if (new_height < 300) { |
if (new_height < 300) { |
new_height = 300; |
new_height = 300; |
Line 1332 sub domain_select {
|
Line 1407 sub domain_select {
|
|
|
=over 4 |
=over 4 |
|
|
=cut |
|
|
|
=item * multiple_select_form($name,$value,$size,$hash,$order) |
=item * multiple_select_form($name,$value,$size,$hash,$order) |
|
|
Returns a string containing a <select> element int multiple mode |
Returns a string containing a <select> element int multiple mode |
Line 1520 input: 4 arguments (two required, two op
|
Line 1593 input: 4 arguments (two required, two op
|
option, and selected by default. |
option, and selected by default. |
$hide - Value of 'hide' causes hiding of the name of the server, |
$hide - Value of 'hide' causes hiding of the name of the server, |
if 1 server found, or default, if 0 found. |
if 1 server found, or default, if 0 found. |
output: returns 1 items: |
output: returns 2 items: |
(a) form element which contains either: |
(a) form element which contains either: |
(i) <select name="$name"> |
(i) <select name="$name"> |
<option value="$hostid1">$hostid $servers{$hostid}</option> |
<option value="$hostid1">$hostid $servers{$hostid}</option> |
Line 1725 END
|
Line 1798 END
|
} |
} |
|
|
my $radioval = "'nochange'"; |
my $radioval = "'nochange'"; |
if (exists($in{'curr_authtype'}) && |
if (defined($in{'curr_authtype'})) { |
defined($in{'curr_authtype'}) && |
if ($in{'curr_authtype'} ne '') { |
$in{'curr_authtype'} ne '') { |
$radioval = "'".$in{'curr_authtype'}."arg'"; |
$radioval = "'$in{'curr_authtype'}arg'"; |
} |
} |
} |
my $argfield = 'null'; |
my $argfield = 'null'; |
if ( grep/^mode$/,(keys %in) ) { |
if (defined($in{'mode'})) { |
if ($in{'mode'} eq 'modifycourse') { |
if ($in{'mode'} eq 'modifycourse') { |
if ( grep/^curr_authtype$/,(keys %in) ) { |
if (defined($in{'curr_autharg'})) { |
$radioval = "'$in{'curr_authtype'}'"; |
if ($in{'curr_autharg'} ne '') { |
} |
|
if ( grep/^curr_autharg$/,(keys %in) ) { |
|
unless ($in{'curr_autharg'} eq '') { |
|
$argfield = "'$in{'curr_autharg'}'"; |
$argfield = "'$in{'curr_autharg'}'"; |
} |
} |
} |
} |
Line 1834 sub authform_nochange{
|
Line 1904 sub authform_nochange{
|
return $result; |
return $result; |
} |
} |
|
|
sub authform_kerberos{ |
sub authform_kerberos { |
my %in = ( |
my %in = ( |
formname => 'document.cu', |
formname => 'document.cu', |
kerb_def_dom => 'MSU.EDU', |
kerb_def_dom => 'MSU.EDU', |
Line 1850 sub authform_kerberos{
|
Line 1920 sub authform_kerberos{
|
$check4 = ' checked="on"'; |
$check4 = ' checked="on"'; |
} |
} |
$krbarg = $in{'kerb_def_dom'}; |
$krbarg = $in{'kerb_def_dom'}; |
if (grep(/^curr_authtype$/,(keys(%in)))) { |
if (defined($in{'curr_authtype'})) { |
if ($in{'curr_authtype'} =~ m/^krb(\d+)$/) { |
if ($in{'curr_authtype'} eq 'krb') { |
$krbver = $1; |
|
$krbcheck = ' checked="on"'; |
$krbcheck = ' checked="on"'; |
if ($krbver eq '5') { |
if (defined($in{'curr_kerb_ver'})) { |
$check5 = ' checked="on"'; |
if ($in{'curr_krb_ver'} eq '5') { |
$check4 = ''; |
$check5 = ' checked="on"'; |
} else { |
$check4 = ''; |
$check4 = ' checked="on"'; |
} else { |
$check5 = ''; |
$check4 = ' checked="on"'; |
|
$check5 = ''; |
|
} |
} |
} |
if (grep(/^curr_autharg$/,(keys(%in)))) { |
if (defined($in{'curr_autharg'})) { |
$krbarg = $in{'curr_autharg'}; |
$krbarg = $in{'curr_autharg'}; |
} |
} |
if (!$can_assign{'krb4'} && !$can_assign{'krb5'}) { |
if (!$can_assign{'krb4'} && !$can_assign{'krb5'}) { |
if (grep(/^curr_autharg$/,(keys(%in)))) { |
if (defined($in{'curr_autharg'})) { |
$result = |
$result = |
&mt('Currently Kerberos authenticated with domain [_1] Version [_2].', |
&mt('Currently Kerberos authenticated with domain [_1] Version [_2].', |
$in{'curr_autharg'},$krbver); |
$in{'curr_autharg'},$krbver); |
Line 1883 sub authform_kerberos{
|
Line 1954 sub authform_kerberos{
|
} |
} |
if (!$can_assign{'krb4'} && !$can_assign{'krb5'}) { |
if (!$can_assign{'krb4'} && !$can_assign{'krb5'}) { |
return; |
return; |
|
} elsif ($authtype eq '') { |
|
if (defined($in{'mode'})) { |
|
if ($in{'mode'} eq 'modifycourse') { |
|
if ($authnum == 1) { |
|
$authtype = '<input type="hidden" name="login" value="krb">'; |
|
} |
|
} |
|
} |
} |
} |
$jscall = "javascript:changed_radio('krb',$in{'formname'});"; |
$jscall = "javascript:changed_radio('krb',$in{'formname'});"; |
if ($authtype eq '') { |
if ($authtype eq '') { |
Line 1937 sub authform_internal{
|
Line 2016 sub authform_internal{
|
); |
); |
my ($intcheck,$intarg,$result,$authtype,$autharg,$jscall); |
my ($intcheck,$intarg,$result,$authtype,$autharg,$jscall); |
my ($authnum,%can_assign) = &get_assignable_auth($in{'domain'}); |
my ($authnum,%can_assign) = &get_assignable_auth($in{'domain'}); |
if (grep(/^curr_authtype$/,(keys(%in)))) { |
if (defined($in{'curr_authtype'})) { |
if ($in{'curr_authtype'} eq 'internal:') { |
if ($in{'curr_authtype'} eq 'int') { |
if ($can_assign{'int'}) { |
if ($can_assign{'int'}) { |
$intcheck = 'checked="on" '; |
$intcheck = 'checked="on" '; |
if (grep(/^curr_autharg$/,(keys(%in)))) { |
if (defined($in{'curr_autharg'})) { |
$intarg = $in{'curr_autharg'}; |
$intarg = $in{'curr_autharg'}; |
} |
} |
} else { |
} else { |
Line 1956 sub authform_internal{
|
Line 2035 sub authform_internal{
|
} |
} |
if (!$can_assign{'int'}) { |
if (!$can_assign{'int'}) { |
return; |
return; |
|
} elsif ($authtype eq '') { |
|
if (defined($in{'mode'})) { |
|
if ($in{'mode'} eq 'modifycourse') { |
|
if ($authnum == 1) { |
|
$authtype = '<input type="hidden" name="login" value="int">'; |
|
} |
|
} |
|
} |
} |
} |
$jscall = "javascript:changed_radio('int',$in{'formname'});"; |
$jscall = "javascript:changed_radio('int',$in{'formname'});"; |
if ($authtype eq '') { |
if ($authtype eq '') { |
Line 1978 sub authform_local{
|
Line 2065 sub authform_local{
|
); |
); |
my ($loccheck,$locarg,$result,$authtype,$autharg,$jscall); |
my ($loccheck,$locarg,$result,$authtype,$autharg,$jscall); |
my ($authnum,%can_assign) = &get_assignable_auth($in{'domain'}); |
my ($authnum,%can_assign) = &get_assignable_auth($in{'domain'}); |
if (grep(/^curr_authtype$/,(keys(%in)))) { |
if (defined($in{'curr_authtype'})) { |
if ($in{'curr_authtype'} eq 'localauth:') { |
if ($in{'curr_authtype'} eq 'loc') { |
if ($can_assign{'loc'}) { |
if ($can_assign{'loc'}) { |
$loccheck = 'checked="on" '; |
$loccheck = 'checked="on" '; |
if (grep(/^curr_autharg$/,(keys(%in)))) { |
if (defined($in{'curr_autharg'})) { |
$locarg = $in{'curr_autharg'}; |
$locarg = $in{'curr_autharg'}; |
} |
} |
} else { |
} else { |
Line 1997 sub authform_local{
|
Line 2084 sub authform_local{
|
} |
} |
if (!$can_assign{'loc'}) { |
if (!$can_assign{'loc'}) { |
return; |
return; |
|
} elsif ($authtype eq '') { |
|
if (defined($in{'mode'})) { |
|
if ($in{'mode'} eq 'modifycourse') { |
|
if ($authnum == 1) { |
|
$authtype = '<input type="hidden" name="login" value="loc">'; |
|
} |
|
} |
|
} |
} |
} |
$jscall = "javascript:changed_radio('loc',$in{'formname'});"; |
$jscall = "javascript:changed_radio('loc',$in{'formname'});"; |
if ($authtype eq '') { |
if ($authtype eq '') { |
Line 2019 sub authform_filesystem{
|
Line 2114 sub authform_filesystem{
|
); |
); |
my ($fsyscheck,$result,$authtype,$autharg,$jscall); |
my ($fsyscheck,$result,$authtype,$autharg,$jscall); |
my ($authnum,%can_assign) = &get_assignable_auth($in{'domain'}); |
my ($authnum,%can_assign) = &get_assignable_auth($in{'domain'}); |
if (grep(/^curr_authtype$/,(keys(%in)))) { |
if (defined($in{'curr_authtype'})) { |
if ($in{'curr_authtype'} eq 'unix:') { |
if ($in{'curr_authtype'} eq 'fsys') { |
if ($can_assign{'fsys'}) { |
if ($can_assign{'fsys'}) { |
$fsyscheck = 'checked="on" '; |
$fsyscheck = 'checked="on" '; |
} else { |
} else { |
Line 2035 sub authform_filesystem{
|
Line 2130 sub authform_filesystem{
|
} |
} |
if (!$can_assign{'fsys'}) { |
if (!$can_assign{'fsys'}) { |
return; |
return; |
|
} elsif ($authtype eq '') { |
|
if (defined($in{'mode'})) { |
|
if ($in{'mode'} eq 'modifycourse') { |
|
if ($authnum == 1) { |
|
$authtype = '<input type="hidden" name="login" value="fsys">'; |
|
} |
|
} |
|
} |
} |
} |
$jscall = "javascript:changed_radio('fsys',$in{'formname'});"; |
$jscall = "javascript:changed_radio('fsys',$in{'formname'});"; |
if ($authtype eq '') { |
if ($authtype eq '') { |
Line 2095 sub get_assignable_auth {
|
Line 2198 sub get_assignable_auth {
|
return ($authnum,%can_assign); |
return ($authnum,%can_assign); |
} |
} |
|
|
|
|
############################################################### |
############################################################### |
## Get Authentication Defaults for Domain ## |
## Get Authentication Defaults for Domain ## |
############################################################### |
############################################################### |
Line 3058 sub pprmlink {
|
Line 3160 sub pprmlink {
|
if (!$symb) { $symb=&Apache::lonnet::symbread(); } |
if (!$symb) { $symb=&Apache::lonnet::symbread(); } |
$symb=&escape($symb); |
$symb=&escape($symb); |
if ($target) { $target="target=\"$target\""; } |
if ($target) { $target="target=\"$target\""; } |
return '<a href="/adm/parmset?&command=set&'. |
return '<a href="/adm/parmset?command=set&'. |
'symb='.$symb.'&uname='.$uname. |
'symb='.$symb.'&uname='.$uname. |
'&udom='.$udom.'" '.$target.'>'.$text.'</a>'; |
'&udom='.$udom.'" '.$target.'>'.$text.'</a>'; |
} |
} |
############################################## |
############################################## |
|
|
Line 4027 table.thinborder tr td {
|
Line 4129 table.thinborder tr td {
|
|
|
form, .inline { display: inline; } |
form, .inline { display: inline; } |
.center { text-align: center; } |
.center { text-align: center; } |
.LC_filename {font-family: $mono;} |
.LC_filename {font-family: $mono; white-space:pre;} |
.LC_error { |
.LC_error { |
color: red; |
color: red; |
font-size: larger; |
font-size: larger; |
Line 4273 table.LC_data_table, table.LC_mail_list
|
Line 4375 table.LC_data_table, table.LC_mail_list
|
} |
} |
table.LC_nested_outer { |
table.LC_nested_outer { |
border: 1px solid #000000; |
border: 1px solid #000000; |
border-collapse: separate; |
border-collapse: collapse; |
border-spacing: 0px; |
border-spacing: 0px; |
width: 100%; |
width: 100%; |
} |
} |
table.LC_nested { |
table.LC_nested { |
border: 0px; |
border: 0px; |
border-collapse: separate; |
border-collapse: collapse; |
border-spacing: 0px; |
border-spacing: 0px; |
width: 100%; |
width: 100%; |
} |
} |
Line 4331 table.LC_nested tr.LC_info_row td {
|
Line 4433 table.LC_nested tr.LC_info_row td {
|
font-size: small; |
font-size: small; |
text-align: center; |
text-align: center; |
} |
} |
table.LC_nested tr.LC_info_row td.LC_left_item { |
table.LC_nested tr.LC_info_row td.LC_left_item, |
|
table.LC_nested_outer tr th.LC_left_item { |
text-align: left; |
text-align: left; |
} |
} |
table.LC_nested td { |
table.LC_nested td { |
Line 4855 table.LC_sty_end {
|
Line 4958 table.LC_sty_end {
|
background: #FFBBBB; |
background: #FFBBBB; |
} |
} |
|
|
|
table.LC_double_column { |
|
border-width: 0px; |
|
border-collapse: collapse; |
|
width: 100%; |
|
padding: 2px; |
|
} |
|
|
|
table.LC_double_column tr td.LC_left_col { |
|
top: 2px; |
|
left: 2px; |
|
width: 47%; |
|
vertical-align: top; |
|
} |
|
|
|
table.LC_double_column tr td.LC_right_col { |
|
top: 2px; |
|
right: 2px; |
|
width: 47%; |
|
vertical-align: top; |
|
} |
|
|
|
span.LC_role_level { |
|
font-weight: bold; |
|
} |
|
|
|
div.LC_left_float { |
|
float: left; |
|
padding-right: 5%; |
|
padding:bottom: 4px; |
|
} |
|
|
|
div.LC_clear_float_header { |
|
padding:bottom: 2px; |
|
} |
|
|
|
div.LC_clear_float_footer { |
|
padding:top: 10px; |
|
clear: both; |
|
} |
|
|
END |
END |
} |
} |
|
|
Line 4971 Inputs: none
|
Line 5114 Inputs: none
|
sub xml_begin { |
sub xml_begin { |
my $output=''; |
my $output=''; |
|
|
&Apache::lonhtmlcommon::init_htmlareafields(); |
if ($env{'internal.start_page'}==1) { |
|
&Apache::lonhtmlcommon::init_htmlareafields(); |
|
} |
|
|
if ($env{'browser.mathml'}) { |
if ($env{'browser.mathml'}) { |
$output='<?xml version="1.0"?>' |
$output='<?xml version="1.0"?>' |
Line 6533 sub csv_print_samples {
|
Line 6678 sub csv_print_samples {
|
my ($r,$records) = @_; |
my ($r,$records) = @_; |
my $samples = &get_samples($records,3); |
my $samples = &get_samples($records,3); |
|
|
$r->print(&mt('Samples').'<br /><table border="2"><tr>'); |
$r->print(&mt('Samples').'<br />'.&start_data_table(). |
|
&start_data_table_header_row()); |
foreach my $sample (sort({$a <=> $b} keys(%{ $samples->[0] }))) { |
foreach my $sample (sort({$a <=> $b} keys(%{ $samples->[0] }))) { |
$r->print('<th>'.&mt('Column [_1]',($sample+1)).'</th>'); } |
$r->print('<th>'.&mt('Column [_1]',($sample+1)).'</th>'); } |
$r->print('</tr>'); |
$r->print(&end_data_table_header_row()); |
foreach my $hash (@$samples) { |
foreach my $hash (@$samples) { |
$r->print('<tr>'); |
$r->print(&start_data_table_row()); |
foreach my $sample (sort({$a <=> $b} keys(%{ $samples->[0] }))) { |
foreach my $sample (sort({$a <=> $b} keys(%{ $samples->[0] }))) { |
$r->print('<td>'); |
$r->print('<td>'); |
if (defined($$hash{$sample})) { $r->print($$hash{$sample}); } |
if (defined($$hash{$sample})) { $r->print($$hash{$sample}); } |
$r->print('</td>'); |
$r->print('</td>'); |
} |
} |
$r->print('</tr>'); |
$r->print(&end_data_table_row()); |
} |
} |
$r->print('</tr></table><br />'."\n"); |
$r->print(&end_data_table().'<br />'."\n"); |
} |
} |
|
|
###################################################### |
###################################################### |
Line 6571 sub csv_print_select_table {
|
Line 6717 sub csv_print_select_table {
|
my $i=0; |
my $i=0; |
my $samples = &get_samples($records,1); |
my $samples = &get_samples($records,1); |
$r->print(&mt('Associate columns with student attributes.')."\n". |
$r->print(&mt('Associate columns with student attributes.')."\n". |
'<table border="2"><tr>'. |
&start_data_table().&start_data_table_header_row(). |
'<th>'.&mt('Attribute').'</th>'. |
'<th>'.&mt('Attribute').'</th>'. |
'<th>'.&mt('Column').'</th></tr>'."\n"); |
'<th>'.&mt('Column').'</th>'. |
|
&end_data_table_header_row()."\n"); |
foreach my $array_ref (@$d) { |
foreach my $array_ref (@$d) { |
my ($value,$display,$defaultcol)=@{ $array_ref }; |
my ($value,$display,$defaultcol)=@{ $array_ref }; |
$r->print('<tr><td>'.$display.'</td>'); |
$r->print(&start_data_table_row().'<tr><td>'.$display.'</td>'); |
|
|
$r->print('<td><select name=f'.$i. |
$r->print('<td><select name=f'.$i. |
' onchange="javascript:flip(this.form,'.$i.');">'); |
' onchange="javascript:flip(this.form,'.$i.');">'); |
Line 6586 sub csv_print_select_table {
|
Line 6733 sub csv_print_select_table {
|
($sample eq $defaultcol ? ' selected="selected" ' : ''). |
($sample eq $defaultcol ? ' selected="selected" ' : ''). |
'>Column '.($sample+1).'</option>'); |
'>Column '.($sample+1).'</option>'); |
} |
} |
$r->print('</select></td></tr>'."\n"); |
$r->print('</select></td>'.&end_data_table_row()."\n"); |
$i++; |
$i++; |
} |
} |
|
$r->print(&end_data_table()); |
$i--; |
$i--; |
return $i; |
return $i; |
} |
} |
Line 6615 sub csv_samples_select_table {
|
Line 6763 sub csv_samples_select_table {
|
my $i=0; |
my $i=0; |
# |
# |
my $samples = &get_samples($records,3); |
my $samples = &get_samples($records,3); |
$r->print('<table border=2><tr><th>'. |
$r->print(&start_data_table(). |
&mt('Field').'</th><th>'.&mt('Samples').'</th></tr>'); |
&start_data_table_header_row().'<th>'. |
|
&mt('Field').'</th><th>'.&mt('Samples').'</th>'. |
|
&end_data_table_header_row()); |
|
|
foreach my $key (sort(keys(%{ $samples->[0] }))) { |
foreach my $key (sort(keys(%{ $samples->[0] }))) { |
$r->print('<tr><td><select name="f'.$i.'"'. |
$r->print(&start_data_table_row().'<td><select name="f'.$i.'"'. |
' onchange="javascript:flip(this.form,'.$i.');">'); |
' onchange="javascript:flip(this.form,'.$i.');">'); |
foreach my $option (@$d) { |
foreach my $option (@$d) { |
my ($value,$display,$defaultcol)=@{ $option }; |
my ($value,$display,$defaultcol)=@{ $option }; |
Line 6633 sub csv_samples_select_table {
|
Line 6783 sub csv_samples_select_table {
|
$r->print($samples->[$line]{$key}."<br />\n"); |
$r->print($samples->[$line]{$key}."<br />\n"); |
} |
} |
} |
} |
$r->print('</td></tr>'); |
$r->print('</td>'.&end_data_table_row()); |
$i++; |
$i++; |
} |
} |
|
$r->print(&end_data_table()); |
$i--; |
$i--; |
return($i); |
return($i); |
} |
} |