[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface lonmenu.pm

raeburn raeburn at source.lon-capa.org
Mon May 28 18:22:20 EDT 2012


raeburn		Mon May 28 22:22:20 2012 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/interface	lonmenu.pm 
  Log:
  - For 2.11.
    - Backport 1.379.
  
  
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.369.2.10 loncom/interface/lonmenu.pm:1.369.2.11
--- loncom/interface/lonmenu.pm:1.369.2.10	Mon May 28 14:45:20 2012
+++ loncom/interface/lonmenu.pm	Mon May 28 22:22:20 2012
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.369.2.10 2012/05/28 14:45:20 raeburn Exp $
+# $Id: lonmenu.pm,v 1.369.2.11 2012/05/28 22:22:20 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -432,8 +432,12 @@
 sub create_submenu {
     my ($link,$target,$title,$submenu) = @_;
     return unless (ref($submenu) eq 'ARRAY');
+    my $disptarget;
+    if ($target ne '') {
+        $disptarget = ' target="'.$target.'"';
+    }
     my $menu = '<li class="LC_hoverable">'.
-               '<a href="'.$link.'" target="'.$target.'">'. 
+               '<a href="'.$link.'"'.$disptarget.'>'. 
                '<span class="LC_nobreak">'.&mt($title).
                '<span class="LC_fontsize_small" style="font-weight:normal;">'.
                ' ▼</span></span></a>'.
@@ -2021,7 +2025,7 @@
         ($Apache::inputtags::status[-1] eq 'CAN_ANSWER')) {
         my $duedate = &Apache::lonnet::EXT("resource.0.duedate");
         if ($duedate && $duedate > time) {
-            my ($collapse,$expand,$title,$currdisp);
+            my ($collapse,$expand,$alttxt,$title,$currdisp);
             my @interval=&Apache::lonnet::EXT("resource.0.interval");
             if (@interval > 1) {
                 $currdisp = 'inline';
@@ -2031,7 +2035,8 @@
                 $expand = '◄ ';
             }
             unless ($env{'environment.icons'} eq 'iconsonly') {
-                $title = &mt('Timer');
+                $alttxt = &mt('Timer');
+                $title = $alttxt.' ';
             }
             my $desc = &mt('Countdown to due date/time');
             return <<END;
@@ -2039,11 +2044,11 @@
 <a href="javascript:toggleCountdown();" class="LC_menubuttons_link">
 <span id="ddcountcollapse" class="LC_menubuttons_inline_text">
 $collapse
-</a></span>
+</span></a>
 <span id="duedatecountdown" class="LC_menubuttons_inline_text" style="display: $currdisp;"></span>
 <a href="javascript:toggleCountdown();" class="LC_menubuttons_link">
 <span id="ddcountexpand" class="LC_menubuttons_inline_text" >$expand</span>
-<img src="/res/adm/pages/timer.png" title="$desc" class="LC_icon"><span class="LC_menubuttons_inline_text">$title</span></a>
+<img src="/res/adm/pages/timer.png" title="$desc" class="LC_icon" alt="$alttxt" /><span class="LC_menubuttons_inline_text">$title</span></a>
 END
         }
     }




More information about the LON-CAPA-cvs mailing list