1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-23 15:19:42 +02:00

Improve print and PDF rendering

This commit is contained in:
Harvey Kandola 2019-01-08 13:56:42 +00:00
parent 5467771542
commit c706edec47
5 changed files with 767 additions and 798 deletions

File diff suppressed because one or more lines are too long

View file

@ -100,13 +100,6 @@ export default Component.extend(Modals, {
processNotification(msg, type) {
if (this.get('isDestroyed') || this.get('isDestroying')) return;
// if (msg === 'wait') {
// this.set('showWait', true);
// this.set('showMessage', false);
// this.set('showDone', false);
// }
// New code...
if (is.not.undefined(type)) {
switch (type) {
case 'info':
@ -137,30 +130,6 @@ export default Component.extend(Modals, {
return;
}
// Legacy code...
if (msg === 'done') {
$('.progress-done').removeClass('zoomOut').addClass('zoomIn');
this.set('showWait', false);
this.set('showMessage', false);
this.set('showDone', true);
setTimeout(function() {
$('.progress-done').removeClass('zoomIn').addClass('zoomOut');
}, 3000);
}
if (msg !== 'done' && msg !== 'wait') {
$('.progress-notification').removeClass('zoomOut').addClass('zoomIn');
this.set('showWait', false);
this.set('showDone', false);
this.set('showMessage', true);
this.set('message', msg);
setTimeout(function() {
$('.progress-notification').removeClass('zoomIn').addClass('zoomOut');
}, 3000);
}
},
actions: {
@ -179,12 +148,11 @@ export default Component.extend(Modals, {
}
},
onShowWhatsNewModal() {
this.modalOpen("#whats-new-modal", { "show": true });
onNew() {
if (this.get('newsContent.length') > 0) {
this.get('session').seenNewVersion();
this.set('hasWhatsNew', false);
this.get('router').transitionTo('updates');
}
},

View file

@ -15,6 +15,7 @@ import Controller from '@ember/controller';
export default Controller.extend(Notifier, {
router: service(),
appMeta: service(),
folderService: service('folder'),
documentService: service('document'),
localStorage: service('localStorage'),

View file

@ -2,7 +2,7 @@
margin: 0 0 0 0;
> .page-header {
margin: 0 0 2rem 0;
margin: 2rem 0 2rem 0;
> .page-number {
color: $theme-500;
@ -53,7 +53,7 @@
.start-section {
@extend .no-select;
text-align: right;
margin: 1.5rem 0;
margin: 0;
display: block;
> i {

View file

@ -95,7 +95,7 @@
{{/if}}
{{/if}}
<div class="divider"></div>
{{#link-to "updates" class=(if hasWhatsNew "item bold green" "item")}}What's New{{/link-to}}
<a class={{if hasWhatsNew "item bold green" "item"}} href="#" {{action "onNew"}}>What's New</a>
<a href="https://docs.documize.com" target="_blank" class="item">Help</a>
{{#if enableLogout}}
<div class="divider"></div>