[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[5495] trunk
- Subject: SF.net SVN: ledger-smb:[5495] trunk
- From: ..hidden..
- Date: Sun, 06 Jan 2013 07:07:30 +0000
Revision: 5495
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5495&view=rev
Author: einhverfr
Date: 2013-01-06 07:07:29 +0000 (Sun, 06 Jan 2013)
Log Message:
-----------
Correcting dynatable not handling underscores in col_id
when tex was used. Also adding support for html_only columns and using minipage to allow page breaks in form data in tables
Modified Paths:
--------------
trunk/Changelog
trunk/UI/Reports/display_report.tex
trunk/UI/lib/dynatable.tex
Modified: trunk/Changelog
===================================================================
--- trunk/Changelog 2013-01-06 06:22:57 UTC (rev 5494)
+++ trunk/Changelog 2013-01-06 07:07:29 UTC (rev 5495)
@@ -93,6 +93,7 @@
* Fixing extra blank lines showing up on ar/ap trans screen on save (Chris T)
* Changing xetex demos to use Liberation font (Chris T, h/t Erik H)
* Better appearance of customer history report filter screen (Chris T)
+* Fixed new Dynatable.tex not handling col ids with underscores (Chris T)
Changelog for 1.3.27
* Detect whether ledgersmb.conf exists during Makefile.PL run and create if
Modified: trunk/UI/Reports/display_report.tex
===================================================================
--- trunk/UI/Reports/display_report.tex 2013-01-06 06:22:57 UTC (rev 5494)
+++ trunk/UI/Reports/display_report.tex 2013-01-06 07:07:29 UTC (rev 5495)
@@ -3,16 +3,14 @@
papersize = 'a4paper';
END;
+SKIP_TYPES = ['hidden', 'radio', 'checkbox'];
COLNUMBER = 0;
-SKIP_TYPES = ['hidden', 'radio', 'checkbox'];
-
FOREACH COL IN columns;
- IF 0 == SKIP_TYPES.grep(COL.type).size();
- COLNUMBER = COLNUMBER + 1;
+ IF 0 == SKIP_TYPES.grep(COL.type).size() and ! COL.html_only.defined();
+ COLNUMBER = COLNUMBER + 1;
END;
END;
-
FILTER latex;
-?>
\documentclass[<?lsmb papersize ?>]{article}
Modified: trunk/UI/lib/dynatable.tex
===================================================================
--- trunk/UI/lib/dynatable.tex 2013-01-06 06:22:57 UTC (rev 5494)
+++ trunk/UI/lib/dynatable.tex 2013-01-06 07:07:29 UTC (rev 5495)
@@ -5,6 +5,9 @@
# This assumes a 1cm margin on either side. --CT
DECLARED_WIDTH=0;
+SKIP_TYPES = ['hidden', 'radio', 'checkbox'];
+
+
FOREACH COL IN columns;
DECLARED_WIDTH = DECLARED_WIDTH + COL.pwidth; # pwidth is arbitrary scale
END;
@@ -21,7 +24,9 @@
IF COL.psep_before;
'|';
END;
- IF COL.pwidth;
+ IF 1 == SKIP_TYPES.grep(COL.type).size() or COL.html_only;
+ '';
+ ELSIF COL.pwidth;
"p{" _ (COL.pwidth * WIDTH_PER_P) _ "cm}";
ELSIF COL.palign;
COL.palign;
@@ -38,52 +43,51 @@
<?lsmb IF head; head ?>\\<?lsmb- END ?>
<?lsmb- -?>
<?lsmb
-SKIP_TYPES = ['hidden', 'radio', 'checkbox'];
-
ADD_SEP = 0;
FOREACH COL IN columns;
- IF ADD_SEP;
- ' & ';
- END;
- ADD_SEP = 1;
- IF 0 == SKIP_TYPES.grep(COL.type).size();
+ IF 0 == SKIP_TYPES.grep(COL.type).size() AND ! COL.html_only;
+ IF ADD_SEP;
+ ' & ';
+ END;
COL.name;
+ ADD_SEP = 1;
END;
END;
--?>\\
+-?>\tabularnewline
\hline\hline
\endfirsthead
<?lsmb
-SKIP_TYPES = ['hidden', 'radio', 'checkbox'];
ADD_SEP = 0;
FOREACH COL IN columns;
- IF ADD_SEP;
- ' & ';
- END;
- ADD_SEP = 1;
- IF 0 == SKIP_TYPES.grep(COL.type).size();
+ IF 0 == SKIP_TYPES.grep(COL.type).size() AND ! COL.html_only;
+ IF ADD_SEP;
+ ' & ';
+ END;
COL.name;
+ ADD_SEP = 1;
END;
END;
--?>\\
+-?>\tabularnewline
\hline\hline
\endhead
<?lsmb
FOREACH ROW IN tbody.rows;
- ADD_SEP = 0;
+ ADD_SEP=0;
FOREACH COL IN columns;
- IF ADD_SEP;
- ' & ';
+ COLID = COL.col_id.replace('\\\\');
+ IF 0 == SKIP_TYPES.grep(COL.type).size() AND ! COL.html_only;
+ IF ADD_SEP;
+ ' & ';
+ END;
+ ADD_SEP = 1;
+ ?>\begin{minipage}{<?lsmb (COL.pwidth * WIDTH_PER_P) _ "cm"; ?>}<?lsmb
+ ROW.${COLID}; #$
+ ?>\end{minipage}<?lsmb
END;
- ADD_SEP = 1;
- COL_ID = COL.col_id;
- IF 0 == SKIP_TYPES.grep(COL.type).size();
- ROW.$COL_ID; #$
- END;
- END;
- ?>\\
+ END;
+ ?>\tabularnewline
<?lsmb
END; # FOREACH ?>
\end{longtable}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.