--- loncom/interface/lonextresedit.pm 2023/07/11 23:17:40 1.8.2.4.4.3 +++ loncom/interface/lonextresedit.pm 2023/05/22 21:10:55 1.31 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: lonextresedit.pm,v 1.8.2.4.4.3 2023/07/11 23:17:40 raeburn Exp $ +# $Id: lonextresedit.pm,v 1.31 2023/05/22 21:10:55 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -109,7 +109,7 @@ sub handler { %ltitools = ( dom => \%domtools, crs => \%crstools, - ); + ); } my $js = &Apache::lonhtmlcommon::scripttag(&extedit_javascript()); my $pathitem = ''; } $formname = 'edit'.$type.'_'.$residx; - $fieldsetid = 'upload'.$type.$residx; + $fieldsetid = 'external'.$type.$residx; $urlid = $type.'url_'.$residx; map { $toolattr{$_} .= '_'.$residx; } (keys(%toolattr)); $srcclass = ' class="LC_nobreak"'; @@ -474,7 +472,7 @@ sub extedit_form { if ($type eq 'tool') { $link = $lt{'et'}; } - $link = ''.$link.''.$helpitem; + $link = ''.$link.''.$helpitem; if ($type eq 'tool') { $legend = $lt{'te'}; } else { @@ -522,7 +520,7 @@ sub extedit_form { if (ref($ltitools->{'dom'}) eq 'HASH') { $ltihash = $ltitools->{'dom'}->{$tool}; } - } + } } if (($tool ne '') && (ref($ltihash) eq 'HASH')) { my $tooltitle = $ltihash->{'title'}; @@ -633,7 +631,7 @@ sub extedit_form { $exttypeofftext = &mt('No external tools defined in the domain are available for selection.'); } elsif (!$numcrstools && $numdomtools) { $defcheck{'dom'} = ' checked="checked"'; - $subdivstyle = 'display:block'; + $subdivstyle = 'display:none'; $exttypeonsty = 'display:block'; my $firstoption = ''; $seloptions = &ordered_tooloptions($ltitools->{'dom'}); @@ -718,17 +716,13 @@ $preview "; } - my $idattr; - unless ($subdivid eq '') { - $idattr = 'id="'.$subdivid.'"'; - } $form = <
$legend $active $chooser -
+
$title @@ -1059,7 +1053,7 @@ function setExternal(extform,residx,type if (residx > 0) { labelinput += '_'+residx; titleinput += '_'+residx; - appendinput += '_'+residx; + appendinput += '_'+residx; } if (document.getElementById(labelinput)) { var crslabel = document.getElementById(labelinput).value; @@ -1118,14 +1112,14 @@ function setExternal(extform,residx,type } function editext(residx,type) { - if (document.getElementById('upload'+type+residx)) { - var curr = document.getElementById('upload'+type+residx).style.display; + if (document.getElementById('external'+type+residx)) { + var curr = document.getElementById('external'+type+residx).style.display; if (curr == 'none') { disp = 'block'; } else { disp = 'none'; } - document.getElementById('upload'+type+residx).style.display=disp; + document.getElementById('external'+type+residx).style.display=disp; } resize_scrollbox('contentscroll','1','1'); return; @@ -1366,7 +1360,7 @@ function updateExttool(caller,form,suppl if ((ltitoolsDisplay[i][j]) && (ltitoolsTarget[i][j] == 'window')) { dimen = 'block'; dimenwidth = ltitoolsWidth[i][j]; - dimenheight = ltitoolsHeight[i][j]; + dimenheight = ltitoolsHeight[i][j]; } if (document.getElementById(dimendiv)) { document.getElementById(dimendiv).style.display = dimen; @@ -1393,7 +1387,7 @@ function updateExttool(caller,form,suppl } if (document.getElementById(linktextinput)) { if (ltitoolsLink[i][j]) { - document.getElementById(linktextinput).value = ltitoolsLinkDef[i][j]; + document.getElementById(linktextinput).value = ltitoolsLinkDef[i][j]; } else { document.getElementById(linktextinput).value = ''; }