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

raeburn raeburn at source.lon-capa.org
Thu Sep 3 11:38:51 EDT 2020


raeburn		Thu Sep  3 15:38:51 2020 EDT

  Modified files:              
    /loncom/interface	lonindexer.pm 
  Log:
  - Improve readability in modal pop-up for .js, .css, .txt, and .tab files.  
  
  
Index: loncom/interface/lonindexer.pm
diff -u loncom/interface/lonindexer.pm:1.229 loncom/interface/lonindexer.pm:1.230
--- loncom/interface/lonindexer.pm:1.229	Thu Aug  9 13:52:07 2018
+++ loncom/interface/lonindexer.pm	Thu Sep  3 15:38:51 2020
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Directory Indexer
 #
-# $Id: lonindexer.pm,v 1.229 2018/08/09 13:52:07 raeburn Exp $
+# $Id: lonindexer.pm,v 1.230 2020/09/03 15:38:51 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1121,8 +1121,13 @@
 	my $quotable_filelink = &Apache::loncommon::escape_single($filelink);
         my $quotable_startdir = Apache::loncommon::escape_single($startdir);
         my $quotable_listname = &Apache::loncommon::escape_single($listname);
+        my $curfext = lc((split(/\./,$listname))[-1]);
+        my $modalstyle;
+        if ($curfext =~ /^js|css|txt|tab$/) {
+            $modalstyle = ",'','background-color:#ffffff'";
+        }
 
-	$r->print (" <a href=\"javascript:openMyModal('".$quotable_filelink."?inhibitmenu=yes',500,500,'yes');\">$listname</a> ");
+	$r->print (" <a href=\"javascript:openMyModal('".$quotable_filelink."?inhibitmenu=yes',500,500,'yes'".$modalstyle.");\">$listname</a> ");
 	$quotable_filelink = &Apache::loncommon::escape_single($filelink.'.meta');
 	&Apache::loncommon::inhibit_menu_check(\$quotable_filelink);
 	$r->print (" (<a href=\"javascript:openMyModal('".$quotable_filelink."?inhibitmenu=yes',500,500,'yes');\">".&mt('metadata')."</a>) ");




More information about the LON-CAPA-cvs mailing list