[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb: [1482] trunk
- Subject: SF.net SVN: ledger-smb: [1482] trunk
- From: ..hidden..
- Date: Fri, 31 Aug 2007 23:16:06 -0700
Revision: 1482
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=1482&view=rev
Author: einhverfr
Date: 2007-08-31 23:16:04 -0700 (Fri, 31 Aug 2007)
Log Message:
-----------
More menu fixes
Modified Paths:
--------------
trunk/LedgerSMB/DBObject.pm
trunk/scripts/menu.pl
Added Paths:
-----------
trunk/UI/menu/
trunk/UI/menu/drilldown.html
trunk/UI/menu/expanding.css
trunk/UI/menu/expanding.html
Removed Paths:
-------------
trunk/UI/menu_expand.html
Modified: trunk/LedgerSMB/DBObject.pm
===================================================================
--- trunk/LedgerSMB/DBObject.pm 2007-09-01 05:35:34 UTC (rev 1481)
+++ trunk/LedgerSMB/DBObject.pm 2007-09-01 06:16:04 UTC (rev 1482)
@@ -133,7 +133,7 @@
for (@in_args) { push @call_args, $_ } ;
$self->{call_args} = ..hidden..;
$self->debug({file => '/tmp/dbobject'});
- $self->call_procedure( procname => $funcname, args => @call_args );
+ $self->call_procedure( procname => $funcname, args => ..hidden.. );
}
sub run_custom_queries {
Added: trunk/UI/menu/drilldown.html
===================================================================
--- trunk/UI/menu/drilldown.html (rev 0)
+++ trunk/UI/menu/drilldown.html 2007-09-01 06:16:04 UTC (rev 1482)
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>Accounting Menu - LedgerSMB Version 1.2.7 - Chris Travers - metatron_ledger</title>
+ <meta http-equiv="Pragma" content="no-cache" />
+ <meta http-equiv="Expires" content="-1" />
+ <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
+ <link rel="stylesheet" href="css/<?lsmb stylesheet ?>" type="text/css" title="LedgerSMB stylesheet" />
+ <link rel="stylesheet" href="UI/menu/expanding.css" type="text/css" title="LedgerSMB stylesheet" />
+
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+
+ <meta name="robots" content="noindex,nofollow" />
+</head>
+<body>
+ <?lsmb FOR item = menu_items ?>
+ <a href="<?lsmb IF item.module ?><?lsmb item.module
+ ?><?lsmb ELSE ?>menu.pl<?lsmb END
+ ?>?login=<?lsmb login
+ ?>&<?lsmb FOREACH arg IN item.args
+ ?><?lsmb arg
+ ?><?lsmb END
+ ?><?lsmb IF item.menu
+ ?>&parent_id=<?lsmb item.id
+ ?>&open=<?lsmb open
+ ?><?lsmb END ?>&menubar=1"
+ class = "<?lsmb IF item.menu ?>Menu<?lsmb
+ ELSE ?>Item<?lsmb END ?>"
+ ><?lsmb text(item.label) ?></a>
+ <br/>
+ <?lsmb END ?>
+</body>
+</html>
Added: trunk/UI/menu/expanding.css
===================================================================
--- trunk/UI/menu/expanding.css (rev 0)
+++ trunk/UI/menu/expanding.css 2007-09-01 06:16:04 UTC (rev 1482)
@@ -0,0 +1,3 @@
+div.submenu {
+ display: none;
+}
Added: trunk/UI/menu/expanding.html
===================================================================
--- trunk/UI/menu/expanding.html (rev 0)
+++ trunk/UI/menu/expanding.html 2007-09-01 06:16:04 UTC (rev 1482)
@@ -0,0 +1,78 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>Accounting Menu - LedgerSMB Version 1.2.7 - Chris Travers - metatron_ledger</title>
+ <meta http-equiv="Pragma" content="no-cache" />
+ <meta http-equiv="Expires" content="-1" />
+ <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
+ <link rel="stylesheet" href="css/<?lsmb stylesheet ?>" type="text/css" title="LedgerSMB stylesheet" />
+ <link rel="stylesheet" href="UI/menu/expanding.css" type="text/css" title="LedgerSMB stylesheet" />
+
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+
+ <meta name="robots" content="noindex,nofollow" />
+
+ <script type="text/javascript">
+
+ function SwitchMenu(obj) {
+ if (document.getElementById) {
+ var element = document.getElementById(obj);
+
+ if (element.style.display == "block") {
+ element.style.display = "none";
+
+ } else {
+ element.style.display = "block"; //display the block of info
+ }
+ return false;
+ }
+ }
+
+
+ document.onselectstart = new Function("return false");
+ </script>
+</head>
+
+
+ <body class="menu">
+ <img class="cornderlogo" src="images/ledgersmb_small.png" width="100" height="50" border="1" alt="ledger-smb" />
+ <?lsmb FOREACH item = menu_items ?>
+ <?lsmb href = "" ?>
+ <?lsmb WHILE item.level < old_level ?>
+ </div><?lsmb old_level = old_level - 1 ?>
+ <?lsmb END ?>
+ <div class="Menu" id="menu_<?lsmb item.id ?>">
+ <a href="<?lsmb IF item.module ?><?lsmb item.module
+ ?><?lsmb ELSE ?>menu.pl<?lsmb END
+ ?>?login=<?lsmb login
+ ?>&<?lsmb FOREACH arg IN item.args
+ ?><?lsmb arg
+ ?><?lsmb END
+ ?><?lsmb IF item.menu
+ ?>&id=<?lsmb item.id
+ ?>&open=<?lsmb open
+ ?><?lsmb END ?>"
+ <?lsmb IF item.module ?>
+ target = "main_window"
+ <?lsmb END ?>
+ <?lsmb IF item.menu ?>
+ onclick="return SwitchMenu('sub_<?lsmb item.id ?>')"
+ <?lsmb END ?>
+ class = "<?lsmb IF item.module ?>Menu<?lsmb
+ ELSE ?>Item<?lsmb END ?>"
+ ><?lsmb text(item.label) ?></a>
+ </div>
+ <?lsmb IF item.menu ?>
+ <div id="sub_<?lsmb item.id ?>" class=submenu
+ <?lsmb IF item.open ?>
+ style="display: block"
+ <?lsmb END ?>>
+ <?lsmb END ?>
+ <?lsmb old_level = item.level ?>
+ <?lsmb END ?>
+
+
+</body>
+
+</html>
Deleted: trunk/UI/menu_expand.html
===================================================================
--- trunk/UI/menu_expand.html 2007-09-01 05:35:34 UTC (rev 1481)
+++ trunk/UI/menu_expand.html 2007-09-01 06:16:04 UTC (rev 1482)
@@ -1,78 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <title>Accounting Menu - LedgerSMB Version 1.2.7 - Chris Travers - metatron_ledger</title>
- <meta http-equiv="Pragma" content="no-cache" />
- <meta http-equiv="Expires" content="-1" />
- <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
- <link rel="stylesheet" href="css/<?lsmb stylesheet ?>" type="text/css" title="LedgerSMB stylesheet" />
- <link rel="stylesheet" href="UI/menu_expand.css" type="text/css" title="LedgerSMB stylesheet" />
-
- <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
-
- <meta name="robots" content="noindex,nofollow" />
-
- <script type="text/javascript">
-
- function SwitchMenu(obj) {
- if (document.getElementById) {
- var element = document.getElementById(obj);
-
- if (element.style.display == "block") {
- element.style.display = "none";
-
- } else {
- element.style.display = "block"; //display the block of info
- }
- return false;
- }
- }
-
-
- document.onselectstart = new Function("return false");
- </script>
-</head>
-
-
- <body class="menu">
- <img class="cornderlogo" src="images/ledgersmb_small.png" width="100" height="50" border="1" alt="ledger-smb" />
- <?lsmb FOREACH item = menu_items ?>
- <?lsmb href = "" ?>
- <?lsmb WHILE item.level < old_level ?>
- </div><?lsmb old_level = old_level - 1 ?>
- <?lsmb END ?>
- <div class="Menu" id="menu_<?lsmb item.id ?>">
- <a href="<?lsmb IF item.module ?><?lsmb item.module
- ?><?lsmb ELSE ?>menu.pl<?lsmb END
- ?>?login=<?lsmb login
- ?>&<?lsmb FOREACH arg IN item.args
- ?><?lsmb arg
- ?><?lsmb END
- ?><?lsmb IF item.menu
- ?>&id=<?lsmb item.id
- ?>&open=<?lsmb open
- ?><?lsmb END ?>"
- <?lsmb IF item.module ?>
- target = "main_window"
- <?lsmb END ?>
- <?lsmb IF item.menu ?>
- onclick="return SwitchMenu('sub_<?lsmb item.id ?>')"
- <?lsmb END ?>
- class = "<?lsmb IF item.module ?>Menu<?lsmb
- ELSE ?>Item<?lsmb END ?>"
- ><?lsmb text(item.label) ?></a>
- </div>
- <?lsmb IF item.menu ?>
- <div id="sub_<?lsmb item.id ?>" class=submenu
- <?lsmb IF item.open ?>
- style="display: block"
- <?lsmb END ?>>
- <?lsmb END ?>
- <?lsmb old_level = item.level ?>
- <?lsmb END ?>
-
-
-</body>
-
-</html>
Modified: trunk/scripts/menu.pl
===================================================================
--- trunk/scripts/menu.pl 2007-09-01 05:35:34 UTC (rev 1481)
+++ trunk/scripts/menu.pl 2007-09-01 06:16:04 UTC (rev 1482)
@@ -15,7 +15,7 @@
sub __default {
my ($request) = @_;
if ($request->{menubar}){
- # todo
+ drilldown_menu($request);
} else {
expanding_menu($request);
}
@@ -29,46 +29,64 @@
$request->{main} = "am.pl?action=recurring_transactions"
if $request->{main} eq 'recurring_transactions';
$template = LedgerSMB::Template->new(
- user =>$request->{_user},
- locale => $request->{_locale},
- path => 'UI',
- template => 'frameset',
- format => 'HTML'
- );
- } else {
- # TODO: Create Lynx Initial Menu
- }
- $template->render($request);
- }
+ user =>$request->{_user},
+ locale => $request->{_locale},
+ path => 'UI',
+ template => 'frameset',
+ format => 'HTML'
+ );
+ } else {
+ drilldown_menu($request);
+ return;
+ }
+ $template->render($request);
+}
- sub expanding_menu {
- my ($request) = @_;
- if ($request->{'open'} !~ s/:$request->{id}:/:/){
- $request->{'open'} .= ":$request->{id}:";
- }
+sub expanding_menu {
+ my ($request) = @_;
+ if ($request->{'open'} !~ s/:$request->{id}:/:/){
+ $request->{'open'} .= ":$request->{id}:";
+ }
- # The above system can lead to extra colons.
- $request->{'open'} =~ s/:+/:/g;
+ # The above system can lead to extra colons.
+ $request->{'open'} =~ s/:+/:/g;
-
+
- my $menu = LedgerSMB::DBObject::Menu->new({base => $request});
- $menu->generate();
- for my $item (@{$menu->{menu_items}}){
- if ($request->{'open'} =~ /:$item->{id}:/ ){
- $item->{'open'} = 'true';
- }
- }
+ my $menu = LedgerSMB::DBObject::Menu->new({base => $request});
+ $menu->generate();
+ for my $item (@{$menu->{menu_items}}){
+ if ($request->{'open'} =~ /:$item->{id}:/ ){
+ $item->{'open'} = 'true';
+ }
+ }
my $template = LedgerSMB::Template->new(
user => $request->{_user},
locale => $request->{_locale},
- path => 'UI',
- template => 'menu_expand',
+ path => 'UI/menu',
+ template => 'expanding',
format => 'HTML',
);
$template->render($menu);
}
+sub drilldown_menu {
+ my ($request) = @_;
+ my $menu = LedgerSMB::DBObject::Menu->new({base => $request});
+ $menu->{parent_id} ||= 0;
+
+ print STDERR "Testing";
+ $menu->generate_section;
+ my $template = LedgerSMB::Template->new(
+ user => $request->{_user},
+ locale => $request->{_locale},
+ path => 'UI/menu',
+ template => 'drilldown',
+ format => 'HTML',
+ );
+ $template->render($menu);
+}
+
1;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.