--- loncom/interface/londocs.pm 2009/02/03 14:16:39 1.334
+++ loncom/interface/londocs.pm 2009/03/08 21:49:33 1.353
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.334 2009/02/03 14:16:39 muellerd Exp $
+# $Id: londocs.pm,v 1.353 2009/03/08 21:49:33 weissno Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -133,7 +133,7 @@ sub dumpbutton {
sub clean {
my ($title)=@_;
$title=~s/[^\w\/\!\$\%\^\*\-\_\=\+\;\:\,\\\|\`\~]+/\_/gs;
- return $title;
+ return $title;
}
@@ -175,8 +175,8 @@ sub dumpcourse {
my $fail=0;
for (my $i=0;$i<$#dirs;$i++) {
$makepath.='/'.$dirs[$i];
- unless (-e $makepath) {
- unless(mkdir($makepath,0777)) { $fail=1; }
+ unless (-e $makepath) {
+ unless(mkdir($makepath,0777)) { $fail=1; }
}
}
$r->print(''.$item.' => '.$newfilename.' : ');
@@ -759,7 +759,7 @@ sub replicate_content {
if ($caller eq 'templateupload') {
$url = $symb;
$url =~ s#//#/#g;
- } else {
+ } else {
($map,$ind,$url)=&Apache::lonnet::decode_symb($symb);
}
my $content;
@@ -799,9 +799,9 @@ sub replicate_content {
$$message = 'Could not render '.$url.' server message - '.$rtncode." \n";
}
} elsif ($caller eq 'noedit') {
-# Need to render the resource without the LON-CAPA Internal header and the Post discussion footer, and then set $content equal to this.
+# Need to render the resource without the LON-CAPA Internal header and the Post discussion footer, and then set $content equal to this.
$repstatus = 'ok';
- $content = 'Not the owner of this resource';
+ $content = 'Not the owner of this resource';
}
if ($repstatus eq 'ok') {
print $copiedfile $content;
@@ -852,8 +852,8 @@ sub extract_media {
}
}
if ($caller eq 'resource') {
- my $respath = $Apache::lonnet::perlvar{'lonDocRoot'}.'/res';
- my $embed_path = &Apache::lonnet::filelocation($respath,$embed_url);
+ my $respath = $Apache::lonnet::perlvar{'lonDocRoot'}.'/res';
+ my $embed_path = &Apache::lonnet::filelocation($respath,$embed_url);
$embed_content = &Apache::lonnet::getfile($embed_path);
unless ($embed_content eq -1) {
$repstatus = 'ok';
@@ -921,7 +921,7 @@ sub group_import {
while (@files) {
my ($name, $url, $residx) = @{ shift(@files) };
- if (($url =~ m{^/uploaded/\Q$coursedom\E/\Q$coursenum\E/(default_\d+\.)(page|sequence)$})
+ if (($url =~ m{^/uploaded/\Q$coursedom\E/\Q$coursenum\E/(default_\d+\.)(page|sequence)$})
&& ($caller eq 'londocs')
&& (!&Apache::lonnet::stat_file($url))) {
@@ -944,7 +944,7 @@ sub group_import {
}
}
if ($url) {
- if (!$residx
+ if (!$residx
|| defined($LONCAPA::map::zombies[$residx])) {
$residx = &LONCAPA::map::getresidx($url,$residx);
push(@LONCAPA::map::order, $residx);
@@ -953,7 +953,7 @@ sub group_import {
if ($url=~m{^http://} || $url=~m{^https://}) { $ext = 'true'; }
$url = &LONCAPA::map::qtunescape($url);
$name = &LONCAPA::map::qtunescape($name);
- $LONCAPA::map::resources[$residx] =
+ $LONCAPA::map::resources[$residx] =
join(':', ($name, $url, $ext, 'normal', 'res'));
}
}
@@ -984,9 +984,9 @@ sub breadcrumbs {
my $url='/adm/coursedocs?folderpath='.
&escape($folderpath);
my $name=&unescape($foldername);
-# randompick number, hidden, encrypted, random order, is appended with ":"s to the foldername
+# randompick number, hidden, encrypted, random order, is appended with ":"s to the foldername
$name=~s/\:(\d*)\:(\w*)\:(\w*):(\d*)$//;
- if ($1 ne '') {
+ if ($1 ne '') {
$randompick=$1;
} else {
$randompick=-1;
@@ -1125,7 +1125,7 @@ sub docs_change_log {
foreach my $key (@changes) {
$wholeentry.=':'.$docslog{$id}{'logentry'}{$key};
}
- if ($wholeentry!~/\Q$env{'form.containingphrase'}\E/i) { next; }
+ if ($wholeentry!~/\Q$env{'form.containingphrase'}\E/i) { next; }
}
my $count = 0;
my $time =
@@ -1223,7 +1223,7 @@ sub update_paste_buffer {
&Apache::lonnet::appenv({'docs.markedcopy_supplemental' => $title});
($title) = &parse_supplemental_title($title);
} elsif ($env{'docs.markedcopy_supplemental'}) {
- &Apache::lonnet::delenv('docs\\.markedcopy_supplemental');
+ &Apache::lonnet::delenv('docs.markedcopy_supplemental');
}
$url=~s{http(:|:)//https(:|:)//}{https$2//};
@@ -1327,7 +1327,7 @@ sub do_paste_from_buffer {
}
# published maps can only exists once, so remove it from paste buffer when done
if (($url=~/\.(page|sequence)$/) && ($url=~m {^/res/})) {
- &Apache::lonnet::delenv('docs\\.markedcopy');
+ &Apache::lonnet::delenv('docs.markedcopy');
}
if ($url=~ m{/smppg$}) {
my $db_name = &Apache::lonsimplepage::get_db_name($url);
@@ -1338,7 +1338,7 @@ sub do_paste_from_buffer {
$db_name =~ s{_\d*$ }{_$now}x;
my $result=&Apache::lonnet::put($db_name,\%contents,
$coursedom,$coursenum);
- $url =~ s{/(\d*)/smppg$ }{/$now/smppg}x;
+ $url =~ s{/(\d*)/smppg$ }{/$now/smppg}x;
$title=&mt('Copy of').' '.$title;
}
}
@@ -1352,7 +1352,7 @@ sub do_paste_from_buffer {
if ($folder =~ /^supplemental/) {
$title = $env{'docs.markedcopy_supplemental'};
} else {
- (undef,undef,$title) =
+ (undef,undef,$title) =
&parse_supplemental_title($env{'docs.markedcopy_supplemental'});
}
} else {
@@ -1376,7 +1376,7 @@ sub uniqueness_check {
$url=&LONCAPA::map::qtescape($url);
if ($newurl eq $url) {
$unique = 0;
- last;
+ last;
}
}
return $unique;
@@ -1430,7 +1430,7 @@ sub handle_edit_cmd {
&LONCAPA::map::makezombie($LONCAPA::map::order[$idx]);
splice(@LONCAPA::map::order, $idx, 1);
- } elsif ($cmd eq 'up'
+ } elsif ($cmd eq 'up'
&& ($idx) && (defined($LONCAPA::map::order[$idx-1]))) {
@LONCAPA::map::order[$idx-1,$idx] = @LONCAPA::map::order[$idx,$idx-1];
@@ -1497,7 +1497,7 @@ sub editor {
}
if ($env{'form.pastemarked'}) {
- my $paste_res =
+ my $paste_res =
&do_paste_from_buffer($coursenum,$coursedom,$folder);
if ($paste_res eq 'ok') {
($errtext,$fatal) = &storemap($coursenum,$coursedom,$folder.'.'.$container);
@@ -1660,7 +1660,7 @@ sub process_file_upload {
';
$phase_status = 'phasetwo';
- $$upload_output .=
+ $$upload_output .=
'This file contains embedded multimedia objects, which need to be uploaded to LON-CAPA. '.
&Apache::loncommon::ask_for_embedded_content(
'/adm/coursedocs',$state,$allfiles,$codebase);
@@ -1763,12 +1763,12 @@ sub entryline {
my $incindex=$index+1;
my $selectbox='';
if (($folder!~/^supplemental/) &&
- ($#LONCAPA::map::order>0) &&
+ ($#LONCAPA::map::order>0) &&
((split(/\:/,
- $LONCAPA::map::resources[$LONCAPA::map::order[0]]))[1]
- ne '') &&
+ $LONCAPA::map::resources[$LONCAPA::map::order[0]]))[1]
+ ne '') &&
((split(/\:/,
- $LONCAPA::map::resources[$LONCAPA::map::order[1]]))[1]
+ $LONCAPA::map::resources[$LONCAPA::map::order[1]]))[1]
ne '')) {
$selectbox=
' '.
@@ -1805,8 +1805,8 @@ sub entryline {
}
}
}
- if ($url=~/^\/res\/lib\/templates\//) {
- $nocopy=1;
+ if ($url=~/^\/res\/lib\/templates\//) {
+ $nocopy=1;
$nocut=1;
}
my $copylink=' ';
@@ -1899,6 +1899,7 @@ END
}
my $orig_url = $url;
+ $orig_url=~s{http(:|:)//https(:|:)//}{https$2//};
my $external = ($url=~s{^http(|s)(:|:)//}{/adm/wrapper/ext/});
if ((!$isfolder) && ($residx) && ($folder!~/supplemental/) && (!$ispage)) {
my $symb=&Apache::lonnet::symbclean(
@@ -1920,7 +1921,7 @@ END
} elsif ($url!~/\.(sequence|page)$/) {
$url='/adm/coursedocs/showdoc'.$url;
}
- } elsif ($url=~m|^/ext/|) {
+ } elsif ($url=~m|^/ext/|) {
$url='/adm/wrapper'.$url;
$external = 1;
}
@@ -1941,7 +1942,7 @@ END
my $foldername=&escape($foldertitle);
my $folderpath=$env{'form.folderpath'};
if ($folderpath) { $folderpath.='&' };
-# Append randompick number, hidden, and encrypted with ":" to foldername,
+# Append randompick number, hidden, and encrypted with ":" to foldername,
# so it gets transferred between levels
$folderpath.=$folderarg.'&'.$foldername.':'.(&LONCAPA::map::getparameter($orderidx,
'parameter_randompick'))[0]
@@ -1961,7 +1962,7 @@ END
my $ro_set=
((&LONCAPA::map::getparameter($orderidx,'parameter_randomorder'))[0]=~/^yes$/i?' checked="checked"':'');
$rand_order_text ='
- '.&mt('Random Order').' ';
+ '.&mt('Random Order').' ';
}
if ($ispage) {
my $pagename=&escape($pagetitle);
@@ -2252,7 +2253,7 @@ sub checkversions {
if ($haschanged) {
if (&Apache::lonnet::put('resourceversions',\%newsetversions,
$env{'course.'.$env{'request.course.id'}.'.domain'},
- $env{'course.'.$env{'request.course.id'}.'.num'}) eq 'ok') {
+ $env{'course.'.$env{'request.course.id'}.'.num'}) eq 'ok') {
$r->print('
'.&mt('Your Version Settings have been Saved').' ');
} else {
$r->print(''.&mt('An Error Occured while Attempting to Save your Version Settings').' ');
@@ -2404,7 +2405,7 @@ ENDHEADERS
$entries_per_col = $num_entries/4 + 1;
}
my $entries_count = 0;
- $r->print('');
+ $r->print(' ');
my $cols_output = 1;
for (my $prevvers=$lastold;$prevvers<$currentversion;$prevvers++) {
my $url=$root.'.'.$prevvers.'.'.$extension;
@@ -2483,7 +2484,7 @@ sub changewarning {
$message='Changes will become active for your current session after [_1], or the next time you log in.';
}
$r->print("\n\n".
-''."\n".
+''."\n".
'
+
+HIDDENFORM
+ }
+# --------------------------------------------------------- Main tab structure
+ my $activeClass = 1;
+ $r->print('');
+ if (($standard) && ($allowed) && (!$forcesupplement)) {
+ my $active = '';
+ if($activeClass == 1){
+ $active = 'class="active"';
+ $activeClass = 0;
+ }
+ $r->print(''.&mt('Main Course Documents').' ');
}
+ if (!$forcestandard) {
+ my $active = '';
+ if($activeClass == 1){
+ $active = 'class="active"';
+ }
+ $r->print(''.&mt('Supplemental Course Documents').' ');
+ }
+ $r->print(''.&mt('Special Admin Options').' ');
+ $r->print(' ');
# --------------------------------------------------------- Standard documents
if (($standard) && ($allowed) && (!$forcesupplement)) {
+ my $active = 'style="display: none;"';
+ if($activeClass == 0){
+ $active = 'style="display: block;"';
+ }
+ $r->print('
');
+ $r->print(&Apache::loncommon::help_open_topic('Docs_Adding_Course_Doc',
+ &mt('Editing the Table of Contents for your '.$type)));
my $folder=$env{'form.folder'};
if ($folder eq '' || $folder eq 'supplemental') {
$folder='default';
@@ -2892,16 +2929,6 @@ ERFORM
} else {
#$postexec='self.close();';
}
- $hadchanges=0;
- my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,
- $upload_output,$type);
- if ($error) {
- $r->print('
'.$error.'
');
- }
- if ($hadchanges) {
- &mark_hash_old();
- }
- &changewarning($r,$postexec);
my $folderseq='/uploaded/'.$coursedom.'/'.$coursenum.'/default_'.time.
'.sequence';
my $pageseq = '/uploaded/'.$coursedom.'/'.$coursenum.'/default_'.time.
@@ -2963,13 +2990,13 @@ NSPROBFORM
my $newdropboxform=(<
- $uploadtag
+ $uploadtag
-
+
-
-
+
+
NDBFORM
my $newexuploadform=(<
- $help{'My Personal Info'}
+ $help{'My Personal Information Page'}
NAMFORM
@@ -3032,6 +3059,9 @@ NASOFORM
NROSTFORM
+my $specialdocumentsform;
+my $newfolderform;
+
unless ($env{'form.pagepath'}) {
my $path = &HTML::Entities::encode($env{'form.folderpath'},'<>&"');
@@ -3047,7 +3077,7 @@ NROSTFORM
NPFORM
- my $newfolderform=(<
@@ -3078,28 +3108,21 @@ NSYLFORM
value="$lt{'grpo'}=/adm/$coursedom/$coursenum/aboutme" />
- $help{'Group Files'}
+ $help{'Group Portfolio'}
NGFFORM
-
- my $specialdocumentsform=(< $newfolderform
- $newpageform
- $newsylform
- $newnavform
- $newsmppageform
- $newsmpproblemform
- $newdropboxform
- $newexuploadform
- $newbulform
- $newaboutmeform
- $newaboutsomeoneform
- $newgroupfileform
- $newrosterform
-SPDOFORM
-
+ $specialdocumentsform=" $newpageform $newsylform $newgroupfileform";
+ }
+ $specialdocumentsform.=" $newnavform $newsmppageform
+ $newsmpproblemform $newdropboxform
+ $newexuploadform $newbulform
+ $newaboutmeform $newaboutsomeoneform
+ $newrosterform";
+if($env{'form.pagepath'}) {
+ $specialdocumentsform=" $newsmpproblemform $newexuploadform";
+}
my %orderhash = (
'aa' => 'New Document',
@@ -3109,7 +3132,7 @@ my %orderhash = (
'zz' => 'Hide all Options',
);
my %namehash = (
- 'New Document' => $fileuploadform,
+ 'New Document' => $fileuploadform.' '.$newfolderform,
'Published Documents' => $simpleeditdefaultform,
'Special Documents' => $specialdocumentsform,
'More Options' => $extresourcesform.' '.$imspform.' '.$recoverform,
@@ -3118,13 +3141,28 @@ my $tid='1';
my $content='content';
my $navigation='navigation';
my $varcd = 'Main Course Documents';
-$r->print(&generate_edit_table($tid,$content,$navigation,$varcd,\%namehash,\%orderhash));
- }
+$r->print(&generate_edit_table($tid,$content,$navigation,$varcd,\%namehash,\%orderhash));
+ $hadchanges=0;
+ my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type);
+ if ($error) {
+ $r->print(''.$error.'
');
+ }
+ if ($hadchanges) {
+ &mark_hash_old();
+ }
+
+ &changewarning($r,'');
+$r->print(' ');
if ($env{'form.pagepath'}) {
}
}
# ----------------------------------------------------- Supplemental documents
if (!$forcestandard) {
+ my $active = 'style="display: none;"';
+ if($activeClass == 1){
+ $active = 'style="display: block;"';
+ }
+ $r->print('
');
my $folder=$env{'form.folder'};
unless ($folder=~/^supplemental/) {
$folder='supplemental';
@@ -3134,10 +3172,6 @@ $r->print(&generate_edit_table($tid,$con
$env{'form.folderpath'} = 'supplemental&'.
&escape(&mt('Supplemental '.$type.' Documents'));
}
- my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type);
- if ($error) {
- $r->print('
'.$error.'
');
- }
if ($allowed) {
my $folderseq=
'/uploaded/'.$coursedom.'/'.$coursenum.'/supplemental_'.time.
@@ -3211,7 +3245,7 @@ SNSFORM
value="$plainname=/adm/$udom/$uname/aboutme" />
- $help{'My Personal Info'}
+ $help{'My Personal Information Page'}
SNAMFORM
@@ -3235,9 +3269,17 @@ my $navigation='navigation';
my $varscd = 'Supplemental Course Documents';
$r->print(&generate_edit_table($tid,$content,$navigation,$varscd,\%supnamehash,\%suporderhash));
-
+my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type);
+ if ($error) {
+ $r->print('
'.$error.'
');
+ }
+$r->print('
');
}
}
+$r->print('
');
+$r->print(&generate_admin_options($containertag,$uploadtag,\%help,\%env));
+$r->print('
');
+$r->print('
');
if ($allowed) {
$r->print('
-
-
+
ENDOPTIONFORM
}
@@ -3311,21 +3347,20 @@ ENDOPTIONFORM
sub generate_edit_table {
my ($tid,$content,$navigation,$varcd,$namehash_ref,$orderhash_ref) = @_;
- my %namehash = %{$namehash_ref}; #name verlinkt mit id
- my %orderhash = %{$orderhash_ref}; #name mit kürzel verlinkt mit name
+ my %namehash = %{$namehash_ref};
+ my %orderhash = %{$orderhash_ref};
my $form;
-
-
$form = '
'.&mt($varcd).' ';
$form .= '
';
foreach my $name (sort(keys(%orderhash))){
if($name eq 'zz'){
- $form .= ''.&mt($orderhash{$name}).' ';
+ $form .= ''.&mt($orderhash{$name}).' ';
}else{
$form .= ''.&mt($orderhash{$name}).' ';
}
}
+ $form .= ' ';
$form .= '
';
foreach my $field (keys(%namehash)){
$form .= '
'.$namehash{$field}.'
';
@@ -3344,12 +3379,12 @@ sub editing_js {
p_mnp => 'Name of New Page',
t_mnp => 'New Page',
p_mxu => 'Title for the Uploaded Score',
- p_msp => 'Title for the Page',
+ p_msp => 'Name of Simple Course Page',
p_msb => 'Title for the Problem',
p_mdb => 'Title for the Drop Box',
- p_mbb => 'Title for the Bulletin Board',
- p_mab => "Enter user:domain for User's 'About Me' Page",
- p_mab2 => "About [_99]",
+ p_mbb => 'Title for the Discussion Board',
+ p_mab => "Enter user:domain for User's Personal Information Page",
+ p_mab2 => 'Personal Information Page of ',
p_mab_alrt1 => 'Not a valid user:domain',
p_mab_alrt2 => 'Please enter both user and domain in the format user:domain',
p_chn => 'New Title',
@@ -3397,7 +3432,7 @@ function edittext(targetname,residx,titl
function makeexamupload() {
var title=prompt('$lt{"p_mxu"}');
- if (title) {
+ if (title) {
this.document.forms.newexamupload.importdetail.value=
escape(title)+'=/res/lib/templates/examupload.problem';
this.document.forms.newexamupload.submit();
@@ -3406,7 +3441,7 @@ function makeexamupload() {
function makesmppage() {
var title=prompt('$lt{"p_msp"}');
- if (title) {
+ if (title) {
this.document.forms.newsmppg.importdetail.value=
escape(title)+'=/adm/$udom/$uname/$now/smppg';
this.document.forms.newsmppg.submit();
@@ -3415,7 +3450,7 @@ function makesmppage() {
function makesmpproblem() {
var title=prompt('$lt{"p_msb"}');
- if (title) {
+ if (title) {
this.document.forms.newsmpproblem.importdetail.value=
escape(title)+'=/res/lib/templates/simpleproblem.problem';
this.document.forms.newsmpproblem.submit();
@@ -3424,7 +3459,7 @@ function makesmpproblem() {
function makedropbox() {
var title=prompt('$lt{"p_mdb"}');
- if (title) {
+ if (title) {
this.document.forms.newdropbox.importdetail.value=
escape(title)+'=/res/lib/templates/DropBox.problem';
this.document.forms.newdropbox.submit();
@@ -3449,110 +3484,112 @@ function makeabout() {
if ((comp[0]) && (comp[1])) {
this.document.forms.newaboutsomeone.importdetail.value=
'$lt{"p_mab2"}'+escape(user)+'=/adm/'+comp[1]+'/'+comp[0]+'/aboutme';
- this.document.forms.newaboutsomeone.submit();
- } else {
- alert("$lt{'p_mab_alrt1'}");
- }
- } else {
- alert("$lt{'p_mab_alrt2'}");
- }
+ this.document.forms.newaboutsomeone.submit();
+ } else {
+ alert("$lt{'p_mab_alrt1'}");
}
+} else {
+ alert("$lt{'p_mab_alrt2'}");
+}
+}
}
function makeims() {
- var caller = document.forms.ims.folder.value;
- var newlocation = "/adm/imsimportdocs?folder="+caller+"&phase=one";
- newWindow = window.open("","IMSimport","HEIGHT=700,WIDTH=750,scrollbars=yes");
- newWindow.location.href = newlocation;
+var caller = document.forms.ims.folder.value;
+var newlocation = "/adm/imsimportdocs?folder="+caller+"&phase=one";
+newWindow = window.open("","IMSimport","HEIGHT=700,WIDTH=750,scrollbars=yes");
+newWindow.location.href = newlocation;
}
function finishpick() {
- var title=this.document.forms.extimport.title.value;
- var url=this.document.forms.extimport.url.value;
- var form=this.document.forms.extimport.useform.value;
- var residx=this.document.forms.extimport.residx.value;
- eval('this.document.forms.'+form+'.importdetail.value="'+title+'='+url+'='+residx+'";this.document.forms.'+form+'.submit();');
+var title=this.document.forms.extimport.title.value;
+var url=this.document.forms.extimport.url.value;
+var form=this.document.forms.extimport.useform.value;
+var residx=this.document.forms.extimport.residx.value;
+eval('this.document.forms.'+form+'.importdetail.value="'+title+'='+url+'='+residx+'";this.document.forms.'+form+'.submit();');
}
function changename(folderpath,index,oldtitle,container,pagesymb) {
- var title=prompt('$lt{"p_chn"}',oldtitle);
- if (title) {
- this.document.forms.renameform.markcopy.value=-1;
- this.document.forms.renameform.title.value=title;
- this.document.forms.renameform.cmd.value='rename_'+index;
- if (container == 'sequence') {
- this.document.forms.renameform.folderpath.value=folderpath;
- }
- if (container == 'page') {
- this.document.forms.renameform.pagepath.value=folderpath;
- this.document.forms.renameform.pagesymb.value=pagesymb;
- }
- this.document.forms.renameform.submit();
- }
+var title=prompt('$lt{"p_chn"}',oldtitle);
+if (title) {
+this.document.forms.renameform.markcopy.value=-1;
+this.document.forms.renameform.title.value=title;
+this.document.forms.renameform.cmd.value='rename_'+index;
+if (container == 'sequence') {
+ this.document.forms.renameform.folderpath.value=folderpath;
+}
+if (container == 'page') {
+ this.document.forms.renameform.pagepath.value=folderpath;
+ this.document.forms.renameform.pagesymb.value=pagesymb;
+}
+this.document.forms.renameform.submit();
+}
}
function removeres(folderpath,index,oldtitle,container,pagesymb,skip_confirm) {
- if (skip_confirm || confirm('$lt{"p_rmr1"}\\n\\n$lt{"p_rmr2a"} "'+oldtitle+'" $lt{"p_rmr2b"}')) {
- this.document.forms.renameform.markcopy.value=-1;
- this.document.forms.renameform.cmd.value='del_'+index;
- if (container == 'sequence') {
- this.document.forms.renameform.folderpath.value=folderpath;
- }
- if (container == 'page') {
- this.document.forms.renameform.pagepath.value=folderpath;
- this.document.forms.renameform.pagesymb.value=pagesymb;
- }
- this.document.forms.renameform.submit();
- }
+if (skip_confirm || confirm('$lt{"p_rmr1"}\\n\\n$lt{"p_rmr2a"} "'+oldtitle+'" $lt{"p_rmr2b"}')) {
+this.document.forms.renameform.markcopy.value=-1;
+this.document.forms.renameform.cmd.value='del_'+index;
+if (container == 'sequence') {
+ this.document.forms.renameform.folderpath.value=folderpath;
+}
+if (container == 'page') {
+ this.document.forms.renameform.pagepath.value=folderpath;
+ this.document.forms.renameform.pagesymb.value=pagesymb;
+}
+this.document.forms.renameform.submit();
+}
}
function cutres(folderpath,index,oldtitle,container,pagesymb,folder,skip_confirm) {
- if (skip_confirm || confirm('$lt{"p_ctr1a"}\\n$lt{"p_ctr1b"}\\n\\n$lt{"p_ctr2a"} "'+oldtitle+'" $lt{"p_ctr2b"}')) {
- this.document.forms.renameform.cmd.value='cut_'+index;
- this.document.forms.renameform.markcopy.value=index;
- this.document.forms.renameform.copyfolder.value=folder+'.'+container;
- if (container == 'sequence') {
- this.document.forms.renameform.folderpath.value=folderpath;
- }
- if (container == 'page') {
- this.document.forms.renameform.pagepath.value=folderpath;
- this.document.forms.renameform.pagesymb.value=pagesymb;
- }
- this.document.forms.renameform.submit();
- }
+if (skip_confirm || confirm('$lt{"p_ctr1a"}\\n$lt{"p_ctr1b"}\\n\\n$lt{"p_ctr2a"} "'+oldtitle+'" $lt{"p_ctr2b"}')) {
+this.document.forms.renameform.cmd.value='cut_'+index;
+this.document.forms.renameform.markcopy.value=index;
+this.document.forms.renameform.copyfolder.value=folder+'.'+container;
+if (container == 'sequence') {
+ this.document.forms.renameform.folderpath.value=folderpath;
+}
+if (container == 'page') {
+ this.document.forms.renameform.pagepath.value=folderpath;
+ this.document.forms.renameform.pagesymb.value=pagesymb;
+}
+this.document.forms.renameform.submit();
+}
}
function markcopy(folderpath,index,oldtitle,container,pagesymb,folder) {
- this.document.forms.renameform.markcopy.value=index;
- this.document.forms.renameform.copyfolder.value=folder+'.'+container;
- if (container == 'sequence') {
- this.document.forms.renameform.folderpath.value=folderpath;
- }
- if (container == 'page') {
- this.document.forms.renameform.pagepath.value=folderpath;
- this.document.forms.renameform.pagesymb.value=pagesymb;
- }
- this.document.forms.renameform.submit();
+this.document.forms.renameform.markcopy.value=index;
+this.document.forms.renameform.copyfolder.value=folder+'.'+container;
+if (container == 'sequence') {
+this.document.forms.renameform.folderpath.value=folderpath;
+}
+if (container == 'page') {
+this.document.forms.renameform.pagepath.value=folderpath;
+this.document.forms.renameform.pagesymb.value=pagesymb;
+}
+this.document.forms.renameform.submit();
}
function unselectInactive(nav) {
- currentNav = document.getElementById(nav);
- currentLis = currentNav.getElementsByTagName('LI');
- for (i = 0; i < currentLis.length; i++) {
- currentLis[i].className = 'i';
- }
+currentNav = document.getElementById(nav);
+currentLis = currentNav.getElementsByTagName('LI');
+for (i = 0; i < currentLis.length; i++) {
+ currentLis[i].className = 'i';
+}
}
function hideAll(current, nav, data) {
- unselectInactive(nav);
- current.className = 'active';
- currentData = document.getElementById(data);
- currentDivs = currentData.getElementsByTagName('DIV');
- for (i = 0; i < currentDivs.length; i++) {
+unselectInactive(nav);
+current.className = 'active';
+currentData = document.getElementById(data);
+currentDivs = currentData.getElementsByTagName('DIV');
+for (i = 0; i < currentDivs.length; i++) {
+ if(currentDivs[i].className == 'LC_ContentBox'){
currentDivs[i].style.display = 'none';
}
}
+}
function showPage(current, pageId, nav, data) {
hideAll(current, nav, data);
@@ -3588,7 +3625,7 @@ Available help topics
=item mapread()
-Mapread read maps into LONCAPA::map:: global arrays
+Mapread read maps into LONCAPA::map:: global arrays
@order and @resources, determines status
sets @order - pointer to resources in right order
sets @resources - array with the resources with correct idx