--- loncom/interface/londocs.pm 2008/12/15 06:09:37 1.322
+++ loncom/interface/londocs.pm 2009/02/12 11:35:07 1.340
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.322 2008/12/15 06:09:37 raeburn Exp $
+# $Id: londocs.pm,v 1.340 2009/02/12 11:35:07 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -59,7 +59,6 @@ my $hadchanges;
my %help=();
-
sub mapread {
my ($coursenum,$coursedom,$map)=@_;
return
@@ -120,11 +119,9 @@ sub dumpbutton {
my $type = &Apache::loncommon::course_type();
if ($home+$other==0) { return ''; }
if ($home) {
- return '
'.
&mt('Dump '.$type.
@@ -265,10 +262,9 @@ sub dumpcourse {
sub exportbutton {
my $type = &Apache::loncommon::course_type();
- return '
'.
- ' '.
- &Apache::loncommon::help_open_topic('Docs_Export_Course_Docs').'
';
+ &Apache::loncommon::help_open_topic('Docs_Export_Course_Docs');
}
@@ -280,6 +276,15 @@ sub exportcourse {
$env{'course.'.$env{'request.course.id'}.'.domain'}, $env{'course.'.$env{'request.course.id'}.'.num'});
my $numdisc = keys(%discussiontime);
my $navmap = Apache::lonnavmaps::navmap->new();
+ if (!defined($navmap)) {
+ $r->print(&Apache::loncommon::start_page('Export '.lc($type).' to IMS content package').
+ '
IMS Export Failed '.
+ '
'.
+ &mt('Unable to retrieve information about course contents').
+ '
'.&mt('Return to Course Editor').' ');
+ &Apache::lonnet::logthis('IMS export failed - could not create navmap object in '.lc($type).':'.$env{'request.course.id'});
+ return;
+ }
my $it=$navmap->getIterator(undef,undef,undef,1,undef,undef);
my $curRes;
my $outcome;
@@ -471,8 +476,7 @@ function containerCheck(item) {
$r->print($display.''.
'
'.
'
'.
- &Apache::loncommon::end_page());
+ &mt('Export '.$type.' DOCS').'" />');
}
}
@@ -1280,7 +1284,7 @@ sub do_paste_from_buffer {
# Maps need to be copied first
if (($url=~/\.(page|sequence)$/) && ($url=~/^\/uploaded\//)) {
$title=&mt('Copy of').' '.$title;
- my $newid=$$.time;
+ my $newid=$$.int(rand(100)).time;
my ($oldid,$ext) = ($url=~/^(.+)\.(\w+)$/);
if ($oldid =~ m{^(/uploaded/\Q$coursedom\E/\Q$coursenum\E/)(\D+)(\d+)$}) {
my $path = $1;
@@ -1895,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(
@@ -2136,19 +2141,27 @@ List Symbs
sub list_symbs {
my ($r) = @_;
+ my $type = &Apache::loncommon::course_type();
$r->print(&Apache::loncommon::start_page('Symb List'));
$r->print(&Apache::lonhtmlcommon::breadcrumbs('Symb List'));
my $navmap = Apache::lonnavmaps::navmap->new();
- $r->print("
\n");
- foreach my $res ($navmap->retrieveResources()) {
- $r->print($res->compTitle()."\t".$res->symb()."\n");
+ if (!defined($navmap)) {
+ $r->print(''.&mt('Retrieval of List Failed').' '.
+ ''.
+ &mt('Unable to retrieve information about course contents').
+ '
');
+ &Apache::lonnet::logthis('Symb list failed - could not create navmap object in '.lc($type).':'.$env{'request.course.id'});
+ } else {
+ $r->print("\n");
+ foreach my $res ($navmap->retrieveResources()) {
+ $r->print($res->compTitle()."\t".$res->symb()."\n");
+ }
+ $r->print("\n \n");
}
- $r->print("\n \n");
$r->print('
'.&mt('Return to DOCS').' ');
}
-
sub verifycontent {
my ($r) = @_;
my $type = &Apache::loncommon::course_type();
@@ -2506,6 +2519,7 @@ sub handler {
return OK if $r->header_only;
my $type = &Apache::loncommon::course_type();
+
# --------------------------------------------- Initialize help topics for this
foreach my $topic ('Adding_Course_Doc','Main_Course_Documents',
'Adding_External_Resource','Navigate_Content',
@@ -2559,6 +2573,8 @@ sub handler {
my $showdoc=0;
my $containertag;
my $uploadtag;
+
+
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
['folderpath','pagepath',
'pagesymb']);
@@ -2632,9 +2648,10 @@ sub handler {
}
# -------------------------------------------------------------------- Body tag
$script = '';
- my @brcrum = [{href=>"/adm/createuser",text=>"$type Documents"}];
+ my $brcrum = [{href=>"/adm/createuser",text=>"$type Documents"}];
$r->print(&Apache::loncommon::start_page("$type Documents", $script,
- {'force_register' => $showdoc, bread_crumbs => @brcrum}).
+ {'force_register' => $showdoc,
+ 'bread_crumbs' => $brcrum}).
&Apache::loncommon::help_open_menu('','',273,'RAT'));
my %allfiles = ();
@@ -2730,9 +2747,8 @@ sub handler {
'uplm' => 'Upload a new main '.lc($type).' document',
'upls' => 'Upload a new supplemental '.lc($type).' document',
'impp' => 'Import a document',
- 'pubd' => 'Published documents',
+ 'pubd' => 'Published Documents',
'copm' => 'All documents out of a published map into this folder',
- 'spec' => 'Special documents',
'upld' => 'Upload Document',
'srch' => 'Search',
'impo' => 'Import',
@@ -2749,7 +2765,7 @@ sub handler {
'sipr' => 'Simple Problem',
'drbx' => 'Drop Box',
'scuf' => 'Score Upload Form',
- 'bull' => 'Bulletin Board',
+ 'bull' => 'Discussion Board',
'mypi' => 'My Personal Info',
'grpo' => 'Group Files',
'rost' => 'Course Roster',
@@ -2758,13 +2774,86 @@ sub handler {
'file' => 'File',
'title' => 'Title',
'comment' => 'Comment',
- 'parse' => 'If HTML file, upload embedded images/multimedia files'
+ 'parse' => 'Upload embedded images/multimedia files if HTML file!',
+ 'nd' => 'New Document',
+ 'pm' => 'Published Map',
+ 'sd' => 'Special Document',
+ 'mo' => 'More Options',
+ 'hao' => 'Hide all Options'
);
# -----------------------------------------------------------------------------
+ my $fileupload=(<
+
+FIUP
+
+ my $checkbox=(<
$lt{'parse'}?
+
+ -->
+
+ $lt{'parse'}
+
+CHBO
+
+ my $fileuploadform=(<
+ $fileupload
+
+ $lt{'title'}:
+
+ $uploadtag
+
+
+
+ $checkbox
+
+
+
+
+
+ $help{'Uploading_From_Harddrive'}
+
+
+FUFORM
+
+ my $simpleeditdefaultform=(<
+ $lt{'pubd'}
+ $uploadtag
+
+
+
+
+ $help{'Importing_LON-CAPA_Resource'}
+
+
+
+
+
+ $lt{'copm'}
+
+
+ $help{'Load_Map'}
+
+
+SEDFFORM
+
+ my $extresourcesform=(<
+ $uploadtag
+
+
+ $help{'Adding_External_Resource'}
+
+
+ERFORM
+
if ($allowed) {
&update_paste_buffer($coursenum,$coursedom);
- my $dumpbut=&dumpbutton();
- my $exportbut=&exportbutton();
my %lt=&Apache::lonlocal::texthash(
'vc' => 'Verify Content',
'cv' => 'Check/Set Resource Versions',
@@ -2784,51 +2873,49 @@ sub handler {
$containertag = ' ';
$uploadtag = ' ';
}
-
- $r->print(<
-
-
-
-
- $containertag
-
-
-
-
-ENDCOURSEVERIFY
- $r->print(&Apache::loncommon::help_open_topic('Docs_Adding_Course_Doc',
- &mt('Editing the Table of Contents for your '.$type)));
+ $r->print(<
+
+
+
+
+ $containertag
+
+
+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
- $r->print('
');
-
if (($standard) && ($allowed) && (!$forcesupplement)) {
- $r->print('');
-# ''.&mt('Main Course Documents').
-# ($allowed?' '.$help{'Main_Course_Documents'}:'').' ');
+ 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';
@@ -2843,11 +2930,6 @@ ENDCOURSEVERIFY
#$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();
}
@@ -2861,230 +2943,231 @@ ENDCOURSEVERIFY
$container='page';
}
my $readfile='/uploaded/'.$coursedom.'/'.$coursenum.'/'.$folder.'.'.$container;
- $r->print(<
-
-$lt{'uplm'}
-$lt{'impp'}
-$lt{'spec'}
-
-
-
-$lt{'file'}:
-
-
-
-
-
-
-ENDFORM
- unless ($env{'form.pagepath'}) {
- $r->print(<
-
-
-ENDFORM
- }
- $r->print(' ');
+
+
+
+ my $recoverform=(<
+
+
+RFORM
+
+ my $imspform=(<
+
+
+
+IMSPFORM
+
+ my $newnavform=(<
+ $uploadtag
+
+
+
+ $help{'Navigate_Content'}
+
+
+NNFORM
+ my $newsmppageform=(<
+ $uploadtag
+
+
+ $help{'Simple Page'}
+
+
+NSPFORM
+
+ my $newsmpproblemform=(<
+ $uploadtag
+
+
+ $help{'Simple Problem'}
+
+
+
+NSPROBFORM
+
+ my $newdropboxform=(<
+ $uploadtag
+
+
+
+
+
+NDBFORM
+
+ my $newexuploadform=(<
+ $uploadtag
+
+
+
+ $help{'Score_Upload_Form'}
+
+
+NEXUFORM
+
+ my $newbulform=(<
+ $uploadtag
+
+
+
+ $help{'Bulletin Board'}
+
+
+NBFORM
+
+ my $newaboutmeform=(<
+ $uploadtag
+
+
+
+ $help{'My Personal Info'}
+
+
+NAMFORM
+
+ my $newaboutsomeoneform=(<
+ $uploadtag
+
+
+
+
+
+NASOFORM
+
+
+ my $newrosterform=(<
+ $uploadtag
+
+
+
+ $help{'Course Roster'}
+
+
+NROSTFORM
+
unless ($env{'form.pagepath'}) {
my $path = &HTML::Entities::encode($env{'form.folderpath'},'<>&"');
- $r->print(<
-
-
-
-
-
-
-
-
-
-
-
-
-ENDFORM
+
+ my $newpageform=(<
+
+
+
+ $help{'Adding_Pages'}
+
+
+NPFORM
+
+ my $newfolderform=(<
+
+
+
+ $help{'Adding_Folders'}
+
+
+NFFORM
+
+ my $newsylform=(<
+ $uploadtag
+
+
+
+ $help{'Syllabus'}
+
+
+NSYLFORM
+
+ my $newgroupfileform=(<
+ $uploadtag
+
+
+
+ $help{'Group Files'}
+
+
+NGFFORM
+
+
+ my $specialdocumentsform=(< $newfolderform
+ $newpageform
+ $newsylform
+ $newnavform
+ $newsmppageform
+ $newsmpproblemform
+ $newdropboxform
+ $newexuploadform
+ $newbulform
+ $newaboutmeform
+ $newaboutsomeoneform
+ $newgroupfileform
+ $newrosterform
+SPDOFORM
+
+
+my %orderhash = (
+ 'aa' => 'New Document',
+ 'bb' => 'Published Documents',
+ 'cc' => 'Special Documents',
+ 'dd' => 'More Options',
+ 'zz' => 'Hide all Options',
+ );
+my %namehash = (
+ 'New Document' => $fileuploadform,
+ 'Published Documents' => $simpleeditdefaultform,
+ 'Special Documents' => $specialdocumentsform,
+ 'More Options' => $extresourcesform.' '.$imspform.' '.$recoverform,
+ );
+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));
+my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type);
+ if ($error) {
+ $r->print(''.$error.'
');
}
+$r->print('');
+ }
if ($env{'form.pagepath'}) {
- $r->print(<
-$uploadtag
-
-
- $help{'Simple Problem'}
-
-
-
-ENDBLOCK
}
- $r->print(' '."\n".
-'
');
- $r->print('');
}
# ----------------------------------------------------- Supplemental documents
if (!$forcestandard) {
- $r->print('
');
-# ''.&mt('Supplemental Course Documents').
-# ($allowed?' '.$help{'Supplemental'}:'').' ');
+ my $active = 'style="display: none;"';
+ if($activeClass == 1){
+ $active = 'style="display: block;"';
+ }
+ $r->print('
-ENDSUPFORM
+
+ my $supupdocform=(<
+ $fileupload
+
+
+
+ $checkbox
+
+
+ $lt{'comment'}:
+
+
+
+
+
+
+
+ $help{'Uploading_From_Harddrive'}
+
+
+SUPDOCFORM
+
+ my $supnewfolderform=(<
+
+
+
+ $help{'Adding_Folders'}
+
+
+SNFFORM
+
+
+ my $supnewextform=(<
+
+
+
+ $help{'Adding_External_Resource'}
+
+
+SNEFORM
+
+ my $supnewsylform=(<
+
+
+
+
+ $help{'Syllabus'}
+
+
+SNSFORM
+
+ my $supnewaboutmeform=(<
+
+
+
+
+ $help{'My Personal Info'}
+
+
+SNAMFORM
+
+
+
+my %suporderhash = (
+ 'ee' => 'New Document',
+ 'ff' => 'Special Documents',
+ 'zz' => 'Hide all Options',
+ );
+
+my %supnamehash = (
+ 'New Document' => $supupdocform,
+ 'Special Documents' => $supnewfolderform.' '.$supnewextform.' '.$supnewsylform.' '.$supnewaboutmeform,
+ );
+
+my $tid='2';
+my $content='content';
+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('
');
+$r->print(&generate_admin_options($containertag,$uploadtag,\%help,\%env));
+$r->print('
');
+$r->print('
');
if ($allowed) {
$r->print('
@@ -3198,6 +3308,74 @@ ENDSUPFORM
return OK;
}
+sub generate_admin_options {
+ my ($containertag,$uploadtag,$help_ref,$env_ref) = @_;
+ my %lt=&Apache::lonlocal::texthash(
+ 'vc' => 'Verify Content',
+ 'cv' => 'Check/Set Resource Versions',
+ 'ls' => 'List Symbs',
+ 'sl' => 'Show Log'
+ );
+ my %help = %{$help_ref};
+ my %env = %{$env_ref};
+ my $dumpbut=&dumpbutton();
+ my $exportbut=&exportbutton();
+ return (<
+
+
+
+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 $form;
+
+
+
+ $form = ''.&mt($varcd).' ';
+ $form .= '
';
+ foreach my $name (sort(keys(%orderhash))){
+ if($name eq 'zz'){
+ $form .= ''.&mt($orderhash{$name}).' ';
+ }else{
+ $form .= ''.&mt($orderhash{$name}).' ';
+ }
+ }
+ $form .= ' ';
+ $form .= '
';
+ foreach my $field (keys(%namehash)){
+ $form .= '
'.$namehash{$field}.'
';
+ }
+ $form .= '
';
+
+ return $form;
+}
sub editing_js {
my ($udom,$uname) = @_;
@@ -3211,7 +3389,7 @@ sub editing_js {
p_msp => 'Title for the Page',
p_msb => 'Title for the Problem',
p_mdb => 'Title for the Drop Box',
- p_mbb => 'Title for the Bulletin Board',
+ p_mbb => 'Title for the Discussion Board',
p_mab => "Enter user:domain for User's 'About Me' Page",
p_mab2 => "About [_99]",
p_mab_alrt1 => 'Not a valid user:domain',
@@ -3313,91 +3491,120 @@ 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';
+}
+}
+
+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++) {
+ if(currentDivs[i].className == 'LC_ContentBox'){
+ currentDivs[i].style.display = 'none';
+ }
+}
+}
+
+function showPage(current, pageId, nav, data) {
+ hideAll(current, nav, data);
+ unselectInactive(nav);
+ current.className = 'active';
+ currentData = document.getElementById(pageId);
+ currentData.style.display = 'block';
+ return false;
}
ENDNEWSCRIPT