version 1.72, 2003/11/24 21:54:39
|
version 1.75, 2004/01/09 23:22:18
|
Line 677 sub select_or_text_arg {
|
Line 677 sub select_or_text_arg {
|
} |
} |
$optionlist.="<option value=\"TYPEDINVALUE\"". |
$optionlist.="<option value=\"TYPEDINVALUE\"". |
((!$found)?' selected="on"':''). |
((!$found)?' selected="on"':''). |
">".&mt('Type in value')."</option>\n"; |
">".&mt('Type-in value')."</option>\n"; |
# |
# |
my $element=&html_element_name($name); |
my $element=&html_element_name($name); |
my $selectelement='select_list_'.$element; |
my $selectelement='select_list_'.$element; |
Line 696 sub select_or_text_arg {
|
Line 696 sub select_or_text_arg {
|
<nobr> |
<nobr> |
$description |
$description |
<select name="$selectelement" |
<select name="$selectelement" |
onChange="if ($selectedvalue!='TYPEDINVALUE') { $hiddenvalue=$selectedvalue; $typedinvalue=''; }" |
onChange="if ($selectedvalue!='TYPEDINVALUE') { $hiddenvalue=$selectedvalue; $typedinvalue=''; }" > |
$optionlist |
$optionlist |
</select> |
</select> |
<input type="text" size="$size" name="$typeinelement" |
<input type="text" size="$size" name="$typeinelement" |
Line 766 target="imagechoice">Click Coordinate Pa
|
Line 766 target="imagechoice">Click Coordinate Pa
|
ENDBUTTON |
ENDBUTTON |
return $result; |
return $result; |
} |
} |
|
|
|
# coordinate polygon (x1,y1)-(x2,y2)... |
|
sub entercoordpolygon { |
|
my ($id,$mode,$width,$height) = @_; |
|
unless ($Apache::edit::bgimgsrc) { return ''; } |
|
my $bgfile=&Apache::lonnet::escape($Apache::edit::bgimgsrc); |
|
my $form = 'lonhomework'; |
|
my $element; |
|
if (! defined($mode) || $mode eq 'attribute') { |
|
$element = &Apache::lonnet::escape("$id\_$Apache::lonxml::curdepth"); |
|
} elsif ($mode eq 'textnode') { # for data between <tag> ... </tag> |
|
$element = &Apache::lonnet::escape('homework_edit_'. |
|
$Apache::lonxml::curdepth); |
|
} |
|
my $id=&Apache::loncommon::get_cgi_id(); |
|
my %data=("cgi.$id.mode" =>'polygon', |
|
"cgi.$id.formname" =>$form, |
|
"cgi.$id.file" =>$bgfile, |
|
"cgi.$id.formcoord" =>$element); |
|
if ($height) { |
|
$data{"cgi.$id.formheight"}=$height.'_'.$Apache::edit::bgimgsrccurdepth; |
|
} |
|
if ($width) { |
|
$data{"cgi.$id.formwidth"}=$width.'_'.$Apache::edit::bgimgsrccurdepth; |
|
} |
|
&Apache::lonnet::appenv(%data); |
|
my $result='<a href="/adm/imagechoice?token='.$id.'" target="imagechoice">Create Polygon Data</a>'; |
|
return $result; |
|
} |
#----------------------------------------------------- browse |
#----------------------------------------------------- browse |
sub browse { |
sub browse { |
# insert a link to call up the filesystem browser (lonindexer) |
# insert a link to call up the filesystem browser (lonindexer) |