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

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



Revision: 6616
          http://sourceforge.net/p/ledger-smb/code/6616
Author:   einhverfr
Date:     2014-01-24 06:22:01 +0000 (Fri, 24 Jan 2014)
Log Message:
-----------
Dropdowns are populated for timecard printing now.  Now time to test the actual printing

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

Modified: trunk/LedgerSMB/Scripts/timecard.pm
===================================================================
--- trunk/LedgerSMB/Scripts/timecard.pm	2014-01-24 05:31:05 UTC (rev 6615)
+++ trunk/LedgerSMB/Scripts/timecard.pm	2014-01-24 06:22:01 UTC (rev 6616)
@@ -147,6 +147,7 @@
     $timecard->save;
     $request->{id} = $timecard->id;
     $request->merge($timecard->get($request->{id}));
+    $request->{templates} = ['timecard'];
     display($request);
 }
 

Modified: trunk/UI/lib/utilities.html
===================================================================
--- trunk/UI/lib/utilities.html	2014-01-24 05:31:05 UTC (rev 6615)
+++ trunk/UI/lib/utilities.html	2014-01-24 06:22:01 UTC (rev 6616)
@@ -15,16 +15,18 @@
 };
 END; 
 
+IF languages.defined;
 languages.push({});
 PROCESS select element_data = {
            name = "language"
         options = languages
  default_values = [language]
 };
+END;
 
-IF 0 == formats.size;
+IF ! formats.defined;
    formats = [];
-   FOR F IN list_formats();
+   FOR F IN LIST_FORMATS();
       formats.push({text = F, id = F});
    END;
 END;
@@ -35,7 +37,11 @@
  default_values = [format]
 };
 
-printers.pushd({ text = text('screen'), id = 'screen' });
+IF !printers.defined;
+   printers = [];
+END;
+
+printers.push({ text = text('Screen'), id = 'screen' });
 PROCESS select element_data = {
            name = "media"
         options = printers

Modified: trunk/UI/timecards/timecard.html
===================================================================
--- trunk/UI/timecards/timecard.html	2014-01-24 05:31:05 UTC (rev 6615)
+++ trunk/UI/timecards/timecard.html	2014-01-24 06:22:01 UTC (rev 6616)
@@ -129,7 +129,16 @@
     </td>
 </tr>
 </table>
-<?lsmb IF id; PROCESS print_options; END; ?>
+<?lsmb IF id; 
+formats = [];
+FOR F IN LIST_FORMATS();
+   IF F == 'HTML' or F == 'PDF';
+      formats.push({text = F, id = F});
+   END;
+END;
+
+PROCESS print_options; 
+END; ?>
 <?lsmb 
 IF id;
     PROCESS button element_data = {

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


------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits