mirror of
https://github.com/OCA/reporting-engine.git
synced 2025-02-16 16:30:38 +02:00
[ADD] 'single-page' and 'multi-page' classes in report_qweb_element_page_visibility module
These classes cause the element to be visible when the document is only a single page long (for single-page) or when it's multiple pages long (for multi-page). This is especially useful for page counters, which can be hidden when there's only a single page.
This commit is contained in:
@@ -43,6 +43,12 @@
|
||||
'last-page': function (elt) {
|
||||
elt.style.visibility = (vars.sitepage === vars.sitepages) ? "visible" : "hidden";
|
||||
},
|
||||
'single-page': function (elt) {
|
||||
elt.style.display = (vars.sitepages === 1) ? "inherit" : "none";
|
||||
},
|
||||
'multi-page': function (elt) {
|
||||
elt.style.display = (vars.sitepages > 1) ? "inherit" : "none";
|
||||
},
|
||||
};
|
||||
for (var klass in operations) {
|
||||
var y = document.getElementsByClassName(klass);
|
||||
|
||||
Reference in New Issue
Block a user