[LON-CAPA-cvs] cvs: loncom /interface londocs.pm

tempelho tempelho@source.lon-capa.org
Wed, 07 Oct 2009 19:57:12 -0000


tempelho		Wed Oct  7 19:57:12 2009 EDT

  Modified files:              
    /loncom/interface	londocs.pm 
  Log:
  Relocated new folder form to the menu bar, similar to the mockup shown in bug 5997.
  
  
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.389 loncom/interface/londocs.pm:1.390
--- loncom/interface/londocs.pm:1.389	Sun Oct  4 13:58:02 2009
+++ loncom/interface/londocs.pm	Wed Oct  7 19:57:12 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.389 2009/10/04 13:58:02 tempelho Exp $
+# $Id: londocs.pm,v 1.390 2009/10/07 19:57:12 tempelho Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3159,6 +3159,7 @@
 my $specialdocumentsform;
 my @specialdocumentsforma;
 my $newfolderform;
+my $newfolderb;
 
        unless ($env{'form.pagepath'}) {
 	   my $path = &HTML::Entities::encode($env{'form.folderpath'},'<>&"');
@@ -3172,7 +3173,8 @@
 	$help{'Adding_Pages'}
 	</form>
 NPFORM
-	
+
+
 	$newfolderform=(<<NFFORM);
 	<form action="/adm/coursedocs" method="post" name="newfolder">
 	<input type="hidden" name="folderpath" value="$path" />
@@ -3181,12 +3183,6 @@
 	<a onclick="javascript:makenewfolder(document.newfolder,'$folderseq');">$lt{'newf'}</a>$help{'Adding_Folders'}
 	</form>
 NFFORM
-	my @newfolderforma= (
-	{ '<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/docspacer.gif" alt="pic02" />' => "$newfolderform" }
-        );
-
-
-	$newfolderform = create_form_ul(create_list_elements(@newfolderforma));
 
 	my $newsylform=(<<NSYLFORM);
 	<form action="/adm/coursedocs" method="post" name="newsyl">
@@ -3245,11 +3241,11 @@
 	);
 
 my %orderhash = (
-                'aa' => ['Upload Document',$fileuploadform.''.$newfolderform],
+		'00' => ['Newfolder',$newfolderform],
+                'aa' => ['Upload Document',$fileuploadform],
                 'bb' => ['Published Resources',$simpleeditdefaultform],
                 'cc' => ['Special Documents',$specialdocumentsform],
 		'dd' => ['Tools', create_form_ul(create_list_elements(@tools)).&generate_admin_options($containertag,$uploadtag,\%help,\%env)],
-                'zz' => ['Hide'],
                 );
 my $tid='1';
 my $varcd = 'Main Course Documents';
@@ -3325,9 +3321,6 @@
 	</form>
 SNFFORM
 	
-	my @supnewfolderforma = ({'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/docspacer.gif" alt="pic28" />'=>$supnewfolderform});
-	$supnewfolderform = create_form_ul(create_list_elements(@supnewfolderforma));
-
 
 	my $supnewextform=(<<SNEFORM);
 	<form action="/adm/coursedocs" method="post" name="supnewext">
@@ -3367,9 +3360,9 @@
 		{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/docspacer.gif" alt="pic31" />'=>$supnewaboutmeform},
 		);
 my %suporderhash = (
-                'ee' => ['Upload Document',$supupdocform.' '.$supnewfolderform],
-                'ff' => ['Special Documents',create_form_ul(create_list_elements(@specialdocs))],
-                'zz' => ['Hide'],
+		'00' => ['Supnewfolder', $supnewfolderform],
+                'ee' => ['Upload Document',$supupdocform],
+                'ff' => ['Special Documents',create_form_ul(create_list_elements(@specialdocs))]
                 );
 
 my $tid='2';
@@ -3449,19 +3442,22 @@
     $form = '<div class="LC_Box">';
     $form .= '<ul id="navigation'.$tid.'" class="LC_TabContent">';
     foreach my $name (sort(keys(%orderhash))){
-        if($name ne 'zz'){
+        if($name ne '00'){
             if($activetab eq '' || $activetab ne $name){
                $active = '';
             }elsif($activetab eq $name){
                $active = 'class="active"';
             }
             $form .= '<li '.$active.' onclick="javascript:showPage(this, \''.$name.$tid.'\', \'navigation'.$tid.'\',\'content'.$tid.'\');">'.&mt(${$orderhash{$name}}[0]).'</li>';
-        }
+        } else {
+	    $form .= '<li '.$active.'>'.${$orderhash{$name}}[1].'</li>';
+
+	}
     }
     $form .= '</ul>';
     $form .= '<div id="content'.$tid.'" style="padding: 0 0; margin: 0 0;">';
     foreach my $field (keys(%orderhash)){
-	if($field ne 'zz'){
+	if($field ne '00'){
         if($activetab eq '' || $activetab ne $field){
                 $active = 'style="display: none;"';
         }elsif($activetab eq $field){