[freeside-commits] freeside/httemplate/elements menubar.html, 1.3, 1.4

Ivan,,, ivan at wavetail.420.am
Mon Jun 15 20:29:28 PDT 2009


Update of /home/cvs/cvsroot/freeside/httemplate/elements
In directory wavetail.420.am:/tmp/cvs-serv23051/httemplate/elements

Modified Files:
	menubar.html 
Log Message:
basic customer view tabs, RT#5586

Index: menubar.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/elements/menubar.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- menubar.html	23 Aug 2006 22:25:38 -0000	1.3
+++ menubar.html	16 Jun 2009 03:29:26 -0000	1.4
@@ -1,10 +1,109 @@
-%
-%  my($item, $url, @html);
-%  while (@_) {
-%    ($item, $url) = splice(@_,0,2);
-%    next if $item =~ /^\s*Main\s+Menu\s*$/i;
-%    push @html, qq!<A HREF="$url">$item</A>!;
-%  }
-%
+<%doc>
 
-<% join(' | ', @html) %>
+Example:
+
+  include( '/elements/menubar.html',
+           
+           #options hashref (optional)
+           { 'newstyle' => 1, #may become the default at some point
+           },
+
+           #menubar entries (required)
+           'label'  => $url,
+           'label2' => $url2,
+           #etc.
+
+         );
+
+</%doc>
+%if ( $opt->{'newstyle'} ) {
+
+%  #false laziness w/header.html... shouldn't these just go in freeside.css?
+
+   <style type="text/css">
+   a.fsblackbutton {
+            background-color:#333333;
+            color: #ffffff;
+            border:1px solid;
+            border-top-color:#cccccc;
+            border-left-color:#cccccc;
+            border-right-color:#aaaaaa;
+            border-bottom-color:#aaaaaa;
+            /*font-weight:bold;*/
+            /*padding-left:12px;
+            padding-right:12px;*/
+            padding-left:4px;
+            padding-right:4px;
+            text-decoration:none;
+            overflow:visible;
+            filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='#ff333333',EndColorStr='#ff666666')
+   }
+   
+   a.fsblackbuttonselected {
+            background-color:#7e0079;
+            color: #ffffff;
+            border:1px solid;
+            border-top-color:#cccccc;
+            border-left-color:#cccccc;
+            border-right-color:#aaaaaa;
+            border-bottom-color:#aaaaaa;
+            /*font-weight:bold;*/
+            /*padding-left:12px;
+            padding-right:12px;*/
+            padding-left:4px;
+            padding-right:4px;
+            text-decoration:none;
+            overflow:visible;
+            filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='#ff330033',EndColorStr='#ff7e0079')
+   }
+   </style>
+
+   <TABLE BGCOLOR="#000000" BORDER=0 CELLSPACING=0 CELLPADDING=4>
+     <TR>
+       <TD STYLE="background-image:url(<%$fsurl%>images/gray-black-side.png); background-repeat:repeat-y;padding-left:0px">
+         &nbsp;&nbsp;
+       </TD>
+       <TD>
+         <% join(' ', @html ) %>
+       </TD>
+       <TD STYLE="background-image:url(<%$fsurl%>images/black-gray-side.png); background-repeat:repeat-y;padding-right:0px">
+         &nbsp;&nbsp;
+       </TD>
+     </TR>
+   </TABLE>
+
+%} else {
+
+   <% join(' | ', @html) %>
+
+%}
+<%init>
+
+my $opt = ref($_[0]) ? shift : {};
+
+my $url_base = $opt->{'url_base'};
+
+my @html;
+while (@_) {
+
+  my ($item, $url) = splice(@_,0,2);
+  next if $item =~ /^\s*Main\s+Menu\s*$/i;
+
+  my $style = '';
+  if ( $opt->{'newstyle'} ) {
+
+    my $dclass = $item eq $opt->{'selected'}
+                   ? 'fsblackbuttonselected'
+                   : 'fsblackbutton';
+
+    $style =
+      qq( CLASS="$dclass" ).
+      qq( onMouseOver="this.className='fsblackbuttonselected'; return true;" ).
+      qq( onMouseOut="this.className='$dclass'; return true;" );
+  }
+
+  push @html, qq!<A HREF="$url_base$url" $style>$item</A>!;
+
+}
+
+</%init>



More information about the freeside-commits mailing list