[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm lonnavmaps.pm doc/loncapafiles loncapafiles.lpml

schulted schulted@source.lon-capa.org
Wed, 25 Feb 2009 21:06:27 -0000


schulted		Wed Feb 25 21:06:27 2009 EDT

  Modified files:              
    /doc/loncapafiles	loncapafiles.lpml 
    /loncom/interface	lonnavmaps.pm loncommon.pm 
  Log:
  Replacement of the dropdown menu with icons and removal of the horizontal line.
  
  
  
Index: doc/loncapafiles/loncapafiles.lpml
diff -u doc/loncapafiles/loncapafiles.lpml:1.630 doc/loncapafiles/loncapafiles.lpml:1.631
--- doc/loncapafiles/loncapafiles.lpml:1.630	Wed Feb 25 16:52:12 2009
+++ doc/loncapafiles/loncapafiles.lpml	Wed Feb 25 21:06:24 2009
@@ -2,7 +2,7 @@
  "http://lpml.sourceforge.net/DTD/lpml.dtd">
 <!-- loncapafiles.lpml -->
 
-<!-- $Id: loncapafiles.lpml,v 1.630 2009/02/25 16:52:12 droeschl Exp $ -->
+<!-- $Id: loncapafiles.lpml,v 1.631 2009/02/25 21:06:24 schulted Exp $ -->
 
 <!--
 
@@ -6382,6 +6382,8 @@
 ccrs.gif;
 chat.gif;
 chrt.gif;
+close-all-folders.gif;
+close-navigation.gif;
 clst.gif;
 com.gif;
 conf.gif;
@@ -6412,12 +6414,15 @@
 list.gif;
 logout.gif;
 mail.gif;
+mark-discussionentries-read.gif;
 mcrs.gif;
 mrk.gif;
 nav.gif;
 new.gif;
 next.gif;
 nothumb.gif;
+open-all-folders.gif;
+open-first-problem.gif;
 parm.gif;
 pcstr.gif;
 pgrd.gif;
@@ -6435,10 +6440,13 @@
 rtrv.gif;
 sbkm.gif;
 sctr.gif;
+show-all.gif;
+show-incomplete-problems.gif;
 spacer.gif;
 sprs.gif;
 src.gif;
 srvr.gif;
+start-navigation.gif;
 stat.gif;
 subm.gif;
 title.gif;
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.429 loncom/interface/lonnavmaps.pm:1.430
--- loncom/interface/lonnavmaps.pm:1.429	Wed Feb 25 17:33:33 2009
+++ loncom/interface/lonnavmaps.pm	Wed Feb 25 21:06:27 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Navigate Maps Handler
 #
-# $Id: lonnavmaps.pm,v 1.429 2009/02/25 17:33:33 droeschl Exp $
+# $Id: lonnavmaps.pm,v 1.430 2009/02/25 21:06:27 schulted Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -962,7 +962,7 @@
     # Is this the current resource?
     if (!$params->{'displayedHereMarker'} && 
         $resource->symb() eq $params->{'here'} ) {
-        $curMarkerBegin = '<em style="font-weight:bold;">';
+        $curMarkerBegin = '<em>';
         $curMarkerEnd = '</em>';
 	$params->{'displayedHereMarker'} = 1;
     }
@@ -1463,7 +1463,7 @@
         } else {
 	    $result .= '</tr><tr>'; 
         }
-	$result.=&show_linkitems($args->{'linkitems'});
+	$result.=&show_linkitems_toolbar($args->{'linkitems'});
         if ($args->{'sort_html'}) {
 	    if ($env{'environment.remotenavmap'} ne 'on') {
 		$result.='<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td>'.
@@ -1486,7 +1486,6 @@
     }
     # End parameter setting
     
-    $result .= "\n<table id=\"LC_nav_location\">\n<tbody>\n<tr>\n<td class=\"LC_current_location\"> &nbsp; </td>\n</tr>\n</tbody>\n</table>\n";
     $result .= "<br />\n";
 
     # Data
@@ -1847,6 +1846,41 @@
     return $result;
 }
 
