[invoice] enable CSS class

This commit will enables "class" attribute in the various html-table
objects. The CSS string can be specified, eg.

.entries-table tr, .entries-table td { etc }
.date-table tr { etc }

to provide styling etc.
This commit is contained in:
Christopher Lam 2018-06-04 13:58:00 +08:00
parent 0198a8b831
commit ba000f71bf

View File

@ -35,6 +35,9 @@
(define (addif pred . data) (if pred data '()))
(define base-css ".align-right { float: right; text-align: right }
.entries-table > table { width: 100% }")
(define (date-col columns-used)
(vector-ref columns-used 0))
(define (description-col columns-used)
@ -571,6 +574,8 @@
(gnc:html-document-set-title! document (format #f (_"~a #~a") title
(gncInvoiceGetID invoice)))
(gnc:html-document-set-style-text! document invoice-css)
(gnc:html-table-set-style! table "table"
'attribute (list "border" 1)
'attribute (list "cellspacing" 0)