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

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



Revision: 6205
          http://sourceforge.net/p/ledger-smb/code/6205
Author:   einhverfr
Date:     2013-10-31 07:59:26 +0000 (Thu, 31 Oct 2013)
Log Message:
-----------
timecard weekly interface now compiles and displays list of dates.  Still need to add rows

Modified Paths:
--------------
    trunk/LedgerSMB/Scripts/timecard.pm
    trunk/UI/timecards/timecard-week.html

Modified: trunk/LedgerSMB/Scripts/timecard.pm
===================================================================
--- trunk/LedgerSMB/Scripts/timecard.pm	2013-10-31 02:48:02 UTC (rev 6204)
+++ trunk/LedgerSMB/Scripts/timecard.pm	2013-10-31 07:59:26 UTC (rev 6205)
@@ -102,6 +102,14 @@
         $request->{transdate} = $request->{date_from};
         return display($request);
     } else {
+         my $startdate = LedgerSMB::PGDate->from_input($request->{date_from});
+         my @dates = ();
+         for (0 .. 6){
+            push @dates, LedgerSMB::PGDate->new(
+                    date => $startdate->date->add(days => $_)
+            );
+         }
+         $request->{transdates} = ..hidden..;
          my $template = LedgerSMB::Template->new(
              user     => $request->{_user},
              locale   => $request->{_locale},

Modified: trunk/UI/timecards/timecard-week.html
===================================================================
--- trunk/UI/timecards/timecard-week.html	2013-10-31 02:48:02 UTC (rev 6204)
+++ trunk/UI/timecards/timecard-week.html	2013-10-31 07:59:26 UTC (rev 6205)
@@ -1,4 +1,4 @@
-<?lsmb INCLUDE "ui-header.html" dojo-parse='onload';
+<?lsmb INCLUDE "ui-header.html" dojo_parse='onload';
 PROCESS "elements.html" ?>
 <body class="<?lsmb dojo_theme ?>">
 <form action="timecard.pl" method="post">
@@ -6,54 +6,54 @@
 PROCESS input element_data = {
     type = "hidden"
     name = "transdate_0"
-   value = transdates[0]
+   value = transdates.0
 };
 PROCESS input element_data = {
     type = "hidden"
     name = "transdate_1"
-   value = transdates[1]
+   value = transdates.1
 };
 PROCESS input element_data = {
     type = "hidden"
     name = "transdate_2"
-   value = transdates[2]
+   value = transdates.2
 };
 PROCESS input element_data = {
     type = "hidden"
     name = "transdate_3"
-   value = transdates[3]
+   value = transdates.3
 };
 PROCESS input element_data = {
     type = "hidden"
     name = "transdate_4"
-   value = transdates[4]
+   value = transdates.4
 };
 PROCESS input element_data = {
     type = "hidden"
     name = "transdate_5"
-   value = transdates[5]
+   value = transdates.5
 };
 PROCESS input element_data = {
     type = "hidden"
     name = "transdate_6"
-   value = transdates[6]
+   value = transdates.6
 };
 ?>
 <div class="listtop"><?lsmb text('Weekly Time and Materials Entry') ?></div>
 <table width="100%" cols=7 data-dojo-type="dijit/layout/TableContainer"
  id="timecard-weekly">
 <tr class="listtop">
- <th><?lsmb transdates[0] ?></th>
- <th><?lsmb transdates[1] ?></th>
- <th><?lsmb transdates[2] ?></th>
- <th><?lsmb transdates[3] ?></th>
- <th><?lsmb transdates[4] ?></th>
- <th><?lsmb transdates[5] ?></th>
- <th><?lsmb transdates[6] ?></th>
+ <th><?lsmb transdates.0 ?></th>
+ <th><?lsmb transdates.1 ?></th>
+ <th><?lsmb transdates.2 ?></th>
+ <th><?lsmb transdates.3 ?></th>
+ <th><?lsmb transdates.4 ?></th>
+ <th><?lsmb transdates.5 ?></th>
+ <th><?lsmb transdates.6 ?></th>
 </tr>
-<?lsmb FOR 1 .. num_lines ?>
+<?lsmb FOR lnum IN [1 .. num_lines] ?>
 <tr>
-<?lsmb FOR 0 .. 6 ?>
+<?lsmb FOR dnum IN [0 .. 6] ?>
 <td>
 
 </td>

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


------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits