[LON-CAPA-cvs] cvs: loncom /html/res/adm/pages pcstr.gif /interface lonmenu.pm lonpreferences.pm mydesk.tab

www lon-capa-cvs-allow@mail.lon-capa.org
Sat, 28 Apr 2007 23:13:56 -0000


www		Sat Apr 28 19:13:56 2007 EDT

  Added files:                 
    /loncom/html/res/adm/pages	pcstr.gif 

  Modified files:              
    /loncom/interface	lonmenu.pm lonpreferences.pm mydesk.tab 
  Log:
  Work on menus:
  * CSTR is under "My Space" now
  * New mode: icons only
  * Forgot to commit pcstr.gif
  - still needs some testing
  
  
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.217 loncom/interface/lonmenu.pm:1.218
--- loncom/interface/lonmenu.pm:1.217	Tue Apr 24 19:26:02 2007
+++ loncom/interface/lonmenu.pm	Sat Apr 28 19:13:56 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.217 2007/04/24 23:26:02 albertel Exp $
+# $Id: lonmenu.pm,v 1.218 2007/04/28 23:13:56 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -525,13 +525,24 @@
 		    $inlinebuttons=
                         join('',map { (defined($_)?$_:'') } @inlineremote);
 		} else {
-		    $inlinebuttons=(<<ENDINLINE);
+                    if ($env{'environment.icons'} eq 'iconsonly') {
+                       $inlinebuttons=(<<ENDINLINEICONS);
+<tr><td>
+$inlineremote[21] $inlineremote[23]
+$inlineremote[61] $inlineremote[63]
+$inlineremote[71] $inlineremote[72] $inlineremote[73]
+$inlineremote[81] $inlineremote[82] $inlineremote[83]
+$inlineremote[91] $inlineremote[92] $inlineremote[93]</td></tr>
+ENDINLINEICONS
+                    } else {
+		       $inlinebuttons=(<<ENDINLINE);
 <tr><td>$inlineremote[21]</td><td>&nbsp;</td><td>$inlineremote[23]</td></tr>
 <tr><td>$inlineremote[61]</td><td>$inlineremote[62]</td><td>$inlineremote[63]</td></tr>
 <tr><td>$inlineremote[71]</td><td>$inlineremote[72]</td><td>$inlineremote[73]</td></tr>
 <tr><td>$inlineremote[81]</td><td>$inlineremote[82]</td><td>$inlineremote[83]</td></tr>
 <tr><td>$inlineremote[91]</td><td>$inlineremote[92]</td><td>$inlineremote[93]</td></tr>
 ENDINLINE
+                    }
                 }
 	    }
 	    $result =(<<ENDREGTEXT);
@@ -881,9 +892,13 @@
 	   }
        } else {
 # Inline Menu
-	   $inlineremote[$idx]=
+           if ($env{'environment.icons'} eq 'iconsonly') {
+              $inlineremote[$idx]='<a title="'.$desc.'" href="javascript:'.$act.';">'.$pic.'</a>';
+           } else {
+	      $inlineremote[$idx]=
 		   '<a class="LC_menubuttons_link" href="javascript:'.$act.';">'.$pic.
 		   '<span class="LC_menubuttons_inline_text">'.$desc.'</span></a>';
+           }
        }
    }
     return '';
Index: loncom/interface/lonpreferences.pm
diff -u loncom/interface/lonpreferences.pm:1.99 loncom/interface/lonpreferences.pm:1.100
--- loncom/interface/lonpreferences.pm:1.99	Tue Apr 17 14:28:44 2007
+++ loncom/interface/lonpreferences.pm	Sat Apr 28 19:13:56 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Preferences
 #
-# $Id: lonpreferences.pm,v 1.99 2007/04/17 18:28:44 www Exp $
+# $Id: lonpreferences.pm,v 1.100 2007/04/28 23:13:56 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -526,18 +526,25 @@
         ('environment',['icons']);
     my $iconic='checked="checked"';
     my $classic='';
+    my $onlyicon='';
     if ($userenv{'icons'} eq 'classic') {
        $classic='checked="checked"';
        $iconic='';
     }
-    my $useicons=&mt('Use icons');
-    my $usebuttons=&mt('Use classic buttons');
+    if ($userenv{'icons'} eq 'iconsonly') {
+       $onlyicon='checked="checked"';
+       $iconic='';
+    }
+    my $useicons=&mt('Use icons and text');
+    my $usebuttons=&mt('Use buttons and text');
+    my $useicononly=&mt('Use icons only');
     my $change=&mt('Change');
     $r->print(<<ENDSCREEN);
 <form name="prefs" action="/adm/preferences" method="post">
 <input type="hidden" name="action" value="verify_and_change_icons" />
 <label><input type="radio" name="menumode" value="iconic" $iconic /> $useicons</label><br />
 <label><input type="radio" name="menumode" value="classic" $classic /> $usebuttons</label><br />
+<label><input type="radio" name="menumode" value="iconsonly" $onlyicon /> $useicononly</label><br />
 <input type="submit" value="$change" />
 </form>
 ENDSCREEN
@@ -1517,7 +1524,7 @@
     }
 
     push (@Options,({ action   => 'changeicons',
-                      linktext => 'Change How Main Menu is Displayed',
+                      linktext => 'Change How Menus are Displayed',
                       href     => '/adm/preferences',
                       subroutine => \&iconchanger,
                       breadcrumb =>
Index: loncom/interface/mydesk.tab
diff -u loncom/interface/mydesk.tab:1.82 loncom/interface/mydesk.tab:1.83
--- loncom/interface/mydesk.tab:1.82	Thu Apr 12 22:03:54 2007
+++ loncom/interface/mydesk.tab	Sat Apr 28 19:13:56 2007
@@ -70,8 +70,8 @@
 5:3:pccc:$requested_domain:ccrs.gif:create[_1]:course[_8]:go('/adm/createcourse');:Create a new course:dom
 5:3:popa:$crs:parm.gif:course[_9]:parms[_1]:go('/adm/parmset');:Modify parameter settings (due dates, etc) for resources and the course:cmn
 6:1:clear
-6:1:author:rau:cstr.gif:con-[_1]:struct[_1]:go('/priv/$uname/');:Enter my resource construction space:rol
-6:1:author:rca:cstr.gif:co con-[_1]:struct[_2]:go('/priv/$caname/');:Enter construction space as a co-author:rol
+6:1:author:rau:cstr.gif:con-[_1]:struct[_1]:go('/priv/$uname/');:Enter my resource construction space:set
+6:1:author:rca:cstr.gif:co con-[_1]:struct[_2]:go('/priv/$caname/');:Enter construction space as a co-author:set
 6:1:pmau:$requested_domain:conf.gif:domain[_1]:config[_1]:go('/adm/domainprefs');:Set domain configuration:dom
 6:2:clear
 6:2:pbre:$requested_domain:res.gif:resource[_1]:space[_1]:go('/res/$udom/?launch=1');:Browse published resources:cnt