mirror of
https://github.com/documize/community.git
synced 2025-08-04 21:15:24 +02:00
parent
0819e04c03
commit
7e14651998
18 changed files with 704 additions and 620 deletions
|
@ -28,6 +28,10 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, {
|
|||
didReceiveAttrs() {
|
||||
this.set('saveTemplate.name', this.get('document.name'));
|
||||
this.set('saveTemplate.description', this.get('document.excerpt'));
|
||||
|
||||
let doc = this.get('document');
|
||||
|
||||
this.set('layoutLabel', doc.get('layout') === 'doc' ? 'Wiki style' : 'Document style');
|
||||
},
|
||||
|
||||
didRender() {
|
||||
|
@ -53,6 +57,17 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, {
|
|||
window.print();
|
||||
},
|
||||
|
||||
changeLayout() {
|
||||
let doc = this.get('document');
|
||||
let layout = doc.get('layout') === 'doc' ? 'wiki' : 'doc';
|
||||
|
||||
doc.set('layout', layout);
|
||||
|
||||
this.attrs.onSaveMeta(doc);
|
||||
|
||||
this.set('layoutLabel', doc.get('layout') === 'doc' ? 'Wiki style' : 'Document style');
|
||||
},
|
||||
|
||||
saveTemplate() {
|
||||
var name = this.get('saveTemplate.name');
|
||||
var excerpt = this.get('saveTemplate.description');
|
||||
|
|
|
@ -48,6 +48,7 @@ export default Ember.Component.extend(TooltipMixin, NotifierMixin, {
|
|||
title: "Empty",
|
||||
description: "An empty canvas for your words",
|
||||
img: "template-blank",
|
||||
layout: "doc",
|
||||
locked: true
|
||||
};
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ export default Model.extend({
|
|||
userId: attr('string'),
|
||||
tags: attr('string'),
|
||||
template: attr('boolean'),
|
||||
layout: attr('string'),
|
||||
|
||||
// client-side property
|
||||
selected: attr('boolean', { defaultValue: false }),
|
||||
|
|
|
@ -15,6 +15,10 @@
|
|||
display: none !important;
|
||||
}
|
||||
|
||||
.zone-content {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.document-view {
|
||||
.attachment-zone,
|
||||
.document-summary,
|
||||
|
@ -28,4 +32,10 @@
|
|||
display: block !important;
|
||||
}
|
||||
}
|
||||
|
||||
.doc-layout {
|
||||
padding: 0 !important;
|
||||
box-shadow: none !important;
|
||||
margin: 0 !important;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
.wiki-layout {
|
||||
|
||||
}
|
||||
|
||||
.doc-layout {
|
||||
padding: 60px 50px;
|
||||
box-shadow: 0 0 0 0.75pt $color-stroke,0 0 3pt 0.75pt $color-stroke;
|
||||
margin: 30px 40px 50px 40px;
|
||||
}
|
||||
|
||||
.document-view {
|
||||
.print-title {
|
||||
display: none;
|
||||
|
|
|
@ -38,7 +38,13 @@
|
|||
|
||||
{{#dropdown-menu target="document-toolbar-menu" position="bottom right" open="click" onOpenCallback=(action 'onMenuOpen') onCloseCallback=(action 'onMenuOpen')}}
|
||||
<ul class="menu">
|
||||
{{#if isEditor}}
|
||||
<li class="item" {{action 'changeLayout'}} >{{layoutLabel}}</li>
|
||||
<li class="divider"></li>
|
||||
{{/if}}
|
||||
|
||||
<li class="item" id="print-document-button" {{action 'printDocument'}}>Print</li>
|
||||
|
||||
{{#if isEditor}}
|
||||
<li class="divider"></li>
|
||||
<li class="item" id="delete-document-button">Delete</li>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="document-view">
|
||||
<div class="document-view {{document.layout}}-layout">
|
||||
{{#if document.template}}
|
||||
<div class="is-template">TEMPLATE</div>
|
||||
{{/if}}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
||||
//
|
||||
// This software (Documize Community Edition) is licensed under
|
||||
// This software (Documize Community Edition) is licensed under
|
||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
||||
//
|
||||
// You can operate outside the AGPL restrictions by purchasing
|
||||
// Documize Enterprise Edition and obtaining a commercial license
|
||||
// by contacting <sales@documize.com>.
|
||||
// by contacting <sales@documize.com>.
|
||||
//
|
||||
// https://documize.com
|
||||
|
||||
|
@ -14,5 +14,10 @@ export default {
|
|||
Public: 1,
|
||||
Private: 2,
|
||||
Protected: 3
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
DisplayLayout: {
|
||||
DisplayLayoutDoc: "doc",
|
||||
DisplayLayoutWiki: "wiki"
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "documize",
|
||||
"version": "0.32.0",
|
||||
"version": "0.33.0",
|
||||
"description": "The Document IDE",
|
||||
"private": true,
|
||||
"directories": {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue