[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm portfolio.pm /publisher lonpubdir.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Thu, 22 Jun 2006 20:09:51 -0000
This is a MIME encoded message
--albertel1151006991
Content-Type: text/plain
albertel Thu Jun 22 16:09:51 2006 EDT
Modified files:
/loncom/publisher lonpubdir.pm
/loncom/interface loncommon.pm portfolio.pm
Log:
- cstr space and portfoli now use same css attr to enusre similarity of display
--albertel1151006991
Content-Type: text/plain
Content-Disposition: attachment; filename="albertel-20060622160951.txt"
Index: loncom/publisher/lonpubdir.pm
diff -u loncom/publisher/lonpubdir.pm:1.91 loncom/publisher/lonpubdir.pm:1.92
--- loncom/publisher/lonpubdir.pm:1.91 Wed May 17 09:41:45 2006
+++ loncom/publisher/lonpubdir.pm Thu Jun 22 16:09:41 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Construction Space Directory Lister
#
-# $Id: lonpubdir.pm,v 1.91 2006/05/17 13:41:45 www Exp $
+# $Id: lonpubdir.pm,v 1.92 2006/06/22 20:09:41 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -105,13 +105,13 @@
# Start off the directory table.
$r->print('<h3>Directory Contents:</h3>');
- $r->print('<table border="0" cellspacing="2" cellpadding="2"><tr>'.
- '<th bgcolor="#DDDDDD">'.&mt('Type').'</th>'.
- '<th bgcolor="#DDDDDD">'.&mt('Actions').'</th>'.
- '<th bgcolor="#DDDDDD">'.&mt('Name').'</th>'.
- '<th bgcolor="#DDDDDD">'.&mt('Title').'</th>'.
- '<th bgcolor="#DDDDDD">'.&mt('Status').'</th>'.
- '<th bgcolor="#DDDDDD">'.&mt('Last Modified').
+ $r->print('<table id="LC_browser"><tr>'.
+ '<th>'.&mt('Type').'</th>'.
+ '<th>'.&mt('Actions').'</th>'.
+ '<th>'.&mt('Name').'</th>'.
+ '<th>'.&mt('Title').'</th>'.
+ '<th>'.&mt('Status').'</th>'.
+ '<th>'.&mt('Last Modified').
'</th></tr>'."\n");
my $filename;
@@ -399,7 +399,7 @@
</td>
<td bgcolor="#ccddaa" align="center">
<form name="fileaction" method="post" action="/adm/cfile" target="_parent">
- <nobr>
+ <span style="white-space: nowrap">
<input type="hidden" name="filename" value="/~$uname$thisdisfn/" />
<select name="action">
<option value="Select Action">$lt{'sela'}</option>
@@ -413,7 +413,7 @@
<option value="newlibraryfile">$lt{'nlib'}:</option>
<option value="newdir">$lt{'nsub'}:</option>
</select> <input type="text" name="newfilename" value="Type Name Here" onfocus="if (this.value == 'Type Name Here') this.value=''" /> <input type="button" value="Go" onclick="document.fileaction.submit()" />
- </nobr>
+ </span>
</form>
</td>
</tr>
@@ -540,15 +540,19 @@
'</form>';
$$numdir ++;
}
- $r->print('<tr bgcolor="#CCCCFF">'.
+ $r->print('<tr class="LC_browser_folder">'.
'<td><img src="'.
$Apache::lonnet::perlvar{'lonIconsURL'}.'/folder_closed.gif" alt="folder" /></td>'.
'<td>'.$actionitem.'</td>'.
- '<td><font face="arial"><a href="'.&HTML::Entities::encode($here.'/'.$dirname,'<>&"').'/" target="_parent">'.
- $disfilename.'</a></font></td>'.
- '<td colspan="2">'.($kaputt?&Apache::lonhtmlcommon::authorbombs($resdir.'/'.$disfilename.'/'):'').$Apache::lonpublisher::metadatafields{'title'}.' <i>'.
- $Apache::lonpublisher::metadatafields{'subject'}.'</i> '.
- $Apache::lonpublisher::metadatafields{'keywords'}.'</td>'.
+ '<td><span class="LC_filename"><a href="'.&HTML::Entities::encode($here.'/'.$dirname,'<>&"').'/" target="_parent">'.
+ $disfilename.'</a></span></td>'.
+ '<td colspan="2">'.($kaputt?&Apache::lonhtmlcommon::authorbombs($resdir.'/'.$disfilename.'/'):'').$Apache::lonpublisher::metadatafields{'title'});
+ if ($Apache::lonpublisher::metadatafields{'subject'} ne '') {
+ $r->print(' <i>'.
+ $Apache::lonpublisher::metadatafields{'subject'}.
+ '</i> ');
+ }
+ $r->print($Apache::lonpublisher::metadatafields{'keywords'}.'</td>'.
'<td>'.&Apache::lonlocal::locallocaltime($modtime).'</td>'.
"</tr>\n");
}
@@ -564,7 +568,7 @@
&Apache::lonnet::devalidate_cache_new('meta',$targetdir.'/'.$filename);
my $pubstatus = 'unpublished';
my $status=&mt('Unpublished');
- my $bgcolor='#FFAA99';
+ my $css_class='LC_browser_file';
my $title=' ';
my $publish_button=&mt('Publish');
# my $action_buttons=
@@ -593,11 +597,9 @@
$status=&mt('Published').'<br />'.
&mt(&getCopyRightString($targetdir.'/'.$filename)).' '.
&mt(&getSourceRightString($targetdir.'/'.$filename));
- $bgcolor='#CCFF88';
if (&Apache::lonnet::metadata($targetdir.'/'.$filename,'obsolete')) {
$pubstatus = 'obsolete';
$status=&mt('Obsolete');
- $bgcolor='#AAAAAA';
}
# } else {
# $action_buttons='';
@@ -610,7 +612,6 @@
$status=&mt('Modified').'<br />'.
&mt(&getCopyRightString($targetdir.'/'.$filename)).' '.
&mt(&getSourceRightString($targetdir.'/'.$filename));
- $bgcolor='#FFFF77';
# $action_buttons='';
$title='<a href="/res/'.$targetdir.'/'.$filename.'.meta" target="cat">'.
&getTitleString($targetdir.'/'.$filename).'</a>';
@@ -644,13 +645,13 @@
}
my $pub_select = '';
&create_pubselect($r,\$pub_select,$udom,$uname,$thisdisfn,$filename,$resdir,$pubstatus,$publish_button,$numres);
- $r->print('<tr bgcolor="'.$bgcolor.'">'.
+ $r->print('<tr class="LC_browser_file_'.$pubstatus.'">'.
'<td>'.($filename=~/[\#\~]$/?' ':
'<img src="'.&Apache::loncommon::icon($filename).'" alt="" />').'</td>'.
'<td>'.$pub_select.'</td>'.
- '<td><font face="arial">'.
+ '<td><span class="LC_filename"> '.
'<a href="'.$linkdir.'/'.$filename.'" target="_parent">'.
- $filename.'</a></font>'.$editlink2.$editlink.
+ $filename.'</a></span>'.$editlink2.$editlink.
'</td>'.
'<td>'.$title.'</td>'.
'<td>'.$status.'</td>'.
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.388 loncom/interface/loncommon.pm:1.389
--- loncom/interface/loncommon.pm:1.388 Thu Jun 22 15:11:13 2006
+++ loncom/interface/loncommon.pm Thu Jun 22 16:09:51 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.388 2006/06/22 19:11:13 albertel Exp $
+# $Id: loncommon.pm,v 1.389 2006/06/22 20:09:51 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -3333,16 +3333,28 @@
background: $tabbg;
}
-table.LC_brower {
+table#LC_browser {
+
+}
+table#LC_browser tr th {
+ background: #DDDDDD;
+}
+table#LC_browser tr.LC_browser_file,
+table#LC_browser tr.LC_browser_file_published {
+ background: #CCFF88;
+}
+table#LC_browser tr.LC_browser_file_locked,
+table#LC_browser tr.LC_browser_file_unpublished {
+ background: #FFAA99;
}
-table.LC_browser tr.LC_browser_file {
- background: #CCFF88
+table#LC_browser tr.LC_browser_file_obsolete {
+ background: #AAAAAA;
}
-table.LC_browser tr.LC_browser_file_locked {
- background: #FFAA99
+table#LC_browser tr.LC_browser_file_modified {
+ background: #FFFF77;
}
-table.LC_browser tr.LC_browser_folder {
- background: #CCCCFF
+table#LC_browser tr.LC_browser_folder {
+ background: #CCCCFF;
}
span.LC_current_location {
font-size: x-large;
@@ -3714,29 +3726,29 @@
my $row_count;
sub start_data_table {
undef($row_count);
- return '<table class="LC_data_table">';
+ return '<table class="LC_data_table">'."\n";
}
sub end_data_table {
undef($row_count);
- return '</table>';
+ return '</table>'."\n";;
}
sub start_data_table_row {
$row_count++;
- return '<tr '.(($row_count % 2)?'':'class="LC_even_row"').'>';
+ return '<tr '.(($row_count % 2)?'':'class="LC_even_row"').'>'."\n";;
}
sub end_data_table_row {
- return '</tr>';
+ return '</tr>'."\n";;
}
sub start_data_table_header_row {
- return '<tr class="LC_header_row">';
+ return '<tr class="LC_header_row">'."\n";;
}
sub end_data_table_header_row {
- return '</tr>';
+ return '</tr>'."\n";;
}
}
Index: loncom/interface/portfolio.pm
diff -u loncom/interface/portfolio.pm:1.118 loncom/interface/portfolio.pm:1.119
--- loncom/interface/portfolio.pm:1.118 Thu Jun 22 15:23:56 2006
+++ loncom/interface/portfolio.pm Thu Jun 22 16:09:51 2006
@@ -155,11 +155,11 @@
}
if ($select_mode eq 'true') {
$r->print('<form method="post" name="checkselect" action="'.$url.'">');
- $r->print('<table class="LC_browser">'.
+ $r->print('<table id="LC_browser">'.
'<tr><th>Select</th><th> </th><th>Name</th><th>Size</th><th>Last Modified</th></tr>');
} else {
$r->print('<form method="post" action="'.$url.'">');
- $r->print('<table class="LC_browser">'.
+ $r->print('<table id="LC_browser">'.
'<tr><th colspan="2">Actions</th><th> </th><th>Name</th><th>Size</th><th>Last Modified</th><th>Current Access Status</th></tr>');
}
if (defined($group)) {
--albertel1151006991--