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

SF.net SVN: ledger-smb:[5035] branches/1.3



Revision: 5035
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5035&view=rev
Author:   einhverfr
Date:     2012-07-24 08:48:39 +0000 (Tue, 24 Jul 2012)
Log Message:
-----------
Adding action/id div to top of transaction and parts screens for confirmation of actions.

Modified Paths:
--------------
    branches/1.3/Changelog
    branches/1.3/LedgerSMB/Form.pm
    branches/1.3/UI/journal/journal_entry.html
    branches/1.3/UI/lib/elements.html
    branches/1.3/old-handler.pl

Modified: branches/1.3/Changelog
===================================================================
--- branches/1.3/Changelog	2012-07-24 05:55:39 UTC (rev 5034)
+++ branches/1.3/Changelog	2012-07-24 08:48:39 UTC (rev 5035)
@@ -12,6 +12,7 @@
 * Fixed empty string working as empty source for cash recon (Chris T)
 * Saving a part now returns to editing the same part (Chris T, h/t Brian W)
 * If pos.conf.pl is not found, now returns an intelligible error (Chris T)
+* Adding action/id div to top of many screens (Chris T, h/t Erik H)
 
 Changelog for 1.3.20
 * Fixes for es_AR translation, duplicate keys removed (Andres B)

Modified: branches/1.3/LedgerSMB/Form.pm
===================================================================
--- branches/1.3/LedgerSMB/Form.pm	2012-07-24 05:55:39 UTC (rev 5034)
+++ branches/1.3/LedgerSMB/Form.pm	2012-07-24 08:48:39 UTC (rev 5035)
@@ -673,7 +673,11 @@
     } else {
         $class = "new";
     }
-    return "<div id='statusdiv' class='$class'>";
+    my $status = $LedgerSMB::App_State::Locale->text(
+            'Action: [_1], ID: [_2]', $self->{action}, $self->{id}
+    );
+    return "<div id='statusdiv' class='$class'>
+            <div id='history'>$status</div>";
 }
 
 =item $form->close_status_div

Modified: branches/1.3/UI/journal/journal_entry.html
===================================================================
--- branches/1.3/UI/journal/journal_entry.html	2012-07-24 05:55:39 UTC (rev 5034)
+++ branches/1.3/UI/journal/journal_entry.html	2012-07-24 08:48:39 UTC (rev 5035)
@@ -8,7 +8,8 @@
 
 <body>
 
-<?lsmb INCLUDE OPEN_STATUS_DIV id=form.id approved = form.approved ?>
+<?lsmb INCLUDE OPEN_STATUS_DIV 
+             id=form.id approved = form.approved action=form.action ?>
 <form method="post" action="<?lsmb form.script ?>">
 <table width="100%">
 <tr>
@@ -354,4 +355,4 @@
    ?>&file_class=1&callback=<?lsmb tt_url(callback) ?>">[<?lsmb text('Attach') ?>]</a>
 <?lsmb END # IF for<?lsmb INCLUDE CLOSE_STATUS_DIV id=form.id approved = form.approved ?>
 </body>
-<?lsmb INCLUDE OPEN_STATUS_DIV ?>
+<?lsmb INCLUDE CLOSE_STATUS_DIV ?>

Modified: branches/1.3/UI/lib/elements.html
===================================================================
--- branches/1.3/UI/lib/elements.html	2012-07-24 05:55:39 UTC (rev 5034)
+++ branches/1.3/UI/lib/elements.html	2012-07-24 08:48:39 UTC (rev 5035)
@@ -357,6 +357,7 @@
        CLASS = 'saved';
    END;
 ?><div id='statusdiv' class='<?lsmb CLASS ?>'>
+<div id="history"><?lsmb text('Action: [_1], ID: [_2]', action, id); ?></div>
 <?lsmb END ?>
 
 <?lsmb BLOCK CLOSE_STATUS_DIV ?></div><?lsmb END ?>

Modified: branches/1.3/old-handler.pl
===================================================================
--- branches/1.3/old-handler.pl	2012-07-24 05:55:39 UTC (rev 5034)
+++ branches/1.3/old-handler.pl	2012-07-24 08:48:39 UTC (rev 5035)
@@ -60,6 +60,7 @@
 use LedgerSMB::Locale;
 use LedgerSMB::Auth;
 use LedgerSMB::CancelFurtherProcessing;
+use LedgerSMB::App_State;
 use Data::Dumper;
 
 our $logger=Log::Log4perl->get_logger('old-handler-chain');#make logger available to other old programs
@@ -79,6 +80,8 @@
 $locale = LedgerSMB::Locale->get_handle( ${LedgerSMB::Sysconfig::language} )
   or $form->error( __FILE__ . ':' . __LINE__ . ": Locale not loaded: $!\n" );
 
+
+
 # we use $script for the language module
 $form->{script} = $script;
 
@@ -134,6 +137,8 @@
     $locale   = LedgerSMB::Locale->get_handle( $myconfig{language} )
       or $form->error( __FILE__ . ':' . __LINE__ . ": Locale not loaded: $!\n" );
 }
+
+$LedgerSMB::App_State::Locale = $locale;
 # pull in the main code
 $logger->trace("trying script=bin/$form->{script} action=$form->{action}");#trace flow
 try {

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