[print] Style = Monochrome
|
|
@ -38,7 +38,7 @@
|
|||
"fieldtype": "Select",
|
||||
"in_list_view": 1,
|
||||
"label": "Print Style",
|
||||
"options": "Modern\nClassic\nStandard",
|
||||
"options": "Modern\nClassic\nStandard\nMonochrome",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
|
|
@ -76,7 +76,7 @@
|
|||
],
|
||||
"icon": "icon-cog",
|
||||
"issingle": 1,
|
||||
"modified": "2014-07-31 07:43:54.550258",
|
||||
"modified": "2014-08-05 09:03:02.337355",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Print Settings",
|
||||
|
|
|
|||
|
|
@ -1,84 +0,0 @@
|
|||
@import url(https://fonts.googleapis.com/css?family=Noto+Sans:400,700);
|
||||
|
||||
@media screen {
|
||||
.print-format-gutter {
|
||||
background-color: #ddd;
|
||||
padding: 15px 0px;
|
||||
}
|
||||
.print-format {
|
||||
background-color: white;
|
||||
box-shadow: 0px 0px 9px rgba(0,0,0,0.5);
|
||||
max-width: 8.3in;
|
||||
min-height: 11.69in;
|
||||
padding: 0.75in;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.page-break {
|
||||
padding: 30px 0px;
|
||||
border-bottom: 1px dashed #888;
|
||||
}
|
||||
|
||||
.page-break:first-child {
|
||||
padding-top: 0px;
|
||||
}
|
||||
|
||||
.page-break:last-child {
|
||||
border-bottom: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
@media print {
|
||||
.print-format p {
|
||||
margin-left: 1px;
|
||||
margin-right: 1px;
|
||||
}
|
||||
}
|
||||
|
||||
.print-format {
|
||||
font-size: 9pt;
|
||||
font-family: 'Noto Sans', sans-serif;
|
||||
-webkit-print-color-adjust:exact;
|
||||
}
|
||||
|
||||
.page-break {
|
||||
page-break-after: always;
|
||||
}
|
||||
|
||||
.print-heading {
|
||||
border-bottom: 2px solid #aaa;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.print-heading h2 {
|
||||
margin: 0px;
|
||||
}
|
||||
.print-heading h4 {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
table.no-border, table.no-border td {
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.print-format label {
|
||||
/* wkhtmltopdf breaks label into multiple lines when it is inline-block */
|
||||
display: block;
|
||||
}
|
||||
|
||||
.print-format img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.print-format table td > .primary:first-child {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.print-format td, .print-format th {
|
||||
vertical-align: top !important;
|
||||
padding: 6px !important;
|
||||
}
|
||||
|
||||
.print-format p {
|
||||
margin: 3px 0px 3px;
|
||||
}
|
||||
|
|
@ -8,7 +8,9 @@
|
|||
<meta name="author" content="">
|
||||
<title>{%= title %}</title>
|
||||
<link href="{%= frappe.urllib.get_base_url() %}/assets/frappe/css/bootstrap.css" rel="stylesheet">
|
||||
<link href="{%= frappe.urllib.get_base_url() %}/assets/frappe/css/print.css" rel="stylesheet" type="text/css">
|
||||
<style>
|
||||
{%= frappe.boot.print_css %}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="print-format-gutter">
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 105 KiB After Width: | Height: | Size: 95 KiB |
|
Before Width: | Height: | Size: 108 KiB After Width: | Height: | Size: 99 KiB |
BIN
frappe/public/images/help/print-style-monochrome.png
Normal file
|
After Width: | Height: | Size: 98 KiB |
|
Before Width: | Height: | Size: 108 KiB After Width: | Height: | Size: 98 KiB |
|
|
@ -192,7 +192,7 @@ def get_print_style(style=None):
|
|||
if not style:
|
||||
style = print_settings.print_style or "Standard"
|
||||
|
||||
context = {"print_settings": print_settings}
|
||||
context = {"print_settings": print_settings, "print_style": style}
|
||||
|
||||
css = frappe.get_template("templates/styles/standard.css").render(context)
|
||||
|
||||
|
|
|
|||
26
frappe/templates/styles/monochrome.css
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
.print-format * {
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
.print-format .alert {
|
||||
background-color: inherit;
|
||||
border: 1px dashed #333;
|
||||
}
|
||||
|
||||
.print-format .table-bordered,
|
||||
.print-format .table-bordered > thead > tr > th,
|
||||
.print-format .table-bordered > tbody > tr > th,
|
||||
.print-format .table-bordered > tfoot > tr > th,
|
||||
.print-format .table-bordered > thead > tr > td,
|
||||
.print-format .table-bordered > tbody > tr > td,
|
||||
.print-format .table-bordered > tfoot > tr > td {
|
||||
border: 1px solid #333;
|
||||
}
|
||||
|
||||
.print-format hr {
|
||||
border-top: 1px solid #333;
|
||||
}
|
||||
|
||||
.print-heading {
|
||||
border-bottom: 2px solid #333;
|
||||
}
|
||||
|
|
@ -1,4 +1,87 @@
|
|||
{% include "public/css/print.css" %}
|
||||
@import url(https://fonts.googleapis.com/css?family=Noto+Sans:400,700);
|
||||
|
||||
@media screen {
|
||||
.print-format-gutter {
|
||||
background-color: #ddd;
|
||||
padding: 15px 0px;
|
||||
}
|
||||
.print-format {
|
||||
background-color: white;
|
||||
box-shadow: 0px 0px 9px rgba(0,0,0,0.5);
|
||||
max-width: 8.3in;
|
||||
min-height: 11.69in;
|
||||
padding: 0.75in;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.page-break {
|
||||
padding: 30px 0px;
|
||||
border-bottom: 1px dashed #888;
|
||||
}
|
||||
|
||||
.page-break:first-child {
|
||||
padding-top: 0px;
|
||||
}
|
||||
|
||||
.page-break:last-child {
|
||||
border-bottom: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
@media print {
|
||||
.print-format p {
|
||||
margin-left: 1px;
|
||||
margin-right: 1px;
|
||||
}
|
||||
}
|
||||
|
||||
.print-format {
|
||||
font-size: 9pt;
|
||||
font-family: 'Noto Sans', sans-serif;
|
||||
-webkit-print-color-adjust:exact;
|
||||
}
|
||||
|
||||
.page-break {
|
||||
page-break-after: always;
|
||||
}
|
||||
|
||||
.print-heading {
|
||||
border-bottom: 2px solid #aaa;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.print-heading h2 {
|
||||
margin: 0px;
|
||||
}
|
||||
.print-heading h4 {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
table.no-border, table.no-border td {
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.print-format label {
|
||||
/* wkhtmltopdf breaks label into multiple lines when it is inline-block */
|
||||
display: block;
|
||||
}
|
||||
|
||||
.print-format img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.print-format table td > .primary:first-child {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.print-format td, .print-format th {
|
||||
vertical-align: top !important;
|
||||
padding: 6px !important;
|
||||
}
|
||||
|
||||
.print-format p {
|
||||
margin: 3px 0px 3px;
|
||||
}
|
||||
|
||||
.print-format {
|
||||
font-size: {{ print_settings.font_size|flt or 9 }}pt;
|
||||
|
|
|
|||