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

bisitz bisitz@source.lon-capa.org
Fri, 12 Feb 2010 15:21:37 -0000


bisitz		Fri Feb 12 15:21:37 2010 EDT

  Modified files:              
    /loncom/interface	lonmsgdisplay.pm 
  Log:
  Optimized screen ergonomics for actions and functions on internal message main page:
  - Same alignment for headline and content
  - Increased spacing between different items and removed now unnecessary dummy spacing cells
  - "Action": Go button right next to corresponding item instead of extra cell
  - Same type of usage and design for "New Folder" as for "Action" (headline > input element > Go)
  - Better separation of "(un)check all" buttons
  - Wrapped "showing ... messages" in separate paragraph
  - Added filename style to filename
  - Typo; Interpunctation
  
  
Index: loncom/interface/lonmsgdisplay.pm
diff -u loncom/interface/lonmsgdisplay.pm:1.147 loncom/interface/lonmsgdisplay.pm:1.148
--- loncom/interface/lonmsgdisplay.pm:1.147	Tue Jan 26 13:08:08 2010
+++ loncom/interface/lonmsgdisplay.pm	Fri Feb 12 15:21:37 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines for messaging display
 #
-# $Id: lonmsgdisplay.pm,v 1.147 2010/01/26 13:08:08 wenzelju Exp $
+# $Id: lonmsgdisplay.pm,v 1.148 2010/02/12 15:21:37 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -222,39 +222,35 @@
 
     $output .= '
 <form method="post" action="/adm/email" name="folderlist">
-<table border="0" cellspacing="2" cellpadding="2">
- <tr>
-  <td align="left">
-   <table border="0" cellspacing="2" cellpadding="2">
+   <table border="0" cellspacing="2" cellpadding="8">
     <tr>
-     <td align="center"><b>'.$lt{'fold'}.'</b><br />'."\n".
+     <td><b>'.$lt{'fold'}.'</b><br />'."\n".
          &Apache::loncommon::select_form($folder,'folder',%formhash).'
      </td>
-     <td align="center"><b>'.$lt{'show'}.'</b><br />'."\n".
+     <td><b>'.$lt{'show'}.'</b><br />'."\n".
          &Apache::loncommon::select_form($env{'form.interdis'},'interdis',
 					 %show).'
      </td>
-     <td align="center"><b>'.$lt{'status'}.'</b><br />'."\n".
+     <td><b>'.$lt{'status'}.'</b><br />'."\n".
        &Apache::loncommon::select_form($msgstatus,'msgstatus',%statushash).'
      </td>
-     <td align="center"><b>'.$lt{'actn'}.'</b><br />'.
-         &Apache::loncommon::select_form('view','folderaction',%actions).'
-     </td><td><br />'.
-    '<input type="button" value="'.$lt{'go'}.'" onclick="javascript:folder_choice(this.form,'."'change'".');" />
+     <td><b>'.$lt{'actn'}.'</b><br />'."\n".'
+         <span class="LC_nobreak">'.
+         &Apache::loncommon::select_form('view','folderaction',%actions).
+         ' <input type="button" value="'.$lt{'go'}.
+         '" onclick="javascript:folder_choice(this.form,'."'change'".');" />
+         </span>
+     </td>
+     <td><b>'.&mt('New Folder').'</b><br />'."\n".'
+         <span class="LC_nobreak">
+         <input type="text" size="15" name="newfolder" value="" />
+         <input type="button" value="'.$lt{'go'}.
+         '" onclick="javascript:folder_choice(this.form,'."'new'".');" />
+         </span>
      </td>
     </tr>
    </table>
-  </td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td>
-  <td align="right">
-   <table><tr><td><br />
-    <input type="button" value="'.&mt('New Folder').
-    '" onclick="javascript:folder_choice(this.form,'."'new'".');" /></td>'.
-    '<td align="center"><b>'.&mt('Name').'</b><br />'.
-    '<input type="text" size="15" name="newfolder" value="" />
-    </td></tr></table>
-  </td>
- </tr>
-</table>'."\n".
+'."\n".
     '<input type="hidden" name="sortedby" value="'.$env{'form.sortedby'}.'" />'.
     '<input type="hidden" name="renamed" value="" />'.
         ($folder=~/^critical/?'</form>':'');
