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

bisitz bisitz at source.lon-capa.org
Fri Nov 30 06:28:52 EST 2012


bisitz		Fri Nov 30 11:28:52 2012 EDT

  Modified files:              
    /loncom/interface	loncommon.pm lonhtmlcommon.pm 
  Log:
  Introduce new global routine "actionbox" to offer contextual actions, e.g. at bottom of page.
  
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1097 loncom/interface/loncommon.pm:1.1098
--- loncom/interface/loncommon.pm:1.1097	Fri Nov 16 16:54:45 2012
+++ loncom/interface/loncommon.pm	Fri Nov 30 11:28:51 2012
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.1097 2012/11/16 16:54:45 bisitz Exp $
+# $Id: loncommon.pm,v 1.1098 2012/11/30 11:28:51 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -5585,11 +5585,11 @@
   text-align: left;
 }
 
-.LC_head_subbox {
+.LC_head_subbox, .LC_actionbox {
   clear:both;
   background: #F8F8F8; /* $sidebg; */
   border: 1px solid $sidebg;
-  margin: 0 0 10px 0;      
+  margin: 0 0 10px 0;
   padding: 3px;
   text-align: left;
 }
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.334 loncom/interface/lonhtmlcommon.pm:1.335
--- loncom/interface/lonhtmlcommon.pm:1.334	Thu Nov 29 20:37:07 2012
+++ loncom/interface/lonhtmlcommon.pm	Fri Nov 30 11:28:51 2012
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common html routines
 #
-# $Id: lonhtmlcommon.pm,v 1.334 2012/11/29 20:37:07 raeburn Exp $
+# $Id: lonhtmlcommon.pm,v 1.335 2012/11/30 11:28:51 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3534,6 +3534,40 @@
                { listattr => {class => 'LC_funclist'} });
 }   
 
+=pod
+
+=item &actionbox( \@array )
+
+Constructs a XHTML list from \@array with the first item being visually
+highlighted and set to the value 'Actions'. The list is wrapped in a division.
+
+The actionlist is used to offer contextual actions, mostly at the bottom
+of a page, on which the outcome of an processed action is shown,
+e.g. a file operation in Construction Space.
+
+=over
+
+=item \@array
+
+A reference to the array containing text. Details: sub funclist_from_array
+
+=back
+ 
+Returns: XHTML div as string. 
+
+=back
+
+=cut  
+
+sub actionbox {
+    my ($items) = @_;
+    return unless(ref($items) eq 'ARRAY');
+    return
+        '<div class="LC_actionbox">'
+       .&funclist_from_array($items, {legend => &mt('Actions')})
+       .'</div>';
+}
+
 1;
 
 __END__




More information about the LON-CAPA-cvs mailing list