forked from extern/egroupware
Attempt to get nextmatch printing always on the page (landscape)
This commit is contained in:
parent
166a041e55
commit
2cf897b05a
@ -1846,6 +1846,13 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput, et2_IPrin
|
|||||||
* If they want to print them all, we ask the server and print when they're loaded.
|
* If they want to print them all, we ask the server and print when they're loaded.
|
||||||
*/
|
*/
|
||||||
beforePrint: function() {
|
beforePrint: function() {
|
||||||
|
// Add the class, if needed
|
||||||
|
this.div.addClass('print');
|
||||||
|
|
||||||
|
// Trigger resize, so we can fit on a page
|
||||||
|
this.dynheight.outerNode.css('max-width',this.div.css('max-width'));
|
||||||
|
this.resize();
|
||||||
|
|
||||||
// Check for rows that aren't loaded yet, or lots of rows
|
// Check for rows that aren't loaded yet, or lots of rows
|
||||||
var range = this.controller._grid.getIndexRange();
|
var range = this.controller._grid.getIndexRange();
|
||||||
this.old_height = this.controller._grid._scrollHeight;
|
this.old_height = this.controller._grid._scrollHeight;
|
||||||
@ -1957,13 +1964,13 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput, et2_IPrin
|
|||||||
return defer;
|
return defer;
|
||||||
}
|
}
|
||||||
// Don't return anything, just work normally
|
// Don't return anything, just work normally
|
||||||
// Add the class, if needed
|
|
||||||
this.div.addClass('print');
|
|
||||||
},
|
},
|
||||||
afterPrint: function() {
|
afterPrint: function() {
|
||||||
this.div.removeClass('print');
|
this.div.removeClass('print');
|
||||||
this.controller._grid.setScrollHeight(this.old_height);
|
this.controller._grid.setScrollHeight(this.old_height);
|
||||||
delete this.old_height;
|
delete this.old_height;
|
||||||
|
this.dynheight.outerNode.css('max-width','inherit');
|
||||||
|
this.resize();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
et2_register_widget(et2_nextmatch, ["nextmatch"]);
|
et2_register_widget(et2_nextmatch, ["nextmatch"]);
|
||||||
|
@ -462,12 +462,21 @@ which caused click on free space infront of a tag stops nm row selection*/
|
|||||||
.et2_nextmatch .egwGridView_grid tr td div.et2_vbox a {
|
.et2_nextmatch .egwGridView_grid tr td div.et2_vbox a {
|
||||||
display: table-row;
|
display: table-row;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
These are set via javascript before printing to help tame nextmatch's layout
|
||||||
|
for printing
|
||||||
|
*/
|
||||||
.et2_nextmatch.print .egwGridView_scrollarea {
|
.et2_nextmatch.print .egwGridView_scrollarea {
|
||||||
height: auto !important;
|
height: auto !important;
|
||||||
|
width: auto !important;
|
||||||
}
|
}
|
||||||
.et2_nextmatch.print > div {
|
.et2_nextmatch.print > div {
|
||||||
height: auto !important;
|
height: auto !important;
|
||||||
}
|
}
|
||||||
|
.et2_nextmatch.print {
|
||||||
|
/* This is fairly arbitrary, but makes it fit in Chrome and Firefox*/
|
||||||
|
max-width: 700pt !important;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Diff widget
|
* Diff widget
|
||||||
*/
|
*/
|
||||||
@ -1129,9 +1138,12 @@ div.message.floating {
|
|||||||
-webkit-region-break-inside: avoid;
|
-webkit-region-break-inside: avoid;
|
||||||
}
|
}
|
||||||
.et2_nextmatch > div {
|
.et2_nextmatch > div {
|
||||||
width: 100% !important;
|
width: auto !important;
|
||||||
height: auto !important;
|
height: auto !important;
|
||||||
}
|
}
|
||||||
|
.et2_nextmatch table.egwGridView_outer thead tr th div.innerContainer {
|
||||||
|
max-height: inherit;
|
||||||
|
}
|
||||||
#cke_1_top.cke_top {
|
#cke_1_top.cke_top {
|
||||||
display: none;
|
display: none;
|
||||||
border:none;
|
border:none;
|
||||||
|
Loading…
Reference in New Issue
Block a user