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

bisitz bisitz@source.lon-capa.org
Mon, 13 Jul 2009 17:34:29 -0000


bisitz		Mon Jul 13 17:34:29 2009 EDT

  Modified files:              
    /loncom/interface	londocs.pm loncommon.pm 
  Log:
  Use data_table for table of course documents:
  - Currently keep old background colors, but not for resources (use default data_table colors instead)
  - Removed unused style "LC_docs_path"
  - Removed now unused and outdated styles "LC_docs_entry_title" and "LC_docs_entry_icon"
  - Wrapped no docs info in <p> and added info style 
  - "Move Up/Down" buttons: Replaced table by simple div structure
  
  
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.378 loncom/interface/londocs.pm:1.379
--- loncom/interface/londocs.pm:1.378	Fri Jul 10 19:48:51 2009
+++ loncom/interface/londocs.pm	Mon Jul 13 17:34:28 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.378 2009/07/10 19:48:51 tempelho Exp $
+# $Id: londocs.pm,v 1.379 2009/07/13 17:34:28 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1049,7 +1049,7 @@
     }
     $plain=~s/\&gt\;\s*$//;
     return (&Apache::lonhtmlcommon::breadcrumbs(undef,undef,0,'nohelp',
-					       'LC_docs_path', undef, 1 ),$randompick,$ishidden,$isencrypted,$plain,$is_random_order);
+					       undef, undef, 1 ),$randompick,$ishidden,$isencrypted,$plain,$is_random_order);
 }
 
 sub log_docs {
@@ -1600,7 +1600,7 @@
     if ($is_random_order) {
 	$r->print('<p>'.&mt('Caution: this folder is set to randomly order its contents. Adding or removing resources from this folder will change the order of resources shown.').'</p>');
     }
-    $r->print('<table class="LC_docs_editor">');
+    $r->print(&Apache::loncommon::start_data_table());
     foreach my $res (@LONCAPA::map::order) {
 	my ($name,$url)=split(/\:/,$LONCAPA::map::resources[$res]);
 	$name=&LONCAPA::map::qtescape($name);
@@ -1613,9 +1613,11 @@
 	$shown++;
     }
     unless ($shown) {
-	$r->print('<tr><td>'.&mt('Currently no documents.').'</td></tr>');
+	$r->print('<tr><td><p class="LC_info">'
+             .&mt('Currently no documents.')
+             .'</p></td></tr>');
     }
-    $r->print("\n</table>\n");
+    $r->print(&Apache::loncommon::end_data_table());
     if ($allowed) {
         &print_paste_buffer($r,$container);
     }
@@ -1778,7 +1780,7 @@
     $renametitle=~s/\\/\\\\/g;
     $renametitle=~s/\&quot\;/\\\"/g;
     $renametitle=~s/ /%20/g;
-    my $line='<tr>';
+    my $line=&Apache::loncommon::start_data_table_row();
     my ($form_start,$form_end);
 # Edit commands
     my ($container, $type, $esc_path, $path, $symb);
@@ -1881,18 +1883,16 @@
         $form_end = '</form>';
 	$line.=(<<END);
 <td>
-   <table class="LC_docs_entry_move">
-      <tr>
-         <td>
-            <a href='/adm/coursedocs?cmd=up_$index&amp;${type}path=$esc_path&amp;${type}symb=$symb$cpinfo'><img src="${iconpath}move_up.gif" alt='$lt{'up'}' class="LC_icon" /></a>
-         </td>
-      </tr>
-      <tr>
-        <td>
-           <a href='/adm/coursedocs?cmd=down_$index&amp;${type}path=$esc_path&amp;${type}symb=$symb$cpinfo'><img src="${iconpath}move_down.gif" alt='$lt{'dw'}' class="LC_icon" /></a>
-        </td>
-      </tr>
-    </table>
+<div class="LC_docs_entry_move">
+  <a href='/adm/coursedocs?cmd=up_$index&amp;${type}path=$esc_path&amp;${type}symb=$symb$cpinfo'>
+    <img src="${iconpath}move_up.gif" alt='$lt{'up'}' class="LC_icon" />
+  </a>
+</div>
+<div class="LC_docs_entry_move">
+  <a href='/adm/coursedocs?cmd=down_$index&amp;${type}path=$esc_path&amp;${type}symb=$symb$cpinfo'>
+    <img src="${iconpath}move_down.gif" alt='$lt{'dw'}' class="LC_icon" />
+  </a>
+</div>
 </td>
 <td>
    $form_start
@@ -2026,10 +2026,10 @@
 	undef($external);
     }
     $line.='
-  <td class="LC_docs_entry_icon">
+  <td>
     '.($url?'<a href="'.$url.'">':'').'<img src="'.$icon.'" alt="" class="LC_icon" />'.($url?'</a>':'').'
   </td>
-  <td class="LC_docs_entry_title">
+  <td>
     '.($url?"<a href=\"$url\">":'').$title.($url?'</a>':' <span class="LC_docs_reinit_warn">'.&mt('(re-initialize course to access)').'</span>').$external."
   </td>";
     if (($allowed) && ($folder!~/^supplemental/)) {
@@ -2055,7 +2055,7 @@
   <td class="LC_docs_entry_parameter">$form_start $parameterset $form_end</td>
 ENDPARMS
     }
-    $line.="</tr>";
+    $line.=&Apache::loncommon::end_data_table_row();
     return $line;
 }
 
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.858 loncom/interface/loncommon.pm:1.859
--- loncom/interface/loncommon.pm:1.858	Mon Jul 13 14:38:31 2009
+++ loncom/interface/loncommon.pm	Mon Jul 13 17:34:29 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.858 2009/07/13 14:38:31 bisitz Exp $
+# $Id: loncommon.pm,v 1.859 2009/07/13 17:34:29 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -5571,16 +5571,13 @@
 }
 
 .LC_docs_entry_move {
-  border: none;
-  border-collapse: collapse;
-}
-
-.LC_docs_entry_move td {
-  border: 2px solid #BBBBBB;
+  border: 1px solid #BBBBBB;
   background: #DDDDDD;
+  padding: 1px;
+  margin: 0;
 }
 
-.LC_docs_editor td.LC_docs_entry_commands {
+table.LC_data_table tr > td.LC_docs_entry_commands {
   background: #DDDDDD;
   font-size: x-small;
 }
@@ -5606,12 +5603,7 @@
   font-size: x-small;
 }
 
-.LC_docs_editor td.LC_docs_entry_title,
-.LC_docs_editor td.LC_docs_entry_icon {
-  background: #FFFFBB;
-}
-
-.LC_docs_editor td.LC_docs_entry_parameter {
+table.LC_data_table tr > td.LC_docs_entry_parameter {
   background: #BBBBFF;
   font-size: x-small;
   white-space: nowrap;