1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-08-04 21:15:24 +02:00

improvements to print display

This commit is contained in:
Harvey Kandola 2017-04-03 16:34:42 +01:00
parent c6ca284e6d
commit c5443fffb4
8 changed files with 838 additions and 673 deletions

View file

@ -23,6 +23,7 @@ export default Ember.Service.extend({
ajax: service(),
localStorage: service(),
kcAuth: service(),
apiHost: `${config.apiHost}`,
endpoint: `${config.apiHost}/${config.apiNamespace}`,
orgId: '',
title: '',

View file

@ -9,22 +9,57 @@
//
// https://documize.com
@media print {
.non-printable,
.zone-navigation,
.zone-sidebar,
#sidebar-wrapper,
.document-heading,
.edit-document-heading,
#sidebar-toggle,
.back-to-space,
.start-section,
.new-section-wizard {
display: none !important;
@page {
size: 8.5in 11in;
margin: 20mm;
@top-right {
font-size: 12px;
content: string(doctitle);
color: $color-off-black;
}
@bottom-left {
font-size: 12px;
content: 'Exported from Documize';
color: $color-off-black;
}
@bottom-right {
content: counter(page);
font-size: 12px;
color: $color-off-black;
}
}
#page-content-wrapper, #wrapper {
padding: 0 !important;
html, body {
background-color: transparent !important;
max-width: none !important;
float: none !important;
position: relative !important;
height: initial !important;
min-height: initial !important;
}
.non-printable,
.zone-navigation,
#sidebar-wrapper,
.sidebar-wrapper,
.sidebar-common,
.sidebar-toolbar,
.sidebar-panel,
.edit-document-heading,
.back-to-space,
.start-section,
.start-button,
.is-a-tab,
.new-section-wizard {
float: none !important;
display: none !important;
margin: 0 !important;
padding: 0 !important;
width: 0 !important;
z-index: 0 !important;
}
.non-printable-message,
@ -32,9 +67,80 @@
display: block !important;
}
.is-a-tab, .is-a-page {
#wrapper {
padding: 0 !important;
margin: 0 !important;
box-shadow: none !important;
position: relative !important;
box-shadow: initial !important;
border-radius: initial !important;
float: none !important;
overflow-x: initial !important;
padding-left: 0 !important;
.page-container {
padding: 0 !important;
margin: 0 !important;
position: initial !important;
box-shadow: initial !important;
border-radius: initial !important;
width: initial !important;
max-width: initial !important;
float: initial !important;
overflow-x: initial !important;
#page-content-wrapper {
padding: 0 !important;
margin: 0 !important;
position: initial !important;
box-shadow: initial !important;
border-radius: initial !important;
width: initial !important;
max-width: initial !important;
float: initial !important;
overflow-x: initial !important;
#zone-document-content {
padding: 0 !important;
margin: 0 !important;
position: initial !important;
box-shadow: initial !important;
border-radius: initial !important;
width: initial !important;
max-width: initial !important;
float: initial !important;
overflow-x: initial !important;
.document-heading {
.doc-title {
margin: 0 0 10px 0 !important;
}
}
.document-view {
padding: 0 !important;
margin: 0 !important;
position: initial !important;
box-shadow: initial !important;
border-radius: initial !important;
width: initial !important;
max-width: initial !important;
float: initial !important;
overflow-x: initial !important;
.is-a-page /*, .is-a-tab */ {
padding: 0 !important;
margin: 30px 0 20px 0 !important;
position: initial !important;
box-shadow: initial !important;
border-radius: initial !important;
width: initial !important;
max-width: initial !important;
float: initial !important;
overflow-x: initial !important;
}
}
}
}
}
}
}

View file

@ -7,7 +7,6 @@ $sidebar-width: 400px;
-moz-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
transition: all 0.5s ease;
background-color: $color-off-white;
}
#sidebar-wrapper {
@ -20,7 +19,6 @@ $sidebar-width: 400px;
height: 100%;
margin-left: -$sidebar-width;
border-right: 1px solid $color-stroke;
background: $color-off-white;
overflow-y: auto;
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
@ -28,10 +26,6 @@ $sidebar-width: 400px;
transition: all 0.5s ease;
}
#wrapper.toggled #sidebar-wrapper {
width: $sidebar-width;
}
.page-container {
margin-right: auto;
margin-left: auto;
@ -42,7 +36,8 @@ $sidebar-width: 400px;
#page-content-wrapper {
width: 100%;
position: absolute;
position: relative;
// position: absolute;
padding: 30px;
margin: 0 auto;
margin-top: 30px;
@ -54,42 +49,19 @@ $sidebar-width: 400px;
}
}
#wrapper.toggled #page-content-wrapper {
position: absolute;
margin-right: -$sidebar-width;
}
@media(min-width:768px) {
#wrapper {
padding-left: $sidebar-width;
}
#wrapper.toggled {
padding-left: 0;
padding-right: 0;
}
#sidebar-wrapper {
width: $sidebar-width;
}
#wrapper.toggled #sidebar-wrapper {
width: 0;
.sidebar-toolbar {
position: relative;
}
}
#page-content-wrapper {
padding: 30px;
position: relative;
}
#wrapper.toggled #page-content-wrapper {
position: relative;
margin-left: 0;
}
// #page-content-wrapper {
// padding: 30px;
// position: relative;
// }
}
.sidebar-toolbar {

View file

@ -1,4 +1,4 @@
<div id="page-{{ page.id }}" class="is-a-tab wysiwyg {{if expanded 'tab-max' 'tab-min'}}" data-id="{{ page.id }}" data-type="{{ page.contentType }}">
<div id="page-{{ page.id }}" class="is-a-tab wysiwyg non-printable {{if expanded 'tab-max' 'tab-min'}}" data-id="{{ page.id }}" data-type="{{ page.contentType }}">
{{document/tab-heading tagName=page.tagName document=document folder=folder page=page isEditor=isEditor
onExpand=(action 'onExpand') onSavePageAsBlock=(action 'onSavePageAsBlock') onCopyPage=(action 'onCopyPage') onMovePage=(action 'onMovePage') onDeletePage=(action 'onDeletePage')}}
{{#if expanded}}

View file

@ -227,16 +227,16 @@ textarea {
font-size: inherit;
line-height: inherit;
}
a {
/*color: #337ab7;*/
/*text-decoration: none;*/
/*a {
color: #337ab7;
text-decoration: none;
}
/*a:hover,
a:focus {*/
/*color: #23527c;*/
/*text-decoration: underline;*/
a:hover,
a:focus {
color: #23527c;
text-decoration: underline;
}
/*a:focus {
a:focus {
outline: thin dotted;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
@ -1155,7 +1155,7 @@ hr {
display: none !important;
}
}
.visible-print {
/*.visible-print {
display: none !important;
}
@media print {
@ -1201,4 +1201,4 @@ hr {
.hidden-print {
display: none !important;
}
}
}*/