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

albertel lon-capa-cvs-allow@mail.lon-capa.org
Wed, 11 Jul 2007 20:40:28 -0000


albertel		Wed Jul 11 16:40:28 2007 EDT

  Modified files:              
    /loncom/interface	lonindexer.pm 
  Log:
  - only show (Un)check All buttons of there will be check boxes
  
  
Index: loncom/interface/lonindexer.pm
diff -u loncom/interface/lonindexer.pm:1.170 loncom/interface/lonindexer.pm:1.171
--- loncom/interface/lonindexer.pm:1.170	Wed Jul 11 16:32:15 2007
+++ loncom/interface/lonindexer.pm	Wed Jul 11 16:40:28 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Directory Indexer
 #
-# $Id: lonindexer.pm,v 1.170 2007/07/11 20:32:15 albertel Exp $
+# $Id: lonindexer.pm,v 1.171 2007/07/11 20:40:28 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -527,8 +527,10 @@
 	&Apache::loncommon::storeresurl($storeuri);
 	&Apache::lonhtmlcommon::store_recent('residx',$storeuri,$storeuri);
 # -------------------------------------------------- Check All and Uncheck all
-	$r->print('<br /><input type="button" value="'.&mt("Check All").'" id="checkallbutton" onClick="javascript:checkAll()" />');
-	$r->print('<input type="button" value="'.&mt("Uncheck All").'" id="uncheckallbutton" onClick="javascript:uncheckAll()" />');
+	if ($env{'form.catalogmode'} eq 'import') {
+	    $r->print('<br /><input type="button" value="'.&mt("Check All").'" id="checkallbutton" onClick="javascript:checkAll()" />');
+	    $r->print('<input type="button" value="'.&mt("Uncheck All").'" id="uncheckallbutton" onClick="javascript:uncheckAll()" />');
+	}
 # ----------------- output starting row to the indexed file/directory hierarchy
         my $titleclr="#ddffff";
         #$r->print(&initdebug());