Commits

Anonymous committed 29ab9d3

Got the arrows of the smaller navigation menu working.

Comments (0)

Files changed (9)

common/images/sect-arrow-left-disabled.png

Added
New image

common/images/sect-arrow-left.png

Added
New image

common/images/sect-arrow-right-disabled.png

Added
New image

common/images/sect-arrow-right.png

Added
New image

common/images/sect-arrow-up-disabled.png

Added
New image

common/images/sect-arrow-up.png

Added
New image

common/style.css.ttml

     padding-right:5pt;
     padding-left:5pt;
     width:25%;
+    min-width:275px;
 }
 .sub_menu ul
 {
 .article h4 { font-size: 145%; text-decoration:underline; }
 .article h5 { font-size: 130%;  }
 .article h6 { font-size: 110%;  }
+
+.sub_menu .nav_links li
+{
+    display: inline;
+    margin:0;
+    padding:0;
+}
+
+.sub_menu .nav_links img
+{
+    border:0;
+    margin:0;
+    padding:0;
+}

lib/Shlomif/Homepage/SectionMenu.pm

 use strict;
 use warnings;
 
+package Shlomif::Homepage::SectionMenu::NavLinks;
+
+use base 'HTML::Latemp::NavLinks::GenHtml::ArrowImages';
+
+sub get_image_base
+{
+    return 'sect-arrow-';
+}
+
+package Shlomif::Homepage::SectionMenu;
+
 use base 'HTML::Widgets::NavMenu::Object';
 use base 'Class::Accessor';
 
     nav_menu
     path_info
     results
+    root
     sections
     title
 ));
     $self->path_info($args{'path_info'});
     $self->empty(0);
     $self->current_host($args{current_host});
+    $self->root($args{root});
 
     my $current_sect;
     SECTION_LOOP: foreach my $sect (@{$self->sections()})
     }
 }
 
+sub get_nav_links
+{
+    my $self = shift;
+
+    return Shlomif::Homepage::SectionMenu::NavLinks->new(
+        nav_links => $self->results()->{nav_links},
+        nav_links_obj => $self->results()->{nav_links_obj},
+        root => $self->root(),
+    )->get_total_html();
+}
 sub get_html
 {
     my $self = shift;
     {
         return qq{<div class="sub_menu">\n} .
             qq{<h2>} . $self->title() . qq{</h2>\n} .
+            $self->get_nav_links() .
             qq{<a id="toggle_sect_menu" href="javascript:toggle_sect_menu()" class="toggle_sect_menu">Hide</a>\n} .
             qq{<div id="sect_menu_wrapper">\n} .
             join("\n", @{$self->results()->{html}}) .

lib/rest-of-template.wml

     $section_nav_menu = MySectNavData::get_nav_menu(
         'path_info' => $filename,
         'current_host' => "<latemp_default_val "<get-var latemp_server />" "$(LATEMP_SERVER)" />",
+        'root' => "$(ROOT)",
         );
 
     print $section_nav_menu->get_html();