mirror of
https://github.com/documize/community.git
synced 2025-07-27 09:09:44 +02:00
commit
e0cb767b85
134 changed files with 3144 additions and 2468 deletions
|
@ -5,7 +5,17 @@
|
||||||
"indent_with_tabs": true,
|
"indent_with_tabs": true,
|
||||||
"preserve_newlines": true,
|
"preserve_newlines": true,
|
||||||
"max_preserve_newlines": 2,
|
"max_preserve_newlines": 2,
|
||||||
"newline_between_rules": true
|
"newline_between_rules": true,
|
||||||
|
"selector_separator_newlines": true
|
||||||
|
},
|
||||||
|
"scss": {
|
||||||
|
"indent_size": 4,
|
||||||
|
"indent_level": 0,
|
||||||
|
"indent_with_tabs": true,
|
||||||
|
"preserve_newlines": true,
|
||||||
|
"max_preserve_newlines": 2,
|
||||||
|
"newline_between_rules": true,
|
||||||
|
"selector_separator_newlines": true
|
||||||
},
|
},
|
||||||
"html": {
|
"html": {
|
||||||
"indent_size": 4,
|
"indent_size": 4,
|
||||||
|
@ -38,8 +48,10 @@
|
||||||
"brace_style": "collapse-preserve-inline",
|
"brace_style": "collapse-preserve-inline",
|
||||||
"keep_function_indentation": false,
|
"keep_function_indentation": false,
|
||||||
"space_after_anon_function": false,
|
"space_after_anon_function": false,
|
||||||
|
"space_before_anon_function": false,
|
||||||
"space_before_conditional": true,
|
"space_before_conditional": true,
|
||||||
"space_in_empty_paren": false,
|
"space_in_empty_paren": false,
|
||||||
|
"space_before_func_paren": false,
|
||||||
"space_in_paren": false
|
"space_in_paren": false
|
||||||
},
|
},
|
||||||
"sql": {
|
"sql": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Documize Community Edition
|
# Documize Community Edition
|
||||||
|
|
||||||
Modern Wiki + Docs integrating data from SaaS tools.
|
The Document IDE for wikis and documents.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ The mission is to bring software dev inspired features (refactoring, testing, li
|
||||||
|
|
||||||
## Latest version
|
## Latest version
|
||||||
|
|
||||||
v0.30.0
|
v0.31.0
|
||||||
|
|
||||||
## OS Support
|
## OS Support
|
||||||
|
|
||||||
|
|
68
app/app/components/document/document-activity.js
Normal file
68
app/app/components/document/document-activity.js
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
||||||
|
//
|
||||||
|
// 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>.
|
||||||
|
//
|
||||||
|
// https://documize.com
|
||||||
|
|
||||||
|
import Ember from 'ember';
|
||||||
|
|
||||||
|
export default Ember.Component.extend({
|
||||||
|
sortedItems: [],
|
||||||
|
|
||||||
|
didReceiveAttrs() {
|
||||||
|
let editors = this.get('activity.editors');
|
||||||
|
let viewers = this.get('activity.viewers');
|
||||||
|
let pages = this.get('pages');
|
||||||
|
let sorted = [];
|
||||||
|
|
||||||
|
if (is.null(editors)) {
|
||||||
|
editors = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (is.null(viewers)) {
|
||||||
|
viewers = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
viewers.forEach((item) => {
|
||||||
|
Ember.set(item, 'changeLabel', "viewed");
|
||||||
|
Ember.set(item, "viewed", true);
|
||||||
|
sorted.pushObject({ date: item.created, item: item });
|
||||||
|
});
|
||||||
|
|
||||||
|
editors.forEach(function (item) {
|
||||||
|
Ember.set(item, "added", item.action === "add-page");
|
||||||
|
Ember.set(item, "changed", item.action === "update-page");
|
||||||
|
Ember.set(item, "deleted", item.action === "remove-page");
|
||||||
|
|
||||||
|
let page = pages.findBy('id', item.pageId);
|
||||||
|
let title = "";
|
||||||
|
|
||||||
|
if (item.deleted || is.undefined(page)) {
|
||||||
|
title = "removed section";
|
||||||
|
} else {
|
||||||
|
if (item.added) {
|
||||||
|
title = "added " + page.get('title');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (item.changed) {
|
||||||
|
title = "changed " + page.get('title');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Ember.set(item, 'changeLabel', title);
|
||||||
|
|
||||||
|
let exists = sorted.findBy('item.pageId', item.pageId);
|
||||||
|
|
||||||
|
if (is.undefined(exists)) {
|
||||||
|
sorted.pushObject({ date: item.created, item: item });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
this.set('sortedItems', _.sortBy(sorted, 'date').reverse());
|
||||||
|
}
|
||||||
|
});
|
131
app/app/components/document/document-files.js
Normal file
131
app/app/components/document/document-files.js
Normal file
|
@ -0,0 +1,131 @@
|
||||||
|
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
||||||
|
//
|
||||||
|
// 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>.
|
||||||
|
//
|
||||||
|
// https://documize.com
|
||||||
|
|
||||||
|
import Ember from 'ember';
|
||||||
|
import NotifierMixin from '../../mixins/notifier';
|
||||||
|
import TooltipMixin from '../../mixins/tooltip';
|
||||||
|
|
||||||
|
export default Ember.Component.extend(NotifierMixin, TooltipMixin, {
|
||||||
|
appMeta: Ember.inject.service(),
|
||||||
|
drop: null,
|
||||||
|
deleteAttachment: {
|
||||||
|
id: "",
|
||||||
|
name: "",
|
||||||
|
},
|
||||||
|
emptyState: Ember.computed('files', function () {
|
||||||
|
return this.get('files.length') === 0;
|
||||||
|
}),
|
||||||
|
|
||||||
|
didInsertElement() {
|
||||||
|
if (!this.get('isEditor')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
let self = this;
|
||||||
|
let documentId = this.get('document.id');
|
||||||
|
let url = this.get('appMeta.endpoint');
|
||||||
|
let uploadUrl = `${url}/documents/${documentId}/attachments`;
|
||||||
|
|
||||||
|
let dzone = new Dropzone("#upload-document-files", {
|
||||||
|
headers: {
|
||||||
|
'Authorization': 'Bearer ' + self.get('session.session.content.authenticated.token')
|
||||||
|
},
|
||||||
|
url: uploadUrl,
|
||||||
|
method: "post",
|
||||||
|
paramName: 'attachment',
|
||||||
|
clickable: true,
|
||||||
|
maxFilesize: 10,
|
||||||
|
parallelUploads: 3,
|
||||||
|
uploadMultiple: false,
|
||||||
|
addRemoveLinks: false,
|
||||||
|
autoProcessQueue: true,
|
||||||
|
|
||||||
|
init: function () {
|
||||||
|
this.on("success", function (file /*, response*/ ) {
|
||||||
|
self.showNotification(`Attached ${file.name}`);
|
||||||
|
});
|
||||||
|
|
||||||
|
this.on("queuecomplete", function () {
|
||||||
|
self.attrs.onUpload();
|
||||||
|
});
|
||||||
|
|
||||||
|
this.on("addedfile", function ( /*file*/ ) {
|
||||||
|
self.audit.record('attached-file');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
dzone.on("complete", function (file) {
|
||||||
|
dzone.removeFile(file);
|
||||||
|
});
|
||||||
|
|
||||||
|
this.set('drop', dzone);
|
||||||
|
},
|
||||||
|
|
||||||
|
willDestroyElement() {
|
||||||
|
let drop = this.get('drop');
|
||||||
|
|
||||||
|
if (is.not.null(drop)) {
|
||||||
|
drop.destroy();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
actions: {
|
||||||
|
confirmDeleteAttachment(id, name) {
|
||||||
|
this.set('deleteAttachment', {
|
||||||
|
id: id,
|
||||||
|
name: name
|
||||||
|
});
|
||||||
|
|
||||||
|
$(".delete-attachment-dialog").css("display", "block");
|
||||||
|
|
||||||
|
let drop = new Drop({
|
||||||
|
target: $(".delete-attachment-" + id)[0],
|
||||||
|
content: $(".delete-attachment-dialog")[0],
|
||||||
|
classes: 'drop-theme-basic',
|
||||||
|
position: "bottom right",
|
||||||
|
openOn: "always",
|
||||||
|
tetherOptions: {
|
||||||
|
offset: "5px 0",
|
||||||
|
targetOffset: "10px 0"
|
||||||
|
},
|
||||||
|
remove: false
|
||||||
|
});
|
||||||
|
|
||||||
|
this.set('drop', drop);
|
||||||
|
},
|
||||||
|
|
||||||
|
cancel() {
|
||||||
|
let drop = this.get('drop');
|
||||||
|
drop.close();
|
||||||
|
|
||||||
|
this.set('deleteAttachment', {
|
||||||
|
id: "",
|
||||||
|
name: ""
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
deleteAttachment() {
|
||||||
|
let attachment = this.get('deleteAttachment');
|
||||||
|
let drop = this.get('drop');
|
||||||
|
drop.close();
|
||||||
|
|
||||||
|
this.attrs.onDelete(this.get('deleteAttachment').id, attachment.name);
|
||||||
|
|
||||||
|
this.set('deleteAttachment', {
|
||||||
|
id: "",
|
||||||
|
name: ""
|
||||||
|
});
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
47
app/app/components/document/document-meta.js
Normal file
47
app/app/components/document/document-meta.js
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
||||||
|
//
|
||||||
|
// 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>.
|
||||||
|
//
|
||||||
|
// https://documize.com
|
||||||
|
|
||||||
|
import Ember from 'ember';
|
||||||
|
import NotifierMixin from '../../mixins/notifier';
|
||||||
|
import TooltipMixin from '../../mixins/tooltip';
|
||||||
|
|
||||||
|
export default Ember.Component.extend(NotifierMixin, TooltipMixin, {
|
||||||
|
appMeta: Ember.inject.service(),
|
||||||
|
|
||||||
|
didReceiveAttrs() {
|
||||||
|
// setup document owner
|
||||||
|
let owner = this.get('users').findBy('id', this.get('document.userId'));
|
||||||
|
|
||||||
|
// no document owner? You are the owner!
|
||||||
|
if (is.undefined(owner)) {
|
||||||
|
owner = this.session.user;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.set('owner', owner);
|
||||||
|
},
|
||||||
|
|
||||||
|
actions: {
|
||||||
|
onSave() {
|
||||||
|
let doc = this.get('document');
|
||||||
|
|
||||||
|
if (is.empty(doc.get('excerpt'))) {
|
||||||
|
$("meta-excerpt").addClass("error").focus();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
doc.set('excerpt', doc.get('excerpt').substring(0, 250));
|
||||||
|
doc.set('userId', this.get('owner.id'));
|
||||||
|
|
||||||
|
this.attrs.onSave(doc);
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
}
|
||||||
|
});
|
|
@ -1,64 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// 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>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
|
||||||
document: {},
|
|
||||||
meta: [],
|
|
||||||
pages: [],
|
|
||||||
|
|
||||||
didReceiveAttrs() {
|
|
||||||
let editors = this.get('meta.editors');
|
|
||||||
let toc = this.get('pages');
|
|
||||||
|
|
||||||
if (is.null(editors)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
editors.forEach(function (item) {
|
|
||||||
Ember.set(item, "added", item.action === "add-page");
|
|
||||||
Ember.set(item, "changed", item.action === "update-page");
|
|
||||||
Ember.set(item, "deleted", item.action === "remove-page");
|
|
||||||
|
|
||||||
let page = _.findWhere(toc, {
|
|
||||||
id: item.pageId
|
|
||||||
});
|
|
||||||
let title = "";
|
|
||||||
|
|
||||||
if (is.not.undefined(page)) {
|
|
||||||
title = page.get('title');
|
|
||||||
|
|
||||||
if (item.added) {
|
|
||||||
Ember.set(item, 'changeLabel', "added " + title);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (item.changed) {
|
|
||||||
Ember.set(item, 'changeLabel', "changed " + title);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Ember.set(item, "deleted", true);
|
|
||||||
|
|
||||||
if (item.added) {
|
|
||||||
Ember.set(item, 'changeLabel', "added section (since removed)");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (item.changed) {
|
|
||||||
Ember.set(item, 'changeLabel', "changed section (since removed)");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (item.deleted) {
|
|
||||||
Ember.set(item, 'changeLabel', "removed section");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -15,70 +15,73 @@ import TooltipMixin from '../../mixins/tooltip';
|
||||||
import tocUtil from '../../utils/toc';
|
import tocUtil from '../../utils/toc';
|
||||||
|
|
||||||
export default Ember.Component.extend(NotifierMixin, TooltipMixin, {
|
export default Ember.Component.extend(NotifierMixin, TooltipMixin, {
|
||||||
document: {},
|
document: {},
|
||||||
folder: {},
|
folder: {},
|
||||||
pages: [],
|
pages: [],
|
||||||
page: "",
|
page: "",
|
||||||
state: {
|
state: {
|
||||||
actionablePage: false,
|
actionablePage: false,
|
||||||
upDisabled: true,
|
upDisabled: true,
|
||||||
downDisabled: true,
|
downDisabled: true,
|
||||||
indentDisabled: true,
|
indentDisabled: true,
|
||||||
outdentDisabled: true
|
outdentDisabled: true
|
||||||
|
},
|
||||||
|
emptyState: Ember.computed('pages', function () {
|
||||||
|
return this.get('pages.length') === 0;
|
||||||
|
}),
|
||||||
|
|
||||||
|
didReceiveAttrs: function () {
|
||||||
|
this.set('showToc', is.not.undefined(this.get('pages')) && this.get('pages').get('length') > 0);
|
||||||
|
if (is.not.null(this.get('page'))) {
|
||||||
|
this.send('onEntryClick', this.get('page'));
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
didReceiveAttrs: function() {
|
didRender: function () {
|
||||||
this.set('showToc', is.not.undefined(this.get('pages')) && this.get('pages').get('length') > 2);
|
if (this.session.authenticated) {
|
||||||
if (is.not.null(this.get('page'))) {
|
this.addTooltip(document.getElementById("toc-up-button"));
|
||||||
this.send('onEntryClick', this.get('page'));
|
this.addTooltip(document.getElementById("toc-down-button"));
|
||||||
}
|
this.addTooltip(document.getElementById("toc-outdent-button"));
|
||||||
},
|
this.addTooltip(document.getElementById("toc-indent-button"));
|
||||||
|
}
|
||||||
didRender: function() {
|
|
||||||
if (this.session.authenticated) {
|
|
||||||
this.addTooltip(document.getElementById("toc-up-button"));
|
|
||||||
this.addTooltip(document.getElementById("toc-down-button"));
|
|
||||||
this.addTooltip(document.getElementById("toc-outdent-button"));
|
|
||||||
this.addTooltip(document.getElementById("toc-indent-button"));
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
didInsertElement() {
|
|
||||||
this.eventBus.subscribe('documentPageAdded', this, 'onDocumentPageAdded');
|
|
||||||
},
|
},
|
||||||
|
|
||||||
willDestroyElement() {
|
didInsertElement() {
|
||||||
this.eventBus.unsubscribe('documentPageAdded');
|
this.eventBus.subscribe('documentPageAdded', this, 'onDocumentPageAdded');
|
||||||
|
},
|
||||||
|
|
||||||
|
willDestroyElement() {
|
||||||
|
this.eventBus.unsubscribe('documentPageAdded');
|
||||||
this.destroyTooltips();
|
this.destroyTooltips();
|
||||||
},
|
},
|
||||||
|
|
||||||
onDocumentPageAdded(pageId) {
|
onDocumentPageAdded(pageId) {
|
||||||
this.send('onEntryClick', pageId);
|
this.send('onEntryClick', pageId);
|
||||||
},
|
},
|
||||||
|
|
||||||
// Controls what user can do with the toc (left sidebar).
|
// Controls what user can do with the toc (left sidebar).
|
||||||
// Identifies the target pages.
|
// Identifies the target pages.
|
||||||
setState(pageId) {
|
setState(pageId) {
|
||||||
this.set('page', pageId);
|
this.set('page', pageId);
|
||||||
|
|
||||||
let toc = this.get('pages');
|
let toc = this.get('pages');
|
||||||
let page = _.findWhere(toc, { id: pageId });
|
let page = _.findWhere(toc, { id: pageId });
|
||||||
|
|
||||||
let state = tocUtil.getState(toc, page);
|
let state = tocUtil.getState(toc, page);
|
||||||
|
|
||||||
if (!this.get('isEditor') || is.empty(pageId)) {
|
if (!this.get('isEditor') || is.empty(pageId)) {
|
||||||
state.actionablePage = state.upDisabled = state.downDisabled = state.indentDisabled = state.outdentDisabled = false;
|
state.actionablePage = false;
|
||||||
}
|
state.upDisabled = state.downDisabled = state.indentDisabled = state.outdentDisabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
this.set('state', state);
|
this.set('state', state);
|
||||||
},
|
},
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
// Page up - above pages shunt down.
|
// Page up - above pages shunt down.
|
||||||
pageUp() {
|
pageUp() {
|
||||||
if (this.get('state.upDisabled')) {
|
if (this.get('state.upDisabled')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let state = this.get('state');
|
let state = this.get('state');
|
||||||
let pages = this.get('pages');
|
let pages = this.get('pages');
|
||||||
|
@ -88,75 +91,75 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, {
|
||||||
if (pendingChanges.length > 0) {
|
if (pendingChanges.length > 0) {
|
||||||
this.attrs.changePageSequence(pendingChanges);
|
this.attrs.changePageSequence(pendingChanges);
|
||||||
|
|
||||||
this.send('onEntryClick', this.get('page'));
|
this.send('onEntryClick', this.get('page'));
|
||||||
this.audit.record("moved-page-up");
|
this.audit.record("moved-page-up");
|
||||||
this.showNotification("Moved up");
|
this.showNotification("Moved up");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// Move down -- pages below shift up.
|
// Move down -- pages below shift up.
|
||||||
pageDown() {
|
pageDown() {
|
||||||
if (this.get('state.downDisabled')) {
|
if (this.get('state.downDisabled')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let state = this.get('state');
|
let state = this.get('state');
|
||||||
var pages = this.get('pages');
|
var pages = this.get('pages');
|
||||||
var page = _.findWhere(pages, { id: this.get('page') });
|
var page = _.findWhere(pages, { id: this.get('page') });
|
||||||
let pendingChanges = tocUtil.moveDown(state, pages, page);
|
let pendingChanges = tocUtil.moveDown(state, pages, page);
|
||||||
|
|
||||||
if (pendingChanges.length > 0) {
|
if (pendingChanges.length > 0) {
|
||||||
this.attrs.changePageSequence(pendingChanges);
|
this.attrs.changePageSequence(pendingChanges);
|
||||||
|
|
||||||
this.send('onEntryClick', this.get('page'));
|
this.send('onEntryClick', this.get('page'));
|
||||||
this.audit.record("moved-page-down");
|
this.audit.record("moved-page-down");
|
||||||
this.showNotification("Moved down");
|
this.showNotification("Moved down");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// Indent - changes a page from H2 to H3, etc.
|
// Indent - changes a page from H2 to H3, etc.
|
||||||
pageIndent() {
|
pageIndent() {
|
||||||
if (this.get('state.indentDisabled')) {
|
if (this.get('state.indentDisabled')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let state = this.get('state');
|
let state = this.get('state');
|
||||||
var pages = this.get('pages');
|
var pages = this.get('pages');
|
||||||
var page = _.findWhere(pages, { id: this.get('page') });
|
var page = _.findWhere(pages, { id: this.get('page') });
|
||||||
let pendingChanges = tocUtil.indent(state, pages, page);
|
let pendingChanges = tocUtil.indent(state, pages, page);
|
||||||
|
|
||||||
if (pendingChanges.length > 0) {
|
if (pendingChanges.length > 0) {
|
||||||
this.attrs.changePageLevel(pendingChanges);
|
this.attrs.changePageLevel(pendingChanges);
|
||||||
|
|
||||||
this.showNotification("Indent");
|
this.showNotification("Indent");
|
||||||
this.audit.record("changed-page-sequence");
|
this.audit.record("changed-page-sequence");
|
||||||
this.send('onEntryClick', this.get('page'));
|
this.send('onEntryClick', this.get('page'));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// Outdent - changes a page from H3 to H2, etc.
|
// Outdent - changes a page from H3 to H2, etc.
|
||||||
pageOutdent() {
|
pageOutdent() {
|
||||||
if (this.get('state.outdentDisabled')) {
|
if (this.get('state.outdentDisabled')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let state = this.get('state');
|
let state = this.get('state');
|
||||||
var pages = this.get('pages');
|
var pages = this.get('pages');
|
||||||
var page = _.findWhere(pages, { id: this.get('page') });
|
var page = _.findWhere(pages, { id: this.get('page') });
|
||||||
let pendingChanges = tocUtil.outdent(state, pages, page);
|
let pendingChanges = tocUtil.outdent(state, pages, page);
|
||||||
|
|
||||||
if (pendingChanges.length > 0) {
|
if (pendingChanges.length > 0) {
|
||||||
this.attrs.changePageLevel(pendingChanges);
|
this.attrs.changePageLevel(pendingChanges);
|
||||||
|
|
||||||
this.showNotification("Outdent");
|
this.showNotification("Outdent");
|
||||||
this.audit.record("changed-page-sequence");
|
this.audit.record("changed-page-sequence");
|
||||||
this.send('onEntryClick', this.get('page'));
|
this.send('onEntryClick', this.get('page'));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onEntryClick(id) {
|
onEntryClick(id) {
|
||||||
this.setState(id);
|
this.setState(id);
|
||||||
this.attrs.gotoPage(id);
|
this.attrs.gotoPage(id);
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// 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>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
|
||||||
document: {},
|
|
||||||
meta: [],
|
|
||||||
});
|
|
|
@ -18,15 +18,12 @@ export default Ember.Component.extend(TooltipMixin, NotifierMixin, {
|
||||||
document: {},
|
document: {},
|
||||||
folder: {},
|
folder: {},
|
||||||
showToc: true,
|
showToc: true,
|
||||||
showViews: false,
|
|
||||||
showContributions: false,
|
|
||||||
showSections: false,
|
showSections: false,
|
||||||
showScrollTool: false,
|
showScrollTool: false,
|
||||||
showingSections: false,
|
showingSections: false,
|
||||||
|
|
||||||
didRender() {
|
didRender() {
|
||||||
if (this.session.authenticated) {
|
if (this.session.authenticated) {
|
||||||
this.addTooltip(document.getElementById("owner-avatar"));
|
|
||||||
this.addTooltip(document.getElementById("section-tool"));
|
this.addTooltip(document.getElementById("section-tool"));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -75,32 +72,13 @@ export default Ember.Component.extend(TooltipMixin, NotifierMixin, {
|
||||||
|
|
||||||
showToc() {
|
showToc() {
|
||||||
this.set('showToc', true);
|
this.set('showToc', true);
|
||||||
this.set('showViews', false);
|
|
||||||
this.set('showContributions', false);
|
|
||||||
this.set('showSections', false);
|
this.set('showSections', false);
|
||||||
this.set('showingSections', false);
|
this.set('showingSections', false);
|
||||||
},
|
},
|
||||||
|
|
||||||
showViews() {
|
|
||||||
this.set('showToc', false);
|
|
||||||
this.set('showViews', true);
|
|
||||||
this.set('showContributions', false);
|
|
||||||
this.set('showSections', false);
|
|
||||||
this.set('showingSections', false);
|
|
||||||
},
|
|
||||||
|
|
||||||
showContributions() {
|
|
||||||
this.set('showToc', false);
|
|
||||||
this.set('showViews', false);
|
|
||||||
this.set('showContributions', true);
|
|
||||||
this.set('showSections', false);
|
|
||||||
this.set('showingSections', false);
|
|
||||||
},
|
|
||||||
|
|
||||||
showSections() {
|
showSections() {
|
||||||
this.set('showToc', false);
|
this.set('showToc', false);
|
||||||
this.set('showViews', false);
|
|
||||||
this.set('showContributions', false);
|
|
||||||
this.set('showSections', true);
|
this.set('showSections', true);
|
||||||
this.set('showingSections', true);
|
this.set('showingSections', true);
|
||||||
},
|
},
|
||||||
|
@ -111,9 +89,8 @@ export default Ember.Component.extend(TooltipMixin, NotifierMixin, {
|
||||||
},
|
},
|
||||||
|
|
||||||
onAddSection(section) {
|
onAddSection(section) {
|
||||||
|
this.send('showToc');
|
||||||
this.attrs.onAddSection(section);
|
this.attrs.onAddSection(section);
|
||||||
|
|
||||||
this.set('showingSections', false);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
scrollTop() {
|
scrollTop() {
|
||||||
|
|
70
app/app/components/document/document-tab.js
Normal file
70
app/app/components/document/document-tab.js
Normal file
|
@ -0,0 +1,70 @@
|
||||||
|
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
||||||
|
//
|
||||||
|
// 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>.
|
||||||
|
//
|
||||||
|
// https://documize.com
|
||||||
|
|
||||||
|
import Ember from 'ember';
|
||||||
|
import NotifierMixin from '../../mixins/notifier';
|
||||||
|
import TooltipMixin from '../../mixins/tooltip';
|
||||||
|
|
||||||
|
export default Ember.Component.extend(NotifierMixin, TooltipMixin, {
|
||||||
|
sectionService: Ember.inject.service('section'),
|
||||||
|
viewMode: true,
|
||||||
|
editMode: false,
|
||||||
|
|
||||||
|
didReceiveAttrs(){
|
||||||
|
if (this.get('mode') === 'edit') {
|
||||||
|
this.send('onEdit');
|
||||||
|
}
|
||||||
|
|
||||||
|
this.audit.record("viewed-document-section-" + this.get('model.page.contentType'));
|
||||||
|
},
|
||||||
|
|
||||||
|
didInsertElement() {
|
||||||
|
let self = this;
|
||||||
|
this.get('sectionService').refresh(this.get('model.document.id')).then(function (changes) {
|
||||||
|
changes.forEach(function (newPage) {
|
||||||
|
let oldPage = self.get('model.page');
|
||||||
|
if (!_.isUndefined(oldPage) && oldPage.get('id') === newPage.get('id')) {
|
||||||
|
oldPage.set('body', newPage.get('body'));
|
||||||
|
oldPage.set('revised', newPage.get('revised'));
|
||||||
|
self.showNotification(`Refreshed ${oldPage.get('title')}`);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
actions: {
|
||||||
|
onEdit() {
|
||||||
|
this.set('viewMode', false);
|
||||||
|
this.set('editMode', true);
|
||||||
|
this.set('mode', 'edit');
|
||||||
|
},
|
||||||
|
|
||||||
|
onView() {
|
||||||
|
this.set('viewMode', true);
|
||||||
|
this.set('editMode', false);
|
||||||
|
this.set('mode', 'view');
|
||||||
|
},
|
||||||
|
|
||||||
|
onCancel() {
|
||||||
|
this.send('onView');
|
||||||
|
},
|
||||||
|
|
||||||
|
onAction(page, meta) {
|
||||||
|
this.get('onAction')(page, meta);
|
||||||
|
this.send('onView');
|
||||||
|
},
|
||||||
|
|
||||||
|
onDelete() {
|
||||||
|
this.get('onDelete')(this.get('model.document'), this.get('model.page'));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
|
@ -19,6 +19,7 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, {
|
||||||
localStorage: Ember.inject.service(),
|
localStorage: Ember.inject.service(),
|
||||||
drop: null,
|
drop: null,
|
||||||
users: [],
|
users: [],
|
||||||
|
menuOpen: false,
|
||||||
saveTemplate: {
|
saveTemplate: {
|
||||||
name: "",
|
name: "",
|
||||||
description: ""
|
description: ""
|
||||||
|
@ -30,70 +31,20 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, {
|
||||||
},
|
},
|
||||||
|
|
||||||
didRender() {
|
didRender() {
|
||||||
if (this.get('isEditor')) {
|
if (this.session.isEditor) {
|
||||||
this.addTooltip(document.getElementById("attachment-button"));
|
this.addTooltip(document.getElementById("add-document-tab"));
|
||||||
this.addTooltip(document.getElementById("save-template-button"));
|
|
||||||
this.addTooltip(document.getElementById("set-meta-button"));
|
|
||||||
this.addTooltip(document.getElementById("delete-document-button"));
|
|
||||||
}
|
|
||||||
|
|
||||||
this.addTooltip(document.getElementById("print-document-button"));
|
|
||||||
},
|
|
||||||
|
|
||||||
didInsertElement() {
|
|
||||||
if (this.get('isEditor')) {
|
|
||||||
let self = this;
|
|
||||||
let documentId = this.get('document.id');
|
|
||||||
let url = this.get('appMeta.endpoint');
|
|
||||||
let uploadUrl = `${url}/documents/${documentId}/attachments`;
|
|
||||||
|
|
||||||
let dzone = new Dropzone("#attachment-button > i", {
|
|
||||||
headers: {
|
|
||||||
'Authorization': 'Bearer ' + self.get('session.session.content.authenticated.token')
|
|
||||||
},
|
|
||||||
url: uploadUrl,
|
|
||||||
method: "post",
|
|
||||||
paramName: 'attachment',
|
|
||||||
clickable: true,
|
|
||||||
maxFilesize: 10,
|
|
||||||
parallelUploads: 3,
|
|
||||||
uploadMultiple: false,
|
|
||||||
addRemoveLinks: false,
|
|
||||||
autoProcessQueue: true,
|
|
||||||
|
|
||||||
init: function () {
|
|
||||||
this.on("success", function (file /*, response*/ ) {
|
|
||||||
self.showNotification(`Attached ${file.name}`);
|
|
||||||
});
|
|
||||||
|
|
||||||
this.on("queuecomplete", function () {
|
|
||||||
self.attrs.onAttachmentUpload();
|
|
||||||
});
|
|
||||||
|
|
||||||
this.on("addedfile", function ( /*file*/ ) {
|
|
||||||
self.audit.record('attached-file');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
dzone.on("complete", function (file) {
|
|
||||||
dzone.removeFile(file);
|
|
||||||
});
|
|
||||||
|
|
||||||
this.set('drop', dzone);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
willDestroyElement() {
|
willDestroyElement() {
|
||||||
if (is.not.null(this.get('drop'))) {
|
|
||||||
this.get('drop').destroy();
|
|
||||||
this.set('drop', null);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.destroyTooltips();
|
this.destroyTooltips();
|
||||||
},
|
},
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
|
onMenuOpen() {
|
||||||
|
this.set('menuOpen', !this.get('menuOpen'));
|
||||||
|
},
|
||||||
|
|
||||||
deleteDocument() {
|
deleteDocument() {
|
||||||
this.attrs.onDocumentDelete();
|
this.attrs.onDocumentDelete();
|
||||||
},
|
},
|
||||||
|
@ -120,22 +71,6 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, {
|
||||||
this.attrs.onSaveTemplate(name, excerpt);
|
this.attrs.onSaveTemplate(name, excerpt);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
},
|
}
|
||||||
|
|
||||||
saveMeta() {
|
|
||||||
let doc = this.get('document');
|
|
||||||
|
|
||||||
if (is.empty(doc.get('excerpt'))) {
|
|
||||||
$("meta-excerpt").addClass("error").focus();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
doc.set('excerpt', doc.get('excerpt').substring(0, 250));
|
|
||||||
doc.set('userId', this.get('owner.id'));
|
|
||||||
this.showNotification("Saved");
|
|
||||||
|
|
||||||
this.attrs.onDocumentChange(doc);
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
});
|
});
|
|
@ -18,51 +18,21 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, {
|
||||||
sectionService: Ember.inject.service('section'),
|
sectionService: Ember.inject.service('section'),
|
||||||
appMeta: Ember.inject.service(),
|
appMeta: Ember.inject.service(),
|
||||||
link: Ember.inject.service(),
|
link: Ember.inject.service(),
|
||||||
/* Parameters */
|
|
||||||
document: null,
|
document: null,
|
||||||
// pages: [],
|
|
||||||
attachments: [],
|
|
||||||
folder: null,
|
folder: null,
|
||||||
folders: [],
|
folders: [],
|
||||||
isEditor: false,
|
isEditor: false,
|
||||||
/* Internal */
|
|
||||||
drop: null,
|
|
||||||
deleteAttachment: {
|
|
||||||
id: "",
|
|
||||||
name: "",
|
|
||||||
},
|
|
||||||
|
|
||||||
noSections: Ember.computed('pages', function () {
|
noSections: Ember.computed('pages', function () {
|
||||||
return this.get('pages.length') === 0;
|
return this.get('pages.length') === 0;
|
||||||
}),
|
}),
|
||||||
|
|
||||||
didInsertElement() {
|
|
||||||
let self = this;
|
|
||||||
|
|
||||||
this.get('sectionService').refresh(this.get('document.id')).then(function (changes) {
|
|
||||||
changes.forEach(function (newPage) {
|
|
||||||
let oldPage = self.get('pages').findBy('id', newPage.get('id'));
|
|
||||||
if (is.not.undefined(oldPage)) {
|
|
||||||
oldPage.set('body', newPage.get('body'));
|
|
||||||
oldPage.set('revised', newPage.get('revised'));
|
|
||||||
self.showNotification(`Refreshed ${oldPage.get('title')}`);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
didRender() {
|
didRender() {
|
||||||
this.contentLinkHandler();
|
this.contentLinkHandler();
|
||||||
},
|
},
|
||||||
|
|
||||||
willDestroyElement() {
|
willDestroyElement() {
|
||||||
this.destroyTooltips();
|
this.destroyTooltips();
|
||||||
|
|
||||||
let drop = this.get('drop');
|
|
||||||
|
|
||||||
if (is.not.null(drop)) {
|
|
||||||
drop.destroy();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
contentLinkHandler() {
|
contentLinkHandler() {
|
||||||
|
@ -70,18 +40,19 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, {
|
||||||
let doc = this.get('document');
|
let doc = this.get('document');
|
||||||
let self = this;
|
let self = this;
|
||||||
|
|
||||||
$("a[data-documize='true']").off('click').on('click', function(e) {
|
$("a[data-documize='true']").off('click').on('click', function (e) {
|
||||||
let link = links.getLinkObject(self.get('meta.outboundLinks'), this);
|
let link = links.getLinkObject(self.get('links'), this);
|
||||||
|
|
||||||
// local link? exists?
|
// local link? exists?
|
||||||
if (link.linkType === "section" && link.documentId === doc.get('id')) {
|
if ((link.linkType === "section" || link.linkType === "tab") && link.documentId === doc.get('id')) {
|
||||||
let exists = self.get('pages').findBy('id', link.targetId);
|
let exists = self.get('allPages').findBy('id', link.targetId);
|
||||||
|
|
||||||
if (_.isUndefined(exists)) {
|
if (_.isUndefined(exists)) {
|
||||||
link.orphan = true;
|
link.orphan = true;
|
||||||
} else {
|
} else {
|
||||||
self.attrs.gotoPage(link.targetId);
|
if (link.linkType === "section") {
|
||||||
return false;
|
self.attrs.gotoPage(link.targetId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,55 +70,6 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, {
|
||||||
},
|
},
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
confirmDeleteAttachment(id, name) {
|
|
||||||
this.set('deleteAttachment', {
|
|
||||||
id: id,
|
|
||||||
name: name
|
|
||||||
});
|
|
||||||
|
|
||||||
$(".delete-attachment-dialog").css("display", "block");
|
|
||||||
|
|
||||||
let drop = new Drop({
|
|
||||||
target: $(".delete-attachment-" + id)[0],
|
|
||||||
content: $(".delete-attachment-dialog")[0],
|
|
||||||
classes: 'drop-theme-basic',
|
|
||||||
position: "bottom right",
|
|
||||||
openOn: "always",
|
|
||||||
tetherOptions: {
|
|
||||||
offset: "5px 0",
|
|
||||||
targetOffset: "10px 0"
|
|
||||||
},
|
|
||||||
remove: false
|
|
||||||
});
|
|
||||||
|
|
||||||
this.set('drop', drop);
|
|
||||||
},
|
|
||||||
|
|
||||||
cancel() {
|
|
||||||
let drop = this.get('drop');
|
|
||||||
drop.close();
|
|
||||||
|
|
||||||
this.set('deleteAttachment', {
|
|
||||||
id: "",
|
|
||||||
name: ""
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
deleteAttachment() {
|
|
||||||
let attachment = this.get('deleteAttachment');
|
|
||||||
let drop = this.get('drop');
|
|
||||||
drop.close();
|
|
||||||
|
|
||||||
this.showNotification(`Deleted ${attachment.name}`);
|
|
||||||
this.attrs.onAttachmentDeleted(this.get('deleteAttachment').id);
|
|
||||||
this.set('deleteAttachment', {
|
|
||||||
id: "",
|
|
||||||
name: ""
|
|
||||||
});
|
|
||||||
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
|
|
||||||
onDeletePage(id, deleteChildren) {
|
onDeletePage(id, deleteChildren) {
|
||||||
let page = this.get('pages').findBy("id", id);
|
let page = this.get('pages').findBy("id", id);
|
||||||
|
|
||||||
|
@ -164,7 +86,6 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, {
|
||||||
this.attrs.onDeletePage(params);
|
this.attrs.onDeletePage(params);
|
||||||
},
|
},
|
||||||
|
|
||||||
// onTagChange event emitted from document/tag-editor component
|
|
||||||
onTagChange(tags) {
|
onTagChange(tags) {
|
||||||
let doc = this.get('document');
|
let doc = this.get('document');
|
||||||
doc.set('tags', tags);
|
doc.set('tags', tags);
|
||||||
|
|
|
@ -16,16 +16,6 @@ export default Ember.Component.extend({
|
||||||
tagName: "li",
|
tagName: "li",
|
||||||
classNames: ["item"],
|
classNames: ["item"],
|
||||||
|
|
||||||
// indentLevel: Ember.computed('page', function() {
|
|
||||||
// let nodeLevel = this.get('page.level');
|
|
||||||
// let indent = (nodeLevel - 1) * 20;
|
|
||||||
// return indent;
|
|
||||||
// }),
|
|
||||||
|
|
||||||
didReceiveAttrs() {
|
|
||||||
// this.set('classNames', ["item", "margin-left-" + this.get("page.tocIndent")]);
|
|
||||||
},
|
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
onClick(id) {
|
onClick(id) {
|
||||||
this.get('onClick')(id);
|
this.get('onClick')(id);
|
||||||
|
|
|
@ -13,31 +13,28 @@ import Ember from 'ember';
|
||||||
import NotifierMixin from '../../mixins/notifier';
|
import NotifierMixin from '../../mixins/notifier';
|
||||||
|
|
||||||
export default Ember.Component.extend(NotifierMixin, {
|
export default Ember.Component.extend(NotifierMixin, {
|
||||||
sectionService: Ember.inject.service('section'),
|
display: 'section', // which CSS to use
|
||||||
|
|
||||||
didReceiveAttrs() {
|
didRender() {
|
||||||
let self = this;
|
let self = this;
|
||||||
this.get('sectionService').getAll().then(function(sections) {
|
|
||||||
self.set('sections', sections);
|
Mousetrap.bind('esc', function () {
|
||||||
|
if (self.get('isDestroyed') || self.get('isDestroying')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
self.send('onCancel');
|
||||||
|
return false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
didRender() {
|
actions: {
|
||||||
let self = this;
|
|
||||||
|
|
||||||
Mousetrap.bind('esc', function() {
|
|
||||||
self.send('onCancel');
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
actions: {
|
|
||||||
onCancel() {
|
onCancel() {
|
||||||
this.attrs.onCancel();
|
this.attrs.onCancel();
|
||||||
},
|
},
|
||||||
|
|
||||||
addSection(section) {
|
addSection(section) {
|
||||||
this.attrs.onAction(section);
|
this.attrs.onAction(section);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -23,7 +23,7 @@ export default Ember.Component.extend({
|
||||||
this._super(...arguments);
|
this._super(...arguments);
|
||||||
let tagz = [];
|
let tagz = [];
|
||||||
|
|
||||||
if (this.get('documentTags').length > 1) {
|
if (!_.isUndefined(this.get('documentTags')) && this.get('documentTags').length > 1) {
|
||||||
let tags = this.get('documentTags').split('#');
|
let tags = this.get('documentTags').split('#');
|
||||||
_.each(tags, function(tag) {
|
_.each(tags, function(tag) {
|
||||||
if (tag.length > 0) {
|
if (tag.length > 0) {
|
||||||
|
|
|
@ -85,9 +85,9 @@ export default Ember.Component.extend({
|
||||||
self.attrs.onOpenCallback(drop);
|
self.attrs.onOpenCallback(drop);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
self.set('drop', drop);
|
self.set('drop', drop);
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
willDestroyElement() {
|
willDestroyElement() {
|
||||||
|
|
|
@ -18,6 +18,8 @@ export default Ember.Component.extend({
|
||||||
position: 'bottom right',
|
position: 'bottom right',
|
||||||
contentId: "",
|
contentId: "",
|
||||||
drop: null,
|
drop: null,
|
||||||
|
onOpenCallback: null, // callback when opened
|
||||||
|
onCloseCallback: null, // callback when closed
|
||||||
tether: Ember.inject.service(),
|
tether: Ember.inject.service(),
|
||||||
|
|
||||||
didReceiveAttrs() {
|
didReceiveAttrs() {
|
||||||
|
@ -44,7 +46,20 @@ export default Ember.Component.extend({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
self.set('drop', drop);
|
if (drop) {
|
||||||
|
drop.on('open', function () {
|
||||||
|
if (is.not.null(self.get("onOpenCallback"))) {
|
||||||
|
self.attrs.onOpenCallback(drop);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
drop.on('close', function () {
|
||||||
|
if (is.not.null(self.get("onCloseCallback"))) {
|
||||||
|
self.attrs.onCloseCallback();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
self.set('drop', drop);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
willDestroyElement() {
|
willDestroyElement() {
|
||||||
|
|
|
@ -49,9 +49,7 @@ export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin,
|
||||||
self.set('waiting', true);
|
self.set('waiting', true);
|
||||||
this.get('sectionService').fetch(this.get('page'), "secrets", this.get('config'))
|
this.get('sectionService').fetch(this.get('page'), "secrets", this.get('config'))
|
||||||
.then(function (response) {
|
.then(function (response) {
|
||||||
console.log(response);
|
|
||||||
self.set('waiting', false);
|
self.set('waiting', false);
|
||||||
|
|
||||||
self.set('config.APIKey', response.apikey);
|
self.set('config.APIKey', response.apikey);
|
||||||
self.set('config.url', response.url);
|
self.set('config.url', response.url);
|
||||||
self.set('config.username', response.username);
|
self.set('config.username', response.username);
|
||||||
|
|
|
@ -28,69 +28,72 @@ export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin,
|
||||||
|
|
||||||
if (is.undefined(this.get('config.clientId')) || is.undefined(this.get('config.callbackUrl'))) {
|
if (is.undefined(this.get('config.clientId')) || is.undefined(this.get('config.callbackUrl'))) {
|
||||||
self.get('sectionService').fetch(page, "config", {})
|
self.get('sectionService').fetch(page, "config", {})
|
||||||
.then(function (cfg) {
|
.then(function (cfg) {
|
||||||
let config = {};
|
let config = {};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
clientId: cfg.clientID,
|
clientId: cfg.clientID,
|
||||||
callbackUrl: cfg.authorizationCallbackURL,
|
callbackUrl: cfg.authorizationCallbackURL,
|
||||||
owner: null,
|
owner: null,
|
||||||
owner_name: "",
|
owner_name: "",
|
||||||
lists: [],
|
lists: [],
|
||||||
branchSince: "",
|
branchSince: "",
|
||||||
branchLines: "100",
|
branchLines: "100",
|
||||||
userId: "",
|
userId: "",
|
||||||
pageId: page.get('id'),
|
pageId: page.get('id'),
|
||||||
showMilestones: false,
|
showMilestones: false,
|
||||||
showIssues: false,
|
showIssues: false,
|
||||||
showCommits: false,
|
showCommits: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let metaConfig = JSON.parse(self.get('meta.config'));
|
let metaConfig = JSON.parse(self.get('meta.config'));
|
||||||
config.owner = metaConfig.owner;
|
config.owner = metaConfig.owner;
|
||||||
config.lists = metaConfig.lists;
|
config.lists = metaConfig.lists;
|
||||||
config.branchSince = metaConfig.branchSince;
|
config.branchSince = metaConfig.branchSince;
|
||||||
config.userId = metaConfig.userId;
|
config.userId = metaConfig.userId;
|
||||||
config.pageId = metaConfig.pageId;
|
config.pageId = metaConfig.pageId;
|
||||||
config.showMilestones = metaConfig.showMilestones;
|
config.showMilestones = metaConfig.showMilestones;
|
||||||
config.showIssues = metaConfig.showIssues;
|
config.showIssues = metaConfig.showIssues;
|
||||||
config.showCommits = metaConfig.showCommits;
|
config.showCommits = metaConfig.showCommits;
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
|
|
||||||
self.set('config', config);
|
if (_.isUndefined(config.showCommits)) {
|
||||||
self.set('config.pageId', page.get('id'));
|
config.showCommits = true;
|
||||||
|
}
|
||||||
|
|
||||||
// On auth callback capture code
|
self.set('config', config);
|
||||||
let code = window.location.search;
|
self.set('config.pageId', page.get('id'));
|
||||||
|
|
||||||
if (is.not.undefined(code) && is.not.null(code) && is.not.empty(code) && code !== "") {
|
// On auth callback capture code
|
||||||
let tok = code.replace("?code=", "");
|
let code = window.location.search;
|
||||||
self.get('sectionService').fetch(page, "saveSecret", { "token": tok })
|
code = code.replace("?mode=edit", "");
|
||||||
.then(function () {
|
|
||||||
console.log("github auth code saved to db");
|
if (is.not.undefined(code) && is.not.null(code) && is.not.empty(code) && code !== "") {
|
||||||
self.send('authStage2');
|
let tok = code.replace("&code=", "");
|
||||||
}, function (error) { //jshint ignore: line
|
self.get('sectionService').fetch(page, "saveSecret", { "token": tok })
|
||||||
console.log(error);
|
.then(function () {
|
||||||
self.send('auth');
|
self.send('authStage2');
|
||||||
});
|
}, function (error) { //jshint ignore: line
|
||||||
} else {
|
console.log(error);
|
||||||
if (config.userId !== self.get("session.session.authenticated.user.id")) {
|
self.send('auth');
|
||||||
console.log("github auth wrong user ID, switching");
|
});
|
||||||
self.set('config.userId', self.get("session.session.authenticated.user.id"));
|
} else {
|
||||||
}
|
if (config.userId !== self.get("session.session.authenticated.user.id")) {
|
||||||
self.get('sectionService').fetch(page, "checkAuth", self.get('config'))
|
console.log("github auth wrong user ID, switching");
|
||||||
.then(function () {
|
self.set('config.userId', self.get("session.session.authenticated.user.id"));
|
||||||
console.log("github auth code valid");
|
|
||||||
self.send('authStage2');
|
|
||||||
}, function (error) { //jshint ignore: line
|
|
||||||
console.log(error);
|
|
||||||
self.send('auth'); // require auth if the db token is invalid
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}, function (error) { //jshint ignore: line
|
self.get('sectionService').fetch(page, "checkAuth", self.get('config'))
|
||||||
console.log(error);
|
.then(function () {
|
||||||
});
|
self.send('authStage2');
|
||||||
|
}, function (error) { //jshint ignore: line
|
||||||
|
console.log(error);
|
||||||
|
self.send('auth'); // require auth if the db token is invalid
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}, function (error) { //jshint ignore: line
|
||||||
|
console.log(error);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -122,7 +125,6 @@ export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin,
|
||||||
$('#branch-since').datetimepicker();
|
$('#branch-since').datetimepicker();
|
||||||
this.set('initDateTimePicker', "Done");
|
this.set('initDateTimePicker', "Done");
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
getOrgReposLists() {
|
getOrgReposLists() {
|
||||||
|
@ -132,41 +134,41 @@ export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin,
|
||||||
let page = this.get('page');
|
let page = this.get('page');
|
||||||
|
|
||||||
this.get('sectionService').fetch(page, "orgrepos", self.get('config'))
|
this.get('sectionService').fetch(page, "orgrepos", self.get('config'))
|
||||||
.then(function (lists) {
|
.then(function (lists) {
|
||||||
let savedLists = self.get('config.lists');
|
let savedLists = self.get('config.lists');
|
||||||
if (savedLists === null) {
|
if (savedLists === null) {
|
||||||
savedLists = [];
|
savedLists = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lists.length > 0) {
|
if (lists.length > 0) {
|
||||||
let noIncluded = true;
|
let noIncluded = true;
|
||||||
|
|
||||||
lists.forEach(function (list) {
|
lists.forEach(function (list) {
|
||||||
let included = false;
|
let included = false;
|
||||||
var saved;
|
var saved;
|
||||||
if (is.not.undefined(savedLists)) {
|
if (is.not.undefined(savedLists)) {
|
||||||
saved = savedLists.findBy("id", list.id);
|
saved = savedLists.findBy("id", list.id);
|
||||||
}
|
|
||||||
if (is.not.undefined(saved)) {
|
|
||||||
included = saved.included;
|
|
||||||
noIncluded = false;
|
|
||||||
}
|
|
||||||
list.included = included;
|
|
||||||
});
|
|
||||||
|
|
||||||
if (noIncluded) {
|
|
||||||
lists[0].included = true; // make the first entry the default
|
|
||||||
}
|
}
|
||||||
}
|
if (is.not.undefined(saved)) {
|
||||||
|
included = saved.included;
|
||||||
|
noIncluded = false;
|
||||||
|
}
|
||||||
|
list.included = included;
|
||||||
|
});
|
||||||
|
|
||||||
self.set('config.lists', lists);
|
if (noIncluded) {
|
||||||
self.set('busy', false);
|
lists[0].included = true; // make the first entry the default
|
||||||
}, function (error) { //jshint ignore: line
|
}
|
||||||
self.set('busy', false);
|
}
|
||||||
self.set('authenticated', false);
|
|
||||||
self.showNotification("Unable to fetch repositories");
|
self.set('config.lists', lists);
|
||||||
console.log(error);
|
self.set('busy', false);
|
||||||
});
|
}, function (error) { //jshint ignore: line
|
||||||
|
self.set('busy', false);
|
||||||
|
self.set('authenticated', false);
|
||||||
|
self.showNotification("Unable to fetch repositories");
|
||||||
|
console.log(error);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
|
@ -212,11 +214,12 @@ export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin,
|
||||||
let self = this;
|
let self = this;
|
||||||
self.set('busy', true);
|
self.set('busy', true);
|
||||||
self.set('authenticated', false);
|
self.set('authenticated', false);
|
||||||
|
|
||||||
let target = "https://github.com/login/oauth/authorize?client_id=" + self.get('config.clientId') +
|
let target = "https://github.com/login/oauth/authorize?client_id=" + self.get('config.clientId') +
|
||||||
"&scope=repo&redirect_uri=" + encodeURIComponent(self.get('config.callbackUrl')) +
|
"&scope=repo&redirect_uri=" + encodeURIComponent(self.get('config.callbackUrl')) +
|
||||||
"&state=" + encodeURIComponent(window.location.href);
|
"&state=" + encodeURIComponent(window.location.href);
|
||||||
window.location.href = target;
|
|
||||||
|
|
||||||
|
window.location.href = target;
|
||||||
},
|
},
|
||||||
|
|
||||||
onOwnerChange(thisOwner) {
|
onOwnerChange(thisOwner) {
|
||||||
|
|
|
@ -18,24 +18,22 @@ const {
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
export default Ember.Component.extend({
|
||||||
link: service(),
|
link: service(),
|
||||||
|
editMode: true,
|
||||||
isDirty: false,
|
isDirty: false,
|
||||||
pageBody: "",
|
pageBody: "",
|
||||||
|
pagePreview: "",
|
||||||
|
height: $(document).height() - 450,
|
||||||
|
|
||||||
didReceiveAttrs() {
|
didReceiveAttrs() {
|
||||||
this.set("pageBody", this.get("meta.rawBody"));
|
this.set("pageBody", this.get("meta.rawBody"));
|
||||||
},
|
},
|
||||||
|
|
||||||
didInsertElement() {
|
didInsertElement() {
|
||||||
let height = $(document).height() - $(".document-editor > .toolbar").height() - 130;
|
$("#section-markdown-editor").css("height", this.get('height'));
|
||||||
$("#section-markdown-editor, #section-markdown-preview").css("height", height);
|
$("#section-markdown-preview").css("height", this.get('height'));
|
||||||
|
|
||||||
this.renderPreview();
|
$("#section-markdown-editor").off("keyup").on("keyup", () => {
|
||||||
let self = this;
|
this.set('isDirty', true);
|
||||||
|
|
||||||
$("#section-markdown-editor").off("keyup").on("keyup", function () {
|
|
||||||
self.renderPreview();
|
|
||||||
self.set('isDirty', true);
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -43,15 +41,26 @@ export default Ember.Component.extend({
|
||||||
$("#section-markdown-editor").off("keyup");
|
$("#section-markdown-editor").off("keyup");
|
||||||
},
|
},
|
||||||
|
|
||||||
renderPreview() {
|
|
||||||
let md = window.markdownit({
|
|
||||||
linkify: true
|
|
||||||
});
|
|
||||||
let result = md.render(this.get("pageBody"));
|
|
||||||
$("#section-markdown-preview").html(result);
|
|
||||||
},
|
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
|
toggleMode() {
|
||||||
|
this.set('editMode', !this.get('editMode'));
|
||||||
|
|
||||||
|
Ember.run.schedule('afterRender', () => {
|
||||||
|
if (this.get('editMode')) {
|
||||||
|
$("#section-markdown-editor").off("keyup").on("keyup", () => {
|
||||||
|
this.set('isDirty', true);
|
||||||
|
});
|
||||||
|
$("#section-markdown-editor").css("height", this.get('height'));
|
||||||
|
} else {
|
||||||
|
let md = window.markdownit({ linkify: true });
|
||||||
|
let result = md.render(this.get("pageBody"));
|
||||||
|
|
||||||
|
this.set('pagePreview', result);
|
||||||
|
$("#section-markdown-preview").css("height", this.get('height'));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
onInsertLink(link) {
|
onInsertLink(link) {
|
||||||
let linkMarkdown = this.get('link').buildLink(link);
|
let linkMarkdown = this.get('link').buildLink(link);
|
||||||
|
|
||||||
|
|
|
@ -25,23 +25,23 @@ export default Ember.Component.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
didInsertElement() {
|
didInsertElement() {
|
||||||
let self = this;
|
|
||||||
|
|
||||||
$('#table-editor').froalaEditor({
|
$('#table-editor').froalaEditor({
|
||||||
toolbarButtons: [],
|
toolbarButtons: [],
|
||||||
height: this.get('editorHeight') - 260,
|
height: $(document).height() - 400,
|
||||||
toolbarInline: true,
|
toolbarInline: true,
|
||||||
tableResizerOffset: 10
|
tableResizerOffset: 10
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#table-editor').on('froalaEditor.contentChanged', function () {
|
$('#table-editor').on('froalaEditor.contentChanged', () => {
|
||||||
self.set('isDirty', true);
|
this.set('isDirty', true);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
willDestroyElement() {
|
willDestroyElement() {
|
||||||
$('#table-editor').froalaEditor('destroy');
|
|
||||||
$('#table-editor').off('froalaEditor.contentChanged');
|
$('#table-editor').off('froalaEditor.contentChanged');
|
||||||
|
// if ($('#table-editor').data('froala.editor')) {
|
||||||
|
// $('#table-editor').froalaEditor('destroy');
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
|
|
|
@ -25,7 +25,7 @@ export default Ember.Component.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
didInsertElement() {
|
didInsertElement() {
|
||||||
let maxHeight = $(document).height() - $(".document-editor > .toolbar").height() - 200;
|
let maxHeight = $(document).height() - 450;
|
||||||
|
|
||||||
let options = {
|
let options = {
|
||||||
selector: "#rich-text-editor",
|
selector: "#rich-text-editor",
|
||||||
|
@ -59,7 +59,7 @@ export default Ember.Component.extend({
|
||||||
],
|
],
|
||||||
menu: {},
|
menu: {},
|
||||||
menubar: false,
|
menubar: false,
|
||||||
toolbar1: "bold italic underline strikethrough superscript subscript | outdent indent bullist numlist forecolor backcolor | alignleft aligncenter alignright alignjustify | link unlink | table image media | hr codesample",
|
toolbar1: "bold italic underline strikethrough superscript subscript | outdent indent bullist numlist forecolor backcolor | alignleft aligncenter alignright alignjustify | link unlink | table image media codesample",
|
||||||
toolbar2: "formatselect fontselect fontsizeselect",
|
toolbar2: "formatselect fontselect fontsizeselect",
|
||||||
save_onsavecallback: function () {
|
save_onsavecallback: function () {
|
||||||
Mousetrap.trigger('ctrl+s');
|
Mousetrap.trigger('ctrl+s');
|
||||||
|
|
|
@ -18,6 +18,7 @@ export default Model.extend({
|
||||||
documentId: attr('string'),
|
documentId: attr('string'),
|
||||||
orgId: attr('string'),
|
orgId: attr('string'),
|
||||||
contentType: attr('string'),
|
contentType: attr('string'),
|
||||||
|
pageType: attr('string'),
|
||||||
level: attr('number', { defaultValue: 1 }),
|
level: attr('number', { defaultValue: 1 }),
|
||||||
sequence: attr('number', { defaultValue: 0 }),
|
sequence: attr('number', { defaultValue: 0 }),
|
||||||
revisions: attr('number', { defaultValue: 0 }),
|
revisions: attr('number', { defaultValue: 0 }),
|
||||||
|
@ -25,10 +26,9 @@ export default Model.extend({
|
||||||
body: attr('string'),
|
body: attr('string'),
|
||||||
rawBody: attr('string'),
|
rawBody: attr('string'),
|
||||||
meta: attr(),
|
meta: attr(),
|
||||||
// meta: hasMany('page-meta'),
|
|
||||||
|
|
||||||
tagName: Ember.computed('level', function () {
|
tagName: Ember.computed('level', function () {
|
||||||
return "h" + this.get('level');
|
return "h" + (this.get('level') + 1);
|
||||||
}),
|
}),
|
||||||
|
|
||||||
tocIndent: Ember.computed('level', function () {
|
tocIndent: Ember.computed('level', function () {
|
||||||
|
|
|
@ -16,6 +16,7 @@ import Ember from 'ember';
|
||||||
|
|
||||||
export default Model.extend({
|
export default Model.extend({
|
||||||
contentType: attr('string'),
|
contentType: attr('string'),
|
||||||
|
pageType: attr('string'),
|
||||||
title: attr('string'),
|
title: attr('string'),
|
||||||
description: attr('string'),
|
description: attr('string'),
|
||||||
iconFont: attr('string'),
|
iconFont: attr('string'),
|
||||||
|
@ -24,6 +25,7 @@ export default Model.extend({
|
||||||
hasImage: Ember.computed('iconFont', 'iconFile', function () {
|
hasImage: Ember.computed('iconFont', 'iconFile', function () {
|
||||||
return this.get('iconFile').length > 0;
|
return this.get('iconFile').length > 0;
|
||||||
}),
|
}),
|
||||||
|
|
||||||
created: attr(),
|
created: attr(),
|
||||||
revised: attr()
|
revised: attr()
|
||||||
});
|
});
|
|
@ -1,45 +1,43 @@
|
||||||
<div class="global-folder-settings">
|
<div class="global-folder-settings">
|
||||||
<div class="input-form form-borderless">
|
<div class="form-bordered">
|
||||||
<form>
|
<div class="form-header">
|
||||||
<div class="heading">
|
<div class="title">{{folders.length}} shared {{label}}</div>
|
||||||
<div class="title">{{folders.length}} shared {{label}}</div>
|
<div class="tip">View and change shared space ownership</div>
|
||||||
<div class="tip">View and change shared space ownership</div>
|
</div>
|
||||||
</div>
|
<div class="input-control">
|
||||||
<div class="input-control">
|
<table class="basic-table">
|
||||||
<table class="basic-table">
|
<thead>
|
||||||
<thead>
|
<tr>
|
||||||
<tr>
|
<th class="bordered">Space</th>
|
||||||
<th class="bordered">Space</th>
|
<th class="bordered">Participants</th>
|
||||||
<th class="bordered">Participants</th>
|
</tr>
|
||||||
</tr>
|
</thead>
|
||||||
</thead>
|
<tbody>
|
||||||
<tbody>
|
{{#each folders as |folder|}}
|
||||||
{{#each folders as |folder|}}
|
<tr>
|
||||||
<tr>
|
<td class="bordered">
|
||||||
<td class="bordered">
|
{{#link-to 'folder' folder.id folder.slug class="alt"}}{{folder.name}}{{/link-to}}
|
||||||
{{#link-to 'folder' folder.id folder.slug class="alt"}}{{folder.name}}{{/link-to}}
|
</td>
|
||||||
</td>
|
<td class="bordered">
|
||||||
<td class="bordered">
|
{{#each folder.sharedWith as |person|}}
|
||||||
{{#each folder.sharedWith as |person|}}
|
{{#if person.isEveryone}}
|
||||||
{{#if person.isEveryone}}
|
Everyone
|
||||||
Everyone
|
{{else}}
|
||||||
{{else}}
|
|
||||||
|
|
||||||
{{#if person.isOwner}}
|
{{#if person.isOwner}}
|
||||||
<span class="bold">{{person.firstname}} {{person.lastname}} (owner)</span>
|
<span class="bold">{{person.firstname}} {{person.lastname}} (owner)</span>
|
||||||
{{else}}
|
{{else}}
|
||||||
{{person.firstname}} {{person.lastname}}
|
{{person.firstname}} {{person.lastname}}
|
||||||
<a class="action-link" {{action "changeOwner" folder.id person.userId}}>make owner</a>
|
<a class="action-link" {{action "changeOwner" folder.id person.userId}}>make owner</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<br/>
|
<br/>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,3 +1 @@
|
||||||
<div class="input-form form-borderless">
|
{{general-settings model=model save=(action 'save')}}
|
||||||
{{general-settings model=model save=(action 'save')}}
|
|
||||||
</div>
|
|
||||||
|
|
|
@ -1,3 +1 @@
|
||||||
<div class="input-form form-borderless">
|
{{global-settings model=model save=(action 'save')}}
|
||||||
{{global-settings model=model save=(action 'save')}}
|
|
||||||
</div>
|
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
<div class="input-form form-borderless">
|
{{user-settings add=(action 'add')}}
|
||||||
{{user-settings add=(action 'add')}}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="clearfix" />
|
<div class="clearfix" />
|
||||||
|
|
||||||
|
|
|
@ -10,11 +10,7 @@
|
||||||
// https://documize.com
|
// https://documize.com
|
||||||
|
|
||||||
import Ember from 'ember';
|
import Ember from 'ember';
|
||||||
|
import NotifierMixin from '../../../mixins/notifier';
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
export default Ember.Controller.extend(NotifierMixin, {
|
||||||
actions: {
|
|
||||||
close() {
|
|
||||||
this.attrs.close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
33
app/app/pods/document/activity/route.js
Normal file
33
app/app/pods/document/activity/route.js
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
||||||
|
//
|
||||||
|
// 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>.
|
||||||
|
//
|
||||||
|
// https://documize.com
|
||||||
|
|
||||||
|
import Ember from 'ember';
|
||||||
|
import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
|
||||||
|
|
||||||
|
export default Ember.Route.extend(AuthenticatedRouteMixin, {
|
||||||
|
documentService: Ember.inject.service('document'),
|
||||||
|
|
||||||
|
model() {
|
||||||
|
this.audit.record("viewed-document-activity");
|
||||||
|
|
||||||
|
return Ember.RSVP.hash({
|
||||||
|
folders: this.modelFor('document').folders,
|
||||||
|
folder: this.modelFor('document').folder,
|
||||||
|
document: this.modelFor('document').document,
|
||||||
|
isEditor: this.modelFor('document').isEditor,
|
||||||
|
pages: this.modelFor('document').allPages,
|
||||||
|
tabs: this.modelFor('document').tabs,
|
||||||
|
activity: this.get('documentService').getMeta(this.modelFor('document').document.get('id')).then((activity) => {
|
||||||
|
return activity;
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
1
app/app/pods/document/activity/template.hbs
Normal file
1
app/app/pods/document/activity/template.hbs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{{document/document-activity document=model.document pages=model.pages activity=model.activity}}
|
|
@ -10,5 +10,138 @@
|
||||||
// https://documize.com
|
// https://documize.com
|
||||||
|
|
||||||
import Ember from 'ember';
|
import Ember from 'ember';
|
||||||
|
import NotifierMixin from '../../mixins/notifier';
|
||||||
|
|
||||||
export default Ember.Controller.extend({});
|
export default Ember.Controller.extend(NotifierMixin, {
|
||||||
|
documentService: Ember.inject.service('document'),
|
||||||
|
templateService: Ember.inject.service('template'),
|
||||||
|
page: null,
|
||||||
|
folder: {},
|
||||||
|
pages: [],
|
||||||
|
|
||||||
|
// Jump to the right part of the document.
|
||||||
|
scrollToPage(pageId) {
|
||||||
|
Ember.run.schedule('afterRender', function () {
|
||||||
|
let dest;
|
||||||
|
let target = "#page-title-" + pageId;
|
||||||
|
let targetOffset = $(target).offset();
|
||||||
|
|
||||||
|
if (is.undefined(targetOffset)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
dest = targetOffset.top > $(document).height() - $(window).height() ? $(document).height() - $(window).height() : targetOffset.top;
|
||||||
|
// small correction to ensure we also show page title
|
||||||
|
dest = dest > 50 ? dest - 74 : dest;
|
||||||
|
|
||||||
|
$("html,body").animate({
|
||||||
|
scrollTop: dest
|
||||||
|
}, 500, "linear");
|
||||||
|
$(".toc-index-item").removeClass("selected");
|
||||||
|
$("#index-" + pageId).addClass("selected");
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
actions: {
|
||||||
|
gotoPage(pageId) {
|
||||||
|
if (is.null(pageId)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.scrollToPage(pageId);
|
||||||
|
},
|
||||||
|
|
||||||
|
onPageSequenceChange(changes) {
|
||||||
|
this.get('documentService').changePageSequence(this.get('model.document.id'), changes).then(() => {
|
||||||
|
_.each(changes, (change) => {
|
||||||
|
let pageContent = _.findWhere(this.get('model.pages'), {
|
||||||
|
id: change.pageId
|
||||||
|
});
|
||||||
|
|
||||||
|
if (is.not.undefined(pageContent)) {
|
||||||
|
pageContent.set('sequence', change.sequence);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
this.set('model.pages', this.get('model.pages').sortBy('sequence'));
|
||||||
|
this.get('target.router').refresh();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
onPageLevelChange(changes) {
|
||||||
|
this.get('documentService').changePageLevel(this.get('model.document.id'), changes).then(() => {
|
||||||
|
_.each(changes, (change) => {
|
||||||
|
let pageContent = _.findWhere(this.get('model.pages'), {
|
||||||
|
id: change.pageId
|
||||||
|
});
|
||||||
|
|
||||||
|
if (is.not.undefined(pageContent)) {
|
||||||
|
pageContent.set('level', change.level);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
let pages = this.get('model.pages');
|
||||||
|
pages = pages.sortBy('sequence');
|
||||||
|
this.set('model.pages', []);
|
||||||
|
this.set('model.pages', pages);
|
||||||
|
this.get('target.router').refresh();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
onSaveTemplate(name, desc) {
|
||||||
|
this.get('templateService').saveAsTemplate(this.get('model.document.id'), name, desc).then(function () {});
|
||||||
|
},
|
||||||
|
|
||||||
|
onAddSection(section) {
|
||||||
|
this.audit.record("added-section-" + section.get('contentType'));
|
||||||
|
|
||||||
|
let page = {
|
||||||
|
documentId: this.get('model.document.id'),
|
||||||
|
title: `${section.get('title')}`,
|
||||||
|
level: 1,
|
||||||
|
sequence: 0,
|
||||||
|
body: "",
|
||||||
|
contentType: section.get('contentType'),
|
||||||
|
pageType: section.get('pageType')
|
||||||
|
};
|
||||||
|
|
||||||
|
let meta = {
|
||||||
|
documentId: this.get('model.document.id'),
|
||||||
|
rawBody: "",
|
||||||
|
config: ""
|
||||||
|
};
|
||||||
|
|
||||||
|
let model = {
|
||||||
|
page: page,
|
||||||
|
meta: meta
|
||||||
|
};
|
||||||
|
|
||||||
|
this.get('documentService').addPage(this.get('model.document.id'), model).then((newPage) => {
|
||||||
|
let data = this.get('store').normalize('page', newPage);
|
||||||
|
this.get('store').push(data);
|
||||||
|
|
||||||
|
this.get('documentService').getPages(this.get('model.document.id')).then((pages) => {
|
||||||
|
this.set('model.pages', pages.filterBy('pageType', 'section'));
|
||||||
|
this.set('model.tabs', pages.filterBy('pageType', 'tab'));
|
||||||
|
|
||||||
|
this.get('documentService').getPageMeta(this.get('model.document.id'), newPage.id).then(() => {
|
||||||
|
this.transitionToRoute('document.edit',
|
||||||
|
this.get('model.folder.id'),
|
||||||
|
this.get('model.folder.slug'),
|
||||||
|
this.get('model.document.id'),
|
||||||
|
this.get('model.document.slug'),
|
||||||
|
newPage.id);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
onDocumentDelete() {
|
||||||
|
this.get('documentService').deleteDocument(this.get('model.document.id')).then(() => {
|
||||||
|
this.audit.record("deleted-page");
|
||||||
|
this.send("showNotification", "Deleted");
|
||||||
|
this.transitionToRoute('folder', this.get('model.folder.id'), this.get('model.folder.slug'));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
|
@ -10,9 +10,8 @@
|
||||||
// https://documize.com
|
// https://documize.com
|
||||||
|
|
||||||
import Ember from 'ember';
|
import Ember from 'ember';
|
||||||
import NotifierMixin from '../../../mixins/notifier';
|
|
||||||
|
|
||||||
export default Ember.Controller.extend(NotifierMixin, {
|
export default Ember.Controller.extend({
|
||||||
documentService: Ember.inject.service('document'),
|
documentService: Ember.inject.service('document'),
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
|
@ -26,8 +25,6 @@ export default Ember.Controller.extend(NotifierMixin, {
|
||||||
|
|
||||||
onAction(page, meta) {
|
onAction(page, meta) {
|
||||||
let self = this;
|
let self = this;
|
||||||
this.showNotification("Saving");
|
|
||||||
|
|
||||||
let model = {
|
let model = {
|
||||||
page: page.toJSON({ includeId: true }),
|
page: page.toJSON({ includeId: true }),
|
||||||
meta: meta.toJSON({ includeId: true })
|
meta: meta.toJSON({ includeId: true })
|
||||||
|
|
|
@ -22,8 +22,8 @@ export default Ember.Route.extend(AuthenticatedRouteMixin, {
|
||||||
this.audit.record("edited-page");
|
this.audit.record("edited-page");
|
||||||
|
|
||||||
return Ember.RSVP.hash({
|
return Ember.RSVP.hash({
|
||||||
folder: self.get('folderService').getFolder(self.paramsFor('document').folder_id),
|
folder: self.modelFor('document').folder,
|
||||||
document: self.modelFor('document'),
|
document: self.modelFor('document').document,
|
||||||
page: self.get('documentService').getPage(self.paramsFor('document').document_id, params.page_id),
|
page: self.get('documentService').getPage(self.paramsFor('document').document_id, params.page_id),
|
||||||
meta: self.get('documentService').getPageMeta(self.paramsFor('document').document_id, params.page_id)
|
meta: self.get('documentService').getPageMeta(self.paramsFor('document').document_id, params.page_id)
|
||||||
});
|
});
|
||||||
|
|
40
app/app/pods/document/files/controller.js
Normal file
40
app/app/pods/document/files/controller.js
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
||||||
|
//
|
||||||
|
// 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>.
|
||||||
|
//
|
||||||
|
// https://documize.com
|
||||||
|
|
||||||
|
import Ember from 'ember';
|
||||||
|
import NotifierMixin from '../../../mixins/notifier';
|
||||||
|
|
||||||
|
export default Ember.Controller.extend(NotifierMixin, {
|
||||||
|
documentService: Ember.inject.service('document'),
|
||||||
|
|
||||||
|
getAttachments() {
|
||||||
|
let self = this;
|
||||||
|
this.get('documentService').getAttachments(this.get('model.document.id')).then(function (files) {
|
||||||
|
self.set('model.files', files);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
actions: {
|
||||||
|
onUpload() {
|
||||||
|
this.getAttachments();
|
||||||
|
},
|
||||||
|
|
||||||
|
onDelete(id, name) {
|
||||||
|
let self = this;
|
||||||
|
|
||||||
|
this.showNotification(`Deleted ${name}`);
|
||||||
|
|
||||||
|
this.get('documentService').deleteAttachment(this.get('model.document.id'), id).then(function () {
|
||||||
|
self.getAttachments();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
}
|
||||||
|
});
|
31
app/app/pods/document/files/route.js
Normal file
31
app/app/pods/document/files/route.js
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
||||||
|
//
|
||||||
|
// 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>.
|
||||||
|
//
|
||||||
|
// https://documize.com
|
||||||
|
|
||||||
|
import Ember from 'ember';
|
||||||
|
import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
|
||||||
|
|
||||||
|
export default Ember.Route.extend(AuthenticatedRouteMixin, {
|
||||||
|
documentService: Ember.inject.service('document'),
|
||||||
|
|
||||||
|
model() {
|
||||||
|
this.audit.record("viewed-document-attachments");
|
||||||
|
|
||||||
|
return Ember.RSVP.hash({
|
||||||
|
folders: this.modelFor('document').folders,
|
||||||
|
folder: this.modelFor('document').folder,
|
||||||
|
document: this.modelFor('document').document,
|
||||||
|
isEditor: this.modelFor('document').isEditor,
|
||||||
|
pages: this.modelFor('document').allPages,
|
||||||
|
tabs: this.modelFor('document').tabs,
|
||||||
|
files: this.get('documentService').getAttachments(this.modelFor('document').document.get('id'))
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
1
app/app/pods/document/files/template.hbs
Normal file
1
app/app/pods/document/files/template.hbs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{{document/document-files document=model.document files=model.files isEditor=model.isEditor onUpload=(action 'onUpload') onDelete=(action 'onDelete')}}
|
|
@ -14,24 +14,7 @@ import NotifierMixin from '../../../mixins/notifier';
|
||||||
|
|
||||||
export default Ember.Controller.extend(NotifierMixin, {
|
export default Ember.Controller.extend(NotifierMixin, {
|
||||||
documentService: Ember.inject.service('document'),
|
documentService: Ember.inject.service('document'),
|
||||||
templateService: Ember.inject.service('template'),
|
|
||||||
|
|
||||||
queryParams: ['page'],
|
queryParams: ['page'],
|
||||||
page: null,
|
|
||||||
folder: {},
|
|
||||||
pages: [],
|
|
||||||
attachments: null,
|
|
||||||
|
|
||||||
getAttachments() {
|
|
||||||
let self = this;
|
|
||||||
this.get('documentService').getAttachments(this.model.get('id')).then(function (attachments) {
|
|
||||||
if (is.array(attachments)) {
|
|
||||||
self.set('attachments', attachments);
|
|
||||||
} else {
|
|
||||||
self.set('attachments', []);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
// Jump to the right part of the document.
|
// Jump to the right part of the document.
|
||||||
scrollToPage(pageId) {
|
scrollToPage(pageId) {
|
||||||
|
@ -66,11 +49,9 @@ export default Ember.Controller.extend(NotifierMixin, {
|
||||||
},
|
},
|
||||||
|
|
||||||
onPageSequenceChange(changes) {
|
onPageSequenceChange(changes) {
|
||||||
let self = this;
|
this.get('documentService').changePageSequence(this.get('model.document.id'), changes).then(() => {
|
||||||
|
_.each(changes, (change) => {
|
||||||
this.get('documentService').changePageSequence(this.model.get('id'), changes).then(function () {
|
let pageContent = _.findWhere(this.get('model.pages'), {
|
||||||
_.each(changes, function (change) {
|
|
||||||
let pageContent = _.findWhere(self.get('pages'), {
|
|
||||||
id: change.pageId
|
id: change.pageId
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -79,16 +60,15 @@ export default Ember.Controller.extend(NotifierMixin, {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
self.set('pages', self.get('pages').sortBy('sequence'));
|
this.set('model.pages', this.get('model.pages').sortBy('sequence'));
|
||||||
|
this.get('target.router').refresh();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
onPageLevelChange(changes) {
|
onPageLevelChange(changes) {
|
||||||
let self = this;
|
this.get('documentService').changePageLevel(this.get('model.document.id'), changes).then(() => {
|
||||||
|
_.each(changes, (change) => {
|
||||||
this.get('documentService').changePageLevel(this.model.get('id'), changes).then(function () {
|
let pageContent = _.findWhere(this.get('model.pages'), {
|
||||||
_.each(changes, function (change) {
|
|
||||||
let pageContent = _.findWhere(self.get('pages'), {
|
|
||||||
id: change.pageId
|
id: change.pageId
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -97,28 +77,17 @@ export default Ember.Controller.extend(NotifierMixin, {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
let pages = self.get('pages');
|
let pages = this.get('model.pages');
|
||||||
pages = pages.sortBy('sequence');
|
pages = pages.sortBy('sequence');
|
||||||
self.set('pages', []);
|
this.set('model.pages', pages);
|
||||||
self.set('pages', pages);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
onAttachmentUpload() {
|
this.get('target.router').refresh();
|
||||||
this.getAttachments();
|
|
||||||
},
|
|
||||||
|
|
||||||
onAttachmentDeleted(id) {
|
|
||||||
let self = this;
|
|
||||||
this.get('documentService').deleteAttachment(this.model.get('id'), id).then(function () {
|
|
||||||
self.getAttachments();
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
onPageDeleted(deletePage) {
|
onPageDeleted(deletePage) {
|
||||||
let self = this;
|
let documentId = this.get('model.document.id');
|
||||||
let documentId = this.get('model.id');
|
let pages = this.get('model.pages');
|
||||||
let pages = this.get('pages');
|
|
||||||
let deleteId = deletePage.id;
|
let deleteId = deletePage.id;
|
||||||
let deleteChildren = deletePage.children;
|
let deleteChildren = deletePage.children;
|
||||||
let page = _.findWhere(pages, {
|
let page = _.findWhere(pages, {
|
||||||
|
@ -127,6 +96,8 @@ export default Ember.Controller.extend(NotifierMixin, {
|
||||||
let pageIndex = _.indexOf(pages, page, false);
|
let pageIndex = _.indexOf(pages, page, false);
|
||||||
let pendingChanges = [];
|
let pendingChanges = [];
|
||||||
|
|
||||||
|
this.audit.record("deleted-page");
|
||||||
|
|
||||||
// select affected pages
|
// select affected pages
|
||||||
for (var i = pageIndex + 1; i < pages.get('length'); i++) {
|
for (var i = pageIndex + 1; i < pages.get('length'); i++) {
|
||||||
if (pages[i].get('level') <= page.get('level')) {
|
if (pages[i].get('level') <= page.get('level')) {
|
||||||
|
@ -145,102 +116,28 @@ export default Ember.Controller.extend(NotifierMixin, {
|
||||||
pageId: deleteId
|
pageId: deleteId
|
||||||
});
|
});
|
||||||
|
|
||||||
this.get('documentService').deletePages(documentId, deleteId, pendingChanges).then(function () {
|
this.get('documentService').deletePages(documentId, deleteId, pendingChanges).then(() => {
|
||||||
// update our models so we don't have to reload from db
|
// update our models so we don't have to reload from db
|
||||||
for (var i = 0; i < pendingChanges.length; i++) {
|
for (var i = 0; i < pendingChanges.length; i++) {
|
||||||
let pageId = pendingChanges[i].pageId;
|
let pageId = pendingChanges[i].pageId;
|
||||||
self.set('pages', _.reject(self.get('pages'), function (p) { //jshint ignore: line
|
this.set('model.pages', _.reject(pages, function (p) { //jshint ignore: line
|
||||||
return p.id === pageId;
|
return p.get('id') === pageId;
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
self.set('pages', _.sortBy(self.get('pages'), "sequence"));
|
this.set('model.pages', _.sortBy(pages, "sequence"));
|
||||||
|
this.get('target.router').refresh();
|
||||||
self.audit.record("deleted-page");
|
|
||||||
|
|
||||||
// fetch document meta
|
|
||||||
self.get('documentService').getMeta(self.model.get('id')).then(function (meta) {
|
|
||||||
self.set('meta', meta);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// page delete followed by re-leveling child pages
|
// page delete followed by re-leveling child pages
|
||||||
this.get('documentService').deletePage(documentId, deleteId).then(function () {
|
this.get('documentService').deletePage(documentId, deleteId).then(() => {
|
||||||
self.set('pages', _.reject(self.get('pages'), function (p) {
|
this.set('model.pages', _.reject(pages, function (p) {
|
||||||
return p.get('id') === deleteId;
|
return p.get('id') === deleteId;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
self.audit.record("deleted-page");
|
this.send('onPageLevelChange', pendingChanges);
|
||||||
|
|
||||||
// fetch document meta
|
|
||||||
self.get('documentService').getMeta(self.model.get('id')).then(function (meta) {
|
|
||||||
self.set('meta', meta);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
self.send('onPageLevelChange', pendingChanges);
|
|
||||||
}
|
}
|
||||||
},
|
|
||||||
|
|
||||||
onSaveTemplate(name, desc) {
|
|
||||||
this.get('templateService').saveAsTemplate(this.model.get('id'), name, desc).then(function () {});
|
|
||||||
},
|
|
||||||
|
|
||||||
onDocumentChange(doc) {
|
|
||||||
let self = this;
|
|
||||||
this.get('documentService').save(doc).then(function () {
|
|
||||||
self.set('model', doc);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
onAddSection(section) {
|
|
||||||
this.audit.record("added-section");
|
|
||||||
this.audit.record("added-section-" + section.get('contentType'));
|
|
||||||
|
|
||||||
let page = {
|
|
||||||
documentId: this.get('model.id'),
|
|
||||||
title: `${section.get('title')} Section`,
|
|
||||||
level: 1,
|
|
||||||
sequence: 2048,
|
|
||||||
body: "",
|
|
||||||
contentType: section.get('contentType')
|
|
||||||
};
|
|
||||||
|
|
||||||
let data = this.get('store').normalize('page', page);
|
|
||||||
let pageData = this.get('store').push(data);
|
|
||||||
|
|
||||||
let meta = {
|
|
||||||
documentId: this.get('model.id'),
|
|
||||||
rawBody: "",
|
|
||||||
config: ""
|
|
||||||
};
|
|
||||||
|
|
||||||
let pageMeta = this.get('store').normalize('page-meta', meta);
|
|
||||||
let pageMetaData = this.get('store').push(pageMeta);
|
|
||||||
|
|
||||||
let model = {
|
|
||||||
page: pageData,
|
|
||||||
meta: pageMetaData
|
|
||||||
};
|
|
||||||
|
|
||||||
this.get('documentService').addPage(this.get('model.id'), model).then((newPage) => {
|
|
||||||
this.transitionToRoute('document.edit',
|
|
||||||
this.get('folder.id'),
|
|
||||||
this.get('folder.slug'),
|
|
||||||
this.get('model.id'),
|
|
||||||
this.get('model.slug'),
|
|
||||||
newPage.id);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
onDocumentDelete() {
|
|
||||||
let self = this;
|
|
||||||
|
|
||||||
this.get('documentService').deleteDocument(this.get('model.id')).then(function () {
|
|
||||||
self.audit.record("deleted-page");
|
|
||||||
self.send("showNotification", "Deleted");
|
|
||||||
self.transitionToRoute('folder', self.get('folder.id'), self.get('folder.slug'));
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -14,97 +14,53 @@ import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-rout
|
||||||
|
|
||||||
export default Ember.Route.extend(AuthenticatedRouteMixin, {
|
export default Ember.Route.extend(AuthenticatedRouteMixin, {
|
||||||
documentService: Ember.inject.service('document'),
|
documentService: Ember.inject.service('document'),
|
||||||
|
linkService: Ember.inject.service('link'),
|
||||||
folderService: Ember.inject.service('folder'),
|
folderService: Ember.inject.service('folder'),
|
||||||
userService: Ember.inject.service('user'),
|
userService: Ember.inject.service('user'),
|
||||||
pages: [],
|
queryParams: {
|
||||||
attachments: [],
|
page: {
|
||||||
users: [],
|
refreshModel: false
|
||||||
meta: [],
|
}
|
||||||
folder: null,
|
|
||||||
|
|
||||||
beforeModel: function (transition) {
|
|
||||||
this.pageId = is.not.undefined(transition.queryParams.page) ? transition.queryParams.page : "";
|
|
||||||
var self = this;
|
|
||||||
|
|
||||||
this.get('folderService').getAll().then(function (folders) {
|
|
||||||
self.set('folders', folders);
|
|
||||||
self.set('folder', folders.findBy("id", self.paramsFor('document').folder_id));
|
|
||||||
self.get('folderService').setCurrentFolder(self.get('folder'));
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
model: function () {
|
beforeModel(transition) {
|
||||||
this.audit.record("viewed-document");
|
this.set('pageId', is.not.undefined(transition.queryParams.page) ? transition.queryParams.page : "");
|
||||||
return this.modelFor('document');
|
this.set('folderId', this.paramsFor('document').folder_id);
|
||||||
},
|
this.set('documentId', this.paramsFor('document').document_id);
|
||||||
|
|
||||||
afterModel: function (model) {
|
let folders = this.get('store').peekAll('folder');
|
||||||
var self = this;
|
let folder = this.get('store').peekRecord('folder', this.get('folderId'));
|
||||||
var documentId = model.get('id');
|
let document = this.get('store').peekRecord('document', this.get('documentId'));
|
||||||
|
|
||||||
this.browser.setTitle(model.get('name'));
|
this.set('document', document);
|
||||||
|
this.set('folders', folders);
|
||||||
|
this.set('folder', folder);
|
||||||
|
|
||||||
// We resolve the promise when all data is ready.
|
return new Ember.RSVP.Promise((resolve) => {
|
||||||
return new Ember.RSVP.Promise(function (resolve) {
|
this.get('documentService').getPages(this.get('documentId')).then((pages) => {
|
||||||
self.get('documentService').getPages(documentId).then(function (pages) {
|
this.set('allPages', pages);
|
||||||
self.set('pages', pages);
|
this.set('pages', pages.filterBy('pageType', 'section'));
|
||||||
|
this.set('tabs', pages.filterBy('pageType', 'tab'));
|
||||||
self.get('documentService').getAttachments(documentId).then(function (attachments) {
|
resolve();
|
||||||
self.set('attachments', is.array(attachments) ? attachments : []);
|
|
||||||
|
|
||||||
if (self.session.authenticated) {
|
|
||||||
self.get('documentService').getMeta(documentId).then(function (meta) {
|
|
||||||
self.set('meta', meta);
|
|
||||||
|
|
||||||
self.get('userService').getFolderUsers(self.get('folder.id')).then(function (users) {
|
|
||||||
self.set('users', users);
|
|
||||||
resolve();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
resolve();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
setupController(controller, model) {
|
model() {
|
||||||
controller.set('model', model);
|
this.browser.setTitle(this.get('document.name'));
|
||||||
controller.set('folder', this.folder);
|
this.browser.setMetaDescription(this.get('document.excerpt'));
|
||||||
controller.set('folders', this.get('folders').rejectBy('id', 0));
|
|
||||||
controller.set('currentPage', this.pageId);
|
|
||||||
controller.set('isEditor', this.get('folderService').get('canEditCurrentFolder'));
|
|
||||||
controller.set('pages', this.get('pages'));
|
|
||||||
controller.set('attachments', this.get('attachments'));
|
|
||||||
controller.set('users', this.get('users'));
|
|
||||||
|
|
||||||
// setup document owner
|
return Ember.RSVP.hash({
|
||||||
let owner = this.get('users').findBy('id', model.get('userId'));
|
folders: this.get('folders'),
|
||||||
|
folder: this.get('folder'),
|
||||||
// no document owner? You are the owner!
|
document: this.get('document'),
|
||||||
if (is.undefined(owner)) {
|
page: this.get('pageId'),
|
||||||
owner = this.session.user;
|
isEditor: this.get('folderService').get('canEditCurrentFolder'),
|
||||||
model.set('userId', this.get('session.session.authenticated.user.id'));
|
allPages: this.get('allPages'),
|
||||||
this.get('documentService').save(model);
|
pages: this.get('pages'),
|
||||||
}
|
tabs: this.get('tabs'),
|
||||||
|
links: this.get('linkService').getDocumentLinks(this.get('documentId'))
|
||||||
controller.set('owner', owner);
|
});
|
||||||
|
|
||||||
// check for no meta
|
|
||||||
let meta = this.get('meta');
|
|
||||||
|
|
||||||
if (is.not.null(meta)) {
|
|
||||||
if (is.null(meta.editors)) {
|
|
||||||
meta.editors = [];
|
|
||||||
}
|
|
||||||
if (is.null(meta.viewers)) {
|
|
||||||
meta.viewers = [];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
controller.set('meta', meta);
|
|
||||||
|
|
||||||
this.browser.setMetaDescription(model.get('excerpt'));
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,17 +1,2 @@
|
||||||
{{layout/zone-navigation}}
|
{{document/document-view document=model.document links=model.links allPages=model.allPages tabs=model.tabs pages=model.pages folder=model.folder folders=model.folders isEditor=model.isEditor
|
||||||
|
gotoPage=(action 'gotoPage') onDeletePage=(action 'onPageDeleted')}}
|
||||||
{{#layout/zone-sidebar}}
|
|
||||||
{{document/document-sidebar document=model meta=meta folder=folder pages=pages page=page owner=owner isEditor=isEditor onAddSection=(action
|
|
||||||
'onAddSection') changePageSequence=(action 'onPageSequenceChange') changePageLevel=(action 'onPageLevelChange') gotoPage=(action
|
|
||||||
'gotoPage')}}
|
|
||||||
{{/layout/zone-sidebar}}
|
|
||||||
|
|
||||||
{{#layout/zone-content}}
|
|
||||||
{{document/document-toolbar document=model pages=pages folder=folder owner=owner isEditor=isEditor users=users onSaveTemplate=(action
|
|
||||||
'onSaveTemplate') onDocumentChange=(action 'onDocumentChange') onAttachmentUpload=(action 'onAttachmentUpload') onDocumentDelete=(action
|
|
||||||
'onDocumentDelete')}}
|
|
||||||
|
|
||||||
{{document/document-view document=model meta=meta pages=pages attachments=attachments folder=folder
|
|
||||||
folders=folders isEditor=isEditor gotoPage=(action 'gotoPage') onAttachmentDeleted=(action 'onAttachmentDeleted') onDeletePage=(action
|
|
||||||
'onPageDeleted')}}
|
|
||||||
{{/layout/zone-content}}
|
|
||||||
|
|
24
app/app/pods/document/meta/controller.js
Normal file
24
app/app/pods/document/meta/controller.js
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
||||||
|
//
|
||||||
|
// 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>.
|
||||||
|
//
|
||||||
|
// https://documize.com
|
||||||
|
|
||||||
|
import Ember from 'ember';
|
||||||
|
|
||||||
|
export default Ember.Controller.extend({
|
||||||
|
documentService: Ember.inject.service('document'),
|
||||||
|
|
||||||
|
actions: {
|
||||||
|
onSave(doc) {
|
||||||
|
this.get('documentService').save(doc).then(() => {
|
||||||
|
this.transitionToRoute('document.index');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
33
app/app/pods/document/meta/route.js
Normal file
33
app/app/pods/document/meta/route.js
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
||||||
|
//
|
||||||
|
// 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>.
|
||||||
|
//
|
||||||
|
// https://documize.com
|
||||||
|
|
||||||
|
import Ember from 'ember';
|
||||||
|
import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
|
||||||
|
|
||||||
|
export default Ember.Route.extend(AuthenticatedRouteMixin, {
|
||||||
|
userService: Ember.inject.service('user'),
|
||||||
|
|
||||||
|
model() {
|
||||||
|
this.audit.record("viewed-document-meta");
|
||||||
|
|
||||||
|
let folderId = this.modelFor('document').folder.get('id');
|
||||||
|
|
||||||
|
return Ember.RSVP.hash({
|
||||||
|
folders: this.modelFor('document').folders,
|
||||||
|
folder: this.modelFor('document').folder,
|
||||||
|
document: this.modelFor('document').document,
|
||||||
|
isEditor: this.modelFor('document').isEditor,
|
||||||
|
pages: this.modelFor('document').allPages,
|
||||||
|
tabs: this.modelFor('document').tabs,
|
||||||
|
users: this.get('userService').getFolderUsers(folderId)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
1
app/app/pods/document/meta/template.hbs
Normal file
1
app/app/pods/document/meta/template.hbs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{{document/document-meta document=model.document folders=model.folders folder=model.folder users=model.users isEditor=model.isEditor onSave=(action 'onSave')}}
|
|
@ -13,15 +13,59 @@ import Ember from 'ember';
|
||||||
import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
|
import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
|
||||||
|
|
||||||
export default Ember.Route.extend(AuthenticatedRouteMixin, {
|
export default Ember.Route.extend(AuthenticatedRouteMixin, {
|
||||||
|
sectionService: Ember.inject.service('section'),
|
||||||
documentService: Ember.inject.service('document'),
|
documentService: Ember.inject.service('document'),
|
||||||
|
folderService: Ember.inject.service('folder'),
|
||||||
|
|
||||||
model: function (params) {
|
beforeModel(transition) {
|
||||||
this.audit.record("viewed-document");
|
this.set('pageId', is.not.undefined(transition.queryParams.page) ? transition.queryParams.page : "");
|
||||||
return this.get('documentService').getDocument(params.document_id);
|
this.set('folderId', this.paramsFor('document').folder_id);
|
||||||
|
this.set('documentId', this.paramsFor('document').document_id);
|
||||||
|
|
||||||
|
return new Ember.RSVP.Promise((resolve) => {
|
||||||
|
this.get('folderService').getAll().then((folders) => {
|
||||||
|
this.set('folders', folders);
|
||||||
|
|
||||||
|
this.get('folderService').getFolder(this.get('folderId')).then((folder) => {
|
||||||
|
this.set('folder', folder);
|
||||||
|
|
||||||
|
this.get('folderService').setCurrentFolder(folder).then(() => {
|
||||||
|
this.set('isEditor', this.get('folderService').get('canEditCurrentFolder'));
|
||||||
|
|
||||||
|
this.get('documentService').getPages(this.get('documentId')).then((pages) => {
|
||||||
|
this.set('allPages', pages);
|
||||||
|
this.set('pages', pages.filterBy('pageType', 'section'));
|
||||||
|
this.set('tabs', pages.filterBy('pageType', 'tab'));
|
||||||
|
resolve();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
model() {
|
||||||
|
return Ember.RSVP.hash({
|
||||||
|
folders: this.get('folders'),
|
||||||
|
folder: this.get('folder'),
|
||||||
|
document: this.get('documentService').getDocument(this.get('documentId')).then((document) => {
|
||||||
|
return document;
|
||||||
|
}),
|
||||||
|
page: this.get('pageId'),
|
||||||
|
isEditor: this.get('isEditor'),
|
||||||
|
allPages: this.get('allPages'),
|
||||||
|
pages: this.get('pages'),
|
||||||
|
tabs: this.get('tabs'),
|
||||||
|
sections: this.get('sectionService').getAll().then((sections) => {
|
||||||
|
return sections.filterBy('pageType', 'section');
|
||||||
|
}),
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
error(error /*, transition*/ ) {
|
error(error /*, transition*/ ) {
|
||||||
|
console.log(error);
|
||||||
|
console.log(error.stack);
|
||||||
if (error) {
|
if (error) {
|
||||||
this.transitionTo('/not-found');
|
this.transitionTo('/not-found');
|
||||||
return false;
|
return false;
|
||||||
|
|
46
app/app/pods/document/section/controller.js
Normal file
46
app/app/pods/document/section/controller.js
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
||||||
|
//
|
||||||
|
// 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>.
|
||||||
|
//
|
||||||
|
// https://documize.com
|
||||||
|
|
||||||
|
import Ember from 'ember';
|
||||||
|
import NotifierMixin from '../../../mixins/notifier';
|
||||||
|
|
||||||
|
export default Ember.Controller.extend(NotifierMixin, {
|
||||||
|
documentService: Ember.inject.service('document'),
|
||||||
|
queryParams: ['mode'],
|
||||||
|
mode: null,
|
||||||
|
|
||||||
|
actions: {
|
||||||
|
onAction(page, meta) {
|
||||||
|
this.showNotification("Saving");
|
||||||
|
|
||||||
|
let model = {
|
||||||
|
page: page.toJSON({ includeId: true }),
|
||||||
|
meta: meta.toJSON({ includeId: true })
|
||||||
|
};
|
||||||
|
|
||||||
|
this.get('documentService').updatePage(page.get('documentId'), page.get('id'), model).then((page) => {
|
||||||
|
this.audit.record("edited-page");
|
||||||
|
let data = this.get('store').normalize('page', page);
|
||||||
|
this.get('store').push(data);
|
||||||
|
this.get('target.router').refresh();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
onDelete(document, page) {
|
||||||
|
this.get('documentService').deletePage(document.get('id'), page.get('id')).then(() => {
|
||||||
|
this.audit.record("deleted-page");
|
||||||
|
this.showNotification('Deleted');
|
||||||
|
this.transitionToRoute('document');
|
||||||
|
this.get('target.router').refresh();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
43
app/app/pods/document/section/route.js
Normal file
43
app/app/pods/document/section/route.js
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
||||||
|
//
|
||||||
|
// 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>.
|
||||||
|
//
|
||||||
|
// https://documize.com
|
||||||
|
|
||||||
|
import Ember from 'ember';
|
||||||
|
import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
|
||||||
|
|
||||||
|
export default Ember.Route.extend(AuthenticatedRouteMixin, {
|
||||||
|
documentService: Ember.inject.service('document'),
|
||||||
|
folderService: Ember.inject.service('folder'),
|
||||||
|
userService: Ember.inject.service('user'),
|
||||||
|
pageId: '',
|
||||||
|
queryParams: {
|
||||||
|
mode: {
|
||||||
|
refreshModel: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
beforeModel(transition) {
|
||||||
|
this.set('mode', !_.isUndefined(transition.queryParams.mode) ? transition.queryParams.mode : '');
|
||||||
|
},
|
||||||
|
|
||||||
|
model(params) {
|
||||||
|
return Ember.RSVP.hash({
|
||||||
|
folders: this.modelFor('document').folders,
|
||||||
|
folder: this.modelFor('document').folder,
|
||||||
|
document: this.modelFor('document').document,
|
||||||
|
pages: this.modelFor('document').pages,
|
||||||
|
tabs: this.get('documentService').getPages(this.modelFor('document').document.get('id')).then((pages) => {
|
||||||
|
return pages.filterBy('pageType', 'tab');
|
||||||
|
}),
|
||||||
|
page: this.get('documentService').getPage(this.modelFor('document').document.get('id'), params.page_id),
|
||||||
|
meta: this.get('documentService').getPageMeta(this.modelFor('document').document.get('id'), params.page_id)
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
1
app/app/pods/document/section/template.hbs
Normal file
1
app/app/pods/document/section/template.hbs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{{document/document-tab mode=mode model=model onAction=(action 'onAction') onDelete=(action 'onDelete')}}
|
|
@ -1 +1,13 @@
|
||||||
{{outlet}}
|
{{layout/zone-navigation}}
|
||||||
|
|
||||||
|
{{#layout/zone-sidebar}}
|
||||||
|
{{document/document-sidebar document=model.document folder=model.folder pages=model.pages page=model.page isEditor=model.isEditor sections=model.sections
|
||||||
|
onAddSection=(action 'onAddSection') changePageSequence=(action 'onPageSequenceChange') changePageLevel=(action 'onPageLevelChange') gotoPage=(action 'gotoPage')}}
|
||||||
|
{{/layout/zone-sidebar}}
|
||||||
|
|
||||||
|
{{#layout/zone-content}}
|
||||||
|
{{document/document-toolbar document=model.document pages=model.pages tabs=model.tabs folder=model.folder isEditor=model.isEditor
|
||||||
|
onSaveTemplate=(action 'onSaveTemplate') onDocumentDelete=(action 'onDocumentDelete')}}
|
||||||
|
|
||||||
|
{{outlet}}
|
||||||
|
{{/layout/zone-content}}
|
||||||
|
|
|
@ -10,42 +10,44 @@ export default Ember.Controller.extend(NotifierMixin, {
|
||||||
},
|
},
|
||||||
|
|
||||||
onAddSection(section) {
|
onAddSection(section) {
|
||||||
this.audit.record("added-section");
|
|
||||||
this.audit.record("added-section-" + section.get('contentType'));
|
this.audit.record("added-section-" + section.get('contentType'));
|
||||||
|
|
||||||
let page = {
|
let page = {
|
||||||
documentId: this.get('model.document.id'),
|
documentId: this.get('model.document.id'),
|
||||||
title: `${section.get('title')} Section`,
|
title: `${section.get('title')}`,
|
||||||
level: 1,
|
level: 1,
|
||||||
sequence: 2048,
|
sequence: 0,
|
||||||
body: "",
|
body: "",
|
||||||
contentType: section.get('contentType')
|
contentType: section.get('contentType'),
|
||||||
|
pageType: section.get('pageType')
|
||||||
};
|
};
|
||||||
|
|
||||||
let data = this.get('store').normalize('page', page);
|
|
||||||
let pageData = this.get('store').push(data);
|
|
||||||
|
|
||||||
let meta = {
|
let meta = {
|
||||||
documentId: this.get('model.document.id'),
|
documentId: this.get('model.document.id'),
|
||||||
rawBody: "",
|
rawBody: "",
|
||||||
config: ""
|
config: "",
|
||||||
|
externaleSource: true
|
||||||
};
|
};
|
||||||
|
|
||||||
let pageMeta = this.get('store').normalize('page-meta', meta);
|
|
||||||
let pageMetaData = this.get('store').push(pageMeta);
|
|
||||||
|
|
||||||
let model = {
|
let model = {
|
||||||
page: pageData,
|
page: page,
|
||||||
meta: pageMetaData
|
meta: meta
|
||||||
};
|
};
|
||||||
|
|
||||||
this.get('documentService').addPage(this.get('model.document.id'), model).then((newPage) => {
|
this.get('documentService').addPage(this.get('model.document.id'), model).then((newPage) => {
|
||||||
this.transitionToRoute('document.edit',
|
let data = this.get('store').normalize('page', newPage);
|
||||||
this.get('model.folder.id'),
|
this.get('store').push(data);
|
||||||
this.get('model.folder.slug'),
|
|
||||||
this.get('model.document.id'),
|
this.get('documentService').getPages(this.get('model.document.id')).then((pages) => {
|
||||||
this.get('model.document.slug'),
|
this.set('model.pages', pages.filterBy('pageType', 'section'));
|
||||||
newPage.id);
|
this.set('model.tabs', pages.filterBy('pageType', 'tab'));
|
||||||
|
|
||||||
|
this.get('documentService').getPageMeta(this.get('model.document.id'), newPage.id).then(() => {
|
||||||
|
let options = {};
|
||||||
|
options['mode'] = 'edit';
|
||||||
|
this.transitionToRoute('document.section', newPage.id, { queryParams: options });
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,17 +2,20 @@ import Ember from 'ember';
|
||||||
import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
|
import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
|
||||||
|
|
||||||
export default Ember.Route.extend(AuthenticatedRouteMixin, {
|
export default Ember.Route.extend(AuthenticatedRouteMixin, {
|
||||||
documentService: Ember.inject.service('document'),
|
documentService: Ember.inject.service('document'),
|
||||||
folderService: Ember.inject.service('folder'),
|
folderService: Ember.inject.service('folder'),
|
||||||
sectionService: Ember.inject.service('section'),
|
sectionService: Ember.inject.service('section'),
|
||||||
|
|
||||||
model() {
|
model() {
|
||||||
let self = this;
|
|
||||||
|
|
||||||
return Ember.RSVP.hash({
|
return Ember.RSVP.hash({
|
||||||
folder: self.get('folderService').getFolder(self.paramsFor('document').folder_id),
|
folders: this.modelFor('document').folders,
|
||||||
document: self.get('documentService').getDocument(self.paramsFor('document').document_id),
|
folder: this.modelFor('document').folder,
|
||||||
sections: self.get('sectionService').getAll()
|
document: this.modelFor('document').document,
|
||||||
|
pages: this.modelFor('document').pages,
|
||||||
|
tabs: this.modelFor('document').tabs,
|
||||||
|
sections: this.get('sectionService').getAll().then(function (sections) {
|
||||||
|
return sections.filterBy('pageType', 'tab');
|
||||||
|
})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{{document/page-wizard document=model.document folder=model.folder sections=model.sections onCancel=(action 'onCancel') onAction=(action 'onAddSection')}}
|
{{document/page-wizard display='tab' document=model.document folder=model.folder sections=model.sections onCancel=(action 'onCancel') onAction=(action 'onAddSection')}}
|
||||||
|
|
|
@ -145,7 +145,6 @@ export default Ember.Route.extend(NotifierMixin, {
|
||||||
var payload = { Message: message, Roles: data };
|
var payload = { Message: message, Roles: data };
|
||||||
|
|
||||||
this.get('folderService').savePermissions(folder.get('id'), payload).then(() => {
|
this.get('folderService').savePermissions(folder.get('id'), payload).then(() => {
|
||||||
this.showNotification("Saved");
|
|
||||||
});
|
});
|
||||||
|
|
||||||
var hasEveryone = _.find(data, function (permission) {
|
var hasEveryone = _.find(data, function (permission) {
|
||||||
|
|
|
@ -32,6 +32,18 @@ export default Router.map(function () {
|
||||||
this.route('document', {
|
this.route('document', {
|
||||||
path: 's/:folder_id/:folder_slug/d/:document_id/:document_slug'
|
path: 's/:folder_id/:folder_slug/d/:document_id/:document_slug'
|
||||||
}, function () {
|
}, function () {
|
||||||
|
this.route('files', {
|
||||||
|
path: 'files'
|
||||||
|
});
|
||||||
|
this.route('meta', {
|
||||||
|
path: 'meta'
|
||||||
|
});
|
||||||
|
this.route('activity', {
|
||||||
|
path: 'activity'
|
||||||
|
});
|
||||||
|
this.route('section', {
|
||||||
|
path: 'section/:page_id'
|
||||||
|
});
|
||||||
this.route('edit', {
|
this.route('edit', {
|
||||||
path: 'edit/:page_id'
|
path: 'edit/:page_id'
|
||||||
});
|
});
|
||||||
|
|
|
@ -124,12 +124,16 @@ export default Ember.Service.extend({
|
||||||
updatePage: function (documentId, pageId, payload, skipRevision) {
|
updatePage: function (documentId, pageId, payload, skipRevision) {
|
||||||
var revision = skipRevision ? "?r=true" : "?r=false";
|
var revision = skipRevision ? "?r=true" : "?r=false";
|
||||||
let url = `documents/${documentId}/pages/${pageId}${revision}`;
|
let url = `documents/${documentId}/pages/${pageId}${revision}`;
|
||||||
|
|
||||||
Ember.set(payload.meta, 'id', parseInt(payload.meta.id));
|
Ember.set(payload.meta, 'id', parseInt(payload.meta.id));
|
||||||
|
|
||||||
return this.get('ajax').request(url, {
|
return this.get('ajax').request(url, {
|
||||||
method: 'PUT',
|
method: 'PUT',
|
||||||
data: JSON.stringify(payload),
|
data: JSON.stringify(payload),
|
||||||
contentType: 'json'
|
contentType: 'json'
|
||||||
|
}).then((response) => {
|
||||||
|
let data = this.get('store').normalize('page', response);
|
||||||
|
return this.get('store').push(data);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,13 @@ export default Ember.Service.extend({
|
||||||
appMeta: service(),
|
appMeta: service(),
|
||||||
store: service(),
|
store: service(),
|
||||||
|
|
||||||
|
// Returns links within specified document
|
||||||
|
getDocumentLinks(documentId) {
|
||||||
|
return this.get('ajax').request(`documents/${documentId}/links`, {
|
||||||
|
method: "GET"
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
// Returns candidate links using provided parameters
|
// Returns candidate links using provided parameters
|
||||||
getCandidates(folderId, documentId, pageId) {
|
getCandidates(folderId, documentId, pageId) {
|
||||||
return this.get('ajax').request(`links/${folderId}/${documentId}/${pageId}`, {
|
return this.get('ajax').request(`links/${folderId}/${documentId}/${pageId}`, {
|
||||||
|
@ -56,7 +63,7 @@ export default Ember.Service.extend({
|
||||||
let endpoint = this.get('appMeta').get('endpoint');
|
let endpoint = this.get('appMeta').get('endpoint');
|
||||||
let orgId = this.get('appMeta').get('orgId');
|
let orgId = this.get('appMeta').get('orgId');
|
||||||
|
|
||||||
if (link.linkType === "section" || link.linkType === "document") {
|
if (link.linkType === "section" || link.linkType === "tab" || link.linkType === "document") {
|
||||||
href = `/link/${link.linkType}/${link.id}`;
|
href = `/link/${link.linkType}/${link.id}`;
|
||||||
result = `<a data-documize='true' data-link-space-id='${link.folderId}' data-link-id='${link.id}' data-link-target-document-id='${link.documentId}' data-link-target-id='${link.targetId}' data-link-type='${link.linkType}' href='${href}'>${link.title}</a>`;
|
result = `<a data-documize='true' data-link-space-id='${link.folderId}' data-link-id='${link.id}' data-link-target-document-id='${link.documentId}' data-link-target-id='${link.targetId}' data-link-type='${link.linkType}' href='${href}'>${link.title}</a>`;
|
||||||
}
|
}
|
||||||
|
@ -112,6 +119,14 @@ export default Ember.Service.extend({
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// handle tab link
|
||||||
|
if (link.linkType === "tab") {
|
||||||
|
let options = {};
|
||||||
|
options['mode'] = 'view';
|
||||||
|
router.transitionTo('document.section', link.targetId, { queryParams: options });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// handle document link
|
// handle document link
|
||||||
if (link.linkType === "document") {
|
if (link.linkType === "document") {
|
||||||
router.transitionTo('document', link.folderId, folderSlug, link.documentId, documentSlug);
|
router.transitionTo('document', link.folderId, folderSlug, link.documentId, documentSlug);
|
||||||
|
@ -125,7 +140,3 @@ export default Ember.Service.extend({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
|
||||||
doc meta to show inbound and outbound links.
|
|
||||||
*/
|
|
||||||
|
|
|
@ -20,12 +20,7 @@
|
||||||
@import "view/page-auth.scss";
|
@import "view/page-auth.scss";
|
||||||
@import "view/page-onboard.scss";
|
@import "view/page-onboard.scss";
|
||||||
@import "view/page-exceptions.scss";
|
@import "view/page-exceptions.scss";
|
||||||
@import "view/document/sidebar.scss";
|
@import "view/document/all.scss";
|
||||||
@import "view/document/content.scss";
|
|
||||||
@import "view/document/wysiwyg.scss";
|
|
||||||
@import "view/document/editor.scss";
|
|
||||||
@import "view/document/wizard.scss";
|
|
||||||
@import "view/document/edit-tools.scss";
|
|
||||||
@import "view/common.scss";
|
@import "view/common.scss";
|
||||||
@import "vendor.scss";
|
@import "vendor.scss";
|
||||||
@import "responsive.scss";
|
@import "responsive.scss";
|
||||||
|
|
|
@ -106,7 +106,7 @@ video.responsive-video {
|
||||||
|
|
||||||
html {
|
html {
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
font-family: $base-font;
|
font-family: $font-regular;
|
||||||
background-color: $color-white;
|
background-color: $color-white;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
|
@ -20,7 +20,7 @@ $color-blue: #2667af;
|
||||||
$color-gray: #8b9096;
|
$color-gray: #8b9096;
|
||||||
$color-goldy: #cc9933;
|
$color-goldy: #cc9933;
|
||||||
|
|
||||||
$color-header: #f3f5f8;
|
$color-sidebar: #f3f5f8;
|
||||||
$color-link: #0092d3;
|
$color-link: #0092d3;
|
||||||
$color-border: #f3f5f8;
|
$color-border: #f3f5f8;
|
||||||
|
|
||||||
|
@ -40,36 +40,47 @@ $color-chip-text: #1b88e3;
|
||||||
.color-white {
|
.color-white {
|
||||||
color: $color-white !important;
|
color: $color-white !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.color-off-white {
|
.color-off-white {
|
||||||
color: $color-off-white !important;
|
color: $color-off-white !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.color-black {
|
.color-black {
|
||||||
color: $color-black !important;
|
color: $color-black !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.color-off-black {
|
.color-off-black {
|
||||||
color: $color-off-black !important;
|
color: $color-off-black !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.color-primary {
|
.color-primary {
|
||||||
color: $color-primary !important;
|
color: $color-primary !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.color-link {
|
.color-link {
|
||||||
color: $color-link !important;
|
color: $color-link !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.color-blue {
|
.color-blue {
|
||||||
color: $color-blue !important;
|
color: $color-blue !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.color-red {
|
.color-red {
|
||||||
color: $color-red !important;
|
color: $color-red !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.color-green {
|
.color-green {
|
||||||
color: $color-green !important;
|
color: $color-green !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.color-gray {
|
.color-gray {
|
||||||
color: $color-gray !important;
|
color: $color-gray !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.background-color-white {
|
.background-color-white {
|
||||||
background-color: $color-white !important;
|
background-color: $color-white !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.background-color-primary {
|
.background-color-primary {
|
||||||
background-color: $color-primary !important;
|
background-color: $color-primary !important;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,61 +1,43 @@
|
||||||
.fixed-width-font {
|
.font-fixed-width {
|
||||||
font-family: 'courier new', courier;
|
font-family: 'courier new', courier;
|
||||||
}
|
}
|
||||||
|
@font-face {
|
||||||
|
font-family: 'open_sansbold';
|
||||||
|
src: url('font/opensans/opensans-bold-webfont.eot');
|
||||||
|
src: url('font/opensans/opensans-bold-webfont.eot?#iefix') format('embedded-opentype'), url('font/opensans/opensans-bold-webfont.woff2') format('woff2'), url('font/opensans/opensans-bold-webfont.woff') format('woff'), url('font/opensans/opensans-bold-webfont.ttf') format('truetype'), url('font/opensans/opensans-bold-webfont.svg#open_sansbold') format('svg');
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
@font-face {
|
||||||
|
font-family: 'open_sanslight';
|
||||||
|
src: url('font/opensans/opensans-light-webfont.eot');
|
||||||
|
src: url('font/opensans/opensans-light-webfont.eot?#iefix') format('embedded-opentype'), url('font/opensans/opensans-light-webfont.woff2') format('woff2'), url('font/opensans/opensans-light-webfont.woff') format('woff'), url('font/opensans/opensans-light-webfont.ttf') format('truetype'), url('font/opensans/opensans-light-webfont.svg#open_sanslight') format('svg');
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
@font-face {
|
||||||
|
font-family: 'open_sansregular';
|
||||||
|
src: url('font/opensans/opensans-regular-webfont.eot');
|
||||||
|
src: url('font/opensans/opensans-regular-webfont.eot?#iefix') format('embedded-opentype'), url('font/opensans/opensans-regular-webfont.woff2') format('woff2'), url('font/opensans/opensans-regular-webfont.woff') format('woff'), url('font/opensans/opensans-regular-webfont.ttf') format('truetype'), url('font/opensans/opensans-regular-webfont.svg#open_sansregular') format('svg');
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
@font-face {
|
||||||
|
font-family: 'open_sanssemibold';
|
||||||
|
src: url('font/opensans/opensans-semibold-webfont.eot');
|
||||||
|
src: url('font/opensans/opensans-semibold-webfont.eot?#iefix') format('embedded-opentype'), url('font/opensans/opensans-semibold-webfont.woff2') format('woff2'), url('font/opensans/opensans-semibold-webfont.woff') format('woff'), url('font/opensans/opensans-semibold-webfont.ttf') format('truetype'), url('font/opensans/opensans-semibold-webfont.svg#open_sanssemibold') format('svg');
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
$font-regular: 'open_sansregular';
|
||||||
|
$font-semibold: 'open_sanssemibold';
|
||||||
|
$font-light: 'open_sanslight';
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'open_sansbold';
|
font-family: "Material Icons";
|
||||||
src: url('font/opensans/opensans-bold-webfont.eot');
|
font-style: normal;
|
||||||
src: url('font/opensans/opensans-bold-webfont.eot?#iefix') format('embedded-opentype'),
|
font-weight: 400;
|
||||||
url('font/opensans/opensans-bold-webfont.woff2') format('woff2'),
|
src: url("font/icons/MaterialIcons-Regular.eot");
|
||||||
url('font/opensans/opensans-bold-webfont.woff') format('woff'),
|
src: local('Material Icons'), local('MaterialIcons-Regular'), url("font/icons/MaterialIcons-Regular.woff2") format('woff2'), url("font/icons/MaterialIcons-Regular.woff") format('woff'), url("font/icons/MaterialIcons-Regular.ttf") format('truetype');
|
||||||
url('font/opensans/opensans-bold-webfont.ttf') format('truetype'),
|
|
||||||
url('font/opensans/opensans-bold-webfont.svg#open_sansbold') format('svg');
|
|
||||||
font-weight: normal;
|
|
||||||
font-style: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
@font-face {
|
|
||||||
font-family: 'open_sanslight';
|
|
||||||
src: url('font/opensans/opensans-light-webfont.eot');
|
|
||||||
src: url('font/opensans/opensans-light-webfont.eot?#iefix') format('embedded-opentype'),
|
|
||||||
url('font/opensans/opensans-light-webfont.woff2') format('woff2'),
|
|
||||||
url('font/opensans/opensans-light-webfont.woff') format('woff'),
|
|
||||||
url('font/opensans/opensans-light-webfont.ttf') format('truetype'),
|
|
||||||
url('font/opensans/opensans-light-webfont.svg#open_sanslight') format('svg');
|
|
||||||
font-weight: normal;
|
|
||||||
font-style: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
@font-face {
|
|
||||||
font-family: 'open_sansregular';
|
|
||||||
src: url('font/opensans/opensans-regular-webfont.eot');
|
|
||||||
src: url('font/opensans/opensans-regular-webfont.eot?#iefix') format('embedded-opentype'),
|
|
||||||
url('font/opensans/opensans-regular-webfont.woff2') format('woff2'),
|
|
||||||
url('font/opensans/opensans-regular-webfont.woff') format('woff'),
|
|
||||||
url('font/opensans/opensans-regular-webfont.ttf') format('truetype'),
|
|
||||||
url('font/opensans/opensans-regular-webfont.svg#open_sansregular') format('svg');
|
|
||||||
font-weight: normal;
|
|
||||||
font-style: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
@font-face {
|
|
||||||
font-family: 'open_sanssemibold';
|
|
||||||
src: url('font/opensans/opensans-semibold-webfont.eot');
|
|
||||||
src: url('font/opensans/opensans-semibold-webfont.eot?#iefix') format('embedded-opentype'),
|
|
||||||
url('font/opensans/opensans-semibold-webfont.woff2') format('woff2'),
|
|
||||||
url('font/opensans/opensans-semibold-webfont.woff') format('woff'),
|
|
||||||
url('font/opensans/opensans-semibold-webfont.ttf') format('truetype'),
|
|
||||||
url('font/opensans/opensans-semibold-webfont.svg#open_sanssemibold') format('svg');
|
|
||||||
font-weight: normal;
|
|
||||||
font-style: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
$base-font: 'open_sansregular';
|
|
||||||
|
|
||||||
@font-face {
|
|
||||||
font-family: "Material Icons";
|
|
||||||
font-style : normal;
|
|
||||||
font-weight: 400;
|
|
||||||
src : url("font/icons/MaterialIcons-Regular.eot");
|
|
||||||
src : local('Material Icons'), local('MaterialIcons-Regular'), url("font/icons/MaterialIcons-Regular.woff2") format('woff2'), url("font/icons/MaterialIcons-Regular.woff") format('woff'), url("font/icons/MaterialIcons-Regular.ttf") format('truetype');
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,6 +26,20 @@
|
||||||
border-top-left-radius: $radius;
|
border-top-left-radius: $radius;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@mixin border-radius-bottom-right($radius)
|
||||||
|
{
|
||||||
|
-webkit-border-bottom-right-radius: $radius;
|
||||||
|
-moz-border-radius-bottomright: $radius;
|
||||||
|
border-bottom-right-radius: $radius;
|
||||||
|
}
|
||||||
|
|
||||||
|
@mixin border-radius-bottom-left($radius)
|
||||||
|
{
|
||||||
|
-webkit-border-bottom-left-radius: $radius;
|
||||||
|
-moz-border-radius-bottomleft: $radius;
|
||||||
|
border-bottom-left-radius: $radius;
|
||||||
|
}
|
||||||
|
|
||||||
@mixin border-radius-none()
|
@mixin border-radius-none()
|
||||||
{
|
{
|
||||||
-webkit-border-radius: none;
|
-webkit-border-radius: none;
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: auto
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.github-repo-title {
|
.github-repo-title {
|
||||||
|
@ -21,7 +21,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.github-list-title {
|
.github-list-title {
|
||||||
font-weight: bold;
|
|
||||||
color: #4c4c4c;
|
color: #4c4c4c;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
margin: 5px;
|
margin: 5px;
|
||||||
|
@ -34,17 +33,16 @@
|
||||||
.github-issue-label {
|
.github-issue-label {
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
color: white;
|
color: white;
|
||||||
padding: 0px 4px;
|
padding: 0 4px;
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
box-shadow: inset 0 -1px 0 rgba(0,0,0,0.12);
|
box-shadow: inset 0 -1px 0 rgba(0,0,0,0.12);
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
line-height: 22px;
|
line-height: 22px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.section-github-render {
|
.section-github-render {
|
||||||
|
|
||||||
a:hover {
|
a:hover {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
@ -62,7 +60,7 @@
|
||||||
|
|
||||||
.heading {
|
.heading {
|
||||||
font-size: 1.6rem;
|
font-size: 1.6rem;
|
||||||
margin: 30px 0 0 0;
|
margin: 30px 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.github-table thead tr th {
|
.github-table thead tr th {
|
||||||
|
@ -73,36 +71,37 @@
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
color:#838d94;
|
color: #838d94;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.github-table tbody tr td {
|
.github-table tbody tr td {
|
||||||
border: none!important;
|
border: none!important;
|
||||||
padding: 5px 20px 5px 20px !important;
|
padding: 5px 20px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.github-table .right-column {
|
.github-table .right-column {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
color:#838d94;
|
color: #838d94;
|
||||||
}
|
}
|
||||||
|
|
||||||
span.data {
|
span.data {
|
||||||
color:#838d94;
|
color: #838d94;
|
||||||
}
|
}
|
||||||
|
|
||||||
.issue-label {
|
.issue-label {
|
||||||
color:white;
|
color: white;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
padding: 4px 6px;
|
padding: 4px 6px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12);
|
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12);
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.progress-bar {
|
.progress-bar {
|
||||||
display: inline-block; border-radius: 3px;
|
display: inline-block;
|
||||||
|
border-radius: 3px;
|
||||||
width: 40%;
|
width: 40%;
|
||||||
background-color: #f1f1f1;
|
background-color: #f1f1f1;
|
||||||
height: 8px;
|
height: 8px;
|
||||||
|
@ -117,8 +116,8 @@
|
||||||
|
|
||||||
span.issue-state {
|
span.issue-state {
|
||||||
float: left;
|
float: left;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
margin-top: 3px;
|
margin-top: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
img.github-avatar {
|
img.github-avatar {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
> .empty-state {
|
> .empty-state {
|
||||||
margin: 30px 0 0;
|
margin: 30px 0;
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
color: $color-gray;
|
color: $color-gray;
|
||||||
font-family: 'open_sanslight';
|
font-family: 'open_sanslight';
|
||||||
|
|
139
app/app/styles/view/document/activity.scss
Normal file
139
app/app/styles/view/document/activity.scss
Normal file
|
@ -0,0 +1,139 @@
|
||||||
|
.document-activity {
|
||||||
|
> .metrics {
|
||||||
|
list-style-type: none;
|
||||||
|
margin: 0 0 30px;
|
||||||
|
padding: 0;
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
> .metric {
|
||||||
|
padding: 0 30px;
|
||||||
|
display: inline-block;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
.label {
|
||||||
|
padding: 0 0 10px;
|
||||||
|
font-family: $font-regular;
|
||||||
|
font-size: 0.9rem;
|
||||||
|
color: $color-gray;
|
||||||
|
}
|
||||||
|
|
||||||
|
.number {
|
||||||
|
font-family: $font-light;
|
||||||
|
font-size: 2rem;
|
||||||
|
color: $color-off-black;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
> .items {
|
||||||
|
list-style-type: none;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
|
> .item {
|
||||||
|
padding: 20px 0;
|
||||||
|
width: 100%;
|
||||||
|
border-bottom: 1px solid $color-border;
|
||||||
|
|
||||||
|
&:last-of-type {
|
||||||
|
border-bottom: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
> .avatar-box {
|
||||||
|
display: inline-block;
|
||||||
|
margin: 3px 10px 0 0;
|
||||||
|
width: 5%;
|
||||||
|
}
|
||||||
|
|
||||||
|
> .name {
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 1rem;
|
||||||
|
font-family: $font-light;
|
||||||
|
color: $color-off-black;
|
||||||
|
width: 25%;
|
||||||
|
}
|
||||||
|
|
||||||
|
> .detail {
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 1rem;
|
||||||
|
font-family: $font-regular;
|
||||||
|
color: $color-off-black;
|
||||||
|
width: 45%;
|
||||||
|
|
||||||
|
.viewed {
|
||||||
|
color: $color-goldy;
|
||||||
|
}
|
||||||
|
|
||||||
|
.added {
|
||||||
|
color: $color-green;
|
||||||
|
}
|
||||||
|
|
||||||
|
.changed {
|
||||||
|
color: $color-blue;
|
||||||
|
}
|
||||||
|
|
||||||
|
.deleted {
|
||||||
|
color: $color-red;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
> .date {
|
||||||
|
display: inline-block;
|
||||||
|
font-family: $font-light;
|
||||||
|
font-size: 1rem;
|
||||||
|
float: right;
|
||||||
|
width: 15%;
|
||||||
|
padding-top: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.meta-editors {
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
> .items {
|
||||||
|
list-style-type: none;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
|
> .item {
|
||||||
|
margin: 15px 0;
|
||||||
|
overflow-x: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
width: 90%;
|
||||||
|
|
||||||
|
.avatar-box {
|
||||||
|
display: inline-block;
|
||||||
|
margin: 3px 10px 0 0;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail {
|
||||||
|
display: inline-block;
|
||||||
|
|
||||||
|
.name {
|
||||||
|
font-size: 1rem;
|
||||||
|
color: $color-off-black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.changed {
|
||||||
|
font-size: 0.9rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.deleted {
|
||||||
|
font-size: 0.9rem;
|
||||||
|
color: $color-red;
|
||||||
|
}
|
||||||
|
|
||||||
|
.date {
|
||||||
|
font-size: 0.8rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
9
app/app/styles/view/document/all.scss
Normal file
9
app/app/styles/view/document/all.scss
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
@import "activity.scss";
|
||||||
|
@import "content.scss";
|
||||||
|
@import "edit-tools.scss";
|
||||||
|
@import "editor.scss";
|
||||||
|
@import "files.scss";
|
||||||
|
@import "sidebar.scss";
|
||||||
|
@import "toolbar.scss";
|
||||||
|
@import "wizard.scss";
|
||||||
|
@import "wysiwyg.scss";
|
|
@ -15,73 +15,13 @@
|
||||||
color: $color-gray;
|
color: $color-gray;
|
||||||
}
|
}
|
||||||
|
|
||||||
.attachment-zone {
|
|
||||||
margin: 20px 0 30px 0;
|
|
||||||
|
|
||||||
> .list {
|
|
||||||
margin: 0;
|
|
||||||
padding: 7px 0;
|
|
||||||
|
|
||||||
> .item {
|
|
||||||
color: $color-off-black;
|
|
||||||
margin-top: 10px;
|
|
||||||
padding: 0;
|
|
||||||
list-style-type: none;
|
|
||||||
border-bottom: 1px dotted $color-border;
|
|
||||||
padding-bottom: 10px;
|
|
||||||
|
|
||||||
> .icon {
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
> a {
|
|
||||||
color: $color-gray;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
color: $color-link;
|
|
||||||
}
|
|
||||||
|
|
||||||
> .file {
|
|
||||||
font-size: 1rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
> .action {
|
|
||||||
float: right;
|
|
||||||
margin-top: -2px;
|
|
||||||
margin-right: 5px;
|
|
||||||
@extend .cursor-pointer;
|
|
||||||
opacity: 0.5;
|
|
||||||
@extend .transition-all;
|
|
||||||
display: none;
|
|
||||||
color: $color-stroke;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
.action {
|
|
||||||
display: inline-block;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.delete-attachment-dialog,
|
|
||||||
.delete-page-dialog {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.is-template {
|
.is-template {
|
||||||
color: $color-gray;
|
color: $color-goldy;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 1.5em;
|
font-size: 1.5em;
|
||||||
margin-bottom: 30px;
|
margin-bottom: 30px;
|
||||||
padding-bottom: 5px;
|
padding-bottom: 5px;
|
||||||
@include border-bottom(1px);
|
border-bottom: 1px dotted $color-goldy;
|
||||||
}
|
}
|
||||||
|
|
||||||
> .pages {
|
> .pages {
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
.document-editor {
|
.document-editor {
|
||||||
> .toolbar {
|
> .toolbar {
|
||||||
@extend .z-depth-tiny;
|
|
||||||
background-color: $color-white;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 20px 40px;
|
padding: 0;
|
||||||
|
|
||||||
> .title {
|
> .title {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
|
@ -12,7 +10,7 @@
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
||||||
> input {
|
> input {
|
||||||
margin: 0 0 5px 0;
|
margin: 0 0 5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,7 +21,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
> .canvas {
|
> .canvas {
|
||||||
padding: 40px 40px;
|
padding: 40px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cancel-edits-dialog {
|
.cancel-edits-dialog {
|
||||||
|
|
82
app/app/styles/view/document/files.scss
Normal file
82
app/app/styles/view/document/files.scss
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
.document-files {
|
||||||
|
margin: 0;
|
||||||
|
|
||||||
|
> .upload-document-files {
|
||||||
|
width: 50%;
|
||||||
|
padding: 20px;
|
||||||
|
margin: 0 auto;
|
||||||
|
text-align: center;
|
||||||
|
color: $color-gray;
|
||||||
|
border: 2px dotted $color-gray;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 1rem;
|
||||||
|
line-height: 1.7rem;
|
||||||
|
@include border-radius(10px);
|
||||||
|
@include ease-in();
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
border-color: $color-link;
|
||||||
|
color: $color-link;
|
||||||
|
}
|
||||||
|
|
||||||
|
> .dz-preview,
|
||||||
|
.dz-processing {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
> .list {
|
||||||
|
margin: 0 0 50px;
|
||||||
|
padding: 7px 0;
|
||||||
|
|
||||||
|
> .item {
|
||||||
|
color: $color-off-black;
|
||||||
|
margin-top: 10px;
|
||||||
|
padding: 0;
|
||||||
|
list-style-type: none;
|
||||||
|
border-bottom: 1px solid $color-border;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
|
||||||
|
&:last-of-type {
|
||||||
|
border-bottom: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
> .icon {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
> a {
|
||||||
|
color: $color-gray;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: $color-link;
|
||||||
|
}
|
||||||
|
|
||||||
|
> .file {
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
> .action {
|
||||||
|
float: right;
|
||||||
|
margin-top: -2px;
|
||||||
|
margin-right: 5px;
|
||||||
|
@extend .cursor-pointer;
|
||||||
|
@extend .transition-all;
|
||||||
|
display: none;
|
||||||
|
color: $color-gray;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
.action {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.delete-attachment-dialog,
|
||||||
|
.delete-page-dialog {
|
||||||
|
display: none;
|
||||||
|
}
|
9
app/app/styles/view/document/section.scss
Normal file
9
app/app/styles/view/document/section.scss
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
.document-section {
|
||||||
|
> .toolbar {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
|
||||||
|
> .buttons {
|
||||||
|
margin: 10px 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -2,57 +2,6 @@
|
||||||
@extend .no-select;
|
@extend .no-select;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
> .summary-line {
|
|
||||||
color: $color-gray;
|
|
||||||
margin: 30px 0;
|
|
||||||
|
|
||||||
> .items {
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
> .divider {
|
|
||||||
margin-right: 20px;
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
|
|
||||||
> .item {
|
|
||||||
list-style-type: none;
|
|
||||||
display: inline-block;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
vertical-align: middle;
|
|
||||||
|
|
||||||
> .metric {
|
|
||||||
@extend .cursor-pointer;
|
|
||||||
text-align: center;
|
|
||||||
color: $color-gray;
|
|
||||||
|
|
||||||
.number {
|
|
||||||
font-size: 1.2rem;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.label {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
font-size: 0.8rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
color: $color-link;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
> .active {
|
|
||||||
> .metric {
|
|
||||||
color: $color-link;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.stuck-toc {
|
.stuck-toc {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 20px;
|
top: 20px;
|
||||||
|
@ -109,7 +58,6 @@
|
||||||
|
|
||||||
.document-structure {
|
.document-structure {
|
||||||
> .toc-controls {
|
> .toc-controls {
|
||||||
text-align: center;
|
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: $color-gray;
|
color: $color-gray;
|
||||||
|
|
||||||
|
@ -140,6 +88,7 @@
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
margin: 20px 0 0;
|
margin: 20px 0 0;
|
||||||
|
font-family: $font-semibold;
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
padding: 4px 0;
|
padding: 4px 0;
|
||||||
|
@ -164,86 +113,3 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.meta-viewers {
|
|
||||||
> .items {
|
|
||||||
list-style-type: none;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
white-space: nowrap;
|
|
||||||
|
|
||||||
> .item {
|
|
||||||
margin: 15px 0;
|
|
||||||
overflow-x: hidden;
|
|
||||||
white-space: nowrap;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
width: 90%;
|
|
||||||
|
|
||||||
> .avatar-box {
|
|
||||||
display: inline-block;
|
|
||||||
margin: 3px 10px 0 0;
|
|
||||||
vertical-align: top;
|
|
||||||
}
|
|
||||||
|
|
||||||
> .detail {
|
|
||||||
display: inline-block;
|
|
||||||
|
|
||||||
> .name {
|
|
||||||
font-size: 1rem;
|
|
||||||
color: $color-off-black;
|
|
||||||
}
|
|
||||||
|
|
||||||
> .date {
|
|
||||||
font-size: 0.8rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.meta-editors {
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
> .items {
|
|
||||||
list-style-type: none;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
white-space: nowrap;
|
|
||||||
|
|
||||||
> .item {
|
|
||||||
margin: 15px 0;
|
|
||||||
overflow-x: hidden;
|
|
||||||
white-space: nowrap;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
width: 90%;
|
|
||||||
|
|
||||||
.avatar-box {
|
|
||||||
display: inline-block;
|
|
||||||
margin: 3px 10px 0 0;
|
|
||||||
vertical-align: top;
|
|
||||||
}
|
|
||||||
|
|
||||||
.detail {
|
|
||||||
display: inline-block;
|
|
||||||
|
|
||||||
.name {
|
|
||||||
font-size: 1rem;
|
|
||||||
color: $color-off-black;
|
|
||||||
}
|
|
||||||
|
|
||||||
.changed {
|
|
||||||
font-size: 0.9rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.deleted {
|
|
||||||
font-size: 0.9rem;
|
|
||||||
color: $color-red;
|
|
||||||
}
|
|
||||||
|
|
||||||
.date {
|
|
||||||
font-size: 0.8rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
88
app/app/styles/view/document/toolbar.scss
Normal file
88
app/app/styles/view/document/toolbar.scss
Normal file
|
@ -0,0 +1,88 @@
|
||||||
|
.document-toolbar {
|
||||||
|
position: relative;
|
||||||
|
margin: -30px 0 40px;
|
||||||
|
height: 60px;
|
||||||
|
padding: 5px 30px 0;
|
||||||
|
background-color: $color-sidebar;
|
||||||
|
@include border-radius-bottom-right(5px);
|
||||||
|
@include border-radius-bottom-left(5px);
|
||||||
|
@extend .no-select;
|
||||||
|
|
||||||
|
> .tabs {
|
||||||
|
width: 80%;
|
||||||
|
height: 50px;
|
||||||
|
margin-top: 15px;
|
||||||
|
display: inline-block;
|
||||||
|
|
||||||
|
> .tab {
|
||||||
|
list-style-type: none;
|
||||||
|
display: inline-block;
|
||||||
|
margin: 0 20px 0 0;
|
||||||
|
padding: 0;
|
||||||
|
color: $color-gray;
|
||||||
|
font-family: $font-semibold;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: $color-link;
|
||||||
|
}
|
||||||
|
|
||||||
|
> a {
|
||||||
|
color: $color-gray;
|
||||||
|
@include ease-in();
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: $color-link;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
> .active {
|
||||||
|
color: $color-link;
|
||||||
|
|
||||||
|
> .add-tab {
|
||||||
|
> i {
|
||||||
|
color: $color-link;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.add-tab {
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: text-top;
|
||||||
|
@include ease-in();
|
||||||
|
|
||||||
|
> i {
|
||||||
|
font-size: 1.5rem;
|
||||||
|
color: $color-gray;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: $color-link;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
> .options {
|
||||||
|
width: 20%;
|
||||||
|
height: 50px;
|
||||||
|
margin-top: 15px;
|
||||||
|
display: inline-block;
|
||||||
|
text-align: right;
|
||||||
|
float: right;
|
||||||
|
|
||||||
|
> .option {
|
||||||
|
list-style-type: none;
|
||||||
|
display: inline-block;
|
||||||
|
margin: 0 0 0 20px;
|
||||||
|
padding: 0;
|
||||||
|
color: $color-gray;
|
||||||
|
cursor: pointer;
|
||||||
|
@include ease-in();
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: $color-link;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
.section-wizard {
|
.section-wizard {
|
||||||
margin: 20px 0 30px 0;
|
margin: 20px 0 30px;
|
||||||
|
|
||||||
> .canvas {
|
> .canvas {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
color: $color-primary;
|
color: $color-primary;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon {
|
.icon {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
@ -65,3 +65,72 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tab-wizard {
|
||||||
|
margin: 20px 0 30px;
|
||||||
|
|
||||||
|
> .canvas {
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
> .list {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
> .item {
|
||||||
|
list-style: none;
|
||||||
|
cursor: pointer;
|
||||||
|
padding: 20px;
|
||||||
|
@include ease-in();
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
@include ease-in();
|
||||||
|
|
||||||
|
> .details {
|
||||||
|
> .title {
|
||||||
|
color: $color-primary;
|
||||||
|
}
|
||||||
|
|
||||||
|
> .desc {
|
||||||
|
color: $color-primary;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
text-align: center;
|
||||||
|
display: inline-block;
|
||||||
|
width: 50px;
|
||||||
|
margin-right: 10px;
|
||||||
|
float: left;
|
||||||
|
|
||||||
|
> .img {
|
||||||
|
float: left;
|
||||||
|
text-align: center;
|
||||||
|
display: inline-block;
|
||||||
|
height: 40px;
|
||||||
|
width: 40px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
> .details {
|
||||||
|
vertical-align: top;
|
||||||
|
display: inline-block;
|
||||||
|
float: left;
|
||||||
|
|
||||||
|
> .title {
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: bold;
|
||||||
|
color: $color-off-black;
|
||||||
|
letter-spacing: 0.5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
> .desc {
|
||||||
|
color: $color-gray;
|
||||||
|
font-size: 0.9rem;
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -39,48 +39,48 @@
|
||||||
|
|
||||||
b
|
b
|
||||||
{
|
{
|
||||||
font-family: "open_sanssemibold";
|
font-family: $font-semibold;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1.doc-name {
|
h1 {
|
||||||
font-size: 2em;
|
font-size: 2em;
|
||||||
font-family: open_sansregular;
|
font-family: $font-semibold;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1
|
// h1
|
||||||
{
|
// {
|
||||||
font-size: 1.6em;
|
// font-size: 1.6em;
|
||||||
font-family: open_sanslight;
|
// font-family: open_sanslight;
|
||||||
color:$color-off-black;
|
// color:$color-off-black;
|
||||||
margin: 30px 0 20px 0;
|
// margin: 0 0 20px 0;
|
||||||
}
|
// }
|
||||||
|
|
||||||
h2
|
h2
|
||||||
{
|
{
|
||||||
font-size: 1.5em;
|
font-size: 1.7em;
|
||||||
margin: 30px 0 20px 0;
|
margin: 30px 0 20px 0;
|
||||||
font-family: open_sanslight;
|
font-family: $font-regular;
|
||||||
}
|
}
|
||||||
|
|
||||||
h3
|
h3
|
||||||
{
|
{
|
||||||
font-size: 1.4rem;
|
font-size: 1.5rem;
|
||||||
margin: 30px 0 20px 0;
|
margin: 30px 0 20px 0;
|
||||||
font-family: open_sanslight;
|
font-family: $font-regular;
|
||||||
}
|
}
|
||||||
|
|
||||||
h4
|
h4
|
||||||
{
|
{
|
||||||
font-size: 1.3rem;
|
font-size: 1.3rem;
|
||||||
margin: 30px 0 20px 0;
|
margin: 30px 0 20px 0;
|
||||||
font-family: open_sanslight;
|
font-family: $font-regular;
|
||||||
}
|
}
|
||||||
|
|
||||||
h5, h6, h7, h8, h9
|
h5, h6, h7, h8, h9
|
||||||
{
|
{
|
||||||
font-size: 1.2rem;
|
font-size: 1.3rem;
|
||||||
margin: 30px 0 20px 0;
|
margin: 30px 0 20px 0;
|
||||||
font-family: open_sanslight;
|
font-family: $font-regular;
|
||||||
}
|
}
|
||||||
|
|
||||||
h2, h3, h4, h5, h6, h7, h8, h9
|
h2, h3, h4, h5, h6, h7, h8, h9
|
||||||
|
@ -88,7 +88,7 @@
|
||||||
.page-title
|
.page-title
|
||||||
{
|
{
|
||||||
color:$color-off-black;
|
color:$color-off-black;
|
||||||
font-family: open_sansregular;
|
font-family: $font-regular;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
|
|
||||||
> .top-zone,
|
> .bottom-zone,
|
||||||
> .bottom-zone {
|
> .top-zone {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -101,7 +101,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.zone-sidebar {
|
.zone-sidebar {
|
||||||
background-color: $color-header;
|
background-color: $color-sidebar;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
padding: 30px 40px 0;
|
padding: 30px 40px 0;
|
||||||
|
@ -116,8 +116,8 @@
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
|
|
||||||
> a > .material-icons,
|
> .material-icons,
|
||||||
> .material-icons {
|
> a > .material-icons {
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
@ -133,6 +133,6 @@
|
||||||
|
|
||||||
.zone-content {
|
.zone-content {
|
||||||
min-height: 500px; //ensure dropdowns render in viewport
|
min-height: 500px; //ensure dropdowns render in viewport
|
||||||
padding: 30px 40px 30px 100px;
|
padding: 30px 40px 30px 110px;
|
||||||
z-index: 777;
|
z-index: 777;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
.auth-box {
|
.auth-box {
|
||||||
height: 450px;
|
height: 500px;
|
||||||
width: 450px;
|
width: 500px;
|
||||||
background-color: $color-white;
|
background-color: $color-white;
|
||||||
border: 1px solid $color-border;
|
border: 1px solid $color-border;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|
|
@ -1,55 +1,55 @@
|
||||||
.page-search {
|
.page-search {
|
||||||
.input-control {
|
.input-control {
|
||||||
> input {
|
> input {
|
||||||
background-color: $color-header;
|
background-color: $color-sidebar;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-results {
|
.search-results {
|
||||||
.heading {
|
.heading {
|
||||||
font-size: 1.2rem;
|
font-size: 1.2rem;
|
||||||
color: $color-off-black;
|
color: $color-off-black;
|
||||||
}
|
}
|
||||||
|
|
||||||
> .list {
|
> .list {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
|
|
||||||
> .item {
|
> .item {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
margin: 0 30px 30px 0;
|
margin: 0 30px 30px 0;
|
||||||
padding-bottom: 40px;
|
padding-bottom: 40px;
|
||||||
border-bottom: 1px solid #e1e1e1;
|
border-bottom: 1px solid #e1e1e1;
|
||||||
|
|
||||||
> .link {
|
> .link {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: $color-off-black;
|
color: $color-off-black;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: $color-link;
|
color: $color-link;
|
||||||
}
|
}
|
||||||
|
|
||||||
> .title {
|
> .title {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
font-size: 1.2rem;
|
font-size: 1.2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
> .folder {
|
> .folder {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
color: $color-gray;
|
color: $color-gray;
|
||||||
margin-left: 15px;
|
margin-left: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
> .excerpt {
|
> .excerpt {
|
||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
> .chips {
|
> .chips {
|
||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
> .references {
|
> .references {
|
||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
|
@ -69,7 +69,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,77 +1,81 @@
|
||||||
* { box-sizing: border-box; }
|
* {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
.input-control {
|
.input-control {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-bottom: 25px;
|
margin-bottom: 50px;
|
||||||
|
|
||||||
> label {
|
> label {
|
||||||
color: $color-input;
|
color: $color-input;
|
||||||
font-size: 1.1em;
|
font-size: 1.1em;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
pointer-events: none;
|
font-family: $font-semibold;
|
||||||
}
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
> .tip {
|
> .tip {
|
||||||
color: $color-input;
|
color: $color-input;
|
||||||
font-size: 0.8em;
|
font-size: 1em;
|
||||||
margin: 5px 0 10px 0;
|
margin: 5px 0 10px;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
font-family: $font-light;
|
||||||
|
}
|
||||||
|
|
||||||
> input,
|
> input,
|
||||||
textarea {
|
textarea {
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
padding: 8px 0 10px 0;
|
padding: 8px 0 10px;
|
||||||
margin: 0 0 15px 0;
|
margin: 0 0 15px;
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border: none;
|
border: none;
|
||||||
border-bottom: 1px solid $color-input;
|
border-bottom: 1px solid $color-input;
|
||||||
height: 2.3rem;
|
height: 2.3rem;
|
||||||
outline: none;
|
outline: none;
|
||||||
|
|
||||||
&:focus {
|
&:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
border-bottom: 1px solid $color-input !important;
|
border-bottom: 1px solid $color-primary !important;
|
||||||
box-shadow: 0 1px 0 0 $color-input !important;
|
box-shadow: 0 1px 0 0 $color-primary !important;
|
||||||
transition: 0.2s ease all;
|
transition: 0.2s ease all;
|
||||||
-moz-transition: 0.2s ease all;
|
-moz-transition: 0.2s ease all;
|
||||||
-webkit-transition: 0.2s ease all;
|
-webkit-transition: 0.2s ease all;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
> textarea {
|
> textarea {
|
||||||
resize: none;
|
resize: none;
|
||||||
height: auto !important;
|
height: auto !important;
|
||||||
overflow-y: hidden;
|
overflow-y: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
> select,
|
> select,
|
||||||
> div select {
|
> div select {
|
||||||
background-color: $color-white;
|
background-color: $color-white;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
border: 1px solid $color-input;
|
border: 1px solid $color-input;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
height: 2.3rem;
|
height: 2.3rem;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|
||||||
&:focus {
|
&:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
border: 1px solid $color-input !important;
|
border: 1px solid $color-input !important;
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
transition: 0.2s ease all;
|
transition: 0.2s ease all;
|
||||||
-moz-transition: 0.2s ease all;
|
-moz-transition: 0.2s ease all;
|
||||||
-webkit-transition: 0.2s ease all;
|
-webkit-transition: 0.2s ease all;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
> .checkbox {
|
> .checkbox {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
padding: 8px 0 10px 0;
|
padding: 8px 0 10px;
|
||||||
margin: 0 0 15px 0;
|
margin: 0 0 15px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
border: none;
|
border: none;
|
||||||
border-bottom: 1px solid $color-input;
|
border-bottom: 1px solid $color-input;
|
||||||
|
@ -89,7 +93,7 @@
|
||||||
|
|
||||||
> input[type='checkbox'] {
|
> input[type='checkbox'] {
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
padding: 8px 0 10px 0;
|
padding: 8px 0 10px;
|
||||||
margin: 0 0 15px 5px;
|
margin: 0 0 15px 5px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
border: none;
|
border: none;
|
||||||
|
@ -108,78 +112,80 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
> label {
|
> label {
|
||||||
color: $color-off-black;
|
color: $color-off-black;
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.error {
|
.error {
|
||||||
border-color: $color-red;
|
border-color: $color-red;
|
||||||
|
|
||||||
&:focus {
|
&:focus {
|
||||||
border-bottom: 1px solid $color-red !important;
|
border-bottom: 1px solid $color-red !important;
|
||||||
box-shadow: 0 1px 0 0 $color-red !important;
|
box-shadow: 0 1px 0 0 $color-red !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
select.error {
|
select.error {
|
||||||
border-color: $color-red;
|
border-color: $color-red;
|
||||||
|
|
||||||
&:focus {
|
&:focus {
|
||||||
border: 1px solid $color-red !important;
|
border: 1px solid $color-red !important;
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-inline {
|
.input-inline {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
width: 97%;
|
width: 97%;
|
||||||
|
|
||||||
> input {
|
> input {
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border: none;
|
border: none;
|
||||||
height: auto;
|
height: auto;
|
||||||
outline: none;
|
outline: none;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|
||||||
&:focus {
|
&:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
border-bottom: none !important;
|
border-bottom: none !important;
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-form {
|
.form-bordered {
|
||||||
border: 1px solid $color-border;
|
padding: 30px 40px;
|
||||||
display: block;
|
border: 10px solid $color-border;
|
||||||
border-radius : 3px;
|
@include border-radius(15px);
|
||||||
background-color: $color-white;
|
}
|
||||||
padding: 30px 50px;
|
|
||||||
|
|
||||||
> .heading, > form .heading {
|
.form-header {
|
||||||
>.title {
|
> .title {
|
||||||
font-size: 1.1rem;
|
font-size: 1.4rem;
|
||||||
font-weight: bold;
|
font-weight: normal;
|
||||||
color: $color-off-black;
|
font-family: $font-semibold;
|
||||||
}
|
pointer-events: none;
|
||||||
|
font-weight: bold;
|
||||||
|
color: $color-off-black;
|
||||||
|
}
|
||||||
|
|
||||||
> .tip {
|
> .tip {
|
||||||
color: $color-input;
|
color: $color-input;
|
||||||
font-size: 0.9em;
|
font-size: 1.2rem;
|
||||||
margin: 5px 0 30px 0;
|
margin: 5px 0 30px;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
text-align: left;
|
font-family: $font-light;
|
||||||
}
|
text-align: left;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -187,11 +193,6 @@
|
||||||
margin-top: 30px;
|
margin-top: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-borderless {
|
|
||||||
padding: 0 !important;
|
|
||||||
border: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.widget-checkbox {
|
.widget-checkbox {
|
||||||
color: $color-link;
|
color: $color-link;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
|
@ -10,8 +10,9 @@
|
||||||
font-size: 1.3rem;
|
font-size: 1.3rem;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
@extend .no-select;
|
|
||||||
color: $color-off-black;
|
color: $color-off-black;
|
||||||
|
@extend .no-select;
|
||||||
|
@include ease-in();
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: $color-link;
|
color: $color-link;
|
||||||
|
|
41
app/app/templates/components/document/document-activity.hbs
Normal file
41
app/app/templates/components/document/document-activity.hbs
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
<div class="document-activity">
|
||||||
|
<ul class="metrics">
|
||||||
|
<li class="metric">
|
||||||
|
<div class="label">created</div>
|
||||||
|
<div class="number">{{time-ago document.created}}</div>
|
||||||
|
</li>
|
||||||
|
<li class="metric">
|
||||||
|
<div class="label">viewers</div>
|
||||||
|
<div class="number">{{activity.viewers.length}}</div>
|
||||||
|
</li>
|
||||||
|
<li class="metric">
|
||||||
|
<div class="label">actions</div>
|
||||||
|
<div class="number">{{activity.editors.length}}</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul class="items">
|
||||||
|
{{#each sortedItems as |e|}}
|
||||||
|
<li class="item">
|
||||||
|
<div class="avatar-box">
|
||||||
|
<div class="avatar">{{user-initials e.item.firstname e.item.lastname}}</div>
|
||||||
|
</div>
|
||||||
|
<div class="name">{{e.item.firstname}} {{e.item.lastname}}</div>
|
||||||
|
<div class="detail">
|
||||||
|
{{#if e.item.deleted}}
|
||||||
|
<div class="deleted">{{e.item.changeLabel}}</div>
|
||||||
|
{{/if}}
|
||||||
|
{{#if e.item.changed}}
|
||||||
|
<div class="changed">{{e.item.changeLabel}}</div>
|
||||||
|
{{/if}}
|
||||||
|
{{#if e.item.added}}
|
||||||
|
<div class="added">{{e.item.changeLabel}}</div>
|
||||||
|
{{/if}}
|
||||||
|
{{#if e.item.viewed}}
|
||||||
|
<div class="viewed">{{e.item.changeLabel}}</div>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
<div class="date">{{time-ago e.date}}</div>
|
||||||
|
</li>
|
||||||
|
{{/each}}
|
||||||
|
</ul>
|
||||||
|
</div>
|
44
app/app/templates/components/document/document-files.hbs
Normal file
44
app/app/templates/components/document/document-files.hbs
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
<div class="document-files">
|
||||||
|
<ul class="list">
|
||||||
|
{{#each files key="id" as |a index|}}
|
||||||
|
<li class="item">
|
||||||
|
<img class="icon" src="/assets/img/attachments/{{document/file-icon a.extension}}" />
|
||||||
|
<a href="{{ appMeta.endpoint }}/public/attachments/{{ appMeta.orgId }}/{{ a.id }}">
|
||||||
|
<span class="file">{{ a.filename }}</span>
|
||||||
|
</a>
|
||||||
|
{{#if isEditor}}
|
||||||
|
<div class="action round-button-mono">
|
||||||
|
<i class="material-icons color-gray delete-attachment-{{a.id}}" title="Delete" {{action 'confirmDeleteAttachment' a.id a.filename}}>delete</i>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
</li>
|
||||||
|
{{/each}}
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
{{#if emptyState}}
|
||||||
|
<div class="explainer">
|
||||||
|
<div class="empty-state">
|
||||||
|
There are no files
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
<div id="upload-document-files" class="upload-document-files">
|
||||||
|
Drag-drop files or click to select files
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="dropdown-dialog delete-attachment-dialog">
|
||||||
|
<div class="content">
|
||||||
|
<p>Are you sure you want to delete <span class="bold">{{deleteAttachment.name}}?</span></p>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<div class="flat-button" {{action 'cancel'}}>
|
||||||
|
cancel
|
||||||
|
</div>
|
||||||
|
<div class="flat-button flat-red" {{action 'deleteAttachment'}}>
|
||||||
|
delete
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="clearfix"></div>
|
||||||
|
</div>
|
27
app/app/templates/components/document/document-meta.hbs
Normal file
27
app/app/templates/components/document/document-meta.hbs
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
<div class="form-bordered">
|
||||||
|
<div class="form-header">
|
||||||
|
<div class="title">Meta Information</div>
|
||||||
|
<div class="tip">Name, owner, excerpt</div>
|
||||||
|
</div>
|
||||||
|
<div class="input-control">
|
||||||
|
<label>Owner</label>
|
||||||
|
<div class="tip">Set the document owner</div>
|
||||||
|
{{ui-select id="document-owner"
|
||||||
|
content=users
|
||||||
|
action=(action (mut owner))
|
||||||
|
optionValuePath="id"
|
||||||
|
optionLabelPath="fullname"
|
||||||
|
selection=owner}}
|
||||||
|
</div>
|
||||||
|
<div class="input-control">
|
||||||
|
<label>Name</label>
|
||||||
|
<div class="tip">Short title for this document</div>
|
||||||
|
{{focus-input type='text' id="document-name" value=document.name}}
|
||||||
|
</div>
|
||||||
|
<div class="input-control">
|
||||||
|
<label>Excerpt</label>
|
||||||
|
<div class="tip">Provide short summary of the document (max. 250)</div>
|
||||||
|
{{textarea value=document.excerpt rows="5" id="meta-excerpt"}}
|
||||||
|
</div>
|
||||||
|
<div class="regular-button button-blue" {{ action 'onSave' }}>Save</div>
|
||||||
|
</div>
|
|
@ -1,6 +0,0 @@
|
||||||
<div class="close-action">
|
|
||||||
<div class="round-button-mono" {{action 'close'}}>
|
|
||||||
<i class="material-icons">clear</i>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="clearfix"></div>
|
|
|
@ -1,20 +0,0 @@
|
||||||
<div class="meta-editors">
|
|
||||||
<ul class="items">
|
|
||||||
{{#each meta.editors as |edit|}}
|
|
||||||
<li class="item">
|
|
||||||
<div class="avatar-box">
|
|
||||||
<div class="avatar">{{user-initials edit.firstname edit.lastname}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="detail">
|
|
||||||
<div class="name">{{edit.firstname}} {{edit.lastname}}</div>
|
|
||||||
{{#if edit.deleted}}
|
|
||||||
<div class="deleted">{{edit.changeLabel}}</div>
|
|
||||||
{{else}}
|
|
||||||
<a class="changed">{{edit.changeLabel}}</a>
|
|
||||||
{{/if}}
|
|
||||||
<div class="date">{{time-ago edit.created}}</div>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
{{/each}}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
|
@ -1,22 +1,24 @@
|
||||||
<div class="document-structure">
|
<div class="document-structure">
|
||||||
{{#if this.session.authenticated}}
|
{{#if this.session.authenticated}}
|
||||||
<div id="tocToolbar" class="hidden-xs hidden-sm toc-controls {{if state.actionablePage 'current-page' ''}}">
|
{{#unless emptyState}}
|
||||||
<div id="toc-up-button" class="round-button-mono {{if state.upDisabled 'disabled'}}" data-tooltip="Move up" data-tooltip-position="top center" {{action 'pageUp'}}>
|
<div id="tocToolbar" class="hidden-xs hidden-sm toc-controls {{if state.actionablePage 'current-page' ''}}">
|
||||||
<i class="material-icons">arrow_upward</i>
|
<div id="toc-up-button" class="round-button-mono {{if state.upDisabled 'disabled'}}" data-tooltip="Move up" data-tooltip-position="top center" {{action 'pageUp'}}>
|
||||||
</div>
|
<i class="material-icons">arrow_upward</i>
|
||||||
<div class="button-gap" />
|
</div>
|
||||||
<div id="toc-down-button" class="round-button-mono {{if state.downDisabled 'disabled'}}" data-tooltip="Move down" data-tooltip-position="top center" {{action 'pageDown'}}>
|
<div class="button-gap" />
|
||||||
<i class="material-icons">arrow_downward</i>
|
<div id="toc-down-button" class="round-button-mono {{if state.downDisabled 'disabled'}}" data-tooltip="Move down" data-tooltip-position="top center" {{action 'pageDown'}}>
|
||||||
</div>
|
<i class="material-icons">arrow_downward</i>
|
||||||
<div class="button-gap" />
|
</div>
|
||||||
<div id="toc-outdent-button" class="round-button-mono {{if state.outdentDisabled 'disabled'}}" data-tooltip="Outdent" data-tooltip-position="top center" {{action 'pageOutdent'}}>
|
<div class="button-gap" />
|
||||||
<i class="material-icons">format_indent_decrease</i>
|
<div id="toc-outdent-button" class="round-button-mono {{if state.outdentDisabled 'disabled'}}" data-tooltip="Outdent" data-tooltip-position="top center" {{action 'pageOutdent'}}>
|
||||||
</div>
|
<i class="material-icons">format_indent_decrease</i>
|
||||||
<div class="button-gap" />
|
</div>
|
||||||
<div id="toc-indent-button" class="round-button-mono {{if state.indentDisabled 'disabled'}}" data-tooltip="Indent" data-tooltip-position="top center" {{action 'pageIndent'}}>
|
<div class="button-gap" />
|
||||||
<i class="material-icons">format_indent_increase</i>
|
<div id="toc-indent-button" class="round-button-mono {{if state.indentDisabled 'disabled'}}" data-tooltip="Indent" data-tooltip-position="top center" {{action 'pageIndent'}}>
|
||||||
</div>
|
<i class="material-icons">format_indent_increase</i>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
{{/unless}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<ul id="document-index" class="entries">
|
<ul id="document-index" class="entries">
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
<div class="meta-viewers">
|
|
||||||
<ul class="items">
|
|
||||||
{{#each meta.viewers as |viewer|}}
|
|
||||||
<li class="item">
|
|
||||||
<div class="avatar-box">
|
|
||||||
<div class="avatar">{{user-initials viewer.firstname viewer.lastname}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="detail">
|
|
||||||
<div class="name">{{viewer.firstname}} {{viewer.lastname}}</div>
|
|
||||||
<div class="date">{{time-ago viewer.created}}</div>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
{{/each}}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
|
@ -1,34 +1,6 @@
|
||||||
<div class="document-sidebar">
|
<div class="document-sidebar">
|
||||||
{{back-to-space folder=folder}}
|
{{back-to-space folder=folder}}
|
||||||
|
<div class="margin-top-40" />
|
||||||
{{#if session.authenticated}}
|
|
||||||
<div class="summary-line hidden-xs hidden-sm">
|
|
||||||
<ul class="items">
|
|
||||||
<li class="item {{if showToc "active"}}" {{action 'showToc'}}>
|
|
||||||
<div class="metric">
|
|
||||||
<div class="number">{{pages.length}}</div>
|
|
||||||
<div class="label">sections</div>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
<li class="divider" />
|
|
||||||
<li class="item {{if showViews "active"}}" {{action 'showViews'}}>
|
|
||||||
<div class="metric">
|
|
||||||
<div class="number">{{meta.viewers.length}}</div>
|
|
||||||
<div class="label">views</div>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
<li class="divider" />
|
|
||||||
<li class="item {{if showContributions "active"}}" {{action 'showContributions'}}>
|
|
||||||
<div class="metric">
|
|
||||||
<div class="number">{{meta.editors.length}}</div>
|
|
||||||
<div class="label">activity</div>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
{{else}}
|
|
||||||
<div class="margin-top-40" />
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
{{#if isEditor}}
|
{{#if isEditor}}
|
||||||
<div {{action 'showSections'}} id="section-tool" class="round-button round-button-mono button-white section-tool" data-tooltip="Content" data-tooltip-position="top center">
|
<div {{action 'showSections'}} id="section-tool" class="round-button round-button-mono button-white section-tool" data-tooltip="Content" data-tooltip-position="top center">
|
||||||
|
@ -48,17 +20,12 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if showToc}}
|
{{#if showToc}}
|
||||||
{{document/document-sidebar-toc document=model folder=folder pages=pages page=page isEditor=isEditor
|
{{document/document-sidebar-toc document=document folder=folder pages=pages page=page isEditor=isEditor
|
||||||
changePageSequence=(action 'onPageSequenceChange') changePageLevel=(action 'onPageLevelChange')
|
changePageSequence=(action 'onPageSequenceChange') changePageLevel=(action 'onPageLevelChange')
|
||||||
gotoPage=(action 'gotoPage')}}
|
gotoPage=(action 'gotoPage')}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if showViews}}
|
|
||||||
{{document/document-sidebar-viewers meta=meta}}
|
|
||||||
{{/if}}
|
|
||||||
{{#if showContributions}}
|
|
||||||
{{document/document-sidebar-edits pages=pages meta=meta}}
|
|
||||||
{{/if}}
|
|
||||||
{{#if showSections}}
|
{{#if showSections}}
|
||||||
{{document/page-wizard document=document folder=folder onCancel=(action 'onCancel') onAction=(action 'onAddSection')}}
|
{{document/page-wizard display='section' document=document folder=folder sections=sections
|
||||||
|
onCancel=(action 'onCancel') onAction=(action 'onAddSection')}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
|
31
app/app/templates/components/document/document-tab.hbs
Normal file
31
app/app/templates/components/document/document-tab.hbs
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
<div class="document-section">
|
||||||
|
{{#if viewMode}}
|
||||||
|
<div class="wysiwyg">
|
||||||
|
<div>
|
||||||
|
<h1 class="pull-left">{{model.page.title}}</h1>
|
||||||
|
<div class="toolbar pull-right">
|
||||||
|
<div class="buttons">
|
||||||
|
<div class="round-button-mono" {{action 'onEdit'}}>
|
||||||
|
<i class="material-icons color-gray">edit</i>
|
||||||
|
</div>
|
||||||
|
<div class="button-gap"></div>
|
||||||
|
<div class="round-button-mono" id="delete-section-button">
|
||||||
|
<i class="material-icons color-gray">delete</i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="clearfix" />
|
||||||
|
{{#dropdown-dialog target="delete-section-button" position="bottom right" button="Delete" color="flat-red" onAction=(action 'onDelete')}}
|
||||||
|
<p>Are you sure you want to delete this section?</p>
|
||||||
|
<p>There is no undo!</p>
|
||||||
|
{{/dropdown-dialog}}
|
||||||
|
|
||||||
|
{{section/base-renderer page=model.page}}
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if editMode}}
|
||||||
|
{{document/document-editor document=model.document folder=model.folder page=model.page meta=model.meta onCancel=(action 'onCancel') onAction=(action 'onAction')}}
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
|
@ -1,37 +1,65 @@
|
||||||
<div class="pull-right hidden-xs hidden-sm">
|
<div class="document-toolbar hidden-xs hidden-sm">
|
||||||
{{#if isEditor}}
|
|
||||||
<div class="button-gap"></div>
|
|
||||||
<div class="round-button-mono" id="set-meta-button" data-tooltip="Set meta" data-tooltip-position="top center">
|
|
||||||
<i class="material-icons color-gray">settings</i>
|
|
||||||
</div>
|
|
||||||
<div class="button-gap"></div>
|
|
||||||
<div class="round-button-mono" id="attachment-button" data-tooltip="Attach file" data-tooltip-position="top center">
|
|
||||||
<i class="material-icons color-gray">attach_file</i>
|
|
||||||
</div>
|
|
||||||
<div class="button-gap"></div>
|
|
||||||
<div class="round-button-mono" id="save-template-button" data-tooltip="Save as template" data-tooltip-position="top center">
|
|
||||||
<i class="material-icons color-gray">content_copy</i>
|
|
||||||
</div>
|
|
||||||
<div class="button-gap"></div>
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
<div class="round-button-mono" id="print-document-button" data-tooltip="Print me" data-tooltip-position="top center" {{action 'printDocument'}}>
|
<ul class="tabs">
|
||||||
<i class="material-icons color-gray">print</i>
|
<li class="tab">
|
||||||
</div>
|
{{#link-to 'document.index'}}Content{{/link-to}}
|
||||||
|
</li>
|
||||||
|
<li class="tab">
|
||||||
|
{{#link-to 'document.files'}}Files{{/link-to}}
|
||||||
|
</li>
|
||||||
|
{{#if isEditor}}
|
||||||
|
<li class="tab">
|
||||||
|
{{#link-to 'document.meta'}}Meta{{/link-to}}
|
||||||
|
</li>
|
||||||
|
{{/if}}
|
||||||
|
{{#if session.authenticated}}
|
||||||
|
<li class="tab">
|
||||||
|
{{#link-to 'document.activity'}}Activity{{/link-to}}
|
||||||
|
</li>
|
||||||
|
{{/if}}
|
||||||
|
{{#each tabs as |tab|}}
|
||||||
|
<li class="tab">
|
||||||
|
{{#link-to 'document.section' tab.id (query-params mode='view')}}{{tab.title}}{{/link-to}}
|
||||||
|
</li>
|
||||||
|
{{/each}}
|
||||||
|
{{#if isEditor}}
|
||||||
|
<li class="tab">
|
||||||
|
{{#link-to 'document.wizard'}}
|
||||||
|
<div id="add-document-tab" class="add-tab" data-tooltip="Tab" data-tooltip-position="bottom center">
|
||||||
|
<i class="material-icons">add</i>
|
||||||
|
</div>
|
||||||
|
{{/link-to}}
|
||||||
|
</li>
|
||||||
|
{{/if}}
|
||||||
|
</ul>
|
||||||
|
|
||||||
{{#if isEditor}}
|
<ul class="options">
|
||||||
<div class="button-gap"></div>
|
{{#if isEditor}}
|
||||||
<div class="round-button-mono button-red-text" id="delete-document-button" data-tooltip="Delete content" data-tooltip-position="top center">
|
<li class="option" id="save-template-button"><i class="material-icons">content_copy</i></li>
|
||||||
<i class="material-icons color-gray">delete</i>
|
{{/if}}
|
||||||
</div>
|
<li class="option" id="document-toolbar-menu"><i class="material-icons">more_horiz</i></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
{{#dropdown-menu target="document-toolbar-menu" position="bottom right" open="click" onOpenCallback=(action 'onMenuOpen') onCloseCallback=(action 'onMenuOpen')}}
|
||||||
|
<ul class="menu">
|
||||||
|
<li class="item" id="print-document-button" {{action 'printDocument'}}>Print</li>
|
||||||
|
{{#if isEditor}}
|
||||||
|
<li class="item" id="save-template-button">Save as template</li>
|
||||||
|
<li class="divider"></li>
|
||||||
|
<li class="item" id="delete-document-button">Delete</li>
|
||||||
|
{{/if}}
|
||||||
|
</ul>
|
||||||
|
{{/dropdown-menu}}
|
||||||
|
|
||||||
|
{{#if menuOpen}}
|
||||||
|
{{#dropdown-dialog target="delete-document-button" position="bottom right" button="Delete" color="flat-red" onAction=(action 'deleteDocument')}}
|
||||||
|
<p>Are you sure you want to delete this document?</p>
|
||||||
|
<p>There is no undo!</p>
|
||||||
|
{{/dropdown-dialog}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if isEditor}}
|
{{#if isEditor}}
|
||||||
{{#dropdown-dialog target="delete-document-button" position="bottom right" button="Delete" color="flat-red" onAction=(action 'deleteDocument')}}
|
{{#dropdown-dialog target="save-template-button" position="bottom right" button="Save as Template" color="flat-green" onAction=(action 'saveTemplate') focusOn="new-template-name" }}
|
||||||
<p>Are you sure you want to delete this document?</p>
|
|
||||||
<p>There is no undo!</p>
|
|
||||||
{{/dropdown-dialog}}
|
|
||||||
{{#dropdown-dialog target="save-template-button" position="bottom right" button="Save as Template" color="flat-green" onAction=(action 'saveTemplate') focusOn="new-template-name"}}
|
|
||||||
<div>
|
<div>
|
||||||
<div class="input-control">
|
<div class="input-control">
|
||||||
<label>Name</label>
|
<label>Name</label>
|
||||||
|
@ -45,30 +73,8 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/dropdown-dialog}}
|
{{/dropdown-dialog}}
|
||||||
{{#dropdown-dialog target="set-meta-button" position="bottom right" button="Save" color="flat-blue" onAction=(action 'saveMeta') selectOn="document-name"}}
|
|
||||||
<div>
|
|
||||||
<div class="input-control">
|
|
||||||
<label>Owner</label>
|
|
||||||
<div class="tip">Set the document owner</div>
|
|
||||||
{{ui-select id="document-owner"
|
|
||||||
content=users
|
|
||||||
action=(action (mut owner))
|
|
||||||
optionValuePath="id"
|
|
||||||
optionLabelPath="fullname"
|
|
||||||
selection=owner}}
|
|
||||||
</div>
|
|
||||||
<div class="input-control">
|
|
||||||
<label>Name</label>
|
|
||||||
<div class="tip">Short title for this document</div>
|
|
||||||
{{input type='text' id="document-name" value=document.name}}
|
|
||||||
</div>
|
|
||||||
<div class="input-control">
|
|
||||||
<label>Excerpt</label>
|
|
||||||
<div class="tip">Provide short summary of the document (max. 250)</div>
|
|
||||||
{{textarea value=document.excerpt rows="5" id="meta-excerpt"}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{/dropdown-dialog}}
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="margin-bottom-20 clearfix" />
|
|
||||||
|
<div class="clearfix" />
|
||||||
|
|
|
@ -1,63 +1,28 @@
|
||||||
<div class="document-view">
|
<div class="document-view">
|
||||||
|
{{#if document.template}}
|
||||||
|
<div class="is-template">TEMPLATE</div>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
<div class="wysiwyg">
|
<div class="wysiwyg">
|
||||||
<h1 class="doc-name">{{document.name}}</h1>
|
<h1 class="doc-name">{{document.name}}</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{#if document.template}}
|
|
||||||
<div class="is-template">TEMPLATE</div>
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
{{document/tag-editor documentTags=document.tags isEditor=isEditor onChange=(action 'onTagChange')}}
|
{{document/tag-editor documentTags=document.tags isEditor=isEditor onChange=(action 'onTagChange')}}
|
||||||
|
|
||||||
<div class="print-title">
|
<div class="print-title">
|
||||||
{{document.name}}
|
{{document.name}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{#if attachments}}
|
|
||||||
<div class="attachment-zone">
|
|
||||||
<ul class="list">
|
|
||||||
{{#each attachments key="id" as |a index|}}
|
|
||||||
<li class="item">
|
|
||||||
<img class="icon" src="/assets/img/attachments/{{document/file-icon a.extension}}" />
|
|
||||||
<a href="{{ appMeta.endpoint }}/public/attachments/{{ appMeta.orgId }}/{{ a.id }}">
|
|
||||||
<span class="file">{{ a.filename }}</span>
|
|
||||||
</a>
|
|
||||||
{{#if isEditor}}
|
|
||||||
<div class="action round-button-mono">
|
|
||||||
<i class="material-icons delete-attachment-{{a.id}}" title="Delete" {{action 'confirmDeleteAttachment' a.id a.filename}}>delete</i>
|
|
||||||
</div>
|
|
||||||
{{/if}}
|
|
||||||
</li>
|
|
||||||
{{/each}}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
<div class="pages">
|
<div class="pages">
|
||||||
{{#each pages key="id" as |page index|}}
|
{{#each pages key="id" as |page index|}}
|
||||||
<div class="wysiwyg">
|
<div class="wysiwyg">
|
||||||
<div id="page-{{ page.id }}" class="is-a-page" data-id="{{ page.id }}" data-type="{{ page.contentType }}">
|
<div id="page-{{ page.id }}" class="is-a-page" data-id="{{ page.id }}" data-type="{{ page.contentType }}">
|
||||||
{{document/page-heading tagName=page.tagName document=document folder=folder page=page isEditor=isEditor onDeletePage=(action 'onDeletePage')}} {{section/base-renderer page=page}}
|
{{document/page-heading tagName=page.tagName document=document folder=folder page=page isEditor=isEditor onDeletePage=(action 'onDeletePage')}}
|
||||||
|
{{section/base-renderer page=page}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="dropdown-dialog delete-attachment-dialog">
|
|
||||||
<div class="content">
|
|
||||||
<p>Are you sure you want to delete <span class="bold">{{deleteAttachment.name}}?</span></p>
|
|
||||||
</div>
|
|
||||||
<div class="actions">
|
|
||||||
<div class="flat-button" {{action 'cancel'}}>
|
|
||||||
cancel
|
|
||||||
</div>
|
|
||||||
<div class="flat-button flat-red" {{action 'deleteAttachment'}}>
|
|
||||||
delete
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="clearfix"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{#if noSections}}
|
{{#if noSections}}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<div class="edit-tools">
|
<div class="edit-tools">
|
||||||
|
|
||||||
<ul class="toolbar">
|
<ul class="toolbar">
|
||||||
<li class="item">
|
<li class="item">
|
||||||
<div class="square-button-mono button-gray" id="content-linker-button" data-tooltip="Reference link" data-tooltip-position="left middle">
|
<div class="square-button-mono button-gray" id="content-linker-button" data-tooltip="Reference link" data-tooltip-position="left middle">
|
||||||
|
@ -80,5 +79,4 @@
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
{{/dropdown-dialog}}
|
{{/dropdown-dialog}}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="section-wizard">
|
<div class="{{display}}-wizard">
|
||||||
<div class="canvas">
|
<div class="canvas">
|
||||||
<ul class="list">
|
<ul class="list">
|
||||||
{{#each sections as |section|}}
|
{{#each sections as |section|}}
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<div id="{{contentId}}" class="dropdown-menu">
|
<div id="{{contentId}}" class="dropdown-menu non-printable">
|
||||||
{{yield}}
|
{{yield}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,83 +1,87 @@
|
||||||
<div class="folder-settings">
|
<div class="folder-settings">
|
||||||
{{#if tabGeneral}}
|
{{#if tabGeneral}}
|
||||||
<div class="input-form form-borderless">
|
<div class="form-bordered">
|
||||||
<form>
|
<div class="input-control">
|
||||||
<div class="input-control">
|
<label>Name</label>
|
||||||
<label>Name</label>
|
<div class="tip">Concise name helps everyone understand what this space contains</div>
|
||||||
<div class="tip">Concise name helps everyone understand what this space contains</div>
|
{{focus-input id="folderName" type="text" value=folder.name}}
|
||||||
{{focus-input id="folderName" type="text" value=folder.name}}
|
</div>
|
||||||
</div>
|
<div class="regular-button button-blue" {{ action 'rename' }}>save</div>
|
||||||
<div class="regular-button button-blue" {{ action 'rename' }}>save</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if tabShare}}
|
{{#if tabShare}}
|
||||||
<div class="input-form form-borderless">
|
<div class="form-bordered">
|
||||||
<form>
|
<div class="form-header">
|
||||||
<div class="input-control">
|
<div class="title">Invitations</div>
|
||||||
<label>Email</label>
|
<div class="tip">Invite people to this space</div>
|
||||||
<div class="tip">Comma separate multiple email addresses</div>
|
</div>
|
||||||
{{focus-input id="inviteEmail" type="text" value=inviteEmail}}
|
<div class="input-control">
|
||||||
</div>
|
<label>Email</label>
|
||||||
<div class="input-control">
|
<div class="tip">Comma separate multiple email addresses</div>
|
||||||
<label>Message</label>
|
{{focus-input id="inviteEmail" type="text" value=inviteEmail}}
|
||||||
<div class="tip">Explain why they are being invited</div>
|
</div>
|
||||||
{{textarea id="explainInvite" value=inviteMessage rows=3}}
|
<div class="input-control">
|
||||||
</div>
|
<label>Message</label>
|
||||||
<div class="regular-button button-blue" {{ action 'share' }}>Share</div>
|
<div class="tip">Explain why they are being invited</div>
|
||||||
</form>
|
{{textarea id="explainInvite" value=inviteMessage rows=3}}
|
||||||
|
</div>
|
||||||
|
<div class="regular-button button-blue" {{ action 'share' }}>Share</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if tabDelete}}
|
{{#if tabDelete}}
|
||||||
<div class="input-form form-borderless">
|
<div class="form-bordered">
|
||||||
<form>
|
<div class="form-header">
|
||||||
<div class="input-control">
|
<div class="title">Danger Here</div>
|
||||||
<label>Move then Delete</label>
|
<div class="tip">Before careful as there is no undo!</div>
|
||||||
<div class="tip">Move existing documents to another space before you delete <strong>{{folder.name}}</strong></div>
|
</div>
|
||||||
{{ui-select id="delete-target" content=folders action=(action (mut moveTarget)) prompt="Select destination"}}
|
<div class="input-control">
|
||||||
</div>
|
<label>Move before delete</label>
|
||||||
<div class="regular-button button-red" {{ action 'remove' }}>delete</div>
|
<div class="tip">Move existing documents to another space before you delete <strong>{{folder.name}}</strong></div>
|
||||||
</form>
|
{{ui-select id="delete-target" content=folders action=(action (mut moveTarget)) prompt="Select destination"}}
|
||||||
|
</div>
|
||||||
|
<div class="regular-button button-red" {{ action 'remove' }}>delete</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if tabPermissions}}
|
{{#if tabPermissions}}
|
||||||
<div class="input-form form-borderless">
|
<div class="form-bordered">
|
||||||
<form>
|
<div class="form-header">
|
||||||
<div class="input-control">
|
<div class="title">Permissions</div>
|
||||||
<label>Permissions</label>
|
<div class="tip">Decide who can see and edit within this space</div>
|
||||||
<div class="tip">The message that gets sent to new invites for <strong>{{folder.name}}</strong></div>
|
</div>
|
||||||
{{textarea id="explainRole" value=roleMessage rows=3}}
|
<div class="input-control">
|
||||||
</div>
|
<label>Permissions</label>
|
||||||
|
<div class="tip">The message that gets sent to new invites for <strong>{{folder.name}}</strong></div>
|
||||||
|
{{textarea id="explainRole" value=roleMessage rows=3}}
|
||||||
|
</div>
|
||||||
|
|
||||||
<table class="basic-table">
|
<table class="basic-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th> </th>
|
<th> </th>
|
||||||
<th>Can View</th>
|
<th>Can View</th>
|
||||||
<th>Can Edit</th>
|
<th>Can Edit</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{{#each permissions key="@index" as |permission|}}
|
{{#each permissions key="@index" as |permission|}}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{permission.fullname}}</td>
|
<td>{{permission.fullname}}</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="checkbox" id="canView-{{permission.userId}}" checked={{permission.canView}} />
|
<input type="checkbox" id="canView-{{permission.userId}}" checked={{permission.canView}} />
|
||||||
<label for="canView-{{permission.userId}}"> </label>
|
<label for="canView-{{permission.userId}}"> </label>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="checkbox" id="canEdit-{{permission.userId}}" checked={{permission.canEdit}} />
|
<input type="checkbox" id="canEdit-{{permission.userId}}" checked={{permission.canEdit}} />
|
||||||
<label for="canEdit-{{permission.userId}}"> </label>
|
<label for="canEdit-{{permission.userId}}"> </label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<div class="regular-button button-blue" {{ action 'setPermissions' }}>Apply</div>
|
<div class="regular-button button-blue" {{ action 'setPermissions' }}>Apply</div>
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
<form>
|
<form>
|
||||||
<div>
|
<div class="form-bordered">
|
||||||
|
<div class="form-header">
|
||||||
|
<div class="title">Instance Settings</div>
|
||||||
|
<div class="tip">Settings applicable to your Documize instance</div>
|
||||||
|
</div>
|
||||||
<div class="input-control">
|
<div class="input-control">
|
||||||
<label>Title</label>
|
<label>Title</label>
|
||||||
<div class="tip">Describe the title of this Documize instance</div>
|
<div class="tip">Describe the title of this Documize instance</div>
|
||||||
|
|
|
@ -1,34 +1,32 @@
|
||||||
<form>
|
<form class="form-bordered">
|
||||||
<div class="input-control">
|
<div class="form-header">
|
||||||
<label>Global Settings</label>
|
<div class="title">Global Settings</div>
|
||||||
<div class="tip">Settings applicable for all tenants</div>
|
<div class="tip">Settings applicable for all tenants</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="input-control">
|
||||||
<div class="input-control">
|
<label>SMTP Host</label>
|
||||||
<label>SMTP Host</label>
|
<div class="tip">e.g. my.host.com</div>
|
||||||
<div class="tip">e.g. my.host.com</div>
|
{{focus-input id="smtp-host" type="text" value=model.global.host class=(if SMTPHostEmptyError 'error')}}
|
||||||
{{focus-input id="smtp-host" type="text" value=model.global.host class=(if SMTPHostEmptyError 'error')}}
|
|
||||||
</div>
|
|
||||||
<div class="input-control">
|
|
||||||
<label>SMTP Port</label>
|
|
||||||
<div class="tip">e.g. 587</div>
|
|
||||||
{{input id="smtp-port" type="text" value=model.global.port class=(if SMTPPortEmptyError 'error')}}
|
|
||||||
</div>
|
|
||||||
<div class="input-control">
|
|
||||||
<label>SMTP Sender</label>
|
|
||||||
<div class="tip">e.g. noreply@documize.com</div>
|
|
||||||
{{input id="smtp-sender" type="text" value=model.global.sender class=(if SMTPSenderEmptyError 'error')}}
|
|
||||||
</div>
|
|
||||||
<div class="input-control">
|
|
||||||
<label>SMTP User ID</label>
|
|
||||||
<div class="tip">Your credentials</div>
|
|
||||||
{{input id="smtp-userid" type="text" value=model.global.userid class=(if SMTPUserIdEmptyError 'error')}}
|
|
||||||
</div>
|
|
||||||
<div class="input-control">
|
|
||||||
<label>SMTP Password</label>
|
|
||||||
<div class="tip">Your credentials</div>
|
|
||||||
{{input id="smtp-password" type="text" value=model.global.password class=(if SMTPPasswordEmptyError 'error')}}
|
|
||||||
</div>
|
|
||||||
<div class="regular-button button-blue" {{ action 'save' }}>save</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="input-control">
|
||||||
|
<label>SMTP Port</label>
|
||||||
|
<div class="tip">e.g. 587</div>
|
||||||
|
{{input id="smtp-port" type="text" value=model.global.port class=(if SMTPPortEmptyError 'error')}}
|
||||||
|
</div>
|
||||||
|
<div class="input-control">
|
||||||
|
<label>SMTP Sender</label>
|
||||||
|
<div class="tip">e.g. noreply@documize.com</div>
|
||||||
|
{{input id="smtp-sender" type="text" value=model.global.sender class=(if SMTPSenderEmptyError 'error')}}
|
||||||
|
</div>
|
||||||
|
<div class="input-control">
|
||||||
|
<label>SMTP User ID</label>
|
||||||
|
<div class="tip">Your credentials</div>
|
||||||
|
{{input id="smtp-userid" type="text" value=model.global.userid class=(if SMTPUserIdEmptyError 'error')}}
|
||||||
|
</div>
|
||||||
|
<div class="input-control">
|
||||||
|
<label>SMTP Password</label>
|
||||||
|
<div class="tip">Your credentials</div>
|
||||||
|
{{input id="smtp-password" type="text" value=model.global.password class=(if SMTPPasswordEmptyError 'error')}}
|
||||||
|
</div>
|
||||||
|
<div class="regular-button button-blue" {{ action 'save' }}>save</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -1,15 +1,8 @@
|
||||||
{{#section/base-editor document=document folder=folder page=page isDirty=(action 'isDirty') onCancel=(action 'onCancel')
|
{{#section/base-editor document=document folder=folder page=page isDirty=(action 'isDirty') onCancel=(action 'onCancel')
|
||||||
onAction=(action 'onAction')}}
|
onAction=(action 'onAction')}}
|
||||||
<div class="input-form">
|
<div class="input-control">
|
||||||
<form>
|
<label>Airtable embed code</label>
|
||||||
<div class="heading">
|
<div class="tip">Paste the Airtable embed code snippet</div>
|
||||||
<div class="title">Airtable</div>
|
{{textarea value=data rows="3" id="airtable-embed-code" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"}}
|
||||||
<div class="tip">Paste the Airtable embed code snippet</div>
|
|
||||||
</div>
|
|
||||||
<div class="input-control">
|
|
||||||
<label>Embed Code</label>
|
|
||||||
{{textarea value=data rows="3" id="airtable-embed-code" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"}}
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
{{/section/base-editor}}
|
{{/section/base-editor}}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<div class="document-editor">
|
<div class="document-editor form-bordered">
|
||||||
<div class="toolbar">
|
<div class="toolbar">
|
||||||
<div class="title pull-left">
|
<div class="title pull-left">
|
||||||
<div class="input-control">
|
<div class="input-control">
|
||||||
<label>Title</label>
|
<label>Title</label>
|
||||||
<div class="tip">{{tip}}</div>
|
<div class="tip">{{tip}}</div>
|
||||||
{{input type='text' id="page-title" value=page.title class="mousetrap"}}
|
{{focus-input type='text' id="page-title" value=page.title class="mousetrap"}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="buttons pull-right">
|
<div class="buttons pull-right">
|
||||||
|
@ -34,4 +34,5 @@
|
||||||
<div class="canvas">
|
<div class="canvas">
|
||||||
{{yield}}
|
{{yield}}
|
||||||
</div>
|
</div>
|
||||||
|
<div class="clearfix"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,53 +1,41 @@
|
||||||
{{#section/base-editor document=document folder=folder page=page busy=waiting tip="Gemini enterprise issue and ticketing software (https://www.countersoft.com)" isDirty=(action 'isDirty') onCancel=(action 'onCancel') onAction=(action 'onAction')}}
|
{{#section/base-editor document=document folder=folder page=page busy=waiting tip="Gemini enterprise issue and ticketing software (https://www.countersoft.com)" isDirty=(action 'isDirty') onCancel=(action 'onCancel') onAction=(action 'onAction')}}
|
||||||
|
|
||||||
<div class="pull-left" style="width: 45%;">
|
<div class="pull-left width-45">
|
||||||
<div class="input-form">
|
<div class="input-control">
|
||||||
<form>
|
<label>Gemini URL</label>
|
||||||
<div class="heading">
|
<div class="tip">e.g. http://helpdesk.countersoft.com</div>
|
||||||
<div class="title">Credentials</div>
|
{{focus-input id="gemini-url" type="text" value=config.url readonly=isReadonly}}
|
||||||
<div class="tip">URL to the Gemini instance</div>
|
|
||||||
</div>
|
|
||||||
<div class="input-control">
|
|
||||||
<label>Gemini URL</label>
|
|
||||||
<div class="tip">e.g. http://helpdesk.countersoft.com</div>
|
|
||||||
{{focus-input id="gemini-url" type="text" value=config.url readonly=isReadonly}}
|
|
||||||
</div>
|
|
||||||
<div class="input-control">
|
|
||||||
<label>Username</label>
|
|
||||||
<div class="tip">Gemini username</div>
|
|
||||||
{{input id="gemini-username" type="text" value=config.username readonly=isReadonly}}
|
|
||||||
</div>
|
|
||||||
<div class="input-control">
|
|
||||||
<label>API Key</label>
|
|
||||||
<div class="tip">Gemini user API key (from user profile)</div>
|
|
||||||
{{input id="gemini-apikey" type="password" value=config.APIKey readonly=isReadonly}}
|
|
||||||
</div>
|
|
||||||
<div class="regular-button button-blue" {{ action 'auth' }}>Authenticate</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="input-control">
|
||||||
|
<label>Username</label>
|
||||||
|
<div class="tip">Gemini username</div>
|
||||||
|
{{input id="gemini-username" type="text" value=config.username readonly=isReadonly}}
|
||||||
|
</div>
|
||||||
|
<div class="input-control">
|
||||||
|
<label>API Key</label>
|
||||||
|
<div class="tip">Gemini user API key (from user profile)</div>
|
||||||
|
{{input id="gemini-apikey" type="password" value=config.APIKey readonly=isReadonly}}
|
||||||
|
</div>
|
||||||
|
<div class="regular-button button-blue" {{ action 'auth' }}>Authenticate</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pull-left margin-left-40" style="width: 45%;">
|
<div class="pull-left margin-left-40 width-45">
|
||||||
{{#if authenticated}}
|
{{#if authenticated}}
|
||||||
<div class="input-form">
|
<div class="input-control">
|
||||||
<form>
|
<label>Workspace</label>
|
||||||
<div class="heading">
|
<div class="tip">Select Gemini workspace for source of items to be displayed</div>
|
||||||
<div class="title">Workspace</div>
|
<ul class="section-gemini-workspaces">
|
||||||
<div class="tip">Select Gemini workspace for source of items to be displayed</div>
|
{{#each workspaces as |card|}}
|
||||||
</div>
|
<li class="section-gemini-workspace" data-tooltip="{{card.Title}}" data-tooltip-position="bottom center" id="gemini-workspace-{{card.Id}}">
|
||||||
<ul class="section-gemini-workspaces">
|
<div class="section-gemini-card" style="background-color:{{card.Color}};" {{action 'onWorkspaceChange' card.Id}}>{{card.Key}}</div>
|
||||||
{{#each workspaces as |card|}}
|
{{#if card.selected}}
|
||||||
<li class="section-gemini-workspace" data-tooltip="{{card.Title}}" data-tooltip-position="bottom center" id="gemini-workspace-{{card.Id}}">
|
<div class="section-gemini-selected-card">✓</div>
|
||||||
<div class="section-gemini-card" style="background-color:{{card.Color}};" {{action 'onWorkspaceChange' card.Id}}>{{card.Key}}</div>
|
{{/if}}
|
||||||
{{#if card.selected}}
|
</li>
|
||||||
<div class="section-gemini-selected-card">✓</div>
|
{{/each}}
|
||||||
{{/if}}
|
</ul>
|
||||||
</li>
|
|
||||||
{{/each}}
|
|
||||||
</ul>
|
|
||||||
<div class="clearfix" />
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="clearfix" />
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -1,22 +1,15 @@
|
||||||
{{#section/base-editor document=document folder=folder page=page busy=busy tip="GitHub is how people build software. (https://github.com)" isDirty=(action 'isDirty') onCancel=(action 'onCancel') onAction=(action 'onAction')}}
|
{{#section/base-editor document=document folder=folder page=page busy=busy tip="GitHub is how people build software. (https://github.com)" isDirty=(action 'isDirty') onCancel=(action 'onCancel') onAction=(action 'onAction')}}
|
||||||
|
|
||||||
<div class="section-github-editor">
|
<div class="section-github-editor">
|
||||||
|
{{#if authenticated}}
|
||||||
{{#if authenticated}}
|
<div class="pull-left width-45">
|
||||||
|
|
||||||
<div class="pull-left width-45">
|
|
||||||
<div class="input-form">
|
|
||||||
<div class="heading">
|
|
||||||
<div class="title">Select Repository</div>
|
|
||||||
<div class="tip">Choose source of code information to be displayed</div>
|
|
||||||
</div>
|
|
||||||
<div class="input-control">
|
<div class="input-control">
|
||||||
<label>Organization or User</label>
|
<label>Select repository</label>
|
||||||
<div class="tip">Select organization or username whose repository you want to show</div>
|
<div class="tip">Select organization or user whose repository you want to show</div>
|
||||||
{{ui-select id="owners-dropdown" content=owners action=(action 'onOwnerChange') optionValuePath="id" optionLabelPath="name" selection=config.owner}}
|
{{ui-select id="owners-dropdown" content=owners action=(action 'onOwnerChange') optionValuePath="id" optionLabelPath="name" selection=config.owner}}
|
||||||
</div>
|
</div>
|
||||||
<div class="input-control">
|
<div class="input-control">
|
||||||
<label>Show items since (default 7 days ago)</label>
|
<label>Show items since</label>
|
||||||
|
<div class="tip">default is 7 days ago</div>
|
||||||
{{input id="branch-since" value=config.branchSince type="text" }}<br>
|
{{input id="branch-since" value=config.branchSince type="text" }}<br>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-control">
|
<div class="input-control">
|
||||||
|
@ -25,55 +18,47 @@
|
||||||
<div class="github-view">
|
<div class="github-view">
|
||||||
{{input id="show-milestone" checked=config.showMilestones type="checkbox"}}
|
{{input id="show-milestone" checked=config.showMilestones type="checkbox"}}
|
||||||
<label>Show Milestones</label>
|
<label>Show Milestones</label>
|
||||||
|
<br/>
|
||||||
{{input id="show-issues" checked=config.showIssues type="checkbox"}}
|
{{input id="show-issues" checked=config.showIssues type="checkbox"}}
|
||||||
<label>Show Issues</label>
|
<label>Show Issues</label>
|
||||||
|
<br/>
|
||||||
{{input id="show-commits" checked=config.showCommits type="checkbox" }}
|
{{input id="show-commits" checked=config.showCommits type="checkbox" }}
|
||||||
<label>Show Commits</label>
|
<label>Show Commits</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="pull-left width-10"> </div>
|
<div class="pull-left width-10"> </div>
|
||||||
|
|
||||||
<div class="pull-left width-45">
|
<div class="pull-left width-45">
|
||||||
<div class="input-form">
|
<div class="input-form">
|
||||||
<div class="input-control">
|
<div class="input-control">
|
||||||
<label>Repositories</label>
|
<label>Repositories</label>
|
||||||
<div class="tip">Select the repository to show</div>
|
<div class="tip">Select the repository to show</div>
|
||||||
<div class="github-board">
|
<div class="github-board">
|
||||||
{{#each config.lists as |list|}}
|
{{#each config.lists as |list|}}
|
||||||
<div class="github-list" {{action 'onListCheckbox' list.id}}>
|
<div class="github-list" {{action 'onListCheckbox' list.id}}>
|
||||||
{{#if list.included}}
|
{{#if list.included}}
|
||||||
<i class="material-icons widget-checkbox checkbox-gray github-list-checkbox">check_box</i>
|
<i class="material-icons widget-checkbox checkbox-gray github-list-checkbox">check_box</i>
|
||||||
{{else}}
|
{{else}}
|
||||||
<i class="material-icons widget-checkbox checkbox-gray github-list-checkbox">check_box_outline_blank</i>
|
<i class="material-icons widget-checkbox checkbox-gray github-list-checkbox">check_box_outline_blank</i>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<span class="github-list-title">{{list.repo}} {{#if list.private}}(private){{/if}}</span>
|
<span class="github-list-title">{{list.repo}} {{#if list.private}}(private){{/if}}</span>
|
||||||
</div>
|
</div>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
<div class="clearfix" />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="clearfix" />
|
||||||
</div>
|
|
||||||
|
|
||||||
{{else}}
|
|
||||||
|
|
||||||
<div class="pull-left width-50">
|
|
||||||
<div class="input-form">
|
|
||||||
<form>
|
|
||||||
<div class="heading">
|
|
||||||
<div class="title">Authentication</div>
|
|
||||||
<div class="tip">Click to authenticate with Github</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="regular-button button-blue" {{ action 'auth' }}>Authenticate</div>
|
</div>
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{{else}}
|
||||||
|
<div class="pull-left width-45">
|
||||||
{{/if}}
|
<div class="input-control">
|
||||||
|
<label>Authentication</label>
|
||||||
|
<div class="tip">Click to authenticate with Github</div>
|
||||||
|
</div>
|
||||||
|
<div class="regular-button button-blue" {{ action 'auth' }}>Authenticate</div>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{/section/base-editor}}
|
{{/section/base-editor}}
|
||||||
|
|
|
@ -1,16 +1,26 @@
|
||||||
{{#section/base-editor document=document folder=folder page=page isDirty=(action 'isDirty') onCancel=(action 'onCancel') onAction=(action 'onAction')}}
|
{{#section/base-editor document=document folder=folder page=page isDirty=(action 'isDirty') onCancel=(action 'onCancel') onAction=(action 'onAction')}}
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
|
{{#if editMode}}
|
||||||
{{focus-textarea id="section-markdown-editor" class="mousetrap bordered" value=pageBody}}
|
<div class="col-xs-11 col-sm-11 col-md-11 col-lg-11">
|
||||||
</div>
|
<div class="margin-bottom-10" >
|
||||||
<div class="col-xs-5 col-sm-5 col-md-5 col-lg-5">
|
<a {{action 'toggleMode'}}>Preview</a>
|
||||||
<div id="section-markdown-preview" class="mousetrap bordered wysiwyg">
|
</div>
|
||||||
|
{{focus-textarea id="section-markdown-editor" class="mousetrap wysiwyg" value=pageBody}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="col-xs-1 col-sm-1 col-md-1 col-lg-1">
|
||||||
<div class="col-xs-1 col-sm-1 col-md-1 col-lg-1">
|
{{document/edit-tools document=document folder=folder page=page onInsertLink=(action 'onInsertLink')}}
|
||||||
{{document/edit-tools document=document folder=folder page=page onInsertLink=(action 'onInsertLink')}}
|
</div>
|
||||||
</div>
|
{{else}}
|
||||||
|
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
|
||||||
|
<div class="margin-bottom-10" >
|
||||||
|
<a {{action 'toggleMode'}}>Edit</a>
|
||||||
|
</div>
|
||||||
|
<div id="section-markdown-preview" class="mousetrap wysiwyg bordered">
|
||||||
|
{{{pagePreview}}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/section/base-editor}}
|
{{/section/base-editor}}
|
||||||
|
|
|
@ -1,58 +1,42 @@
|
||||||
{{#section/base-editor document=document folder=folder page=page busy=waiting tip="Papertrail cloud logging service (https://papertrailapp.com)" isDirty=(action 'isDirty') onCancel=(action 'onCancel') onAction=(action 'onAction')}}
|
{{#section/base-editor document=document folder=folder page=page busy=waiting tip="Papertrail cloud logging service (https://papertrailapp.com)" isDirty=(action 'isDirty') onCancel=(action 'onCancel') onAction=(action 'onAction')}}
|
||||||
|
|
||||||
<div class="pull-left width-45">
|
<div class="pull-left width-45">
|
||||||
<div class="input-form">
|
<form {{ action 'auth' on="submit" }} >
|
||||||
<form {{ action 'auth' on="submit" }} >
|
<div class="input-control">
|
||||||
<div class="heading">
|
<label>Papertrail API Key</label>
|
||||||
<div class="title">Papertrail Authentication
|
<div class="tip">API Token (from your profile)</div>
|
||||||
{{#if authenticated}}
|
{{focus-input id="papertrail-apitoken" type="password" value=config.APIToken }}
|
||||||
Complete
|
</div>
|
||||||
{{/if}}
|
<div class="regular-button button-blue" {{ action 'auth' }} >
|
||||||
</div>
|
{{#if authenticated}}
|
||||||
<div class="tip">Provide your Papertrail API token</div>
|
Re-Authenticate
|
||||||
</div>
|
{{else}}
|
||||||
<div class="input-control">
|
Authenticate
|
||||||
<label>API Key</label>
|
{{/if}}
|
||||||
<div class="tip">API Token (from your profile)</div>
|
</div>
|
||||||
{{focus-input id="papertrail-apitoken" type="password" value=config.APIToken }}
|
</form>
|
||||||
</div>
|
|
||||||
<div class="regular-button button-blue" {{ action 'auth' }} >
|
|
||||||
{{#if authenticated}}
|
|
||||||
Re-Authenticate
|
|
||||||
{{else}}
|
|
||||||
Authenticate
|
|
||||||
{{/if}}
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{#if authenticated}}
|
{{#if authenticated}}
|
||||||
<div class="pull-left width-10"> </div>
|
<div class="pull-left width-10"> </div>
|
||||||
<div class="pull-left width-45">
|
<div class="pull-left width-45">
|
||||||
<div class="input-form">
|
<form {{action 'onAction' on="submit"}}>
|
||||||
<form {{action 'onAction' on="submit"}}>
|
<div class="input-control">
|
||||||
<div class="heading">
|
<label>Search query</label>
|
||||||
<div class="title">Log Filter</div>
|
<div class="tip">Determine which log entries you want to display e.g. bob OR ("some phrase" AND sally)</div>
|
||||||
<div class="tip">Determine which log entries you want to display</div>
|
{{input id="papertrail-query" type="text" class="mousetrap" value=config.query}}
|
||||||
</div>
|
</div>
|
||||||
<div class="input-control">
|
<div class="input-control">
|
||||||
<label>Search Query</label>
|
<label>Maximum results</label>
|
||||||
<div class="tip">e.g. bob OR ("some phrase" AND sally)</div>
|
<div class="tip">How many log entries do you want?</div>
|
||||||
{{input id="papertrail-query" type="text" class="mousetrap" value=config.query}}
|
{{input id="papertrail-max" type="number" class="mousetrap" value=config.max}}
|
||||||
</div>
|
</div>
|
||||||
<div class="input-control">
|
<div class="input-control">
|
||||||
<label>Maximum Results</label>
|
<label>Group</label>
|
||||||
<div class="tip">How many log entries do you want?</div>
|
<div class="tip">Optional Papertrail group</div>
|
||||||
{{input id="papertrail-max" type="number" class="mousetrap" value=config.max}}
|
{{ui-select id="group-dropdown" prompt="<group>" content=options.groups action=(action 'onGroupsChange') optionValuePath="id" optionLabelPath="name" selection=config.group}}
|
||||||
</div>
|
</div>
|
||||||
<div class="input-control">
|
</form>
|
||||||
<label>Group</label>
|
|
||||||
<div class="tip">Optional Papertrail group</div>
|
|
||||||
{{ui-select id="group-dropdown" prompt="<group>" content=options.groups action=(action 'onGroupsChange') optionValuePath="id" optionLabelPath="name" selection=config.group}}
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue