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

SF.net SVN: ledger-smb:[5026] trunk



Revision: 5026
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5026&view=rev
Author:   einhverfr
Date:     2012-07-23 08:30:59 +0000 (Mon, 23 Jul 2012)
Log Message:
-----------
Merging from branches/1.3

Modified Paths:
--------------
    trunk/Changelog
    trunk/LedgerSMB/Form.pm
    trunk/UI/journal/journal_entry.html
    trunk/UI/lib/elements.html
    trunk/bin/aa.pl
    trunk/bin/ir.pl
    trunk/bin/is.pl
    trunk/bin/oe.pl
    trunk/css/ledgersmb.css

Property Changed:
----------------
    trunk/


Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3:3711-5019
   + /branches/1.3:3711-5025

Modified: trunk/Changelog
===================================================================
--- trunk/Changelog	2012-07-23 08:12:56 UTC (rev 5025)
+++ trunk/Changelog	2012-07-23 08:30:59 UTC (rev 5026)
@@ -13,6 +13,9 @@
 * Partsgroups can now be nested though this is not yet used by LSMB (Chris T)
 * Session expiration now with configurable behavior (Chris T)
 
+Enhancing data integrity
+* No longer allow NULL amounts in acc_trans (Chris T)
+
 Installation/Upgrade
 * PostgreSQL contrib dependencies removed, now require Pg 8.4 (Chris T)
 * LaTeX format detection now run-time call, not configured (Chris T)
@@ -76,6 +79,7 @@
 
 Changelog for 1.3.21
 * Added a default numberformat in Form.pm (Chris T)
+* Added a container div for theming saved and/or posted docs (Chris T)
 
 Changelog for 1.3.20
 * Fixes for es_AR translation, duplicate keys removed (Andres B)

Modified: trunk/LedgerSMB/Form.pm
===================================================================
--- trunk/LedgerSMB/Form.pm	2012-07-23 08:12:56 UTC (rev 5025)
+++ trunk/LedgerSMB/Form.pm	2012-07-23 08:30:59 UTC (rev 5026)
@@ -656,6 +656,37 @@
     $self->{header} = 1;
 }
 
+=item $form->open_status_div
+
+Returns a div tag with an id of statusdiv.
+
+If $form->{id} is set and $form->{approved} the class is set to "posted" and if
+id is set but not approved, this is set to "saved."  If neither applies, we set
+to "new."
+
+=cut
+
+sub open_status_div {
+    my ($self) = @_;
+    my $class;
+    if ($self->{approved} and $self->{id}){
+        $class = "posted";
+    } elsif ($self->{id}){
+        $class = "saved";
+    } else {
+        $class = "new";
+    }
+    return "<div id='statusdiv' class='$class'>";
+}
+
+=item $form->close_status_div
+
+Simply returns a </div> tag.  This is included for clarity of code.
+
+=cut 
+
+sub close_status_div { return '</div>'; }
+
 =item $form->redirect([$msg]);
 
 If $form->{callback} is set or $msg is not set, call the redirect function in

Modified: trunk/UI/journal/journal_entry.html
===================================================================
--- trunk/UI/journal/journal_entry.html	2012-07-23 08:12:56 UTC (rev 5025)
+++ trunk/UI/journal/journal_entry.html	2012-07-23 08:30:59 UTC (rev 5026)
@@ -8,8 +8,8 @@
 
 <body>
 
+<?lsmb INCLUDE OPEN_STATUS_DIV id=form.id approved = form.approved ?>
 <form method="post" action="<?lsmb form.script ?>">
-
 <table width="100%">
 <tr>
     <th class="listtop" ><?lsmb form.title ?></th>
@@ -375,7 +375,6 @@
 <?lsmb callback = "gl.pl?action=edit&id=" _ form.id -?>
 <a href="file.pl?action=show_attachment_screen&ref_key=<?lsmb form.id 
    ?>&file_class=1&callback=<?lsmb tt_url(callback) ?>">[<?lsmb text('Attach') ?>]</a>
-<?lsmb END # IF form.id ?>
-</form>
+<?lsmb END # IF for<?lsmb INCLUDE CLOSE_STATUS_DIV id=form.id approved = form.approved ?>
 </body>
-</html>
+<?lsmb INCLUDE OPEN_STATUS_DIV ?>

Modified: trunk/UI/lib/elements.html
===================================================================
--- trunk/UI/lib/elements.html	2012-07-23 08:12:56 UTC (rev 5025)
+++ trunk/UI/lib/elements.html	2012-07-23 08:30:59 UTC (rev 5026)
@@ -348,3 +348,15 @@
     <label<?lsmb label_id ?><?lsmb label_for ?><?lsmb label_class ?>><?lsmb text(element_data.label) ?></label>
   <?lsmb END ?>
 <?lsmb END ?>
+
+<?lsmb BLOCK OPEN_STATUS_DIV;
+   CLASS = 'new';
+   IF id and approved;
+       CLASS = 'posted';
+   ELSIF id; 
+       CLASS = 'saved';
+   END;
+?><div id='statusdiv' class='<?lsmb CLASS ?>'>
+<?lsmb END ?>
+
+<?lsmb BLOCK CLOSE_STATUS_DIV ?></div><?lsmb END ?>

Modified: trunk/bin/aa.pl
===================================================================
--- trunk/bin/aa.pl	2012-07-23 08:12:56 UTC (rev 5025)
+++ trunk/bin/aa.pl	2012-07-23 08:30:59 UTC (rev 5026)
@@ -579,9 +579,8 @@
     $form->header;
 
  print qq|
-<body onload="document.forms[0].${focus}.focus()" />
-
-
+<body onload="document.forms[0].${focus}.focus()" /> | .
+$form->open_status_div . qq|
 <form method=post action=$form->{script}>
 <input type=hidden name=type value="$form->{formname}">
 <input type=hidden name=title value="$title">
@@ -1130,7 +1129,7 @@
 
     print qq|
 </form>
-
+| . $form->close_status_header . qq|
 </body>
 </html>
 |;

Modified: trunk/bin/ir.pl
===================================================================
--- trunk/bin/ir.pl	2012-07-23 08:12:56 UTC (rev 5025)
+++ trunk/bin/ir.pl	2012-07-23 08:30:59 UTC (rev 5026)
@@ -444,6 +444,7 @@
 
     print qq|
 <body onLoad="document.forms[0].${focus}.focus()" />
+| . $form->open_status_div . qq|
 
 <form method=post action="$form->{script}">
 |;
@@ -1026,7 +1027,7 @@
 
     print qq|
 </form>
-
+| . $form->close_status_div . qq|
 </body>
 </html>
 |;

Modified: trunk/bin/is.pl
===================================================================
--- trunk/bin/is.pl	2012-07-23 08:12:56 UTC (rev 5025)
+++ trunk/bin/is.pl	2012-07-23 08:30:59 UTC (rev 5026)
@@ -444,7 +444,8 @@
     $form->header;
 
     print qq|
-<body onLoad="document.forms[0].${focus}.focus()" />
+<body onLoad="document.forms[0].${focus}.focus()" /> 
+| . $form->open_status_div . qq|
 
 <form method=post action="$form->{script}">
 |;
@@ -1106,7 +1107,7 @@
 
     print qq|
 </form>
-
+| . $form->close_status_div . qq|
 </body>
 </html>
 |;

Modified: trunk/bin/oe.pl
===================================================================
--- trunk/bin/oe.pl	2012-07-23 08:12:56 UTC (rev 5025)
+++ trunk/bin/oe.pl	2012-07-23 08:30:59 UTC (rev 5026)
@@ -588,6 +588,7 @@
 
     print qq|
 <body onLoad="document.forms[0].${focus}.focus()" />
+| . $form->open_status_div . qq|
 
 <form method=post action="$form->{script}">
 |;
@@ -963,7 +964,7 @@
 
     print qq| 
 </form>
-
+| . $form->close_status_div . qq|
 </body>
 </html>
 |;

Modified: trunk/css/ledgersmb.css
===================================================================
--- trunk/css/ledgersmb.css	2012-07-23 08:12:56 UTC (rev 5025)
+++ trunk/css/ledgersmb.css	2012-07-23 08:30:59 UTC (rev 5026)
@@ -247,6 +247,20 @@
 tr.warning {
 	background-color: yellow;
 }
+
+/* Theming controls based on transaction status */
+
+#statusdiv.new input {
+}
+
+#statusdiv.posted input {
+       background-color: white;
+}
+
+#statusdiv.saved input {
+       background-color: #ccccff;
+}
+
 /* media stuff */
 
 @media screen {

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