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

raeburn raeburn at source.lon-capa.org
Fri Sep 9 23:18:34 EDT 2011


raeburn		Sat Sep 10 03:18:34 2011 EDT

  Modified files:              
    /loncom/interface	londocs.pm 
  Log:
  - Content Editor
    - Contents of current folder in table in left column.
    - Icons/Functionality for active tab from tools in right column. 
  - Horizontal rules set width:0, by default in "Import Documents" and
    "Published Resources", so resizing behaves as desired in IE8.
    - widths set appropriately when these tabs are active.   
  
  
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.458 loncom/interface/londocs.pm:1.459
--- loncom/interface/londocs.pm:1.458	Fri Sep  9 20:13:17 2011
+++ loncom/interface/londocs.pm	Sat Sep 10 03:18:34 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.458 2011/09/09 20:13:17 raeburn Exp $
+# $Id: londocs.pm,v 1.459 2011/09/10 03:18:34 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3111,7 +3111,6 @@
 
     my $fileuploada = "<br clear='all' /><input type='submit' value='".$lt{'upld'}."' /> $help{'Uploading_From_Harddrive'}";
 	my $fileuploadform=(<<FUFORM);
-        <div style="float:left">
 	<form name="uploaddocument" action="/adm/coursedocs" method="post" enctype="multipart/form-data">
 	<input type="hidden" name="active" value="aa" />
 	$fileupload
@@ -3125,7 +3124,7 @@
 	$checkbox
 	</span>
 FUFORM
-    $fileuploadform .= $fileuploada.'</form></div>';
+    $fileuploadform .= $fileuploada.'</form>';
 
 	my $simpleeditdefaultform=(<<SEDFFORM);
 	<form action="/adm/coursedocs" method="post" name="simpleeditdefault">
@@ -3138,7 +3137,7 @@
 	);
 	$simpleeditdefaultform .= &create_form_ul(&create_list_elements(@simpleeditdefaultforma));
 	$simpleeditdefaultform .=(<<SEDFFORM);
-	<hr />
+	<hr id="bb_hrule" style="width:0px;text-align:left;margin-left:0" />
 	$lt{'copm'}<br />
 	<input type="text" size="40" name="importmap" /><br />
 	<span class="LC_nobreak" style="float:left"><input type="button"
@@ -3391,7 +3390,7 @@
         my @importdoc = (
         {'<img class="LC_noBorder LC_middle" src="/res/adm/pages/extres.png" alt="'.$lt{extr}.'" onclick="javascript:makenewext(\'newext\');" />'=>$extresourcesform},
         {'<img class="LC_noBorder LC_middle" src="/res/adm/pages/ims.png" alt="'.$lt{imsf}.'" onclick="javascript:makeims();" />'=>$imspform},);
-        $fileuploadform =  &create_form_ul(&create_list_elements(@importdoc)) . '<hr/>' . $fileuploadform;
+        $fileuploadform =  &create_form_ul(&create_list_elements(@importdoc)) . '<hr id="cc_hrule" style="width:0px;text-align:left;margin-left:0" />' . $fileuploadform;
 
         @gradingforma=(
         {'<img class="LC_noBorder LC_middle" src="/res/adm/pages/simpprob.png" alt="'.$lt{sipr}.'" onclick="javascript:makesmpproblem();" />'=>$newsmpproblemform},
@@ -3537,7 +3536,7 @@
 		{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/extres.png" alt="'.$lt{extr}.'" onclick="javascript:makenewext(\'supnewext\');" />'
             =>$supnewextform},
         );
-$supupdocform =  &create_form_ul(&create_list_elements(@supimportdoc)) . '<hr/>' . $supupdocform;
+$supupdocform =  &create_form_ul(&create_list_elements(@supimportdoc)) . '<hr id="ee_hrule" style="width:0px;text-align:left;margin-left:0" />' . $supupdocform;
 my %suporderhash = (
 		'00' => ['Supnewfolder', $supnewfolderform],
                 'ee' => ['Import Documents',$supupdocform],
@@ -4077,11 +4076,12 @@
         var minscrollboxw = 250;
 
         var maxtabw = 0;
+        var actabw = 0;
         for (var i=0; i<alltabs.length; i++) {
             if (activeTab == alltabs[i]) {
-                var tabw = document.getElementById(alltabs[i]).offsetWidth;
-                if (tabw > maxtabw) {
-                    maxtabw = tabw;
+                actabw = document.getElementById(alltabs[i]).offsetWidth;
+                if (actabw > maxtabw) {
+                    maxtabw = actabw;
                 }
             } else {
                 if (document.getElementById(alltabs[i]) != null) {
@@ -4132,6 +4132,23 @@
             listwchange = 1;
         }
 
+        if (activeTab == 'cc1') {
+            if (document.getElementById('cc_hrule') != null) {
+                document.getElementById('cc_hrule').style.width=actabw+"px";
+            }
+        } else {
+            if (activeTab == 'bb1') {
+                if (document.getElementById('bb_hrule') != null) {
+                    document.getElementById('bb_hrule').style.width=actabw+"px";
+                }
+            } else {
+                if (activeTab == 'ee2') {
+                    if (document.getElementById('ee_hrule') != null) {
+                        document.getElementById('ee_hrule').style.width=actabw+"px";
+                    }
+                }
+            }
+        }
     }
     if ((chkh == 1) || (listwchange)) {
         var primaryheight = document.getElementById("LC_nav_bar").offsetHeight;




More information about the LON-CAPA-cvs mailing list