@@ -308,10 +304,11 @@
            '<input type="submit" name="lastview" value="&gt;|" />';
     }
     $output .=
-        '<br />'
+        '<p>'
        .'<b>'.&mt($status.' messages:').'</b> '
        .&mt('showing messages [_1] through [_2] of [_3].',
             $first,$finish,$total)
+       .'</p>'
        .'</form>';
 
     return $output;
@@ -381,7 +378,7 @@
     my ($folder)=@_;
     my %permfolders = &get_permanent_folders();
     if (defined($permfolders{$folder})) {
-        return &mt('The folder "[_1]" may not be deleted',$folder); 
+        return &mt('The folder "[_1]" may not be deleted.',$folder); 
     }
     my %userfolders = &Apache::lonmsg::get_user_folders();
     if (!defined($userfolders{$folder})) {
@@ -1030,7 +1027,7 @@
     my ($startblock,$endblock) = &Apache::loncommon::blockcheck(\%setters,'com');
     my %lt = &Apache::lonlocal::texthash(
                       sede => 'Select a destination folder to which the messages will be moved.',
-                      nome => 'No messages have been selected to apply ths action to.',
+                      nome => 'No messages have been selected to apply this action to.',
                       chec => 'Check the checkbox for at least one message.',  
     );
     my $jscript = &Apache::loncommon::check_uncheck_jscript();
@@ -1206,13 +1203,19 @@
 	}
     }   
     $r->print("</table>\n");
-    $r->print('<table border="0" cellspacing="2" cellpadding="2">
+    $r->print('<table border="0" cellspacing="2" cellpadding="8">
  <tr>
-  <td>'.
-  '<input type="button" onclick="javascript:checkAll(document.disall.delmark)" value="'.&mt('Check All').'" /><br />'."\n".
-  '<input type="button" onclick="javascript:uncheckAll(document.disall.delmark)" value="'.&mt('Uncheck All').'" />'."\n".
-  '<input type="hidden" name="sortedby" value="'.$env{'form.sortedby'}.'" /></td><td>&nbsp;</td>'."\n".
-  '<td align="center"><b>'.&mt('Action').'</b><br />'."\n".
+  <td>
+   <fieldset>
+   <legend>'.&mt('Select').'</legend>
+   <span class="LC_nobreak">
+   <input type="button" onclick="javascript:checkAll(document.disall.delmark)" value="'.&mt('Check All').'" />'."\n".
+  ' <input type="button" onclick="javascript:uncheckAll(document.disall.delmark)" value="'.&mt('Uncheck All').'" />'."\n".
+  '<input type="hidden" name="sortedby" value="'.$env{'form.sortedby'}.'" />
+  </span>
+  </fieldset>
+  </td>'."\n".
+  '<td><b>'.&mt('Action').'</b><br />'."\n".
   '  <select name="checkedaction">'."\n");
 
     if ($folder ne 'trash') {
@@ -1234,7 +1237,7 @@
     $r->print("\n".'</select></td>'."\n");
 
     if (keys(%gotfolders) > 0) {
-        $r->print('<td align="center"><b>'.&mt('Destination folder').'<b><br />');
+        $r->print('<td><b>'.&mt('Destination folder').'<b><br />');
 	my %userfolders;
         foreach my $key (keys(%gotfolders)) {
             $userfolders{$key} = $key;
@@ -1243,7 +1246,7 @@
         $r->print(&Apache::loncommon::select_form('','movetofolder',%userfolders).
                   '</td>');
     }
-    $r->print('<td>&nbsp;</td><td>&nbsp;&nbsp;'.
+    $r->print('<td>'.
               '<input type="button" name="go" value="'.&mt('Go').
               '" onclick="javascript:validate_checkedaction()"/></td>'."\n".
               '</tr></table>');
@@ -3459,7 +3462,7 @@
         &printheader($r,'','Moved Messages');
         if (!defined($gotfolders{$destfolder})) {
             $r->print(&mt('Destination folder [_1] is not a valid folder',
-                      $destfolder));
+                          '<span class="LC_filename">'.$destfolder.'</span>'));
         } else {
 	    my ($total,$failed,@failed_msg)=(0,0);
             my @to_move = &Apache::loncommon::get_env_multiple('form.delmark');