--- loncom/interface/lonextresedit.pm 2017/04/25 22:18:59 1.16 +++ loncom/interface/lonextresedit.pm 2017/05/08 14:20:20 1.18 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: lonextresedit.pm,v 1.16 2017/04/25 22:18:59 raeburn Exp $ +# $Id: lonextresedit.pm,v 1.18 2017/05/08 14:20:20 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -60,7 +60,7 @@ sub handler { $symb,$type); if (($env{'form.folderpath'} =~ /^supplemental/) && ($env{'form.suppurl'})) { $supplementalflag = 1; - if (&unescape($env{'form.suppurl'}) =~ m{^/adm/$cdom/$cnum/\d+/exttools?$}) { + if (&unescape($env{'form.suppurl'}) =~ m{^/adm/$cdom/$cnum/\d+/ext\.tool$}) { $type = 'tool'; } } @@ -79,7 +79,7 @@ sub handler { if ($symb ne $env{'form.symb'}) { $env{'form.symb'} = $symb; } - if ($url =~ m{/adm/$cdom/$cnum/\d+/exttools?$}) { + if ($url =~ m{/adm/$cdom/$cnum/\d+/ext\.tool$}) { $type = 'tool'; } } @@ -146,7 +146,7 @@ sub process_changes { $oldtitle = &unescape($env{'form.title'}); $container = 'sequence'; $supplementalflag = 1; - if ($oldurl =~ m{^/adm/$cdom/$cnum/\d+/exttools?$}) { + if ($oldurl =~ m{^/adm/$cdom/$cnum/\d+/ext\.tool$}) { $type = 'tool'; } else { $type = 'ext'; @@ -157,7 +157,7 @@ sub process_changes { if ($env{'form.importdetail'}) { ($newtitle,$newurl,$newidx) = map {&unescape($_)} split(/\=/,$env{'form.importdetail'}); - if ($newurl =~ m{^(/adm/$cdom/$cnum/(\d+)/exttools?)\:?(.*)$}) { + if ($newurl =~ m{^(/adm/$cdom/$cnum/(\d+)/ext\.tool)\:?(.*)$}) { $newurl = $1; $marker = $2; $args = $3; @@ -418,7 +418,7 @@ sub extedit_form { } else { $orig_title = $lt{'et'}; $save = $lt{'at'}; - $orig_url = "/adm/$cdom/$cnum/new/exttool"; + $orig_url = "/adm/$cdom/$cnum/new/ext\.tool"; } $pathitem .= '
'; } @@ -429,7 +429,7 @@ sub extedit_form { my $class = 'LC_nobreak'; if ($residx) { $class = 'LC_docs_ext_edit LC_nobreak'; - if ($orig_url =~ m{^/adm/$cdom/$cnum/(\d+)/exttools?$}) { + if ($orig_url =~ m{^/adm/$cdom/$cnum/(\d+)/ext\.tool$}) { my $marker = $1; my %toolhash=&Apache::lonnet::dump('exttool_'.$marker,$cdom,$cnum); if ($toolhash{'id'}) { @@ -912,28 +912,28 @@ function updateExttool(caller,form,suppl document.getElementById(windiv).style.display = 'none'; } if (document.getElementById(linktextdiv)) { - if ((ltitoolsLink[j]) && (ltitoolsTarget[j] == 'window')) { + if (ltitoolsLink[j]) { document.getElementById(linktextdiv).style.display = 'inline'; } else { document.getElementById(linktextdiv).style.display = 'none'; } } if (document.getElementById(linktextinput)) { - if ((ltitoolsLink[j]) && (ltitoolsTarget[j] == 'window')) { + if (ltitoolsLink[j]) { document.getElementById(linktextinput).value = ltitoolsLinkDef[j]; } else { document.getElementById(linktextinput).value = ''; } } if (document.getElementById(explanationdiv)) { - if ((ltitoolsExplain[j]) && (ltitoolsTarget[j] == 'window')) { + if (ltitoolsExplain[j]) { document.getElementById(explanationdiv).style.display = 'inline'; } else { document.getElementById(explanationdiv).style.display = 'none'; } } if (document.getElementById(explanationinput)) { - if ((ltitoolsExplain[j]) && (ltitoolsTarget[j] == 'window')) { + if (ltitoolsExplain[j]) { document.getElementById(explanationinput).value = ltitoolsExplainDef[j]; } else { document.getElementById(explananationinput).value = ''; @@ -967,7 +967,7 @@ function updateTooldim(form,dimendiv,win for (var i=0; i