+sub show_linkitems_toolbar {
+    my ($linkitems,$condition)=@_;
+    my @linkorder = ("blank","launchnav","closenav","firsthomework",
+		     "everything","uncompleted","changefolder","clearbubbles");
+    
+    my $result .=' 
+              <td align="left">
+                       <span class="LC_nobreak">'."\n<ul id=\"LC_toolbar\">";
+	foreach my $link (@linkorder) {
+        my $link_id = "LC_content_toolbar_".$link;
+	if (defined($linkitems->{$link})) {
+	    if ($linkitems->{$link}{'text'} ne '') {
+		$linkitems->{$link}{'cmd'}=~s/"/'/g;
+		if($linkitems->{$link}{'cmd'}){
+                   if($link eq 'changefolder'){
+                      if($condition){$link_id='LC_content_toolbar_changefolder_toggled'}
+                      else{$link_id='LC_content_toolbar_changefolder'}
+                   }
+                          $result .=  ' <li><a href="#"'.
+			    	' onClick="'.$linkitems->{$link}{'cmd'}.'"'.
+                                ' id="'.$link_id.'"'.
+                                ' class="LC_toolbarItem"'.
+			   	' title="'.$linkitems->{$link}{'text'}.'"></a></li>'."\n";
+		}
+
+	    }
+	}
+    }
+    $result .= '</ul>';
+    $result .= ' </span></td>'."\n";
+	
+    return $result;
+}
+
+
 1;
 
 
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.756 loncom/interface/loncommon.pm:1.757
--- loncom/interface/loncommon.pm:1.756	Wed Feb 25 14:09:03 2009
+++ loncom/interface/loncommon.pm	Wed Feb 25 21:06:27 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.756 2009/02/25 14:09:03 weissno Exp $
+# $Id: loncommon.pm,v 1.757 2009/02/25 21:06:27 schulted Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -5912,6 +5912,72 @@
 	vertical-align: text-bottom;
 	margin-right: 0.3em;
 }
+
+a#LC_content_toolbar_firsthomework{
+	background-image:url(/res/adm/pages/open-first-problem.gif);
+}
+
+a#LC_content_toolbar_launchnav{	
+	background-image:url(/res/adm/pages/start-navigation.gif);
+}
+
+a#LC_content_toolbar_closenav{
+	background-image:url(/res/adm/pages/close-navigation.gif);
+}
+
+a#LC_content_toolbar_everything{
+	background-image:url(/res/adm/pages/show-all.gif);
+}
+
+a#LC_content_toolbar_uncompleted{
+	background-image:url(/res/adm/pages/show-incomplete-problems.gif);
+}
+
+#LC_content_toolbar_clearbubbles{
+	background-image:url(/res/adm/pages/mark-discussionentries-read.gif);
+}
+
+a#LC_content_toolbar_changefolder{
+	background : url(/res/adm/pages/close-all-folders.gif) top center ;
+}
+
+a#LC_content_toolbar_changefolder_toggled{
+	background-image:url(/res/adm/pages/open-all-folders.gif);
+}
+
+ul#LC_toolbar li a:hover{
+	background-position: bottom center;
+}
+
+ul#LC_toolbar{
+	padding:0; 
+	margin: 2px;
+	list-style:none;
+	position:relative;
+	background-color:white;
+}
+
+ul#LC_toolbar li{
+	border:1px solid white;
+	padding:0;
+	margin: 0;
+	display:inline-block;
+	vertical-align:middle;
+}
+
+a.LC_toolbarItem{
+	display:inline-block;
+	padding:0;
+	margin:0;
+	height: 32px;
+	width: 32px;
+	color:white; 
+	border:0 none;	
+	background-repeat:no-repeat;
+	background-color:transparent;
+}
+
+
 END
 }