mirror of
https://github.com/documize/community.git
synced 2025-07-19 13:19:43 +02:00
WIP new document UX/UI
This commit is contained in:
parent
21ba55a58f
commit
36be6243ad
23 changed files with 910 additions and 4231 deletions
|
@ -9,17 +9,15 @@
|
|||
//
|
||||
// https://documize.com
|
||||
|
||||
import $ from 'jquery';
|
||||
import { computed } from '@ember/object';
|
||||
import { schedule } from '@ember/runloop';
|
||||
import { inject as service } from '@ember/service';
|
||||
import Component from '@ember/component';
|
||||
import tocUtil from '../../utils/toc';
|
||||
import TooltipMixin from '../../mixins/tooltip';
|
||||
import Component from '@ember/component';
|
||||
|
||||
export default Component.extend(TooltipMixin, {
|
||||
documentService: service('document'),
|
||||
isDesktop: false,
|
||||
emptyState: computed('pages', function () {
|
||||
return this.get('pages.length') === 0;
|
||||
}),
|
||||
|
@ -56,135 +54,21 @@ export default Component.extend(TooltipMixin, {
|
|||
didInsertElement() {
|
||||
this._super(...arguments);
|
||||
this.eventBus.subscribe('documentPageAdded', this, 'onDocumentPageAdded');
|
||||
this.eventBus.subscribe('resized', this, 'setSize');
|
||||
|
||||
this.setSize();
|
||||
this.renderTooltips();
|
||||
},
|
||||
|
||||
willDestroyElement() {
|
||||
this._super(...arguments);
|
||||
this.eventBus.unsubscribe('documentPageAdded');
|
||||
this.eventBus.unsubscribe('resized');
|
||||
|
||||
let t = '#doc-toc';
|
||||
if (interact.isSet(t)) interact(t).unset();
|
||||
this.removeTooltips();
|
||||
},
|
||||
|
||||
onDocumentPageAdded(pageId) { // eslint-disable-line no-unused-vars
|
||||
this.setSize();
|
||||
schedule('afterRender', () => {
|
||||
this.setState(pageId);
|
||||
});
|
||||
},
|
||||
|
||||
setSize() {
|
||||
schedule('afterRender', () => {
|
||||
let isDesktop = $(window).width() >= 1800;
|
||||
this.set('isDesktop', isDesktop);
|
||||
|
||||
if (isDesktop) {
|
||||
let h = $(window).height() - $("#nav-bar").height() - 140;
|
||||
$("#doc-toc").css('max-height', h);
|
||||
|
||||
let i = $("#doc-view").offset();
|
||||
|
||||
if (is.not.undefined(i)) {
|
||||
let l = i.left - 100;
|
||||
if (l > 350) l = 350;
|
||||
$("#doc-toc").width(l);
|
||||
|
||||
$("#doc-toc").css({
|
||||
'display': 'inline-block',
|
||||
'position': 'fixed',
|
||||
'width': l+'px',
|
||||
'height': 'auto',
|
||||
'transform': '',
|
||||
});
|
||||
|
||||
this.attachResizer();
|
||||
}
|
||||
} else {
|
||||
$("#doc-toc").css({
|
||||
'display': 'block',
|
||||
'position': 'relative',
|
||||
'width': '100%',
|
||||
'height': '500px',
|
||||
'transform': 'none',
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
attachResizer() {
|
||||
schedule('afterRender', () => {
|
||||
let t = '#doc-toc';
|
||||
if (interact.isSet(t)) {
|
||||
interact(t).unset();
|
||||
}
|
||||
|
||||
interact('#doc-toc')
|
||||
.draggable({
|
||||
autoScroll: true,
|
||||
inertia: false,
|
||||
onmove: dragMoveListener,
|
||||
// restrict: {
|
||||
// restriction: "body",
|
||||
// endOnly: true,
|
||||
// elementRect: { top: 0, left: 0, bottom: 1, right: 1 }
|
||||
// }
|
||||
})
|
||||
.resizable({
|
||||
// resize from all edges and corners
|
||||
edges: { left: true, right: true, bottom: true, top: true },
|
||||
// keep the edges inside the parent
|
||||
// restrictEdges: {
|
||||
// outer: 'parent',
|
||||
// endOnly: true,
|
||||
// },
|
||||
// minimum size
|
||||
// restrictSize: {
|
||||
// min: { width: 250, height: 65 },
|
||||
// }
|
||||
})
|
||||
.on('resizemove', function (event) {
|
||||
var target = event.target,
|
||||
x = (parseFloat(target.getAttribute('data-x')) || 0),
|
||||
y = (parseFloat(target.getAttribute('data-y')) || 0);
|
||||
|
||||
// update the element's style
|
||||
target.style.width = event.rect.width + 'px';
|
||||
target.style.height = event.rect.height + 'px';
|
||||
|
||||
// translate when resizing from top or left edges
|
||||
x += event.deltaRect.left;
|
||||
y += event.deltaRect.top;
|
||||
|
||||
target.style.webkitTransform = target.style.transform = 'translate(' + x + 'px,' + y + 'px)';
|
||||
|
||||
target.setAttribute('data-x', x);
|
||||
target.setAttribute('data-y', y);
|
||||
target.style.position = 'fixed';
|
||||
});
|
||||
});
|
||||
|
||||
function dragMoveListener (event) {
|
||||
var target = event.target,
|
||||
// keep the dragged position in the data-x/data-y attributes
|
||||
x = (parseFloat(target.getAttribute('data-x')) || 0) + event.dx,
|
||||
y = (parseFloat(target.getAttribute('data-y')) || 0) + event.dy;
|
||||
|
||||
// translate the element
|
||||
target.style.webkitTransform = target.style.transform = 'translate(' + x + 'px, ' + y + 'px)';
|
||||
|
||||
// update the posiion attributes
|
||||
target.setAttribute('data-x', x);
|
||||
target.setAttribute('data-y', y);
|
||||
target.style.position = 'fixed';
|
||||
}
|
||||
},
|
||||
|
||||
// Controls what user can do with the toc (left sidebar)
|
||||
setState(pageId) {
|
||||
let toc = this.get('pages');
|
||||
|
|
|
@ -22,7 +22,7 @@ export default Component.extend({
|
|||
return this.get('document.protection') !== this.get('constants').ProtectionType.Lock && this.get('permissions.documentEdit');
|
||||
}),
|
||||
showDialog: false,
|
||||
|
||||
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
this.getAttachments();
|
||||
|
@ -82,6 +82,7 @@ export default Component.extend({
|
|||
getAttachments() {
|
||||
this.get('documentService').getAttachments(this.get('document.id')).then((files) => {
|
||||
this.set('files', files);
|
||||
this.get('onReady')(files.length);
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -96,7 +97,7 @@ export default Component.extend({
|
|||
this.set('showDialog', false);
|
||||
|
||||
let attachment = this.get('deleteAttachment');
|
||||
|
||||
|
||||
this.get('documentService').deleteAttachment(this.get('document.id'), attachment.id).then(() => {
|
||||
this.getAttachments();
|
||||
this.set('deleteAttachment', {
|
||||
|
|
|
@ -9,11 +9,34 @@
|
|||
//
|
||||
// https://documize.com
|
||||
|
||||
import $ from 'jquery';
|
||||
import { inject as service } from '@ember/service';
|
||||
import Component from '@ember/component';
|
||||
|
||||
export default Component.extend({
|
||||
classNames: ['layout-footer'],
|
||||
tagName: 'footer',
|
||||
appMeta: service()
|
||||
appMeta: service(),
|
||||
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
this.eventBus.subscribe('notifyUser', this, 'handleEvent');
|
||||
},
|
||||
|
||||
handleEvent(msg) {
|
||||
if (msg === 'wait') {
|
||||
this.set('showWait', true);
|
||||
this.set('showDone', false);
|
||||
}
|
||||
|
||||
if (msg === 'done') {
|
||||
$('.progress-done').removeClass('zoomOut').addClass('zoomIn');
|
||||
this.set('showWait', false);
|
||||
this.set('showDone', true);
|
||||
|
||||
setTimeout(function() {
|
||||
$('.progress-done').removeClass('zoomIn').addClass('zoomOut');
|
||||
}, 3000);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -38,7 +38,7 @@ export default Component.extend({
|
|||
|
||||
schedule('afterRender', () => {
|
||||
let options = {
|
||||
cache_suffix: '?v=476',
|
||||
cache_suffix: '?v=4713',
|
||||
selector: '#' + this.get('editorId'),
|
||||
relative_urls: false,
|
||||
browser_spellcheck: true,
|
||||
|
@ -117,7 +117,7 @@ export default Component.extend({
|
|||
};
|
||||
|
||||
if (typeof tinymce === 'undefined') {
|
||||
$.getScript('/tinymce/tinymce.min.js?v=476', function () {
|
||||
$.getScript('/tinymce/tinymce.min.js?v=4713', function () {
|
||||
window.tinymce.dom.Event.domLoaded = true;
|
||||
tinymce.baseURL = '//' + window.location.host + '/tinymce';
|
||||
tinymce.suffix = '.min';
|
||||
|
|
|
@ -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,16 +14,18 @@ import Component from '@ember/component';
|
|||
import miscUtil from '../utils/misc';
|
||||
|
||||
export default Component.extend({
|
||||
notifications : null,
|
||||
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
},
|
||||
|
||||
didInsertElement() {
|
||||
this.eventBus.subscribe('notifyUser', this, 'showNotification');
|
||||
// this.eventBus.subscribe('notifyUser', this, 'showNotification');
|
||||
},
|
||||
|
||||
willDestroyElement() {
|
||||
this.eventBus.unsubscribe('notifyUser');
|
||||
// this.eventBus.unsubscribe('notifyUser');
|
||||
},
|
||||
|
||||
showNotification(msg) {
|
||||
|
@ -52,4 +54,4 @@ export default Component.extend({
|
|||
}, 2500, self.get('notifications').length);
|
||||
});
|
||||
},
|
||||
});
|
||||
});
|
||||
|
|
|
@ -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,11 +14,19 @@ import Mixin from '@ember/object/mixin';
|
|||
export default Mixin.create({
|
||||
showNotification(msg) {
|
||||
this.eventBus.publish('notifyUser', msg);
|
||||
},
|
||||
},
|
||||
|
||||
showWait() {
|
||||
this.eventBus.publish('notifyUser', 'wait');
|
||||
},
|
||||
|
||||
showDone() {
|
||||
this.eventBus.publish('notifyUser', 'done');
|
||||
},
|
||||
|
||||
actions: {
|
||||
showNotification(msg) {
|
||||
this.eventBus.publish('notifyUser', msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -11,16 +11,18 @@
|
|||
|
||||
import { Promise as EmberPromise } from 'rsvp';
|
||||
import { inject as service } from '@ember/service';
|
||||
import Tooltips from '../../../mixins/tooltip';
|
||||
import Notifier from '../../../mixins/notifier';
|
||||
import Controller from '@ember/controller';
|
||||
import TooltipMixin from '../../../mixins/tooltip';
|
||||
|
||||
export default Controller.extend(TooltipMixin, {
|
||||
export default Controller.extend(Tooltips, Notifier, {
|
||||
documentService: service('document'),
|
||||
templateService: service('template'),
|
||||
sectionService: service('section'),
|
||||
linkService: service('link'),
|
||||
// currentPageId: '',
|
||||
tab: 'content',
|
||||
tabCount: 0, // how many items inside the tab?
|
||||
queryParams: ['currentPageId'],
|
||||
|
||||
actions: {
|
||||
|
@ -28,16 +30,19 @@ export default Controller.extend(TooltipMixin, {
|
|||
this.set('tab', tab);
|
||||
if (tab === 'content') {
|
||||
this.send('refresh');
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
onShowPage(pageId) {
|
||||
this.set('tab', 'content');
|
||||
this.get('browser').scrollTo(`#page-${pageId}`);
|
||||
this.get('browser').scrollTo(`#page-${pageId}`);
|
||||
},
|
||||
|
||||
onSaveDocument(doc) {
|
||||
this.get('documentService').save(doc);
|
||||
this.showWait();
|
||||
this.get('documentService').save(doc).then(() => {
|
||||
this.showDone();
|
||||
});
|
||||
this.get('browser').setTitle(doc.get('name'));
|
||||
this.get('browser').setMetaDescription(doc.get('excerpt'));
|
||||
},
|
||||
|
@ -67,11 +72,13 @@ export default Controller.extend(TooltipMixin, {
|
|||
},
|
||||
|
||||
onSavePage(page, meta) {
|
||||
this.showWait();
|
||||
|
||||
let document = this.get('document');
|
||||
let documentId = document.get('id');
|
||||
let constants = this.get('constants');
|
||||
|
||||
// if document approval mode is locked return
|
||||
// if document approval mode is locked return
|
||||
if (document.get('protection') == constants.ProtectionType.Lock) {
|
||||
// should not really happen
|
||||
return;
|
||||
|
@ -84,6 +91,8 @@ export default Controller.extend(TooltipMixin, {
|
|||
};
|
||||
|
||||
this.get('documentService').updatePage(documentId, page.get('id'), model).then((/*up*/) => {
|
||||
this.showDone();
|
||||
|
||||
this.get('documentService').fetchPages(documentId, this.get('session.user.id')).then((pages) => {
|
||||
this.set('pages', pages);
|
||||
this.get('linkService').getDocumentLinks(documentId).then((links) => {
|
||||
|
@ -98,7 +107,7 @@ export default Controller.extend(TooltipMixin, {
|
|||
let deleteId = deletePage.id;
|
||||
let deleteChildren = deletePage.children;
|
||||
let pendingChanges = [];
|
||||
|
||||
|
||||
let pages = this.get('pages');
|
||||
let pageIndex = _.findIndex(pages, function(i) { return i.get('page.id') === deleteId; });
|
||||
let item = pages[pageIndex];
|
||||
|
@ -118,7 +127,7 @@ export default Controller.extend(TooltipMixin, {
|
|||
|
||||
this.get('documentService').deletePages(documentId, deleteId, pendingChanges).then(() => {
|
||||
this.get('documentService').fetchPages(this.get('document.id'), this.get('session.user.id')).then((pages) => {
|
||||
this.set('pages', pages);
|
||||
this.set('pages', pages);
|
||||
});
|
||||
});
|
||||
} else {
|
||||
|
@ -131,10 +140,13 @@ export default Controller.extend(TooltipMixin, {
|
|||
},
|
||||
|
||||
onInsertSection(data) {
|
||||
this.showWait();
|
||||
|
||||
return new EmberPromise((resolve) => {
|
||||
this.get('documentService').addPage(this.get('document.id'), data).then((newPage) => {
|
||||
let data = this.get('store').normalize('page', newPage);
|
||||
this.get('store').push(data);
|
||||
this.showDone();
|
||||
|
||||
this.get('documentService').fetchPages(this.get('document.id'), this.get('session.user.id')).then((pages) => {
|
||||
this.set('pages', pages);
|
||||
|
@ -179,14 +191,18 @@ export default Controller.extend(TooltipMixin, {
|
|||
},
|
||||
|
||||
onSaveTemplate(name, desc) {
|
||||
this.get('templateService').saveAsTemplate(this.get('document.id'), name, desc).then(function () {});
|
||||
this.showWait();
|
||||
|
||||
this.get('templateService').saveAsTemplate(this.get('document.id'), name, desc).then(function () {
|
||||
this.showDone();
|
||||
});
|
||||
},
|
||||
|
||||
onPageSequenceChange(currentPageId, changes) {
|
||||
this.set('currentPageId', currentPageId);
|
||||
this.get('documentService').changePageSequence(this.get('document.id'), changes).then(() => {
|
||||
this.get('documentService').fetchPages(this.get('document.id'), this.get('session.user.id')).then( (pages) => {
|
||||
this.set('pages', pages);
|
||||
this.set('pages', pages);
|
||||
});
|
||||
});
|
||||
},
|
||||
|
@ -195,15 +211,19 @@ export default Controller.extend(TooltipMixin, {
|
|||
this.set('currentPageId', currentPageId);
|
||||
this.get('documentService').changePageLevel(this.get('document.id'), changes).then(() => {
|
||||
this.get('documentService').fetchPages(this.get('document.id'), this.get('session.user.id')).then( (pages) => {
|
||||
this.set('pages', pages);
|
||||
this.set('pages', pages);
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
onTagChange(tags) {
|
||||
this.showDone();
|
||||
|
||||
let doc = this.get('document');
|
||||
doc.set('tags', tags);
|
||||
this.get('documentService').save(doc);
|
||||
this.get('documentService').save(doc).then(()=> {
|
||||
this.showWait();
|
||||
});
|
||||
},
|
||||
|
||||
onRollback(pageId, revisionId) {
|
||||
|
@ -225,6 +245,10 @@ export default Controller.extend(TooltipMixin, {
|
|||
resolve();
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
onReady(count) {
|
||||
this.set('tabCount', count);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,58 +1,93 @@
|
|||
{{toolbar/nav-bar}}
|
||||
{{#layout/top-bar}}
|
||||
<li class="item">
|
||||
{{#link-to "folder.index" folder.id folder.slug class='link'}}
|
||||
{{folder.name}}
|
||||
{{/link-to}}
|
||||
</li>
|
||||
<li class="item">
|
||||
{{#link-to 'document.index' folder.id folder.slug document.id document.slug class="link selected"}}
|
||||
{{document.name}}
|
||||
{{/link-to}}
|
||||
</li>
|
||||
{{/layout/top-bar}}
|
||||
|
||||
{{toolbar/for-document document=document spaces=folders space=folder
|
||||
permissions=permissions roles=roles tab=tab versions=versions
|
||||
onDocumentDelete=(action 'onDocumentDelete')
|
||||
onSaveTemplate=(action 'onSaveTemplate')
|
||||
onSaveDocument=(action 'onSaveDocument')
|
||||
refresh=(action 'refresh')}}
|
||||
{{#layout/middle-zone}}
|
||||
{{#layout/middle-zone-content}}
|
||||
|
||||
<div id="doc-view" class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
{{document/document-heading document=document permissions=permissions
|
||||
versions=versions
|
||||
onSaveDocument=(action 'onSaveDocument')}}
|
||||
{{document/document-meta document=document folder=folder folders=folders
|
||||
permissions=permissions pages=pages versions=versions
|
||||
onSaveDocument=(action 'onSaveDocument')}}
|
||||
{{toolbar/for-document
|
||||
document=document
|
||||
spaces=folders
|
||||
space=folder
|
||||
permissions=permissions
|
||||
roles=roles
|
||||
tab=tab
|
||||
versions=versions
|
||||
onDocumentDelete=(action 'onDocumentDelete')
|
||||
onSaveTemplate=(action 'onSaveTemplate')
|
||||
onSaveDocument=(action 'onSaveDocument')
|
||||
refresh=(action 'refresh')}}
|
||||
|
||||
{{document/document-heading
|
||||
document=document
|
||||
permissions=permissions
|
||||
versions=versions
|
||||
onSaveDocument=(action 'onSaveDocument')}}
|
||||
|
||||
{{document/document-meta
|
||||
document=document
|
||||
folder=folder
|
||||
folders=folders
|
||||
permissions=permissions
|
||||
pages=pages
|
||||
versions=versions
|
||||
onSaveDocument=(action 'onSaveDocument')}}
|
||||
|
||||
<div class="text-center non-printable document-tabnav">
|
||||
<ul class="tabnav-control">
|
||||
<li class="tab {{if (eq tab 'content') 'selected'}}" {{action 'onTabChange' 'content'}}>Content</li>
|
||||
<li class="tab {{if (eq tab 'attachment') 'selected'}}" {{action 'onTabChange' 'attachment'}}>
|
||||
Attachments
|
||||
({{tabCount}})
|
||||
</li>
|
||||
{{#if session.authenticated}}
|
||||
<li class="tab {{if (eq tab 'revision') 'selected'}}" {{action 'onTabChange' 'revision'}}>Revisions</li>
|
||||
{{/if}}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
{{document/document-toc document=document folder=folder pages=pages page=page
|
||||
permissions=permissions roles=roles tab=tab currentPageId=currentPageId onShowPage=(action 'onShowPage')
|
||||
onPageSequenceChange=(action 'onPageSequenceChange') onPageLevelChange=(action 'onPageLevelChange')}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row no-gutters mb-5">
|
||||
<div class="col-12">
|
||||
<div class="text-center non-printable document-tabnav">
|
||||
<ul class="tabnav-control">
|
||||
<li class="tab {{if (eq tab 'content') 'selected'}}" {{action 'onTabChange' 'content'}}>Content</li>
|
||||
<li class="tab {{if (eq tab 'attachment') 'selected'}}" {{action 'onTabChange' 'attachment'}}>Attachments</li>
|
||||
{{#if session.authenticated}}
|
||||
<li class="tab {{if (eq tab 'revision') 'selected'}}" {{action 'onTabChange' 'revision'}}>Revisions</li>
|
||||
{{/if}}
|
||||
</ul>
|
||||
</div>
|
||||
{{#if (eq tab 'content')}}
|
||||
{{document/view-content
|
||||
document=document links=links pages=pages blocks=blocks currentPageId=currentPageId
|
||||
folder=folder folders=folders sections=sections permissions=permissions roles=roles
|
||||
onSavePage=(action 'onSavePage') onInsertSection=(action 'onInsertSection')
|
||||
onSavePageAsBlock=(action 'onSavePageAsBlock') onDeleteBlock=(action 'onDeleteBlock')
|
||||
onCopyPage=(action 'onCopyPage') onMovePage=(action 'onMovePage') onDeletePage=(action 'onPageDeleted')
|
||||
refresh=(action 'refresh')}}
|
||||
{{/if}}
|
||||
{{#if (eq tab 'attachment')}}
|
||||
{{document/view-attachment document=document permissions=permissions onReady=(action 'onReady')}}
|
||||
{{/if}}
|
||||
{{#if (eq tab 'revision')}}
|
||||
{{document/view-revision document=document folder=folder pages=pages permissions=permissions onRollback=(action 'onRollback')}}
|
||||
{{/if}}
|
||||
|
||||
{{#if (eq tab 'content')}}
|
||||
{{document/view-content
|
||||
document=document links=links pages=pages blocks=blocks currentPageId=currentPageId
|
||||
folder=folder folders=folders sections=sections permissions=permissions roles=roles
|
||||
onSavePage=(action 'onSavePage') onInsertSection=(action 'onInsertSection')
|
||||
onSavePageAsBlock=(action 'onSavePageAsBlock') onDeleteBlock=(action 'onDeleteBlock')
|
||||
onCopyPage=(action 'onCopyPage') onMovePage=(action 'onMovePage') onDeletePage=(action 'onPageDeleted')
|
||||
refresh=(action 'refresh')}}
|
||||
{{/if}}
|
||||
{{#if (eq tab 'attachment')}}
|
||||
{{document/view-attachment document=document permissions=permissions}}
|
||||
{{/if}}
|
||||
{{#if (eq tab 'revision')}}
|
||||
{{document/view-revision document=document folder=folder pages=pages permissions=permissions onRollback=(action 'onRollback')}}
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/layout/middle-zone-content}}
|
||||
|
||||
{{#layout/middle-zone-sidebar}}
|
||||
{{document/document-toc
|
||||
document=document
|
||||
folder=folder
|
||||
pages=pages
|
||||
page=page
|
||||
permissions=permissions
|
||||
roles=roles
|
||||
tab=tab
|
||||
currentPageId=currentPageId
|
||||
onShowPage=(action 'onShowPage')
|
||||
onPageSequenceChange=(action 'onPageSequenceChange')
|
||||
onPageLevelChange=(action 'onPageLevelChange')}}
|
||||
{{/layout/middle-zone-sidebar}}
|
||||
{{/layout/middle-zone}}
|
||||
|
||||
{{#layout/bottom-bar}}
|
||||
{{/layout/bottom-bar}}
|
||||
|
|
|
@ -1,20 +1,43 @@
|
|||
footer {
|
||||
background-color: $color-off-white;
|
||||
background-color: $color-primary-light;
|
||||
color: $color-dark;
|
||||
color: $color-gray;
|
||||
font-weight: 500;
|
||||
font-size: 0.9rem;
|
||||
padding: 10px 2rem;
|
||||
font-size: 1rem;
|
||||
padding: 5px 2rem;
|
||||
}
|
||||
|
||||
.footer {
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
|
||||
a, a:visited {
|
||||
@include ease-in();
|
||||
color: $color-primary;
|
||||
color: $color-gray;
|
||||
text-decoration: none;
|
||||
|
||||
&:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
> .progress {
|
||||
display: inline-block;
|
||||
|
||||
> img {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
> .progress-done {
|
||||
background-color: $color-green;
|
||||
color: $color-white;
|
||||
text-align: center;
|
||||
font-size: 1rem;
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
@include border-radius(20px);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,46 +32,82 @@ footer {
|
|||
position: sticky;
|
||||
}
|
||||
|
||||
@media (min-width: 720px) {
|
||||
@media (min-width: 900px) {
|
||||
.layout-body {
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.layout-content {
|
||||
// Content area cannot exceed 1200px
|
||||
// but can shrink as required
|
||||
// (was flex: 1;).
|
||||
flex: 0 1 1000px;
|
||||
// flex: 1;
|
||||
|
||||
padding: 0 2rem;
|
||||
margin: 0;
|
||||
.layout-sidebar {
|
||||
flex: 0 0 200px;
|
||||
}
|
||||
|
||||
.layout-sidebar {
|
||||
flex: 0 0 20rem;
|
||||
// height: calc(100vh - 145px);
|
||||
// overflow-x: hidden;
|
||||
// overflow-y: auto;
|
||||
.layout-content {
|
||||
flex: 0 1 700px;
|
||||
padding: 0 2rem;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
.layout-body {
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.layout-sidebar {
|
||||
flex: 0 0 30rem;
|
||||
flex: 0 0 300px;
|
||||
}
|
||||
|
||||
.layout-content {
|
||||
flex: 0 1 1000px;
|
||||
margin: 0;
|
||||
padding: 0 2rem 0 3rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1400px) {
|
||||
.layout-body {
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.layout-sidebar {
|
||||
flex: 0 0 400px;
|
||||
}
|
||||
|
||||
.layout-content {
|
||||
flex: 0 1 1000px;
|
||||
margin: 0;
|
||||
padding: 0 2rem 0 3rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1600px) {
|
||||
.layout-body {
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.layout-sidebar {
|
||||
flex: 0 0 450px;
|
||||
}
|
||||
|
||||
.layout-content {
|
||||
flex: 0 1 1200px;
|
||||
margin: 0;
|
||||
padding: 0 2rem 0 3rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1800px) {
|
||||
.layout-body {
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.layout-sidebar {
|
||||
flex: 0 0 35rem;
|
||||
flex: 0 0 500px;
|
||||
}
|
||||
|
||||
.layout-content {
|
||||
flex: 0 1 1300px;
|
||||
margin: 0;
|
||||
padding: 0 2rem 0 4rem;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,9 +6,6 @@
|
|||
position: -o-sticky;
|
||||
position: -webkit-sticky;
|
||||
position: sticky;
|
||||
display: flex;
|
||||
z-index: 999;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@mixin border-radius($radius)
|
||||
|
|
|
@ -5,352 +5,357 @@
|
|||
margin-bottom: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* BASICS */
|
||||
|
||||
.CodeMirror {
|
||||
/* Set height, width, borders, and global font properties here */
|
||||
font-family: monospace;
|
||||
height: 300px;
|
||||
color: black;
|
||||
direction: ltr;
|
||||
}
|
||||
|
||||
/* PADDING */
|
||||
|
||||
.CodeMirror-lines {
|
||||
padding: 4px 0; /* Vertical padding around content */
|
||||
}
|
||||
.CodeMirror pre {
|
||||
padding: 0 4px; /* Horizontal padding of content */
|
||||
}
|
||||
|
||||
.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
||||
background-color: white; /* The little square between H and V scrollbars */
|
||||
}
|
||||
|
||||
/* GUTTER */
|
||||
|
||||
.CodeMirror-gutters {
|
||||
border-right: 1px solid #ddd;
|
||||
background-color: #f7f7f7;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.CodeMirror-linenumbers {}
|
||||
.CodeMirror-linenumber {
|
||||
padding: 0 3px 0 5px;
|
||||
min-width: 20px;
|
||||
text-align: right;
|
||||
color: #999;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.CodeMirror-guttermarker { color: black; }
|
||||
.CodeMirror-guttermarker-subtle { color: #999; }
|
||||
|
||||
/* CURSOR */
|
||||
|
||||
.CodeMirror-cursor {
|
||||
border-left: 1px solid black;
|
||||
border-right: none;
|
||||
width: 0;
|
||||
}
|
||||
/* Shown when moving in bi-directional text */
|
||||
.CodeMirror div.CodeMirror-secondarycursor {
|
||||
border-left: 1px solid silver;
|
||||
}
|
||||
.cm-fat-cursor .CodeMirror-cursor {
|
||||
width: auto;
|
||||
border: 0 !important;
|
||||
background: #7e7;
|
||||
}
|
||||
.cm-fat-cursor div.CodeMirror-cursors {
|
||||
z-index: 1;
|
||||
}
|
||||
.cm-fat-cursor-mark {
|
||||
background-color: rgba(20, 255, 20, 0.5);
|
||||
-webkit-animation: blink 1.06s steps(1) infinite;
|
||||
-moz-animation: blink 1.06s steps(1) infinite;
|
||||
animation: blink 1.06s steps(1) infinite;
|
||||
}
|
||||
.cm-animate-fat-cursor {
|
||||
width: auto;
|
||||
border: 0;
|
||||
-webkit-animation: blink 1.06s steps(1) infinite;
|
||||
-moz-animation: blink 1.06s steps(1) infinite;
|
||||
animation: blink 1.06s steps(1) infinite;
|
||||
background-color: #7e7;
|
||||
}
|
||||
@-moz-keyframes blink {
|
||||
0% {}
|
||||
50% { background-color: transparent; }
|
||||
100% {}
|
||||
}
|
||||
@-webkit-keyframes blink {
|
||||
0% {}
|
||||
50% { background-color: transparent; }
|
||||
100% {}
|
||||
}
|
||||
@keyframes blink {
|
||||
0% {}
|
||||
50% { background-color: transparent; }
|
||||
100% {}
|
||||
}
|
||||
|
||||
/* Can style cursor different in overwrite (non-insert) mode */
|
||||
.CodeMirror-overwrite .CodeMirror-cursor {}
|
||||
|
||||
.cm-tab { display: inline-block; text-decoration: inherit; }
|
||||
|
||||
.CodeMirror-rulers {
|
||||
position: absolute;
|
||||
left: 0; right: 0; top: -50px; bottom: -20px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.CodeMirror-ruler {
|
||||
border-left: 1px solid #ccc;
|
||||
top: 0; bottom: 0;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
/* DEFAULT THEME */
|
||||
|
||||
.cm-s-default .cm-header {color: blue;}
|
||||
.cm-s-default .cm-quote {color: #090;}
|
||||
.cm-negative {color: #d44;}
|
||||
.cm-positive {color: #292;}
|
||||
.cm-header, .cm-strong {font-weight: bold;}
|
||||
.cm-em {font-style: italic;}
|
||||
.cm-link {text-decoration: underline;}
|
||||
.cm-strikethrough {text-decoration: line-through;}
|
||||
|
||||
.cm-s-default .cm-keyword {color: #708;}
|
||||
.cm-s-default .cm-atom {color: #219;}
|
||||
.cm-s-default .cm-number {color: #164;}
|
||||
.cm-s-default .cm-def {color: #00f;}
|
||||
.cm-s-default .cm-variable,
|
||||
.cm-s-default .cm-punctuation,
|
||||
.cm-s-default .cm-property,
|
||||
.cm-s-default .cm-operator {}
|
||||
.cm-s-default .cm-variable-2 {color: #05a;}
|
||||
.cm-s-default .cm-variable-3, .cm-s-default .cm-type {color: #085;}
|
||||
.cm-s-default .cm-comment {color: #a50;}
|
||||
.cm-s-default .cm-string {color: #a11;}
|
||||
.cm-s-default .cm-string-2 {color: #f50;}
|
||||
.cm-s-default .cm-meta {color: #555;}
|
||||
.cm-s-default .cm-qualifier {color: #555;}
|
||||
.cm-s-default .cm-builtin {color: #30a;}
|
||||
.cm-s-default .cm-bracket {color: #997;}
|
||||
.cm-s-default .cm-tag {color: #170;}
|
||||
.cm-s-default .cm-attribute {color: #00c;}
|
||||
.cm-s-default .cm-hr {color: #999;}
|
||||
.cm-s-default .cm-link {color: #00c;}
|
||||
|
||||
.cm-s-default .cm-error {color: #f00;}
|
||||
.cm-invalidchar {color: #f00;}
|
||||
|
||||
.CodeMirror-composing { border-bottom: 2px solid; }
|
||||
|
||||
/* Default styles for common addons */
|
||||
|
||||
div.CodeMirror span.CodeMirror-matchingbracket {color: #0b0;}
|
||||
div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;}
|
||||
.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }
|
||||
.CodeMirror-activeline-background {background: #e8f2ff;}
|
||||
|
||||
/* STOP */
|
||||
|
||||
/* The rest of this file contains styles related to the mechanics of
|
||||
the editor. You probably shouldn't touch them. */
|
||||
|
||||
.CodeMirror {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: white;
|
||||
}
|
||||
|
||||
.CodeMirror-scroll {
|
||||
overflow: scroll !important; /* Things will break if this is overridden */
|
||||
/* 30px is the magic margin used to hide the element's real scrollbars */
|
||||
/* See overflow: hidden in .CodeMirror */
|
||||
margin-bottom: -30px; margin-right: -30px;
|
||||
padding-bottom: 30px;
|
||||
height: 100%;
|
||||
outline: none; /* Prevent dragging from highlighting the element */
|
||||
position: relative;
|
||||
}
|
||||
.CodeMirror-sizer {
|
||||
position: relative;
|
||||
border-right: 30px solid transparent;
|
||||
}
|
||||
|
||||
/* The fake, visible scrollbars. Used to force redraw during scrolling
|
||||
before actual scrolling happens, thus preventing shaking and
|
||||
flickering artifacts. */
|
||||
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
||||
position: absolute;
|
||||
z-index: 6;
|
||||
display: none;
|
||||
}
|
||||
.CodeMirror-vscrollbar {
|
||||
right: 0; top: 0;
|
||||
overflow-x: hidden;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.CodeMirror-hscrollbar {
|
||||
bottom: 0; left: 0;
|
||||
overflow-y: hidden;
|
||||
overflow-x: scroll;
|
||||
}
|
||||
.CodeMirror-scrollbar-filler {
|
||||
right: 0; bottom: 0;
|
||||
}
|
||||
.CodeMirror-gutter-filler {
|
||||
left: 0; bottom: 0;
|
||||
}
|
||||
|
||||
.CodeMirror-gutters {
|
||||
position: absolute; left: 0; top: 0;
|
||||
min-height: 100%;
|
||||
z-index: 3;
|
||||
}
|
||||
.CodeMirror-gutter {
|
||||
white-space: normal;
|
||||
height: 100%;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
margin-bottom: -30px;
|
||||
}
|
||||
.CodeMirror-gutter-wrapper {
|
||||
position: absolute;
|
||||
z-index: 4;
|
||||
background: none !important;
|
||||
border: none !important;
|
||||
}
|
||||
.CodeMirror-gutter-background {
|
||||
position: absolute;
|
||||
top: 0; bottom: 0;
|
||||
z-index: 4;
|
||||
}
|
||||
.CodeMirror-gutter-elt {
|
||||
position: absolute;
|
||||
cursor: default;
|
||||
z-index: 4;
|
||||
}
|
||||
.CodeMirror-gutter-wrapper ::selection { background-color: transparent }
|
||||
.CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent }
|
||||
|
||||
.CodeMirror-lines {
|
||||
cursor: text;
|
||||
min-height: 1px; /* prevents collapsing before first draw */
|
||||
}
|
||||
.CodeMirror pre {
|
||||
/* Reset some styles that the rest of the page might have set */
|
||||
-moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
|
||||
border-width: 0;
|
||||
background: transparent;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
margin: 0;
|
||||
white-space: pre;
|
||||
word-wrap: normal;
|
||||
line-height: inherit;
|
||||
color: inherit;
|
||||
z-index: 2;
|
||||
position: relative;
|
||||
overflow: visible;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
-webkit-font-variant-ligatures: contextual;
|
||||
font-variant-ligatures: contextual;
|
||||
}
|
||||
.CodeMirror-wrap pre {
|
||||
word-wrap: break-word;
|
||||
white-space: pre-wrap;
|
||||
word-break: normal;
|
||||
}
|
||||
|
||||
.CodeMirror-linebackground {
|
||||
position: absolute;
|
||||
left: 0; right: 0; top: 0; bottom: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.CodeMirror-linewidget {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.CodeMirror-widget {}
|
||||
|
||||
.CodeMirror-rtl pre { direction: rtl; }
|
||||
|
||||
.CodeMirror-code {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* Force content-box sizing for the elements where we expect it */
|
||||
.CodeMirror-scroll,
|
||||
.CodeMirror-sizer,
|
||||
.CodeMirror-gutter,
|
||||
.CodeMirror-gutters,
|
||||
.CodeMirror-linenumber {
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
.CodeMirror-measure {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.CodeMirror-cursor {
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
}
|
||||
.CodeMirror-measure pre { position: static; }
|
||||
|
||||
div.CodeMirror-cursors {
|
||||
visibility: hidden;
|
||||
position: relative;
|
||||
z-index: 3;
|
||||
}
|
||||
div.CodeMirror-dragcursors {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.CodeMirror-focused div.CodeMirror-cursors {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.CodeMirror-selected { background: #d9d9d9; }
|
||||
.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
|
||||
.CodeMirror-crosshair { cursor: crosshair; }
|
||||
.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }
|
||||
.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }
|
||||
|
||||
.cm-searching {
|
||||
background-color: #ffa;
|
||||
background-color: rgba(255, 255, 0, .4);
|
||||
}
|
||||
|
||||
/* Used to force a border model for a node */
|
||||
.cm-force-border { padding-right: .1px; }
|
||||
|
||||
@media print {
|
||||
/* Hide the cursor when printing */
|
||||
.CodeMirror div.CodeMirror-cursors {
|
||||
visibility: hidden;
|
||||
/* Set height, width, borders, and global font properties here */
|
||||
font-family: monospace;
|
||||
height: 300px;
|
||||
color: black;
|
||||
direction: ltr;
|
||||
}
|
||||
}
|
||||
|
||||
/* See issue #2901 */
|
||||
.cm-tab-wrap-hack:after { content: ''; }
|
||||
/* PADDING */
|
||||
|
||||
.CodeMirror-lines {
|
||||
padding: 4px 0; /* Vertical padding around content */
|
||||
}
|
||||
.CodeMirror pre {
|
||||
padding: 0 4px; /* Horizontal padding of content */
|
||||
}
|
||||
|
||||
.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
||||
background-color: white; /* The little square between H and V scrollbars */
|
||||
}
|
||||
|
||||
/* GUTTER */
|
||||
|
||||
.CodeMirror-gutters {
|
||||
border-right: 1px solid #ddd;
|
||||
background-color: #f7f7f7;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.CodeMirror-linenumbers {}
|
||||
.CodeMirror-linenumber {
|
||||
padding: 0 3px 0 5px;
|
||||
min-width: 20px;
|
||||
text-align: right;
|
||||
color: #999;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.CodeMirror-guttermarker { color: black; }
|
||||
.CodeMirror-guttermarker-subtle { color: #999; }
|
||||
|
||||
/* CURSOR */
|
||||
|
||||
.CodeMirror-cursor {
|
||||
border-left: 1px solid black;
|
||||
border-right: none;
|
||||
width: 0;
|
||||
}
|
||||
/* Shown when moving in bi-directional text */
|
||||
.CodeMirror div.CodeMirror-secondarycursor {
|
||||
border-left: 1px solid silver;
|
||||
}
|
||||
.cm-fat-cursor .CodeMirror-cursor {
|
||||
width: auto;
|
||||
border: 0 !important;
|
||||
background: #7e7;
|
||||
}
|
||||
.cm-fat-cursor div.CodeMirror-cursors {
|
||||
z-index: 1;
|
||||
}
|
||||
.cm-fat-cursor-mark {
|
||||
background-color: rgba(20, 255, 20, 0.5);
|
||||
-webkit-animation: blink 1.06s steps(1) infinite;
|
||||
-moz-animation: blink 1.06s steps(1) infinite;
|
||||
animation: blink 1.06s steps(1) infinite;
|
||||
}
|
||||
.cm-animate-fat-cursor {
|
||||
width: auto;
|
||||
border: 0;
|
||||
-webkit-animation: blink 1.06s steps(1) infinite;
|
||||
-moz-animation: blink 1.06s steps(1) infinite;
|
||||
animation: blink 1.06s steps(1) infinite;
|
||||
background-color: #7e7;
|
||||
}
|
||||
@-moz-keyframes blink {
|
||||
0% {}
|
||||
50% { background-color: transparent; }
|
||||
100% {}
|
||||
}
|
||||
@-webkit-keyframes blink {
|
||||
0% {}
|
||||
50% { background-color: transparent; }
|
||||
100% {}
|
||||
}
|
||||
@keyframes blink {
|
||||
0% {}
|
||||
50% { background-color: transparent; }
|
||||
100% {}
|
||||
}
|
||||
|
||||
/* Can style cursor different in overwrite (non-insert) mode */
|
||||
.CodeMirror-overwrite .CodeMirror-cursor {}
|
||||
|
||||
.cm-tab { display: inline-block; text-decoration: inherit; }
|
||||
|
||||
.CodeMirror-rulers {
|
||||
position: absolute;
|
||||
left: 0; right: 0; top: -50px; bottom: -20px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.CodeMirror-ruler {
|
||||
border-left: 1px solid #ccc;
|
||||
top: 0; bottom: 0;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
/* DEFAULT THEME */
|
||||
|
||||
.cm-s-default .cm-header {color: blue;}
|
||||
.cm-s-default .cm-quote {color: #090;}
|
||||
.cm-negative {color: #d44;}
|
||||
.cm-positive {color: #292;}
|
||||
.cm-header, .cm-strong {font-weight: bold;}
|
||||
.cm-em {font-style: italic;}
|
||||
.cm-link {text-decoration: underline;}
|
||||
.cm-strikethrough {text-decoration: line-through;}
|
||||
|
||||
.cm-s-default .cm-keyword {color: #708;}
|
||||
.cm-s-default .cm-atom {color: #219;}
|
||||
.cm-s-default .cm-number {color: #164;}
|
||||
.cm-s-default .cm-def {color: #00f;}
|
||||
.cm-s-default .cm-variable,
|
||||
.cm-s-default .cm-punctuation,
|
||||
.cm-s-default .cm-property,
|
||||
.cm-s-default .cm-operator {}
|
||||
.cm-s-default .cm-variable-2 {color: #05a;}
|
||||
.cm-s-default .cm-variable-3, .cm-s-default .cm-type {color: #085;}
|
||||
.cm-s-default .cm-comment {color: #a50;}
|
||||
.cm-s-default .cm-string {color: #a11;}
|
||||
.cm-s-default .cm-string-2 {color: #f50;}
|
||||
.cm-s-default .cm-meta {color: #555;}
|
||||
.cm-s-default .cm-qualifier {color: #555;}
|
||||
.cm-s-default .cm-builtin {color: #30a;}
|
||||
.cm-s-default .cm-bracket {color: #997;}
|
||||
.cm-s-default .cm-tag {color: #170;}
|
||||
.cm-s-default .cm-attribute {color: #00c;}
|
||||
.cm-s-default .cm-hr {color: #999;}
|
||||
.cm-s-default .cm-link {color: #00c;}
|
||||
|
||||
.cm-s-default .cm-error {color: #f00;}
|
||||
.cm-invalidchar {color: #f00;}
|
||||
|
||||
.CodeMirror-composing { border-bottom: 2px solid; }
|
||||
|
||||
/* Default styles for common addons */
|
||||
|
||||
div.CodeMirror span.CodeMirror-matchingbracket {color: #0b0;}
|
||||
div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;}
|
||||
.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }
|
||||
.CodeMirror-activeline-background {background: #e8f2ff;}
|
||||
|
||||
/* STOP */
|
||||
|
||||
/* The rest of this file contains styles related to the mechanics of
|
||||
the editor. You probably shouldn't touch them. */
|
||||
|
||||
.CodeMirror {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: white;
|
||||
}
|
||||
|
||||
.CodeMirror-scroll {
|
||||
overflow: scroll !important; /* Things will break if this is overridden */
|
||||
/* 30px is the magic margin used to hide the element's real scrollbars */
|
||||
/* See overflow: hidden in .CodeMirror */
|
||||
margin-bottom: -30px; margin-right: -30px;
|
||||
padding-bottom: 30px;
|
||||
height: 100%;
|
||||
outline: none; /* Prevent dragging from highlighting the element */
|
||||
position: relative;
|
||||
}
|
||||
.CodeMirror-sizer {
|
||||
position: relative;
|
||||
border-right: 30px solid transparent;
|
||||
}
|
||||
|
||||
/* The fake, visible scrollbars. Used to force redraw during scrolling
|
||||
before actual scrolling happens, thus preventing shaking and
|
||||
flickering artifacts. */
|
||||
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
||||
position: absolute;
|
||||
z-index: 6;
|
||||
display: none;
|
||||
}
|
||||
.CodeMirror-vscrollbar {
|
||||
right: 0; top: 0;
|
||||
overflow-x: hidden;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.CodeMirror-hscrollbar {
|
||||
bottom: 0; left: 0;
|
||||
overflow-y: hidden;
|
||||
overflow-x: scroll;
|
||||
}
|
||||
.CodeMirror-scrollbar-filler {
|
||||
right: 0; bottom: 0;
|
||||
}
|
||||
.CodeMirror-gutter-filler {
|
||||
left: 0; bottom: 0;
|
||||
}
|
||||
|
||||
.CodeMirror-gutters {
|
||||
position: absolute; left: 0; top: 0;
|
||||
min-height: 100%;
|
||||
z-index: 3;
|
||||
}
|
||||
.CodeMirror-gutter {
|
||||
white-space: normal;
|
||||
height: 100%;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
margin-bottom: -30px;
|
||||
}
|
||||
.CodeMirror-gutter-wrapper {
|
||||
position: absolute;
|
||||
z-index: 4;
|
||||
background: none !important;
|
||||
border: none !important;
|
||||
}
|
||||
.CodeMirror-gutter-background {
|
||||
position: absolute;
|
||||
top: 0; bottom: 0;
|
||||
z-index: 4;
|
||||
}
|
||||
.CodeMirror-gutter-elt {
|
||||
position: absolute;
|
||||
cursor: default;
|
||||
z-index: 4;
|
||||
}
|
||||
.CodeMirror-gutter-wrapper ::selection { background-color: transparent }
|
||||
.CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent }
|
||||
|
||||
.CodeMirror-lines {
|
||||
cursor: text;
|
||||
min-height: 1px; /* prevents collapsing before first draw */
|
||||
}
|
||||
.CodeMirror pre {
|
||||
/* Reset some styles that the rest of the page might have set */
|
||||
-moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
|
||||
border-width: 0;
|
||||
background: transparent;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
margin: 0;
|
||||
white-space: pre;
|
||||
word-wrap: normal;
|
||||
line-height: inherit;
|
||||
color: inherit;
|
||||
z-index: 2;
|
||||
position: relative;
|
||||
overflow: visible;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
-webkit-font-variant-ligatures: contextual;
|
||||
font-variant-ligatures: contextual;
|
||||
}
|
||||
.CodeMirror-wrap pre {
|
||||
word-wrap: break-word;
|
||||
white-space: pre-wrap;
|
||||
word-break: normal;
|
||||
}
|
||||
|
||||
.CodeMirror-linebackground {
|
||||
position: absolute;
|
||||
left: 0; right: 0; top: 0; bottom: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.CodeMirror-linewidget {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.CodeMirror-widget {}
|
||||
|
||||
.CodeMirror-rtl pre { direction: rtl; }
|
||||
|
||||
.CodeMirror-code {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* Force content-box sizing for the elements where we expect it */
|
||||
.CodeMirror-scroll,
|
||||
.CodeMirror-sizer,
|
||||
.CodeMirror-gutter,
|
||||
.CodeMirror-gutters,
|
||||
.CodeMirror-linenumber {
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
.CodeMirror-measure {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.CodeMirror-cursor {
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
}
|
||||
.CodeMirror-measure pre { position: static; }
|
||||
|
||||
div.CodeMirror-cursors {
|
||||
visibility: hidden;
|
||||
position: relative;
|
||||
z-index: 3;
|
||||
}
|
||||
div.CodeMirror-dragcursors {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.CodeMirror-focused div.CodeMirror-cursors {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.CodeMirror-selected { background: #d9d9d9; }
|
||||
.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
|
||||
.CodeMirror-crosshair { cursor: crosshair; }
|
||||
.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }
|
||||
.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }
|
||||
|
||||
.cm-searching {
|
||||
background-color: #ffa;
|
||||
background-color: rgba(255, 255, 0, .4);
|
||||
}
|
||||
|
||||
/* Used to force a border model for a node */
|
||||
.cm-force-border { padding-right: .1px; }
|
||||
|
||||
@media print {
|
||||
/* Hide the cursor when printing */
|
||||
.CodeMirror div.CodeMirror-cursors {
|
||||
visibility: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
/* See issue #2901 */
|
||||
.cm-tab-wrap-hack:after { content: ''; }
|
||||
|
||||
/* Help users use markselection to safely style text background */
|
||||
span.CodeMirror-selectedtext { background: none; }
|
||||
|
||||
|
||||
/* Help users use markselection to safely style text background */
|
||||
span.CodeMirror-selectedtext { background: none; }
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
margin-top: 6px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.fr-element,
|
||||
.fr-element:focus {
|
||||
outline: 0px solid transparent;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -7,7 +7,7 @@
|
|||
|
||||
> .start-button {
|
||||
text-align: center;
|
||||
margin: 60px 0;
|
||||
margin: 30px 0 20px 0;
|
||||
position: relative;
|
||||
color: $color-gray-light;
|
||||
|
||||
|
|
|
@ -20,6 +20,10 @@
|
|||
|
||||
> .document-customfields {
|
||||
margin-bottom: 4rem;
|
||||
background-color: $color-off-white;
|
||||
border: 1px solid $color-border;
|
||||
padding: 20px 40px;
|
||||
@include border-radius(3px);
|
||||
|
||||
.row {
|
||||
padding: 5px 0;
|
||||
|
@ -33,8 +37,8 @@
|
|||
|
||||
.heading {
|
||||
font-size: 1.1rem;
|
||||
font-weight: bold;
|
||||
color: $color-off-black;
|
||||
font-weight: 700;
|
||||
color: $color-dark;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,96 +1,72 @@
|
|||
.document-toc {
|
||||
@include border-radius(3px);
|
||||
@include ease-in();
|
||||
margin: 0;
|
||||
padding: 0 20px 20px 20px;
|
||||
background-color: $color-off-white;
|
||||
border: 1px solid $color-border;
|
||||
// overflow: scroll;
|
||||
overflow-y: scroll;
|
||||
overflow-x: hidden;
|
||||
box-sizing: border-box; // ensures width/height properties (and min/max properties) includes content, padding and border
|
||||
z-index: 777;
|
||||
display: block;
|
||||
position: relative; //
|
||||
width: 100%; //
|
||||
height: 500px;
|
||||
transform: none; //
|
||||
.document-sidebar {
|
||||
background-color: $color-white;
|
||||
margin: 20px 20px;
|
||||
|
||||
> .header {
|
||||
@include sticky();
|
||||
flex-direction: column;
|
||||
top: 0;
|
||||
padding-top: 20px;
|
||||
margin: 0;
|
||||
background-color: $color-off-white;
|
||||
> .document-toc {
|
||||
@include border-radius(3px);
|
||||
@include ease-in();
|
||||
@include sticky();
|
||||
margin: 0;
|
||||
padding: 0 20px 20px 20px;
|
||||
display: block;
|
||||
// height: calc(100vh - 180px);
|
||||
|
||||
> .title {
|
||||
color: $color-gray;
|
||||
font-weight: bold;
|
||||
font-size: 1.1rem;
|
||||
margin-bottom: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
> .header {
|
||||
top: 0;
|
||||
padding-top: 20px;
|
||||
margin: 0;
|
||||
|
||||
> .toc-controls {
|
||||
margin: 0 0 0 0;
|
||||
text-align: center;
|
||||
|
||||
> .disabled {
|
||||
cursor: not-allowed !important;
|
||||
> .toc-controls {
|
||||
margin: 0 0 0 0;
|
||||
text-align: center;
|
||||
|
||||
> .material-icons {
|
||||
color: $color-gray-light;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
> .disabled {
|
||||
cursor: not-allowed !important;
|
||||
|
||||
> .index-list {
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
font-size: 0.9rem;
|
||||
overflow-x: hidden;
|
||||
list-style-type: none;
|
||||
margin: 0 0 0 0;
|
||||
> .material-icons {
|
||||
color: $color-gray-light;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item {
|
||||
@extend .no-select;
|
||||
padding: 4px 0;
|
||||
text-overflow: ellipsis;
|
||||
word-wrap: break-word;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
|
||||
> .link {
|
||||
color: $color-dark;
|
||||
font-weight: bold;
|
||||
|
||||
&:hover {
|
||||
color: $color-link;
|
||||
}
|
||||
> .index-list {
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
font-size: 0.9rem;
|
||||
overflow-x: hidden;
|
||||
list-style-type: none;
|
||||
margin: 0 0 0 0;
|
||||
|
||||
> .numbering {
|
||||
color: $color-gray;
|
||||
font-weight: bold;
|
||||
display: inline-block;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
.item {
|
||||
@extend .no-select;
|
||||
padding: 4px 0;
|
||||
text-overflow: ellipsis;
|
||||
word-wrap: break-word;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
|
||||
> .selected {
|
||||
color: $color-link;
|
||||
}
|
||||
}
|
||||
}
|
||||
> .link {
|
||||
color: $color-dark;
|
||||
font-weight: bold;
|
||||
|
||||
&:hover {
|
||||
color: $color-link;
|
||||
}
|
||||
|
||||
> .numbering {
|
||||
color: $color-gray;
|
||||
font-weight: bold;
|
||||
display: inline-block;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
> .selected {
|
||||
color: $color-link;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.document-toc-desktop {
|
||||
margin: 30px 0 30px 0;
|
||||
display: inline-block;
|
||||
position: fixed;
|
||||
top: 150px;
|
||||
right: 30px;
|
||||
-webkit-transform: translate(0px, 0px);
|
||||
transform: translate(0px, 0px);
|
||||
}
|
||||
|
|
|
@ -42,6 +42,10 @@
|
|||
vertical-align: text-top;
|
||||
}
|
||||
}
|
||||
|
||||
> .delete {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,46 +1,47 @@
|
|||
{{#unless emptyState}}
|
||||
<div id="doc-toc" class="document-toc {{if isDesktop 'document-toc-desktop'}}">
|
||||
<div class="header">
|
||||
<div class="title">Contents</div>
|
||||
{{#if canEdit}}
|
||||
<div id="tocToolbar" class="toc-controls {{if state.actionablePage 'current-page'}}">
|
||||
<div id="toc-up-button" class="button-icon-green button-icon-small {{if state.upDisabled 'disabled'}}" {{action 'pageUp'}}>
|
||||
<i class="material-icons">arrow_upward</i>
|
||||
</div>
|
||||
<div class="button-icon-gap" />
|
||||
<div id="toc-down-button" class="button-icon-green button-icon-small {{if state.downDisabled 'disabled'}}" {{action 'pageDown'}}>
|
||||
<i class="material-icons">arrow_downward</i>
|
||||
</div>
|
||||
<div class="button-icon-gap" />
|
||||
<div id="toc-outdent-button" class="button-icon-green button-icon-small {{if state.outdentDisabled 'disabled'}}" {{action 'pageOutdent'}}>
|
||||
<i class="material-icons">arrow_back</i>
|
||||
</div>
|
||||
<div class="button-icon-gap" />
|
||||
<div id="toc-indent-button" class="button-icon-green button-icon-small {{if state.indentDisabled 'disabled'}}" {{action 'pageIndent'}}>
|
||||
<i class="material-icons">arrow_forward</i>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div id="sidebar" class="document-sidebar">
|
||||
<div id="doc-toc" class="document-toc {{if isDesktop 'document-toc-desktop'}}">
|
||||
<div class="header">
|
||||
{{#if canEdit}}
|
||||
<div id="tocToolbar" class="toc-controls {{if state.actionablePage 'current-page'}}">
|
||||
<div id="toc-up-button" class="button-icon-green button-icon-small {{if state.upDisabled 'disabled'}}" {{action 'pageUp'}}>
|
||||
<i class="material-icons">arrow_upward</i>
|
||||
</div>
|
||||
<div class="button-icon-gap" />
|
||||
<div id="toc-down-button" class="button-icon-green button-icon-small {{if state.downDisabled 'disabled'}}" {{action 'pageDown'}}>
|
||||
<i class="material-icons">arrow_downward</i>
|
||||
</div>
|
||||
<div class="button-icon-gap" />
|
||||
<div id="toc-outdent-button" class="button-icon-green button-icon-small {{if state.outdentDisabled 'disabled'}}" {{action 'pageOutdent'}}>
|
||||
<i class="material-icons">arrow_back</i>
|
||||
</div>
|
||||
<div class="button-icon-gap" />
|
||||
<div id="toc-indent-button" class="button-icon-green button-icon-small {{if state.indentDisabled 'disabled'}}" {{action 'pageIndent'}}>
|
||||
<i class="material-icons">arrow_forward</i>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<ul class="index-list">
|
||||
{{#each pages key="id" as |item index|}}
|
||||
<li class="item">
|
||||
<a id="index-{{item.page.id}}" {{action 'onGotoPage' item.page.id}}
|
||||
class="link toc-index-item {{item.page.tocIndentCss}} {{if (eq item.page.id state.pageId) 'selected'}}">
|
||||
<span class="numbering">{{item.page.numbering}}</span>
|
||||
{{#if (or item.userHasChangePending userHasNewPagePending)}}
|
||||
<span class="color-red" title="Pending approval" data-toggle="tooltip" data-placement="top">[*] </span>
|
||||
{{/if}}
|
||||
{{#if (or permissions.documentApprove roles.documentApprove)}}
|
||||
{{#if item.changeAwaitingReview}}
|
||||
<span class="color-green" title="Awaiting approval" data-toggle="tooltip" data-placement="top">[*] </span>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{item.page.title}}
|
||||
</a>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
</div>
|
||||
<ul class="index-list">
|
||||
{{#each pages key="id" as |item index|}}
|
||||
<li class="item">
|
||||
<a id="index-{{item.page.id}}" {{action 'onGotoPage' item.page.id}}
|
||||
class="link toc-index-item {{item.page.tocIndentCss}} {{if (eq item.page.id state.pageId) 'selected'}}">
|
||||
<span class="numbering">{{item.page.numbering}}</span>
|
||||
{{#if (or item.userHasChangePending userHasNewPagePending)}}
|
||||
<span class="color-red" title="Pending approval" data-toggle="tooltip" data-placement="top">[*] </span>
|
||||
{{/if}}
|
||||
{{#if (or permissions.documentApprove roles.documentApprove)}}
|
||||
{{#if item.changeAwaitingReview}}
|
||||
<span class="color-green" title="Awaiting approval" data-toggle="tooltip" data-placement="top">[*] </span>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{item.page.title}}
|
||||
</a>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{{/unless}}
|
|
@ -8,8 +8,10 @@
|
|||
<span class="file">{{ a.filename }}</span>
|
||||
</a>
|
||||
{{#if canEdit}}
|
||||
<div class="button-icon-danger align-middle action" {{action 'onShowDialog' a.id a.filename}}>
|
||||
<i class="material-icons">delete</i>
|
||||
<div class="delete">
|
||||
<div class="button-icon-danger align-middle action" {{action 'onShowDialog' a.id a.filename}}>
|
||||
<i class="material-icons">delete</i>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</li>
|
||||
|
|
|
@ -1,131 +1,115 @@
|
|||
{{#if hasPages}}
|
||||
{{#each pages key="id" as |item index|}}
|
||||
{{#if canEdit}}
|
||||
<div class="start-section" data-index={{index}} data-before-id={{item.page.id}} id="add-section-button-{{item.page.id}}" {{action 'onShowSectionWizard' item.page}}>
|
||||
<div class="start-button">
|
||||
<div class="cta">+ SECTION</div>
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="section-divider" />
|
||||
{{/if}}
|
||||
|
||||
{{document/document-page document=document folder=folder page=item.page meta=item.meta pending=item.pending
|
||||
permissions=permissions toEdit=toEdit roles=roles blocks=blocks
|
||||
onSavePage=(action 'onSavePage') onSavePageAsBlock=(action 'onSavePageAsBlock')
|
||||
onCopyPage=(action 'onCopyPage') onMovePage=(action 'onMovePage') onDeletePage=(action 'onDeletePage') refresh=(action refresh)}}
|
||||
{{/each}}
|
||||
|
||||
{{#if canEdit}}
|
||||
<div class="start-section" data-index="0" data-before-id="0" id="add-section-button-0" {{action 'onShowSectionWizard'}}>
|
||||
<div class="start-button">
|
||||
<div class="cta">+ SECTION</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if showLikes}}
|
||||
<div class=" d-flex justify-content-center">
|
||||
<div class="vote-box">
|
||||
{{#unless voteThanks}}
|
||||
<div class="prompt">
|
||||
{{folder.likes}}
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<button type="button" class="btn btn-outline-success font-weight-bold" {{action 'onVote' 1}}>Yes, thanks!</button>
|
||||
<button type="button" class="btn btn-outline-secondary font-weight-bold" {{action 'onVote' 2}}>Not really</button>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="ack">Thanks for the feedback!</div>
|
||||
{{/unless}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{#unless hasPages}}
|
||||
{{#if canEdit}}
|
||||
<div class="start-section" data-index="-1" data-before-id="0" id="add-section-button-0" {{action 'onShowSectionWizard'}}>
|
||||
<div class="start-button">
|
||||
<div class="cta">+ SECTION</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/unless}}
|
||||
|
||||
{{#if hasPages}} {{#each pages key="id" as |item index|}} {{#if canEdit}}
|
||||
<div class="start-section" data-index={{index}} data-before-id={{item.page.id}} id="add-section-button-{{item.page.id}}"
|
||||
{{action 'onShowSectionWizard' item.page}}>
|
||||
<div class="start-button">
|
||||
<div class="cta">+ SECTION</div>
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="section-divider" /> {{/if}} {{document/document-page document=document folder=folder page=item.page meta=item.meta pending=item.pending permissions=permissions
|
||||
toEdit=toEdit roles=roles blocks=blocks onSavePage=(action 'onSavePage') onSavePageAsBlock=(action 'onSavePageAsBlock') onCopyPage=(action
|
||||
'onCopyPage') onMovePage=(action 'onMovePage') onDeletePage=(action 'onDeletePage') refresh=(action refresh)}} {{/each}}
|
||||
{{#if canEdit}}
|
||||
<div id="wizard-placeholder" class="hide margin-top-50" />
|
||||
<div id="new-section-wizard" class="new-section-wizard">
|
||||
<div class="container box">
|
||||
<div class="row clearfix">
|
||||
<div class="col-12 clearfix">
|
||||
<div class="float-right mb-5">
|
||||
<button type="button" class="btn btn-secondary" {{action 'onHideSectionWizard'}}>Close</button>
|
||||
</div>
|
||||
<div class="start-section" data-index="0" data-before-id="0" id="add-section-button-0" {{action 'onShowSectionWizard'}}>
|
||||
<div class="start-button">
|
||||
<div class="cta">+ SECTION</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}} {{#if showLikes}}
|
||||
<div class=" d-flex justify-content-center">
|
||||
<div class="vote-box">
|
||||
{{#unless voteThanks}}
|
||||
<div class="prompt">
|
||||
{{folder.likes}}
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<button type="button" class="btn btn-outline-success font-weight-bold" {{action 'onVote' 1}}>Yes, thanks!</button>
|
||||
<button type="button" class="btn btn-outline-secondary font-weight-bold" {{action 'onVote' 2}}>Not really</button>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="ack">Thanks for the feedback!</div>
|
||||
{{/unless}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}} {{/if}} {{#unless hasPages}} {{#if canEdit}}
|
||||
<div class="start-section" data-index="-1" data-before-id="0" id="add-section-button-0" {{action 'onShowSectionWizard'}}>
|
||||
<div class="start-button">
|
||||
<div class="cta">+ SECTION</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}} {{/unless}} {{#if canEdit}}
|
||||
<div id="wizard-placeholder" class="hide margin-top-50" />
|
||||
<div id="new-section-wizard" class="new-section-wizard">
|
||||
<div class="container box">
|
||||
<div class="row clearfix">
|
||||
<div class="col-12 clearfix">
|
||||
<div class="float-right mb-5">
|
||||
<button type="button" class="btn btn-secondary" {{action 'onHideSectionWizard'}}>Close</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
{{input type="text" id="new-section-name" value=newSectionName class=(if newSectionNameMissing 'mousetrap form-control form-control-lg is-invalid' 'mousetrap form-control form-control-lg') placeholder="Enter section name" autocomplete="off"}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
{{input type="text" id="new-section-name" value=newSectionName class=(if newSectionNameMissing 'mousetrap form-control form-control-lg
|
||||
is-invalid' 'mousetrap form-control form-control-lg') placeholder="Enter section name" autocomplete="off"}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
<div class="new-section-caption">Insert section type</div>
|
||||
<ul class="preset-list">
|
||||
{{#each sections as |section|}}
|
||||
<li class="item" {{action 'onInsertSection' section}}>
|
||||
<div class="icon">
|
||||
<img class="img" src="/sections/{{section.contentType}}.png" srcset="/sections/{{section.contentType}}@2x.png" />
|
||||
</div>
|
||||
<div class='title'>{{section.title}}</div>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
<div class="new-section-caption">Insert section type</div>
|
||||
<ul class="preset-list">
|
||||
{{#each sections as |section|}}
|
||||
<li class="item" {{action 'onInsertSection' section}}>
|
||||
<div class="icon">
|
||||
<img class="img" src="/sections/{{section.contentType}}.png" srcset="/sections/{{section.contentType}}@2x.png" />
|
||||
</div>
|
||||
<div class='title'>{{section.title}}</div>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
{{#if hasBlocks}}
|
||||
<div class="new-section-caption">Insert re-usable content</div>
|
||||
<ul class="block-list">
|
||||
{{#each blocks as |block|}}
|
||||
<li class="item" title="{{block.firstname}} {{block.lastname}}, {{time-ago block.created}}, used: {{ block.used }}" data-toggle="tooltip" data-placement="top">
|
||||
<div class="actions">
|
||||
{{#if permissions.documentTemplate}}
|
||||
{{#link-to 'document.block' folder.id folder.slug document.id document.slug block.id class="button-icon-green button-icon-small align-middle"}}
|
||||
<i class="material-icons">edit</i>
|
||||
{{/link-to}}
|
||||
<div class="button-icon-gap" />
|
||||
<div id={{concat 'delete-block-button-' block.id}} class="button-icon-red button-icon-small align-middle" {{action 'onShowDeleteBlockModal' block.id}}>
|
||||
<i class="material-icons">delete</i>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="details" {{action 'onInsertBlock' block}}>
|
||||
<div class="title text-truncate">{{block.title}}</div>
|
||||
<div class="desc text-truncate">{{block.excerpt}}</div>
|
||||
</div>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
{{else}}
|
||||
<div class="template-caption">You have no reusable content — publish any section as a template</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
{{#if hasBlocks}}
|
||||
<div class="new-section-caption">Insert re-usable content</div>
|
||||
<ul class="block-list">
|
||||
{{#each blocks as |block|}}
|
||||
<li class="item" title="{{block.firstname}} {{block.lastname}}, {{time-ago block.created}}, used: {{ block.used }}" data-toggle="tooltip"
|
||||
data-placement="top">
|
||||
<div class="actions">
|
||||
{{#if permissions.documentTemplate}} {{#link-to 'document.block' folder.id folder.slug document.id document.slug block.id
|
||||
class="button-icon-gray button-icon-small align-middle"}}
|
||||
<i class="material-icons">edit</i>
|
||||
{{/link-to}}
|
||||
<div class="button-icon-gap" />
|
||||
<div id={{concat 'delete-block-button-' block.id}} class="button-icon-danger button-icon-small align-middle" {{action
|
||||
'onShowDeleteBlockModal' block.id}}>
|
||||
<i class="material-icons">delete</i>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="details" {{action 'onInsertBlock' block}}>
|
||||
<div class="title text-truncate">{{block.title}}</div>
|
||||
<div class="desc text-truncate">{{block.excerpt}}</div>
|
||||
</div>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
{{else}}
|
||||
<div class="template-caption">You have no reusable content — publish any section as a template</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if permissions.documentTemplate}}
|
||||
{{#ui/ui-dialog title="Delete Content Block" confirmCaption="Delete" buttonType="btn-danger" show=showDeleteBlockDialog onAction=(action 'onDeleteBlock')}}
|
||||
<p>Are you sure you want to delete this re-usable content block?</p>
|
||||
{{/ui/ui-dialog}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/if}} {{#if permissions.documentTemplate}} {{#ui/ui-dialog title="Delete Content Block" confirmCaption="Delete" buttonType="btn-danger"
|
||||
show=showDeleteBlockDialog onAction=(action 'onDeleteBlock')}}
|
||||
<p>Are you sure you want to delete this re-usable content block?</p>
|
||||
{{/ui/ui-dialog}} {{/if}}
|
||||
|
|
|
@ -1,11 +1,19 @@
|
|||
<div class="row no-gutters">
|
||||
<div class="col">
|
||||
<div class="d-flex justify-content-start">
|
||||
{{yield}}
|
||||
<div class="row no-gutters d-flex align-items-center">
|
||||
<div class="col d-flex justify-content-start">
|
||||
<div class="footer">
|
||||
{{#if showWait}}
|
||||
<div class="progress progress-wait">
|
||||
<img src="/assets/img/busy-gray.gif" />
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if showDone}}
|
||||
<div class="progress progress-done animated zoomIn">✓</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{yield}}
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="footer d-flex justify-content-end">
|
||||
<div class="col d-flex justify-content-end">
|
||||
<div class="footer">
|
||||
<a href="https://documize.com?ref=af">Documize {{appMeta.version}}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,86 +1,76 @@
|
|||
{{#toolbar/t-toolbar}}
|
||||
|
||||
{{#toolbar/t-links}}
|
||||
{{#link-to "folder" space.id space.slug class="link selected" tagName="li"}}{{space.name}}{{/link-to}}
|
||||
{{#if showDocumentLink}}
|
||||
{{#link-to 'document.index' space.id space.slug document.id document.slug class="link"}}{{document.name}}{{/link-to}}
|
||||
{{/if}}
|
||||
{{/toolbar/t-links}}
|
||||
|
||||
<div class="text-right">
|
||||
{{#if showTools}}
|
||||
{{#toolbar/t-actions}}
|
||||
{{#if session.authenticated}}
|
||||
{{#if permissions.documentAdd}}
|
||||
<div id="document-template-button" class="button-icon-gray align-middle" data-toggle="tooltip" data-placement="top" title="Save as template">
|
||||
<i class="material-icons" data-toggle="modal" data-target="#document-template-modal" data-backdrop="static">content_copy</i>
|
||||
</div>
|
||||
<div class="button-icon-gap" />
|
||||
<div id="document-template-modal" class="modal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">Save as Template</div>
|
||||
<div class="modal-body">
|
||||
<form onsubmit={{action 'onSaveTemplate'}}>
|
||||
<div class="form-group">
|
||||
<label for="new-template-name">Name</label>
|
||||
{{input id="new-template-name" value=saveTemplate.name type='email' class="form-control mousetrap" placeholder="Template name"}}
|
||||
<small class="form-text text-muted">Good template name conveys document type</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="new-template-desc">Description</label>
|
||||
{{textarea id="new-template-desc" value=saveTemplate.description class="form-control" rows="5"}}
|
||||
<small class="form-text text-muted">Explain use case for this template</small>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal">Cancel</button>
|
||||
<button type="button" class="btn btn-success" onclick={{action 'onSaveTemplate'}}>Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if session.authenticated}}
|
||||
{{#if permissions.documentAdd}}
|
||||
<div id="document-template-button" class="button-icon-gray align-middle" data-toggle="tooltip" data-placement="top" title="Save as template">
|
||||
<i class="material-icons" data-toggle="modal" data-target="#document-template-modal" data-backdrop="static">content_copy</i>
|
||||
</div>
|
||||
<div class="button-icon-gap" />
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
<div id="document-print-button" class="button-icon-gray align-middle" data-toggle="tooltip" data-placement="top" title="Print" {{action 'onPrintDocument'}}>
|
||||
<i class="material-icons">print</i>
|
||||
<div id="document-print-button" class="button-icon-gray align-middle" data-toggle="tooltip" data-placement="top" title="Print" {{action 'onPrintDocument'}}>
|
||||
<i class="material-icons">print</i>
|
||||
</div>
|
||||
<div class="button-icon-gap" />
|
||||
|
||||
{{#if pinState.isPinned}}
|
||||
<div id="document-pin-button" class="button-icon-gold align-middle" data-toggle="tooltip" data-placement="top" title="Remove favorite" {{action 'onUnpin'}}>
|
||||
<i class="material-icons">star</i>
|
||||
</div>
|
||||
<div class="button-icon-gap" />
|
||||
{{else if session.authenticated}}
|
||||
<div id="document-pin-button" class="button-icon-gray align-middle" data-toggle="tooltip" data-placement="top" title="Save favorite" {{action 'onPin'}}>
|
||||
<i class="material-icons">star</i>
|
||||
</div>
|
||||
<div class="button-icon-gap" />
|
||||
{{/if}}
|
||||
|
||||
{{#if pinState.isPinned}}
|
||||
<div id="document-pin-button" class="button-icon-gold align-middle" data-toggle="tooltip" data-placement="top" title="Remove favorite" {{action 'onUnpin'}}>
|
||||
<i class="material-icons">star</i>
|
||||
</div>
|
||||
<div class="button-icon-gap" />
|
||||
{{else if session.authenticated}}
|
||||
<div id="document-pin-button" class="button-icon-gray align-middle" data-toggle="tooltip" data-placement="top" title="Save favorite" {{action 'onPin'}}>
|
||||
<i class="material-icons">star</i>
|
||||
</div>
|
||||
<div class="button-icon-gap" />
|
||||
{{/if}}
|
||||
|
||||
{{#if permissions.documentDelete}}
|
||||
<div id="document-delete-button" class="button-icon-danger align-middle" data-toggle="tooltip" data-placement="top" title="Delete document">
|
||||
<i class="material-icons" data-toggle="modal" data-target="#document-delete-modal" data-backdrop="static">delete</i>
|
||||
</div>
|
||||
<div class="button-icon-gap" />
|
||||
<div id="document-delete-modal" class="modal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">Delete Document</div>
|
||||
<div class="modal-body">
|
||||
<p>Are you sure you want to delete this document?</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal">Cancel</button>
|
||||
<button type="button" class="btn btn-danger" onclick={{action 'onDocumentDelete'}}>Delete</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/toolbar/t-actions}}
|
||||
{{#if permissions.documentDelete}}
|
||||
<div id="document-delete-button" class="button-icon-danger align-middle" data-toggle="tooltip" data-placement="top" title="Delete document">
|
||||
<i class="material-icons" data-toggle="modal" data-target="#document-delete-modal" data-backdrop="static">delete</i>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
{{/toolbar/t-toolbar}}
|
||||
<div id="document-template-modal" class="modal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">Save as Template</div>
|
||||
<div class="modal-body">
|
||||
<form onsubmit={{action 'onSaveTemplate'}}>
|
||||
<div class="form-group">
|
||||
<label for="new-template-name">Name</label>
|
||||
{{input id="new-template-name" value=saveTemplate.name type='email' class="form-control mousetrap" placeholder="Template name"}}
|
||||
<small class="form-text text-muted">Good template name conveys document type</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="new-template-desc">Description</label>
|
||||
{{textarea id="new-template-desc" value=saveTemplate.description class="form-control" rows="5"}}
|
||||
<small class="form-text text-muted">Explain use case for this template</small>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal">Cancel</button>
|
||||
<button type="button" class="btn btn-success" onclick={{action 'onSaveTemplate'}}>Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="document-delete-modal" class="modal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">Delete Document</div>
|
||||
<div class="modal-body">
|
||||
<p>Are you sure you want to delete this document?</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal">Cancel</button>
|
||||
<button type="button" class="btn btn-danger" onclick={{action 'onDocumentDelete'}}>Delete</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue