[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [1483] trunk/scripts



Revision: 1483
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=1483&view=rev
Author:   einhverfr
Date:     2007-08-31 23:49:20 -0700 (Fri, 31 Aug 2007)

Log Message:
-----------
Updating pod for menu scripts, and adding pod coverage for my modifications to scripts/customer

Modified Paths:
--------------
    trunk/scripts/customer.pl
    trunk/scripts/menu.pl

Modified: trunk/scripts/customer.pl
===================================================================
--- trunk/scripts/customer.pl	2007-09-01 06:16:04 UTC (rev 1482)
+++ trunk/scripts/customer.pl	2007-09-01 06:49:20 UTC (rev 1483)
@@ -51,6 +51,18 @@
         
 }
 
+=pod
+
+=over
+
+=item add
+
+This method creates a blank screen for entering a customer's information.
+
+=back
+
+=cut 
+
 sub add {
     my ($request) = @_;
     my $customer = LedgerSMB::DBObject::Customer->new(base => $request, copy => 'all');

Modified: trunk/scripts/menu.pl
===================================================================
--- trunk/scripts/menu.pl	2007-09-01 06:16:04 UTC (rev 1482)
+++ trunk/scripts/menu.pl	2007-09-01 06:49:20 UTC (rev 1483)
@@ -1,17 +1,43 @@
 #!/usr/bin/perl
 
-# This file is copyright (C) 2007the LedgerSMB core team and licensed under 
-# the GNU General Public License.  For more information please see the included
-# LICENSE and COPYRIGHT files
 
+=head1 NAME
+
+LedgerSMB::Scripts::menu - LedgerSMB controller script for menus
+
+=head1 SYOPSIS
+
+This script provides a controller class for generating menus.  It can operate in
+two modes:  One creates a standard expanding menu which works with or without
+javascript.  The second creates drilldown menus for small-screen or text-only
+devices.
+
+=head1 METHODS
+
+=cut
+
 package LedgerSMB::Scripts::menu;
-our $VERSION = '0.1';
+our $VERSION = '1.0';
 
-$menufile = "menu.ini";
 use LedgerSMB::DBObject::Menu;
 use LedgerSMB::Template;
 use strict;
 
+
+=pod
+
+=over
+
+=item __default
+
+This pseudomethod is used to trap menu clicks that come back through the file
+and route to the appropriate function.  If $request->{menubar} is set, it routes
+to the drilldown_menu.  Otherwise, it routes to expanding_menu.
+
+=back
+
+=cut
+
 sub __default {
     my ($request) = @_;
     if ($request->{menubar}){
@@ -21,6 +47,20 @@
     }
 }
 
+=pod
+
+=over
+
+=item root_doc
+
+If $request->{menubar} is set, this creates a drilldown menu.  Otherwise, it
+creates the root document (currently a frameset).
+
+=back
+
+
+=cut
+
 sub root_doc {
     my ($request) = @_;
     my $template;
@@ -42,6 +82,20 @@
     $template->render($request);
 }
 
+=pod
+
+=over
+
+=item expanding_menu
+
+This function generates an expanding menu.  By default all nodes are closed, but
+there nodes which are supposed to be open are marked.
+
+
+=back
+
+=cut
+
 sub expanding_menu {
     my ($request) = @_;
     if ($request->{'open'} !~ s/:$request->{id}:/:/){
@@ -71,6 +125,21 @@
     $template->render($menu);
 }
 
+=pod
+
+=over
+
+=item drillown_menu
+
+This function creates a single cross section of the menu.  Currently this is
+most useful for generating menus for small screen devices or devices where a
+limited number of options are necessary (screen readers, text-only browsers and
+the like).
+
+=back
+
+=cut
+
 sub drilldown_menu {
     my ($request) = @_;
     my $menu = LedgerSMB::DBObject::Menu->new({base => $request});
@@ -89,4 +158,14 @@
     $template->render($menu);
 }
 
+=pod 
+
+=head1 Copyright (C) 2007 The LedgerSMB Core Team
+
+Licensed under the GNU General Public License version 2 or later (at your 
+option).  For more information please see the included LICENSE and COPYRIGHT 
+files.
+
+=cut
+
 1;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.