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

Merge pull request #16 from documize/new-ux

New ux
This commit is contained in:
Harvey Kandola 2016-07-02 17:12:54 -07:00 committed by GitHub
commit e0313a3fa3
83 changed files with 1373 additions and 1293 deletions

View file

@ -19,18 +19,13 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, {
folder: {},
pages: [],
page: "",
showToc: false,
tocTools: {
UpTarget: "",
DownTarget: "",
AllowIndent: false,
AllowOutdent: false
},
actionablePage: false,
upDisabled: true,
downDisabled: true,
indentDisabled: true,
outdentDisabled: true,
state: {
actionablePage: false,
upDisabled: true,
downDisabled: true,
indentDisabled: true,
outdentDisabled: true
},
didReceiveAttrs: function() {
this.set('showToc', is.not.undefined(this.get('pages')) && this.get('pages').get('length') > 2);

View file

@ -18,6 +18,16 @@ export default Ember.Component.extend(TooltipMixin, {
document: {},
folder: {},
didRender() {
if (this.session.authenticated) {
this.addTooltip(document.getElementById("owner-avatar"));
}
},
willDestroyElements() {
this.destroyElements();
},
actions: {
// Page up - above pages shunt down.
onPageSequenceChange(pendingChanges) {
@ -31,6 +41,11 @@ export default Ember.Component.extend(TooltipMixin, {
gotoPage(id) {
return this.attrs.gotoPage(id);
},
// close dialog
close() {
return true;
}
}
});

View file

@ -33,13 +33,10 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, {
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("add-section-button"));
}
this.addTooltip(document.getElementById("print-document-button"));
if (this.session.authenticated) {
this.addTooltip(document.getElementById("owner-avatar"));
}
},
didInsertElement() {
@ -138,10 +135,5 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, {
this.attrs.onDocumentChange(doc);
return true;
},
// close dialog
close() {
return true;
},
}
});

View file

@ -14,6 +14,10 @@ import Ember from 'ember';
export default Ember.Component.extend({
selectedDocuments: [],
emptyState: Ember.computed('documents', function() {
return this.get('documents.length') === 0;
}),
didReceiveAttrs() {
this.set('selectedDocuments', []);
this.audit.record('viewed-space');

View file

@ -1,11 +1,11 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
// by contacting <sales@documize.com>.
//
// https://documize.com
@ -20,21 +20,12 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, {
folder: {},
busy: false,
hasSelectedDocuments: false,
selectedDocuments: [],
importedDocuments: [],
savedTemplates: [],
isFolderOwner: false,
moveFolderId: "",
hasDocuments: function() {
return this.documents.get('length') > 0;
}.property('documents.length'),
didReceiveAttrs() {
this.set('hasSelectedDocuments', false);
this.set('selectedDocuments', []);
this.set('importedDocuments', []);
this.set('isFolderOwner', this.get('folder.userId') === this.session.user.id);
let self = this;
@ -52,6 +43,7 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, {
let targets = _.reject(this.get('folders'), {
id: this.get('folder').get('id')
});
this.set('movedFolderOptions', targets);
},
@ -79,11 +71,6 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, {
},
actions: {
onDocumentsChecked(documents) {
this.set('selectedDocuments', documents);
this.set('hasSelectedDocuments', documents.length > 0);
},
onEditTemplate(template) {
this.navigateToDocument(template);
},
@ -121,20 +108,7 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, {
},
deleteDocuments() {
let documents = this.get('selectedDocuments');
let self = this;
documents.forEach(function(document) {
self.get('documentService').deleteDocument(document).then(function() {
self.get('refresh')();
});
});
this.set('selectedDocuments', []);
this.set('hasSelectedDocuments', false);
this.send("showNotification", "Deleted");
return true;
this.attrs.onDeleteDocument();
},
setMoveFolder(folderId) {
@ -152,11 +126,10 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, {
return false;
}
this.get('onMoveDocument')(this.get('selectedDocuments'), this.get('moveFolderId'));
this.attrs.onMoveDocument(this.get('moveFolderId'));
this.set("moveFolderId", "");
this.send("showNotification", "Moved");
return true;
}
}
});
});

View file

@ -1,28 +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({
filter: "",
didInitAttrs() {
this.get('onFilter')(this.get('filter'));
},
onKeywordChange: function() {
Ember.run.debounce(this, this.fetch, 750);
}.observes('filter'),
fetch() {
this.get('onFilter')(this.get('filter'));
},
});

View file

@ -1,14 +1,14 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
export default Ember.Component.extend({});
export default Ember.Component.extend({});

View file

@ -1,14 +1,15 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
export default Ember.Component.extend({});
export default Ember.Component.extend({
});

View file

@ -0,0 +1,21 @@
// 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({
title: "",
message: "",
hasMessage: Ember.computed('message', function() {
return this.get('message').length !== 0;
})
});

View file

@ -1,11 +1,11 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
// by contacting <sales@documize.com>.
//
// https://documize.com
@ -13,12 +13,8 @@ import Ember from 'ember';
import netUtil from '../../utils/net';
export default Ember.Component.extend({
dashboardMode: false,
searchMode: false,
profileMode: false,
settingsMode: false,
folderMode: false,
documentMode: false,
folderService: Ember.inject.service('folder'),
folder: null,
didInitAttrs() {
let self = this;
@ -29,10 +25,16 @@ export default Ember.Component.extend({
}
},
didReceiveAttrs() {
if (this.get('folder') === null) {
this.set("folder", this.get('folderService.currentFolder'));
}
},
actions: {
switchAccount(domain) {
this.audit.record('switched-account');
window.location.href = netUtil.getAppUrl(domain);
}
}
});
});

View file

@ -1,14 +1,15 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
export default Ember.Component.extend({});
export default Ember.Component.extend({
});

View file

@ -1,11 +1,11 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
// by contacting <sales@documize.com>.
//
// https://documize.com
@ -16,18 +16,41 @@ export default Ember.Component.extend({
resultPhrase: "",
didReceiveAttrs() {
let count = this.get('results').length;
let self = this;
let results = this.get('results');
let temp = _.groupBy(results, 'documentId');
let documents = [];
switch (count) {
case 0:
self.set("resultPhrase", "No results.");
break;
case 1:
self.set("resultPhrase", "1 reference found");
break;
default:
self.set("resultPhrase", `${count} references found`);
_.each(temp, function(document) {
let refs = [];
if (document.length > 1) {
refs = document.slice(1);
}
_.each(refs, function(ref, index) {
ref.comma = index === refs.length-1 ? "" : ", ";
});
let hasRefs = refs.length > 0;
documents.pushObject( {
doc: document[0],
ref: refs,
hasReferences: hasRefs
});
});
let phrase = 'Nothing found';
if (results.length > 0) {
let places = documents.length === 1 ? "place" : "places";
let references = results.length === 1 ? "secton" : "sections";
let i = results.length;
let j = documents.length;
phrase = `${i} ${references} in ${j} ${places}`;
}
this.set('resultPhrase', phrase);
this.set('documents', documents);
}
});
});

View file

@ -1,11 +1,11 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
// by contacting <sales@documize.com>.
//
// https://documize.com
@ -31,6 +31,15 @@ export function documentFileIcon(params) {
case "mp4":
html = "avi.png";
break;
case "html":
html = "html.png";
break;
case "css":
html = "css.png";
break;
case "bat":
case "sh":
case "ps":
@ -41,13 +50,12 @@ export function documentFileIcon(params) {
case "java":
case "go":
case "js":
case "html":
case "rb":
case "py":
case "css":
case "json":
case "config":
html = "bat.png";
case "xml":
html = "code.png";
break;
case "bin":
case "exe":
@ -97,12 +105,9 @@ export function documentFileIcon(params) {
html = "doc.png";
break;
case "xslt":
case "xml":
html = "xml.png";
break;
}
return new Ember.Handlebars.SafeString(html);
}
export default Ember.Helper.helper(documentFileIcon);
export default Ember.Helper.helper(documentFileIcon);

View file

@ -1,11 +1,11 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
// by contacting <sales@documize.com>.
//
// https://documize.com
@ -25,4 +25,4 @@ export function initialize( /*application*/ ) {
export default {
name: 'application',
initialize: initialize
};
};

View file

@ -1,43 +1,45 @@
<div class="input-form">
<form>
<div class="heading">
<div class="title">{{folders.length}} shared {{label}}</div>
<div class="tip">View and change shared space ownership</div>
</div>
<div class="input-control">
<table class="basic-table">
<thead>
<tr>
<th class="bordered">Space</th>
<th class="bordered">Participants</th>
</tr>
</thead>
<tbody>
{{#each folders as |folder|}}
<tr>
<td class="bordered">
{{#link-to 'folders.folder' folder.id folder.slug}}{{folder.name}}{{/link-to}}
</td>
<td class="bordered">
{{#each folder.sharedWith as |person|}}
{{#if person.isEveryone}}
Everyone
{{else}}
<div class="global-folder-settings">
<div class="input-form form-borderless">
<form>
<div class="heading">
<div class="title">{{folders.length}} shared {{label}}</div>
<div class="tip">View and change shared space ownership</div>
</div>
<div class="input-control">
<table class="basic-table">
<thead>
<tr>
<th class="bordered">Space</th>
<th class="bordered">Participants</th>
</tr>
</thead>
<tbody>
{{#each folders as |folder|}}
<tr>
<td class="bordered">
{{#link-to 'folders.folder' folder.id folder.slug class="alt"}}{{folder.name}}{{/link-to}}
</td>
<td class="bordered">
{{#each folder.sharedWith as |person|}}
{{#if person.isEveryone}}
Everyone
{{else}}
{{#if person.isOwner}}
<span class="bold">{{person.firstname}} {{person.lastname}} (owner)</span>
{{else}}
{{person.firstname}} {{person.lastname}}
<a class="action-link" {{action "changeOwner" folder.id person.userId}}>make owner</a>
{{/if}}
{{/if}}
<br/>
{{/each}}
</td>
</tr>
{{/each}}
</tbody>
</table>
</div>
</form>
</div>
{{#if person.isOwner}}
<span class="bold">{{person.firstname}} {{person.lastname}} (owner)</span>
{{else}}
{{person.firstname}} {{person.lastname}}
<a class="action-link" {{action "changeOwner" folder.id person.userId}}>make owner</a>
{{/if}}
{{/if}}
<br/>
{{/each}}
</td>
</tr>
{{/each}}
</tbody>
</table>
</div>
</form>
</div>
</div>

View file

@ -1,4 +1,4 @@
<div class="input-form">
<div class="input-form form-borderless">
<form>
<div class="heading">
<div class="title">General Settings</div>
@ -26,4 +26,4 @@
<div class="regular-button button-blue" {{ action 'save' }}>save</div>
</div>
</form>
</div>
</div>

View file

@ -1,18 +1,23 @@
{{#header/page-navigation settingsMode=true}}
{{header/message-box message="Manage this Documize instance"}}
{{/header/page-navigation}}
{{#layout/zone-container}}
{{#layout/page-container}}
{{#layout/page-sidebar}}
<div class="sidebar-menu">
<ul class="options">
{{#link-to 'customize.general' activeClass='selected' class="option" tagName="li"}}General{{/link-to}}
{{#link-to 'customize.folders' activeClass='selected' class="option" tagName="li"}}Spaces{{/link-to}}
{{#link-to 'customize.users' activeClass='selected' class="option" tagName="li"}}Users{{/link-to}}
</ul>
</div>
{{/layout/page-sidebar}}
{{#layout/page-content}}
{{outlet}}
{{/layout/page-content}}
{{/layout/page-container}}
{{layout/zone-navigation}}
{{#layout/zone-header title="Documize Settings" message="General options, space management, user management"}}
{{layout/button-home}}
{{/layout/zone-header}}
{{#layout/zone-sidebar}}
<div class="sidebar-menu">
<ul class="options">
{{#link-to 'customize.general' activeClass='selected' class="option" tagName="li"}}General{{/link-to}}
{{#link-to 'customize.folders' activeClass='selected' class="option" tagName="li"}}Spaces{{/link-to}}
{{#link-to 'customize.users' activeClass='selected' class="option" tagName="li"}}Users{{/link-to}}
</ul>
</div>
{{/layout/zone-sidebar}}
{{#layout/zone-content}}
{{outlet}}
{{/layout/zone-content}}
{{/layout/zone-container}}

View file

@ -1,4 +1,4 @@
<div class="input-form">
<div class="input-form form-borderless">
<form>
<div class="heading">
<div class="title">Add User</div>
@ -20,4 +20,4 @@
</form>
</div>
<div class="clearfix" /> {{settings/user-list users=model onDelete=(action "onDelete") onSave=(action "onSave") onPassword=(action "onPassword")}}
<div class="clearfix" /> {{settings/user-list users=model onDelete=(action "onDelete") onSave=(action "onSave") onPassword=(action "onPassword")}}

View file

@ -1,17 +1,29 @@
{{#header/page-navigation folder=folder document=model documentMode=true}}
{{header/message-box message=model.excerpt}}
{{/header/page-navigation}}
{{#layout/zone-container}}
{{document/document-toolbar document=model pages=pages meta=meta folder=folder isEditor=isEditor users=users owner=owner onSaveTemplate=(action 'onSaveTemplate') onDocumentChange=(action 'onDocumentChange') onAttachmentUpload=(action
'onAttachmentUpload') onDocumentDelete=(action 'onDocumentDelete')}}
{{layout/zone-navigation}}
<div class="container-fluid background-color-white">
<div class="row">
<div class="col-lg-3 col-md-3 col-sm-3">
{{document/document-sidebar document=model meta=meta folder=folder pages=pages page=page isEditor=isEditor onAddPage=(action 'onAddPage') changePageSequence=(action 'onPageSequenceChange') changePageLevel=(action 'onPageLevelChange') gotoPage=(action 'gotoPage')}}
</div>
<div class="col-lg-9 col-md-9 col-sm-9">
{{document/document-view document=model pages=pages attachments=attachments folder=folder folders=folders isEditor=isEditor onAttachmentDeleted=(action 'onAttachmentDeleted') onDeletePage=(action 'onPageDeleted')}}
</div>
</div>
</div>
{{#layout/zone-header title=model.name message=model.excerpt}}
{{document/document-toolbar document=model pages=pages folder=folder
isEditor=isEditor users=users
onSaveTemplate=(action 'onSaveTemplate')
onDocumentChange=(action 'onDocumentChange')
onAttachmentUpload=(action 'onAttachmentUpload')
onDocumentDelete=(action 'onDocumentDelete')}}
{{/layout/zone-header}}
{{#layout/zone-sidebar}}
{{document/document-sidebar document=model meta=meta folder=folder pages=pages page=page owner=owner isEditor=isEditor
onAddPage=(action 'onAddPage')
changePageSequence=(action 'onPageSequenceChange')
changePageLevel=(action 'onPageLevelChange')
gotoPage=(action 'gotoPage')}}
{{/layout/zone-sidebar}}
{{#layout/zone-content}}
{{document/document-view document=model pages=pages attachments=attachments folder=folder folders=folders
isEditor=isEditor
onAttachmentDeleted=(action 'onAttachmentDeleted')
onDeletePage=(action 'onPageDeleted')}}
{{/layout/zone-content}}
{{/layout/zone-container}}

View file

@ -4,14 +4,23 @@ import NotifierMixin from '../../../mixins/notifier';
export default Ember.Controller.extend(NotifierMixin, {
documentService: Ember.inject.service('document'),
folderService: Ember.inject.service('folder'),
hasSelectedDocuments: false,
selectedDocuments: [],
actions: {
refresh() {
this.get('target.router').refresh();
},
onMoveDocument(documents, folder) {
onDocumentsChecked(documents) {
this.set('selectedDocuments', documents);
this.set('hasSelectedDocuments', documents.length > 0);
},
onMoveDocument(folder) {
let self = this;
let documents = this.get('selectedDocuments');
documents.forEach(function(documentId) {
self.get('documentService').getDocument(documentId).then(function(doc) {
doc.set('folderId', folder);
@ -20,8 +29,27 @@ export default Ember.Controller.extend(NotifierMixin, {
});
});
});
this.set('selectedDocuments', []);
this.set('hasSelectedDocuments', false);
this.send("showNotification", "Moved");
},
onDeleteDocument() {
let documents = this.get('selectedDocuments');
let self = this;
documents.forEach(function(document) {
self.get('documentService').deleteDocument(document).then(function() {
self.get('target.router').refresh();
});
});
this.set('selectedDocuments', []);
this.set('hasSelectedDocuments', false);
this.send("showNotification", "Deleted");
},
showDocument(folder, document) {
this.transitionToRoute('document', folder.get('id'), folder.get('slug'), document.get('id'), document.get('slug'));
},

View file

@ -1,18 +1,24 @@
{{#header/page-navigation folder=model.folder folderMode=true}}
{{header/message-box message=session.appMeta.message}}
{{/header/page-navigation}}
{{#layout/zone-container}}
{{#layout/page-container}}
{{#layout/page-sidebar}}
{{folder/folders-list folders=model.folders onFolderAdd=(action 'onFolderAdd')}}
{{/layout/page-sidebar}}
{{#layout/page-content}}
{{folder/folder-dashboard
documents=model.documents
folders=model.folders
folder=model.folder
refresh=(action 'refresh')
onMoveDocument=(action 'onMoveDocument')
showDocument=(action 'showDocument')}}
{{/layout/page-content}}
{{/layout/page-container}}
{{layout/zone-navigation}}
{{#layout/zone-header title=model.folder.name message="A space provides a place for related content"}}
{{folder/folder-toolbar
folders=model.folders
folder=model.folder
hasSelectedDocuments=hasSelectedDocuments
refresh=(action 'refresh')
onDeleteDocument=(action 'onDeleteDocument')
onMoveDocument=(action 'onMoveDocument')
showDocument=(action 'showDocument')}}
{{/layout/zone-header}}
{{#layout/zone-sidebar}}
{{folder/folders-list folders=model.folders onFolderAdd=(action 'onFolderAdd')}}
{{/layout/zone-sidebar}}
{{#layout/zone-content}}
{{folder/documents-list documents=model.documents folder=model.folder isFolderOwner=isFolderOwner onDocumentsChecked=(action 'onDocumentsChecked') }}
{{/layout/zone-content}}
{{/layout/zone-container}}

View file

@ -1,9 +1,17 @@
{{#header/page-navigation folder=model folderMode=true}}
{{header/message-box message=session.appMeta.message}}
{{/header/page-navigation}}
{{#layout/zone-container}}
{{#layout/page-container}}
{{#layout/page-sidebar}}
{{layout/zone-navigation}}
{{#layout/zone-header title=model.name message="Settings, sharing, permissions and deletion"}}
{{#link-to 'folders.folder' model.id model.slug}}
<div class="regular-button button-white">
<i class="material-icons">arrow_back</i>
<div class="name">space</div>
</div>
{{/link-to}}
{{/layout/zone-header}}
{{#layout/zone-sidebar}}
<div class="sidebar-menu">
<ul class="options">
<li class="option {{if tabGeneral "selected"}}" {{action 'selectTab' 'tabGeneral'}}>General</li>
@ -12,8 +20,9 @@
<li class="option {{if tabDelete "selected"}}" {{action 'selectTab' 'tabDelete'}}>Delete</li>
</ul>
</div>
{{/layout/page-sidebar}}
{{#layout/page-content}}
{{/layout/zone-sidebar}}
{{#layout/zone-content}}
{{#folder/folder-settings
tabGeneral=tabGeneral
tabShare=tabShare
@ -28,5 +37,6 @@
onShare="onShare"
onPermission="onPermission" }}
{{/folder/folder-settings}}
{{/layout/page-content}}
{{/layout/page-container}}
{{/layout/zone-content}}
{{/layout/zone-container}}

View file

@ -2,6 +2,7 @@ import Ember from 'ember';
export default Ember.Route.extend({
userService: Ember.inject.service('user'),
folderService: Ember.inject.service('folder'),
beforeModel: function() {
if (!this.session.authenticated) {
@ -19,7 +20,6 @@ export default Ember.Route.extend({
setupController(controller, model) {
controller.set('model', model);
let fullname = model.get('fullname');
controller.set('message', `Profile for ${fullname}`);
controller.set("folder", this.get('folderService.currentFolder'));
}
});

View file

@ -1,38 +1,45 @@
{{#header/page-navigation profileMode=true}}
{{header/message-box message="Manage your profile"}}
{{/header/page-navigation}}
{{#layout/zone-container}}
{{#layout/page-container}}
{{#layout/page-sidebar}}
{{layout/zone-navigation}}
{{#layout/zone-header title=session.user.fullname message="Your Documize profile"}}
{{layout/button-home}}
{{/layout/zone-header}}
{{#layout/zone-sidebar}}
<div class="sidebar-menu">
<div class="avatar-large">{{session.user.initials}}</div>
{{/layout/page-sidebar}}
{{#layout/page-content}}
<div class="input-form">
<form>
<div class="input-control">
<label>Firstname</label>
{{focus-input id="firstname" type="text" value=model.firstname}}
</div>
<div class="input-control">
<label>Lastname</label>
{{input id="lastname" type="text" value=model.lastname}}
</div>
<div class="input-control">
<label>Email</label>
{{input id="email" type="text" value=model.email}}
</div>
<div class="input-control">
<label>Password</label>
<div class="tip">Optional change your password</div>
{{input id="password" type="password" value=password.password}}
</div>
<div class="input-control">
<label>Confirm Password</label>
<div class="tip">Confirm your new password</div>
{{input id="confirmPassword" type="password" value=password.confirmation}}
</div>
<div class="regular-button button-blue" {{ action 'save' }}>save</div>
</form>
</div>
{{/layout/page-content}}
{{/layout/page-container}}
</div>
{{/layout/zone-sidebar}}
{{#layout/zone-content}}
<div class="input-form form-borderless">
<form>
<div class="input-control">
<label>Firstname</label>
{{focus-input id="firstname" type="text" value=model.firstname}}
</div>
<div class="input-control">
<label>Lastname</label>
{{input id="lastname" type="text" value=model.lastname}}
</div>
<div class="input-control">
<label>Email</label>
{{input id="email" type="text" value=model.email}}
</div>
<div class="input-control">
<label>Password</label>
<div class="tip">Optional change your password</div>
{{input id="password" type="password" value=password.password}}
</div>
<div class="input-control">
<label>Confirm Password</label>
<div class="tip">Confirm your new password</div>
{{input id="confirmPassword" type="password" value=password.confirmation}}
</div>
<div class="regular-button button-blue" {{ action 'save' }}>save</div>
</form>
</div>
{{/layout/zone-content}}
{{/layout/zone-container}}

View file

@ -7,18 +7,16 @@ export default Ember.Controller.extend({
filter: "",
results: [],
filterResults(filter) {
onKeywordChange: function() {
Ember.run.debounce(this, this.fetch, 750);
}.observes('filter'),
fetch() {
this.audit.record('searched');
let self = this;
this.get('searchService').find(filter).then(function(response) {
this.get('searchService').find(this.get('filter')).then(function(response) {
self.set('results', response);
});
},
actions: {
onFilter(filter) {
this.filterResults(filter);
}
}
});

View file

@ -1,7 +1,18 @@
{{#header/page-navigation searchMode=true}}
{{header/search-box filter=filter onFilter=(action 'onFilter')}}
{{/header/page-navigation}}
{{#layout/zone-container}}
{{#layout/page-container}}
{{search/search-results results=results}}
{{/layout/page-container}}
{{layout/zone-navigation}}
{{#layout/zone-header title=session.appMeta.title message=session.appMeta.message}}
{{layout/button-home}}
{{/layout/zone-header}}
<div class="page-search">
<div class="input-control">
<label>Search</label>
<div class="tip">#tags, keywords, "some phrase", keyword AND keyword, keyword OR keyword</div>
{{focus-input class="input" type="text" value=filter placeholder='start typing...'}}
</div>
{{search/search-results results=results}}
</div>
{{/layout/zone-container}}

View file

@ -39,9 +39,18 @@ export default Ember.Route.extend({
actions: {
willTransition: function( /*transition*/ ) {
$("#zone-sidebar").css('height', 'auto');
Mousetrap.reset();
},
didTransition() {
Ember.run.schedule("afterRender",this,function() {
$("#zone-sidebar").css('height', $(document).height() - $("#zone-navigation").height() - $("#zone-header").height() - 35);
});
return true;
},
error(error, transition) { // jshint ignore: line
if (error) {
if (netUtil.isAjaxAccessError(error)) {

View file

@ -17,6 +17,7 @@
@import "view/layout.scss";
@import "view/page-search.scss";
@import "view/page-documents.scss";
@import "view/page-folder-settings.scss";
@import "view/page-settings.scss";
@import "view/page-auth.scss";
@import "view/page-onboard.scss";

View file

@ -27,30 +27,42 @@
.no-overflow-x { overflow-x: visible !important; }
input:-webkit-autofill { -webkit-box-shadow: 0 0 0px 1000px white inset; }
img.responsive-img, video.responsive-video { max-width: 100%; height: auto; }
.bordered { border: 1px solid $color-border2; }
.bordered { border: 1px solid $color-border; }
html {
overflow-y: scroll;
font-family: $base-font;
background-color: $color-white;
font-size: 14px;
height: 100%;
}
body {
height: 100%;
min-height: 100%;
}
a {
color: $color-attachment;
color: $color-link;
text-decoration: none;
cursor: pointer;
a:hover, a:focus {
color: $color-primary;
text-decoration: underline;
}
}
a.alt {
color: $color-blue;
text-decoration: none;
cursor: pointer;
a:hover, a:focus {
text-decoration: underline;
}
}
$i: 150;
@while $i > 0 {
.margin-#{$i} { margin: #{$i}px; }

View file

@ -8,35 +8,35 @@
// by contacting <sales@documize.com>.
//
// https://documize.com
$color-off-white: #f5f5f5;
$color-off-black: #333333;
$color-black: #000000;
$color-white: #ffffff;
$color-primary: #084d85;
$color-link: #5abc67;
$color-attachment: #2180cc;
$color-red: #d9493c;
$color-green: #1c962b;
$color-blue: #084d85;
$color-primary: #115a97;
$color-red: #d04134;
$color-green: #4caf50;
$color-blue: #115a97;
$color-gray: #8b9096;
$color-background: #f8f8f8;
$color-tooltip: #4c4c4c;
$color-goldy: #cc9933;
$color-header: #f3f5f8;
$color-link: #4caf50;
$color-border: #e1e1e1;
$color-input: #a1a1a1;
$color-stroke: #e1e1e1;
$color-tooltip: #a1a1a1;
$color-toast: #4c4c4c;
$color-chip: #98A2AB;
$color-input: #98A2AB;
$color-stroke: #98A2AB;
$color-checkbox: #115a97;
$color-card-active: #f7fcff;
$color-border: #dbdbdb;
$color-border2: #e2e2e2;
$color-primary-light: lighten($color-primary, 30%);
$color-primary-dark: darken($color-primary, 10%);
$color-gray2: #f0eeee;
$color-active-state: #e2e2e2;
$color-sidebar: #e7f1f6;
$color-shadow: #dbdbdb;
$color-error: #c23c56;
$color-highlight: #fff8dc;
$color-warning: #990012;
$color-chip: #98A2AB;
$color-chip: #dff0f9;
$color-chip-border: #daeaf3;
$color-chip-text: #1b88e3;
.background-color-white {
background-color: $color-white;
}
@ -73,6 +73,3 @@ $color-warning: #990012;
.color-gray {
color: $color-gray;
}
.color-error {
color: $color-error;
}

View file

@ -66,6 +66,7 @@
-moz-transition: all 0.30s ease-in-out;
-ms-transition: all 0.30s ease-in-out;
-o-transition: all 0.30s ease-in-out;
transition: all 0.30s ease-in-out;
}
@mixin arrow-down($color, $size)

View file

@ -10,21 +10,17 @@
// https://documize.com
@media print {
.header, .sidebar, .non-printable {
.zone-navigation, .zone-header, .zone-sidebar, .non-printable {
display: none !important;
}
.document-container {
> .content {
padding: 20px 0 !important;
.document-view {
.page-toolbar, .document-summary, .attachment-zone, .document-tags {
display: none !important;
}
.page-toolbar, .document-summary, .attachment-zone {
display: none !important;
}
.print-title, .non-printable-message{
display: block !important;
}
.print-title, .non-printable-message{
display: block !important;
}
}
}

View file

@ -1,101 +1,108 @@
.document-container {
> .content {
padding: 40px 40px 40px 20px;
.document-view {
.print-title {
display: none;
font-size: 2.3em;
font-weight: bold;
color:$color-black;
margin-bottom: 20px;
margin-top: 0;
}
.print-title {
display: none;
font-size: 2.3em;
font-weight: bold;
color:$color-black;
margin-bottom: 20px;
margin-top: 0;
}
.non-printable-message {
display: none;
font-size: 1em;
font-style: italic;
color: $color-gray;
}
.non-printable-message {
display: none;
font-size: 1em;
font-style: italic;
color: $color-gray;
}
.attachment-zone {
margin: 20px 0 30px 0;
.attachment-zone {
margin: 20px 0 30px 0;
> .list {
margin: 0;
padding: 7px;
> .list {
margin: 0;
padding: 7px;
> .item {
color: $color-off-black;
margin-top: 10px;
padding: 0;
list-style-type: none;
border-bottom: 1px dotted $color-border;
padding-bottom: 10px;
> .item {
color: $color-off-black;
margin-top: 10px;
padding: 0;
list-style-type: none;
border-bottom: 1px solid $color-gray2;
padding-bottom: 10px;
> .icon {
vertical-align: text-top;
margin-right: 10px;
}
> .icon {
vertical-align: text-top;
margin-right: 10px;
}
> a > .file {
font-size: 1rem;
}
> .action {
float: right;
margin-top: -8px;
@extend .cursor-pointer;
display: none;
color: $color-stroke;
}
> a {
color: $color-gray;
&:hover {
.file {
text-decoration: underline;
}
color: $color-link;
}
.action {
display: inline-block;
> .file {
font-size: 0.9rem;
}
}
> .action {
float: right;
margin-top: -8px;
margin-right: 5px;
@extend .cursor-pointer;
opacity: 0.3;
@extend .transition-all;
display: none;
color: $color-stroke;
}
&:hover {
.action {
display: inline-block;
&:hover {
opacity: 1;
}
}
}
}
}
}
.delete-attachment-dialog,
.delete-page-dialog {
display: none;
}
.delete-attachment-dialog,
.delete-page-dialog {
display: none;
}
.is-template {
color: $color-gray;
font-weight: bold;
font-size: 1.5em;
margin-bottom: 50px;
padding-bottom: 5px;
@include border-bottom(1px);
}
.is-template {
color: $color-gray;
font-weight: bold;
font-size: 1.5em;
margin-bottom: 30px;
padding-bottom: 5px;
@include border-bottom(1px);
}
> .pages {
margin: 30px 0 50px 0;
> .pages {
margin: 30px 0 50px 0;
> .wysiwyg {
> .is-a-page {
.page-title {
> .page-toolbar {
opacity: 0.3;
@extend .transition-all;
&:hover {
opacity: 1;
}
}
> .wysiwyg {
> .is-a-page {
.page-title {
> .page-toolbar {
opacity: 0.3;
@extend .transition-all;
&:hover {
.page-toolbar {
opacity: 1;
}
opacity: 1;
}
}
&:hover {
.page-toolbar {
opacity: 1;
}
}
}
@ -122,6 +129,5 @@
> .regular-button {
cursor: default !important;
}
}
}

View file

@ -1,73 +1,203 @@
.document-container {
> .sidebar {
padding: 40px;
font-size: 0.875rem;
@extend .no-select;
.document-sidebar {
@extend .no-select;
.stick {
position: fixed;
top: 50px;
}
> .summary-line {
color: $color-gray;
margin-top: 20px;
.document-structure {
> .toc-controls {
text-align: center;
margin-bottom: 20px;
>.items {
padding: 0;
margin: 0;
text-align: center;
> .round-button-mono {
color: $color-off-black;
border-color: $color-off-black;
> .material-icons {
color: $color-off-black;
}
}
> .disabled {
@extend .cursor-not-allowed;
color: $color-stroke;
border-color: $color-stroke;
> .material-icons {
color: $color-stroke;
}
}
> .divider {
margin-right: 20px;
display: inline-block;
}
.entries {
padding: 0;
list-style: none;
font-size: 13px;
overflow-x: hidden;
> .item {
list-style-type: none;
display: inline-block;
margin: 0;
padding: 0;
vertical-align: middle;
.item {
padding: 4px 0;
text-overflow: ellipsis;
word-wrap: break-word;
white-space: nowrap;
overflow: hidden;
> .metric {
@extend .cursor-pointer;
text-align: center;
color: $color-gray;
> .link {
color: $color-stroke;
&:hover {
color: $color-link;
}
}
> .selected {
color: $color-link;
.number {
font-size: 1.2rem;
font-weight: bold;
}
.label {
margin: 0;
padding: 0;
font-size: 0.8rem;
}
&:hover {
color: $color-link;
}
}
}
}
}
.stick {
position: fixed;
top: 10px;
}
.document-structure {
> .toc-controls {
text-align: center;
margin: 0;
padding: 30px 0 10px 0;
color: $color-gray;
> .round-button-mono {
color: $color-green;
border-color: $color-green;
> .material-icons {
color: $color-green;
}
}
.toc-bullet {
vertical-align: middle;
> .disabled {
@extend .cursor-not-allowed;
color: $color-stroke;
font-size: 10px;
margin-right: 5px;
border-color: $color-stroke;
> .material-icons {
color: $color-stroke;
}
}
}
.entries {
padding: 0;
list-style: none;
font-size: 13px;
overflow-x: hidden;
list-style-type: none;
.item {
padding: 4px 0;
text-overflow: ellipsis;
word-wrap: break-word;
white-space: nowrap;
overflow: hidden;
> .link {
color: $color-gray;
&:hover {
color: $color-link;
}
}
> .selected {
color: $color-link;
font-weight: bold;
}
}
}
}
}
.meta-viewers {
overflow-y: auto;
overflow-x: hidden;
> .items {
list-style-type: none;
margin: 0;
padding: 0;
overflow-y: auto;
overflow-x: hidden;
height: 300px;
min-width: 300px;
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;
overflow-y: auto;
overflow-x: hidden;
height: 300px;
min-width: 300px;
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;
}
}
}
}

View file

@ -1,153 +1,2 @@
.document-container {
> .toolbar {
width: 100%;
margin: 0;
padding: 40px 40px 20px 40px;
background-color: $color-off-white;
color: $color-gray;
> .meta-data {
margin: 0;
padding: 0;
>.items {
padding: 0;
margin: 0;
> .divider {
margin-right: 20px;
display: inline-block;
}
> .item {
list-style-type: none;
display: inline-block;
margin: 0;
padding: 0;
vertical-align: middle;
> .avatar {
}
> .date {
}
> .metric {
@extend .cursor-pointer;
text-align: center;
color: $color-primary;
.number {
font-size: 1.2rem;
font-weight: bold;
}
.label {
margin: 0;
padding: 0;
font-size: 0.8rem;
}
&:hover {
color: $color-primary;
}
}
}
}
}
}
}
.meta-viewers {
overflow-y: auto;
overflow-x: hidden;
> .items {
list-style-type: none;
margin: 0;
padding: 0;
overflow-y: auto;
overflow-x: hidden;
height: 300px;
min-width: 300px;
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;
overflow-y: auto;
overflow-x: hidden;
height: 300px;
min-width: 300px;
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-error;
}
.date {
font-size: 0.8rem;
}
}
}
}
.document-toolbar {
}

View file

@ -16,13 +16,13 @@
width: 400px;
height: 80px;
background-color: $color-white;
border: 1px solid $color-border2;
border: 1px solid $color-border;
border-radius: 3px;
margin: 0 30px 30px 0;
&:hover {
background-color: $color-card-active;
border: 1px solid $color-border2;
border: 1px solid $color-border;
transition: 0.2s all ease;
}
@ -52,14 +52,14 @@
.preview {
font-size: 0.7rem;
color: #cc9933;
color: $color-goldy;
display: inline-block;
margin-left: 10px;
}
}
> .desc {
color: $color-stroke;
color: $color-gray;
font-size: 0.8rem;
margin-top: 5px;
max-width: 300px;

View file

@ -89,7 +89,7 @@
{
background-color: $color-off-white;
padding: 10px;
border: 1px solid $color-border2;
border: 1px solid $color-border;
@include border-radius(3px);
}

View file

@ -1,48 +1,36 @@
.page-container {
padding-top: 60px;
.zone-container {
min-height: 500px; //ensure dropdowns render in viewport
}
.copyright {
margin-top: 50px;
> a {
font-size: 0.8rem;
color: $color-gray;
}
}
.header {
.zone-navigation {
background-color: $color-primary;
color: $color-white;
height: 145px;
padding: 0;
margin: 0;
// z-index: 1;
// position: fixed;
width: 100%;
font-size: 1rem;
padding: 15px 40px 15px 40px;
.content {
margin-top: 25px;
> .title {
padding-left: 10px;
font-size: 1.1rem;
padding-left: 15px;
font-size: 1rem;
display: inline-block;
vertical-align: middle;
color: $color-white;
text-decoration: none;
}
> .name {
padding-right: 10px;
font-size: 1.1rem;
padding-right: 15px;
font-size: 1rem;
display: inline-block;
vertical-align: middle;
}
> .login {
padding: 10px 0 0 0;
font-size: 1.1rem;
padding: 15px 0 0 0;
font-size: 1rem;
display: inline-block;
> a {
@ -50,6 +38,23 @@
text-decoration: none;
}
}
> .search {
padding-left: 15px;
font-size: 1rem;
display: inline-block;
vertical-align: middle;
margin-top: 5px;
> a {
color: $color-white;
text-decoration: none;
> .material-icons {
font-size: 1.5rem;
}
}
}
}
.header-button {
@ -73,7 +78,6 @@
> .material-icons {
color: $color-primary;
// padding: 0 0 0 8px;
text-align: center;
font-size: 1.4em;
}
@ -91,74 +95,51 @@
border-radius: 0;
}
}
}
.breadcrumb-menu {
margin: 0;
padding: 0;
color: $color-white;
padding: 20px 0 0 0;
.zone-header {
background-color: $color-header;
padding: 0 40px 0 40px;
> .option {
list-style: none;
list-style-type: none;
padding: 0 25px 22.5px 0;
float: left;
> .info {
padding: 20px 0 20px 0;
> a {
font-size: 1rem;
color: #AFB4BB;
text-decoration: none;
}
> .title {
color: $color-off-black;
font-size: 1.2rem;
}
> .selected > a {
color: $color-white !important;
}
}
> .message {
color: $color-gray;
font-size: 1rem;
margin-top: 10px;
}
}
.dual-box {
background-color: $color-off-white;
color: $color-gray;
height: 45px;
border: 1px solid $color-border2;
border-radius: 4px;
width: 100%;
padding: 0 10px;
cursor: pointer;
display: inline-block;
&:hover {
@extend .z-depth-tiny;
}
.info {
font-size: 0.9rem;
line-height: 3rem;
display: inline-block;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
width: 90%;
}
.icon {
float: right;
display: inline-block;
font-size: 1.5rem;
line-height: 3rem;
color: $color-stroke;
}
.input {
font-size: 1rem;
line-height: 3rem;
display: inline-block;
transition: .3s;
}
}
.dual-box-white {
background-color: $color-white;
color: $color-off-black;
}
> .actions {
padding: 20px 0 20px 0;
}
}
.zone-sidebar {
height: 100%;
min-height:100%;
padding: 0 40px 0 40px;
border-right: 1px solid $color-border;
float: left;
}
.zone-content {
padding: 30px 40px 30px 40px;
float: left;
}
.copyright {
margin-top: 50px;
text-align: center;
> a {
font-size: 0.8rem;
color: $color-gray;
}
}

View file

@ -2,7 +2,7 @@
height: 450px;
width: 450px;
background-color: $color-white;
border: 1px solid $color-border2;
border: 1px solid $color-border;
display: inline-block;
border-radius : 3px;
color: $color-off-black;

View file

@ -1,6 +1,9 @@
.folders-list {
margin: 30px 0;
> .add-space-action {
text-align: center;
margin-bottom: 30px;
}
> .section {
margin: 0 0 20px 0;
@ -48,14 +51,11 @@
}
.documents-list {
margin: 35px 0;
> .document {
margin: 0;
padding: 20px 20px 25px 20px;
width: 100%;
position: relative;
border-bottom: 1px solid $color-gray2;
transition: .3s;
&:hover {
@ -65,7 +65,6 @@
}
> .snippet {
// color: $color-off-black;
color: $color-gray;
}
}
@ -78,15 +77,15 @@
> .checkbox {
position: absolute;
display: none;
top: 5px;
right: 12px;
top: 8px;
right: 15px;
cursor: pointer;
> .material-icons {
width: 10px;
margin: 0;
padding: 0;
color: $color-link;
color: $color-checkbox;
}
}
@ -110,34 +109,11 @@
font-size: 14px;
line-height: 24px;
}
> .tags {
font-size: 0.8rem;
color: $color-gray;
margin-top: 8px;
.tag {
background-color: $color-white;
color: $color-stroke;
text-decoration: none;
display: inline-block;
margin: 5px 10px 5px 0;
padding: 5px 10px;
border: 1px solid $color-border;
border-radius: 15px;
transition: 0.2s all ease;
&:hover {
background-color: $color-off-white;
}
}
}
}
}
> .selected-card {
background-color: $color-card-active !important;
border-bottom: 1px solid $color-link !important;
> .checkbox {
display: block;
@ -175,7 +151,7 @@
}
.no-documents {
margin-top: 100px;
margin-top: 50px;
text-align: center;
opacity: 0.4;

View file

View file

@ -1,44 +1,74 @@
.page-search {
margin: 50px 100px;
.search-results {
.heading {
font-size: 1.5rem;
color: $color-primary;
}
.search-results {
margin: 50px 0;
> .search-list {
@extend .cards-list;
margin-top: 20px;
.heading {
font-size: 1.2rem;
color: $color-blue;
}
> .search-card {
@extend .content-card;
width: 220px;
height: 200px;
cursor: pointer;
> .list {
margin-top: 20px;
list-style: none;
.folder {
font-size: 0.9rem;
margin: 1.7rem 0 0 0;
height: 1.2rem;
overflow: hidden;
color: $color-gray;
}
> .item {
cursor: pointer;
margin: 0 30px 30px 0;
.tags {
font-size: 0.9rem;
height: 1.2rem;
overflow: hidden;
color: $color-gray;
> .link {
text-decoration: none;
color: $color-off-black;
.tag {
display: inline-block;
margin-right: 5px;
&:hover {
color: $color-link;
}
> .title {
display: inline-block;
font-size: 1.2rem;
}
> .folder {
display: inline-block;
font-size: 0.8rem;
color: $color-gray;
margin-left: 15px;
}
> .excerpt {
margin-top: 1rem;
font-size: 0.9rem;
margin-left: 20px;
}
> .chips {
margin-top: 1rem;
margin-left: 20px;
}
}
}
a, a:hover {
text-decoration: none;
color: $color-off-black;
}
}
> .references {
margin-top: 1rem;
margin-left: 20px;
> .label {
font-size: 0.9rem;
color: $color-gray;
}
> .link {
font-size: 0.9rem;
color: $color-off-black;
&:hover {
color: $color-link;
text-decoration: underline;
}
}
}
}
}
}
}

View file

@ -1,3 +1,7 @@
.global-folder-settings {
}
.user-list {
margin: 30px 0;
@ -21,7 +25,7 @@
}
.checkbox {
color: $color-link;
color: $color-checkbox;
cursor: pointer;
}
}

View file

@ -2,11 +2,12 @@
color: $color-white;
background-color: $color-gray;
@include border-radius(20px);
padding: 8px 0 0 0;
padding: 7px 0 0 0;
letter-spacing: 1px;
text-align: center;
height: 35px;
width: 35px;
cursor: crosshair;
}
.avatar-large {
@ -20,4 +21,5 @@
letter-spacing: 1px;
text-align: center;
margin: 0 auto;
cursor: crosshair;
}

View file

@ -3,7 +3,7 @@
@mixin button-hover-state($bg) {
&:hover {
background-color: lighten($bg, 3%);
@extend .z-depth-1;
@extend .z-depth-tiny;
}
}
@ -22,9 +22,10 @@
border: 1px solid $color-gray;
text-align: center;
@extend .no-select;
@include ease-in();
&:hover {
@extend .z-depth-half;
@extend .z-depth-tiny;
}
i {
@ -52,10 +53,11 @@
border: 1px solid $color-gray;
text-align: center;
@extend .no-select;
@include ease-in();
font-size: 1.2rem;
&:hover {
@extend .z-depth-half;
@extend .z-depth-tiny;
}
i {
@ -68,6 +70,47 @@
}
}
.square-button-white {
display: inline-block;
position: relative;
overflow: hidden;
width: 32px;
height: 32px;
line-height: 31px;
padding: 0;
border-radius: 2px;
transition: .3s;
cursor: pointer;
vertical-align: middle;
background-color: $color-white;
border: 1px solid $color-stroke;
text-align: center;
@extend .no-select;
@include ease-in();
&:hover {
@extend .z-depth-tiny;
}
i {
color: $color-gray;
text-align: center;
}
&:before {
border-radius: 0;
}
}
.button-red-text {
&:hover {
> .material-icons {
@include ease-in();
color: $color-red !important;
}
}
}
.round-button {
display: inline-block;
position: relative;
@ -82,6 +125,7 @@
vertical-align: middle;
text-align: center;
@extend .no-select;
@include ease-in();
font-size: 1.2rem;
> i {
@ -107,6 +151,7 @@
vertical-align: middle;
text-align: center;
@extend .no-select;
@include ease-in();
> i {
color: $color-white;
@ -134,8 +179,9 @@
-webkit-tap-highlight-color: transparent;
color: $color-white;
cursor: pointer;
border: none;
@extend .no-select;
border: none;
@extend .no-select;
@include ease-in();
> .name {
vertical-align: top;
@ -163,6 +209,13 @@
@include button-hover-state($color-gray);
}
.button-white {
border: 1px solid $color-stroke;
background-color: $color-white;
color: $color-blue;
@include button-hover-state($color-white);
}
.button-transparent {
background-color: transparent;
color: $color-gray;
@ -190,6 +243,7 @@
vertical-align: middle;
-webkit-tap-highlight-color: transparent;
@extend .no-select;
@include ease-in();
&:hover {
box-shadow: none;

View file

@ -1,5 +1,5 @@
.base-card {
border: 1px solid $color-border2;
border: 1px solid $color-border;
display: inline-block;
border-radius : 3px;
background-color: $color-white;

View file

@ -1,29 +1,30 @@
.chip {
display: inline-block;
border-radius: 15px;
border: 1px solid $color-border;
border-radius: 3px;
border: 1px solid $color-chip-border;
padding: 0;
height: 25px;
line-height: 0;
margin-right: 5px;
background-color: $color-chip;
color: $color-chip-text;
&:hover {
cursor: pointer;
background-color: $color-off-white;
}
> .chip-text {
display: inline-block;
font-weight: 400;
font-size: 12px;
color: $color-stroke;
color: $color-chip-text;
padding: 11px 10px 0 10px;
letter-spacing: 0.7px;
line-height: 0;
}
> i.material-icons {
color: $color-stroke;
color: $color-chip-text;
font-size: 13px;
margin: 13px 8px 0 0;
padding: 0;
@ -33,14 +34,13 @@
.chip-action {
@extend .chip;
background-color: $color-off-white;
background-color: $color-white;
&:hover {
cursor: pointer;
background-color: $color-off-white;
}
> .chip-text {
color: $color-chip;
color: $color-chip-text;
}
}

View file

@ -99,7 +99,7 @@
> li.divider {
height: 1px;
border-top: 1px solid $color-border2;
border-top: 1px solid $color-border;
margin: 5px 0;
}

View file

@ -44,7 +44,7 @@
> textarea {
resize: none;
height: auto !important;
overflow-y: hidden;
overflow-y: hidden;
}
> select,
@ -160,7 +160,7 @@
}
.input-form {
border: 1px solid $color-border2;
border: 1px solid $color-border;
display: block;
border-radius : 3px;
background-color: $color-white;
@ -187,6 +187,10 @@
margin-top: 30px;
}
.form-borderless {
padding: 0 !important;
border: none !important;
}
.widget-checkbox {
color: $color-link;
@ -195,4 +199,4 @@
.checkbox-gray {
color: $color-gray !important;
}
}

View file

@ -1,16 +1,17 @@
.sidebar-menu {
margin: 20px 0;
margin: 30px 0;
> .options {
padding: 0;
margin: 0;
> .option {
margin-bottom: 10px;
margin-bottom: 15px;
font-size: 1rem;
list-style: none;
cursor: pointer;
@extend .no-select;
color: $color-gray;
&:hover {
color: $color-link;

View file

@ -3,7 +3,7 @@
margin: 0 0 25px 0;
width: 100%;
font-size: 1rem;
border: 1px solid $color-border2;
border: 1px solid $color-border;
border-radius: 2px;
border-collapse: collapse;
@ -26,21 +26,21 @@
text-align: left;
font-weight: bold;
padding: 10px;
border-bottom: 1px solid $color-border2;
border-bottom: 1px solid $color-border;
}
}
}
.bordered {
border: 1px solid $color-border2;
border: 1px solid $color-border;
}
.border-top {
border-top: 1px solid $color-border2;
border-top: 1px solid $color-border;
}
.border-bottom {
border-bottom: 1px solid $color-border2;
border-bottom: 1px solid $color-border;
}
.action-link {

View file

@ -1,4 +1,4 @@
<div class="document-structure hidden-xs hidden-sm">
<div class="document-structure">
{{#if this.session.authenticated}}
<div id="tocToolbar" class="toc-controls {{if state.actionablePage 'current-page' ''}}">
<div id="toc-up-button" class="round-button-mono {{if state.upDisabled 'disabled'}}" data-tooltip="Move up" data-tooltip-position="top center" {{action 'pageUp'}}>

View file

@ -1,17 +1,34 @@
<div class="document-container">
<div class="sidebar hidden-xs hidden-sm">
{{#if isEditor}}
<div class="margin-bottom-20 text-center">
{{#link-to 'document.wizard' folder.id folder.slug document.id document.slug}}
<div class="regular-button button-green" id="add-section-button">
<i class="material-icons">add</i>
<div class="name">section</div>
<div class="document-sidebar">
{{#if session.authenticated}}
<div class="summary-line">
<ul class="items">
<li class="item">
<div id="owner-avatar" class="avatar" data-tooltip="{{owner.fullname}}" data-tooltip-position="right middle">{{owner.initials}}</div>
</li>
<li class="divider" />
<li class="item" id="meta-button-viewers">
<div class="metric">
<div class="number">{{meta.viewers.length}}</div>
<div class="label">views</div>
</div>
{{/link-to}}
</div>
{{/if}}
{{document/document-sidebar-toc document=model folder=folder pages=pages page=page isEditor=isEditor
changePageSequence=(action 'onPageSequenceChange') changePageLevel=(action 'onPageLevelChange')
gotoPage=(action 'gotoPage')}}
</div>
</li>
<li class="divider" />
<li class="item" id="meta-button-history">
<div class="metric">
<div class="number">{{meta.editors.length}}</div>
<div class="label">activity</div>
</div>
</li>
</ul>
</div>
{{#dropdown-dialog target="meta-button-viewers" position="bottom left" showCancel=false button="Close" onAction=(action 'close') color="flat-gray"}}
{{document/document-sidebar-viewers meta=meta}}
{{/dropdown-dialog}}
{{#dropdown-dialog target="meta-button-history" position="bottom left" showCancel=false button="Close" onAction=(action 'close') color="flat-gray"}}
{{document/document-sidebar-edits pages=pages meta=meta}}
{{/dropdown-dialog}}
{{/if}}
{{document/document-sidebar-toc document=model folder=folder pages=pages page=page isEditor=isEditor
changePageSequence=(action 'onPageSequenceChange') changePageLevel=(action 'onPageLevelChange')
gotoPage=(action 'gotoPage')}}
</div>

View file

@ -1,126 +1,87 @@
<div class="container-fluid">
<div class="row">
<div class="document-container">
<div class="toolbar">
{{#if session.authenticated}}
<div class="meta-data pull-left hidden-xs hidden-sm">
<ul class="items">
<li class="item">
<div id="owner-avatar" class="avatar" data-tooltip="{{owner.fullname}}" data-tooltip-position="right middle">{{owner.initials}}</div>
</li>
<li class="divider" />
<li class="item">
<div class="date">{{formatted-date document.revised 'Do MMMM YYYY'}}</div>
</li>
<li class="divider" />
<li class="item" id="meta-button-viewers">
<div class="metric">
<div class="number">{{meta.viewers.length}}</div>
<div class="label">views</div>
</div>
</li>
<li class="divider" />
<li class="item" id="meta-button-history">
<div class="metric">
<div class="number">{{meta.editors.length}}</div>
<div class="label">activity</div>
</div>
</li>
</ul>
{{#dropdown-dialog target="meta-button-viewers" position="bottom left" showCancel=false button="Close" onAction=(action 'close') color="flat-gray"}}
{{document/document-sidebar-viewers meta=meta}}
{{/dropdown-dialog}}
{{#dropdown-dialog target="meta-button-history" position="bottom left" showCancel=false button="Close" onAction=(action 'close') color="flat-gray"}}
{{document/document-sidebar-edits pages=pages meta=meta}}
{{/dropdown-dialog}}
</div>
{{/if}}
<div class="actions pull-right hidden-xs hidden-sm">
{{#link-to 'folders.folder' folder.id folder.slug}}
<div class="regular-button button-blue" id="add-section-button">
<i class="material-icons">arrow_back</i>
<div class="name">space</div>
</div>
{{/link-to}}
{{#if isEditor}}
<div class="button-gap"></div>
<div class="square-button button-gray" id="set-meta-button" data-tooltip="Set meta" data-tooltip-position="top center">
<i class="material-icons">settings</i>
</div>
<div class="button-gap"></div>
<div class="square-button button-gray" id="attachment-button" data-tooltip="Attach file" data-tooltip-position="top center">
<i class="material-icons">attach_file</i>
</div>
<div class="button-gap"></div>
<div class="square-button button-gray" id="save-template-button" data-tooltip="Save as template" data-tooltip-position="top center">
<i class="material-icons">content_copy</i>
</div>
{{/if}}
<div class="button-gap"></div>
<div class="square-button button-gray" id="print-document-button" data-tooltip="Print document" data-tooltip-position="top center" {{action 'printDocument'}}>
<i class="material-icons">print</i>
</div>
{{#if isEditor}}
<div class="button-gap"></div>
<div class="square-button button-red" id="delete-document-button" data-tooltip="Delete document" data-tooltip-position="top center">
<i class="material-icons">delete</i>
</div>
{{/if}}
{{#if isEditor}}
{{#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}}
{{#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 class="input-control">
<label>Name</label>
<div class="tip">Short name for this type of document</div>
{{input type='text' id="new-template-name" value=saveTemplate.name}}
</div>
<div class="input-control">
<label>Excerpt</label>
<div class="tip">Explain use case for this template</div>
{{textarea value=saveTemplate.description rows="3" id="new-template-desc"}}
</div>
</div>
{{/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}}
</div>
<div class="clearfix"></div>
</div>
<div>
{{#link-to 'folders.folder' folder.id folder.slug}}
<div class="regular-button button-white">
<i class="material-icons">arrow_back</i>
<div class="name">space</div>
</div>
{{/link-to}}
{{#if isEditor}}
<div class="button-gap"></div>
<div class="square-button-white" id="set-meta-button" data-tooltip="Set meta" data-tooltip-position="top center">
<i class="material-icons">settings</i>
</div>
<div class="button-gap"></div>
<div class="square-button-white" id="attachment-button" data-tooltip="Attach file" data-tooltip-position="top center">
<i class="material-icons">attach_file</i>
</div>
<div class="button-gap"></div>
<div class="square-button-white" id="save-template-button" data-tooltip="Save as template" data-tooltip-position="top center">
<i class="material-icons">content_copy</i>
</div>
<div class="button-gap"></div>
{{/if}}
<div class="square-button-white" id="print-document-button" data-tooltip="Print me" data-tooltip-position="top center" {{action 'printDocument'}}>
<i class="material-icons">print</i>
</div>
{{#if isEditor}}
<div class="button-gap"></div>
<div class="square-button-white button-red-text" id="delete-document-button" data-tooltip="Delete content" data-tooltip-position="top center">
<i class="material-icons">delete</i>
</div>
<div class="button-gap"></div>
{{#link-to 'document.wizard' folder.id folder.slug document.id document.slug}}
<div class="regular-button button-green" id="add-section-button" data-tooltip="Add section" data-tooltip-position="top center">
<i class="material-icons">add</i>
<div class="name">section</div>
</div>
{{/link-to}}
{{/if}}
{{#if isEditor}}
{{#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}}
{{#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 class="input-control">
<label>Name</label>
<div class="tip">Short name for this type of document</div>
{{input type='text' id="new-template-name" value=saveTemplate.name}}
</div>
<div class="input-control">
<label>Excerpt</label>
<div class="tip">Explain use case for this template</div>
{{textarea value=saveTemplate.description rows="3" id="new-template-desc"}}
</div>
</div>
{{/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}}
</div>

View file

@ -1,81 +1,77 @@
<div class="document-container">
<div class="content">
{{#if document.template}}
<div class="is-template">TEMPLATE</div>
{{/if}}
<div class="document-view">
{{#if document.template}}
<div class="is-template">TEMPLATE</div>
{{/if}}
<div class="document-summary">
{{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">
{{document.name}}
</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="{{ session.appMeta.apiUrl }}api/public/attachments/{{ session.appMeta.orgId }}/{{ a.job }}/{{ a.fileId }}">
<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="print-title">
{{document.name}}
</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="{{ session.appMeta.apiUrl }}api/public/attachments/{{ session.appMeta.orgId }}/{{ a.job }}/{{ a.fileId }}">
<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">
{{#each pages key="id" as |page index|}}
<div class="wysiwyg">
<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}}
</div>
<div class="pages">
{{#each pages key="id" as |page index|}}
<div class="wysiwyg">
<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}}
</div>
{{/each}}
</div>
{{/each}}
</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="dropdown-dialog delete-attachment-dialog">
<div class="content">
<p>Are you sure you want to delete <span class="bold">{{deleteAttachment.name}}?</span></p>
<div class="actions">
<div class="flat-button" {{action 'cancel'}}>
cancel
</div>
<div class="actions">
<div class="flat-button" {{action 'cancel'}}>
cancel
</div>
<div class="flat-button flat-red" {{action 'deleteAttachment'}}>
delete
</div>
<div class="flat-button flat-red" {{action 'deleteAttachment'}}>
delete
</div>
<div class="clearfix"></div>
</div>
<div class="clearfix"></div>
</div>
<div class="dropdown-dialog delete-page-dialog">
<div class="content">
<p>Are you sure you want to delete <span class="bold">{{deletePage.title}}?</span></p>
<p>
{{input type="checkbox" id="delete-child-pages" class="margin-left-20" checked=deletePage.children}}
<label for="delete-child-pages">&nbsp;Delete child pages</label>
</p>
</div>
<div class="actions">
<div class="flat-button" {{action 'cancel'}}>
cancel
</div>
<div class="flat-button flat-red" {{action 'deletePage'}}>
delete
</div>
</div>
<div class="clearfix"></div>
<div class="dropdown-dialog delete-page-dialog">
<div class="content">
<p>Are you sure you want to delete <span class="bold">{{deletePage.title}}?</span></p>
<p>
{{input type="checkbox" id="delete-child-pages" class="margin-left-20" checked=deletePage.children}}
<label for="delete-child-pages">&nbsp;Delete child pages</label>
</p>
</div>
<div class="actions">
<div class="flat-button" {{action 'cancel'}}>
cancel
</div>
<div class="flat-button flat-red" {{action 'deletePage'}}>
delete
</div>
</div>
<div class="clearfix"></div>
</div>
</div>
@ -84,7 +80,7 @@
<div class="box">
<div class="regular-button button-green">
<i class="material-icons">add</i>
<div class="name">section</div>
<div class="name">section</div>
</div>
<div class="message">Add a new section to this document</div>
</div>

View file

@ -1,5 +1,9 @@
{{#each tagz as |tg|}}
{{#link-to "search" (query-params filter=tg) class="tag"}}
{{tg}}
{{/link-to}}
{{/each}}
<div class="margin-top-10">
{{#each tagz as |tg|}}
{{#link-to "search" (query-params filter=tg)}}
<div class="chip">
<span class="chip-text">{{tg}}</span>
</div>
{{/link-to}}
{{/each}}
</div>

View file

@ -4,7 +4,7 @@
{{#link-to 'document.index' folder.id folder.slug document.id document.slug class="link"}}
<div class="title">{{ document.name }}</div>
<div class="snippet">{{ document.excerpt }}</div>
<div class="tags">{{folder/document-tags documentTags=document.tags}}</div>
<div class="chips">{{folder/document-tags documentTags=document.tags}}</div>
{{/link-to}}
<div class="checkbox" {{action 'selectDocument' document.id}}>
{{#if session.authenticated}}
@ -18,3 +18,22 @@
</li>
{{/each}}
</ul>
{{#if emptyState}}
<div class="no-documents">
<div class="box">
<div class="regular-button button-transparent">
<i class="material-icons">add</i>
<div class="name">space</div>
</div>
<div class="message">Create a new space for<br/>all your content</div>
</div>
<div class="box">
<div class="regular-button button-green">
<i class="material-icons">add</i>
<div class="name">content</div>
</div>
<div class="message">Start with a content template or <br/>import .doc .docx, .txt .md files</div>
</div>
</div>
{{/if}}

View file

@ -1,6 +1,6 @@
<div class="margin-top-20">
<div class="folder-settings">
{{#if tabGeneral}}
<div class="input-form">
<div class="input-form form-borderless">
<form>
<div class="input-control">
<label>Name</label>
@ -13,7 +13,7 @@
{{/if}}
{{#if tabShare}}
<div class="input-form">
<div class="input-form form-borderless">
<form>
<div class="input-control">
<label>Email</label>
@ -31,7 +31,7 @@
{{/if}}
{{#if tabDelete}}
<div class="input-form">
<div class="input-form form-borderless">
<form>
<div class="input-control">
<label>Move then Delete</label>
@ -44,7 +44,7 @@
{{/if}}
{{#if tabPermissions}}
<div class="input-form">
<div class="input-form form-borderless">
<form>
<div class="input-control">
<label>Permissions</label>

View file

@ -1,4 +1,4 @@
<div class="pull-right hidden-xs hidden-sm">
<div>
{{#if hasSelectedDocuments}}
<div class="square-button button-blue" id="move-documents-button" data-tooltip="Move documents" data-tooltip-position="top center">
<i class="material-icons">folder</i>
@ -27,26 +27,26 @@
</ul>
{{/dropdown-dialog}}
{{else}}
{{#if folderService.canEditCurrentFolder}}
<div class="regular-button button-green" id="start-document-button" data-tooltip="Add new content" data-tooltip-position="top center">
<i class="material-icons">add</i>
<div class="name">Content</div>
</div>
{{/if}}
{{#if isFolderOwner}}
<div class="button-gap"></div>
{{#link-to 'folders.settings' folder.id folder.slug (query-params tab="tabShare")}}
<div class="square-button button-blue" id="folder-share-button" data-tooltip="Share space" data-tooltip-position="top center">
<div class="square-button-white" id="folder-share-button" data-tooltip="Share space" data-tooltip-position="top center">
<i class="material-icons">share</i>
</div>
{{/link-to}}
<div class="button-gap"></div>
{{#link-to 'folders.settings' folder.id folder.slug}}
<div class="square-button button-gray" id="folder-settings-button" data-tooltip="Space settings" data-tooltip-position="top center">
<div class="square-button-white" id="folder-settings-button" data-tooltip="Space settings" data-tooltip-position="top center">
<i class="material-icons">settings</i>
</div>
{{/link-to}}
{{/if}}
{{#if folderService.canEditCurrentFolder}}
<div class="button-gap"></div>
<div class="regular-button button-green" id="start-document-button" data-tooltip="Add new content" data-tooltip-position="top center">
<i class="material-icons">add</i>
<div class="name">Content</div>
</div>
{{/if}}
{{#if folderService.canEditCurrentFolder}}
{{folder/start-document
savedTemplates=savedTemplates
@ -58,26 +58,3 @@
{{/if}}
{{/if}}
</div>
<div class="clearfix" />
{{#if hasDocuments}}
{{folder/documents-list documents=documents folder=folder isFolderOwner=isFolderOwner onDocumentsChecked=(action 'onDocumentsChecked') }}
{{else}}
<div class="no-documents">
<div class="box">
<div class="regular-button button-transparent">
<i class="material-icons">add</i>
<div class="name">space</div>
</div>
<div class="message">Create a new space for<br/>all your documentation</div>
</div>
<div class="box">
<div class="regular-button button-green">
<i class="material-icons">add</i>
<div class="name">content</div>
</div>
<div class="message">Start with a content template or <br/>import .doc .docx, .txt .md files</div>
</div>
</div>
{{/if}}

View file

@ -1,67 +1,70 @@
<span class="hidden-xs hidden-sm">
{{#if session.isEditor}}
<div class="regular-button button-transparent" id="add-folder-button" data-tooltip="New space" data-tooltip-position="top center">
<i class="material-icons">add</i>
<div class="name">space</div>
</div>
{{#dropdown-dialog target="add-folder-button" position="bottom left" button="Add" color="flat-green" onAction=(action 'addFolder') focusOn="new-folder-name"}}
<div>
<div class="input-control">
<label>New space</label>
<div class="tip">A repository for related documentation</div>
{{input type='text' id="new-folder-name" class="mousetrap" value=newFolder}}
</div>
</div>
{{/dropdown-dialog}}
{{/if}}
</span>
<div class="sidebar-menu">
<div class="folders-list">
<div class="folders-list">
<div class="section">
<div class="heading">EVERYONE</div>
{{#unless hasPublicFolders}}
<div class="message margin-left-15">No global spaces</div>
{{/unless}}
<ul class="list">
{{#each publicFolders as |folder|}}
{{#link-to 'folders.folder' folder.id folder.slug class="link" activeClass='selected' }}
<li class="item">{{ folder.name }}</li>
{{/link-to}}
{{/each}}
</ul>
{{#if session.isEditor}}
<div class="add-space-action hidden-xs hidden-sm">
<div class="regular-button button-white" id="add-folder-button" data-tooltip="New space" data-tooltip-position="top center">
<i class="material-icons">add</i>
<div class="name">space</div>
</div>
{{#dropdown-dialog target="add-folder-button" position="bottom left" button="Add" color="flat-green" onAction=(action 'addFolder') focusOn="new-folder-name"}}
<div>
<div class="input-control">
<label>New space</label>
<div class="tip">A repository for related documentation</div>
{{input type='text' id="new-folder-name" class="mousetrap" value=newFolder}}
</div>
</div>
{{/dropdown-dialog}}
</div>
{{/if}}
<div class="section">
<div class="heading">EVERYONE</div>
{{#unless hasPublicFolders}}
<div class="message margin-left-15">No global spaces</div>
{{/unless}}
<ul class="list">
{{#each publicFolders as |folder|}}
{{#link-to 'folders.folder' folder.id folder.slug class="link" activeClass='selected' }}
<li class="item">{{ folder.name }}</li>
{{/link-to}}
{{/each}}
</ul>
</div>
{{#if session.authenticated}}
<div class="section">
<div class="heading">TEAM</div>
{{#unless hasProtectedFolders}}
<div class="message margin-left-15">No protected spaces</div>
{{/unless}}
<ul class="list">
{{#each protectedFolders as |folder|}}
{{#link-to 'folders.folder' folder.id folder.slug class="link" activeClass='selected' }}
<li class="item">{{ folder.name }}</li>
{{/link-to}}
{{/each}}
</ul>
</div>
<div class="section">
<div class="heading">PERSONAL</div>
{{#unless hasPrivateFolders}}
<div class="message margin-left-15">No private spaces</div>
{{/unless}}
<ul class="list">
{{#each privateFolders as |folder|}}
{{#link-to 'folders.folder' folder.id folder.slug class="link" activeClass='selected' }}
<li class="item">{{ folder.name }}</li>
{{/link-to}}
{{/each}}
</ul>
</div>
{{/if}}
</div>
{{#if session.authenticated}}
<div class="section">
<div class="heading">TEAM</div>
{{#unless hasProtectedFolders}}
<div class="message margin-left-15">No protected spaces</div>
{{/unless}}
<ul class="list">
{{#each protectedFolders as |folder|}}
{{#link-to 'folders.folder' folder.id folder.slug class="link" activeClass='selected' }}
<li class="item">{{ folder.name }}</li>
{{/link-to}}
{{/each}}
</ul>
</div>
<div class="section">
<div class="heading">PERSONAL</div>
{{#unless hasPrivateFolders}}
<div class="message margin-left-15">No private spaces</div>
{{/unless}}
<ul class="list">
{{#each privateFolders as |folder|}}
{{#link-to 'folders.folder' folder.id folder.slug class="link" activeClass='selected' }}
<li class="item">{{ folder.name }}</li>
{{/link-to}}
{{/each}}
</ul>
</div>
{{/if}}
</div>
<div class="copyright hidden-xs hidden-sm">
<a href="https://documize.com?ref=app-footer" target="_blank">Copyright&nbsp;&copy;&nbsp;2016 Documize</a>
<div class="copyright hidden-xs hidden-sm">
<a href="https://documize.com?ref=app-footer" target="_blank">Copyright&nbsp;&copy;&nbsp;2016 Documize Inc.</a>
</div>
</div>

View file

@ -1,6 +0,0 @@
{{#link-to 'search'}}
<div class="dual-box">
<div class="info hidden-xs">{{message}}</div>
<i class="material-icons icon">search</i>
</div>
{{/link-to}}

View file

@ -1,121 +0,0 @@
<div class="header">
<div class="container">
<div class="row">
<div class="pull-left">
<div class="content">
{{#if session.authenticated}}
<div id="accounts-button" class="header-button">
<i class="material-icons">apps</i>
</div>
{{else}}
{{#link-to 'folders.folder' title=session.appMeta.title}}
<div class="header-button">
<i class="material-icons">apps</i>
</div>
{{/link-to}}
{{/if}}
<div class="title">{{session.appMeta.title}}</div>
</div>
</div>
<div class="pull-right">
<div class="content">
{{#if session.authenticated}}
<div class="name hidden-xs">{{session.user.fullname}}</div>
<div id="user-button" class="header-button">
<i class="initials">{{session.user.initials}}</i>
</div>
{{else}}
<div class="login">
{{#link-to 'auth.login'}}Login{{/link-to}}
</div>
{{/if}}
</div>
</div>
</div>
<div class="row">
<ul class="breadcrumb-menu">
{{#if dashboardMode}}
<li class="option selected">
{{#link-to 'folders'}}Dashboard{{/link-to}}
</li>
{{/if}}
{{#if searchMode}}
<li class="option">
{{#link-to 'folders'}}Dashboard{{/link-to}}
</li>
<li class="option selected">
{{#link-to 'search'}}Search{{/link-to}}
</li>
{{/if}}
{{#if settingsMode}}
<li class="option">
{{#link-to 'folders'}}Dashboard{{/link-to}}
</li>
<li class="option selected">
{{#link-to 'customize.general'}}Settings{{/link-to}}
</li>
{{/if}}
{{#if folderMode}}
<li class="option">
{{#link-to 'folders.folder'}}Dashboard{{/link-to}}
</li>
<li class="option selected">
{{#link-to 'folders.folder' folder.id folder.slug}}{{folder.name}}{{/link-to}}
</li>
{{/if}}
{{#if profileMode}}
<li class="option">
{{#link-to 'folders'}}Dashboard{{/link-to}}
</li>
<li class="option selected">
{{#link-to 'profile'}}{{this.session.user.fullname}}{{/link-to}}
</li>
{{/if}}
{{#if documentMode}}
<li class="option">
{{#link-to 'folders'}}Dashboard{{/link-to}}
</li>
<li class="option">
{{#link-to 'folders.folder' folder.id folder.slug}}{{folder.name}}{{/link-to}}
</li>
<li class="option selected">
{{#link-to 'document' folder.id folder.slug document.id document.slug}}{{document.name}}{{/link-to}}
</li>
{{/if}}
</ul>
</div>
<div class="row">
{{yield}}
</div>
</div>
{{#if session.authenticated}}
{{#dropdown-menu target="accounts-button" position="bottom left" open="click" }}
<ul class="menu">
{{#each session.user.accounts as |account|}}
<li class="item" {{action 'switchAccount' account.domain }}>{{account.title}}</li>
{{/each}}
<li class="divider"></li>
<li class="item"><a href="https://documize.com/welcome">Add team...</a></li>
</ul>
{{/dropdown-menu}}
{{#dropdown-menu target="user-button" position="bottom right" open="click" }}
<ul class="menu">
<li class="item">
{{#link-to 'profile'}}Profile{{/link-to}}
</li>
{{#if session.isAdmin}}
<li class="item">
{{#link-to 'customize.general'}}Settings{{/link-to}}
</li>
{{/if}}
<li class="divider"></li>
<li class="item">
{{#link-to 'auth.logout'}}Logout{{/link-to}}
</li>
</ul>
{{/dropdown-menu}}
{{/if}}
</div>

View file

@ -1,8 +0,0 @@
<div class="dual-box dual-box-white">
<div class="input-inline fixed-width-font">
{{focus-input class="input" type="text" value=filter placeholder='#tags, keywords, "some phrase", keyword AND keyword, keyword OR keyword'}}
</div>
{{#link-to 'folders'}}
<i class="material-icons icon">clear</i>
{{/link-to}}
</div>

View file

@ -0,0 +1,6 @@
{{#link-to 'application'}}
<div class="regular-button button-white">
<i class="material-icons">arrow_back</i>
<div class="name">home</div>
</div>
{{/link-to}}

View file

@ -1,7 +0,0 @@
<div class="page-container">
<div class="container">
<div class="row">
{{yield}}
</div>
</div>
</div>

View file

@ -1,3 +0,0 @@
<div class="col-lg-9 col-md-9 col-sm-9">
{{yield}}
</div>

View file

@ -1,3 +0,0 @@
<div class="col-lg-3 col-md-3 col-sm-3">
{{yield}}
</div>

View file

@ -0,0 +1,7 @@
<div class="zone-container">
<div class="container-fluid">
<div class="row">
{{yield}}
</div>
</div>
</div>

View file

@ -0,0 +1,3 @@
<div id="zone-content" class="zone-content col-lg-9 col-md-9 col-sm-9">
{{yield}}
</div>

View file

@ -0,0 +1,14 @@
<div id="zone-header" class="zone-header">
<div class="info pull-left width-60">
<div class="title">
{{title}}
</div>
<div class="{{if hasMessage "message"}}">
{{message}}
</div>
</div>
<div class="actions pull-right hidden-xs hidden-sm">
{{yield}}
</div>
<div class="clearfix"></div>
</div>

View file

@ -0,0 +1,70 @@
<div id="zone-navigation" class="zone-navigation">
<div class="pull-left">
<div class="content">
{{#if session.authenticated}}
<div id="accounts-button" class="header-button">
<i class="material-icons">apps</i>
</div>
{{else}}
{{#link-to 'application' title=session.appMeta.title}}
<div class="header-button">
<i class="material-icons">apps</i>
</div>
{{/link-to}}
{{/if}}
{{#link-to 'application' class="title"}}
<div>{{session.appMeta.title}}</div>
{{/link-to}}
</div>
</div>
<div class="pull-right hidden-xs hidden-sm">
<div class="content">
{{#if session.authenticated}}
<div class="name">{{session.user.fullname}}</div>
<div id="user-button" class="header-button">
<i class="initials">{{session.user.initials}}</i>
</div>
{{else}}
<div class="login">
{{#link-to 'auth.login'}}Login{{/link-to}}
</div>
{{/if}}
<div class="search">
{{#link-to 'search'}}
<i class="material-icons">search</i>
{{/link-to}}
</div>
</div>
</div>
{{#if session.authenticated}}
{{#dropdown-menu target="accounts-button" position="bottom left" open="click" }}
<ul class="menu">
{{#each session.user.accounts as |account|}}
<li class="item" {{action 'switchAccount' account.domain }}>{{account.title}}</li>
{{/each}}
<li class="divider"></li>
<li class="item"><a href="https://documize.com/welcome">Add team...</a></li>
</ul>
{{/dropdown-menu}}
{{#dropdown-menu target="user-button" position="bottom right" open="click" }}
<ul class="menu">
<li class="item">
{{#link-to 'profile'}}Profile{{/link-to}}
</li>
{{#if session.isAdmin}}
<li class="item">
{{#link-to 'customize.general'}}Settings{{/link-to}}
</li>
{{/if}}
<li class="divider"></li>
<li class="item">
{{#link-to 'auth.logout'}}Logout{{/link-to}}
</li>
</ul>
{{/dropdown-menu}}
{{/if}}
<div class="clearfix"></div>
</div>

View file

@ -0,0 +1,3 @@
<div id="zone-sidebar" class="zone-sidebar col-lg-3 col-md-3 col-sm-3">
{{yield}}
</div>

View file

@ -1,14 +1,23 @@
<div class="search-results">
<h2 class="heading">{{resultPhrase}}</h2>
<ul class="search-list">
{{#each results key="id" as |result index|}}
<li class="search-card">
<a href="s/{{result.folderId}}/{{result.folderSlug}}/d/{{ result.documentId }}/{{result.documentSlug}}?page={{ result.id }}">
<div class="title">{{ result.documentTitle }}</div>
<div class="snippet">{{ result.pageTitle }}</div>
<div class="folder">{{ result.folderName }}</div>
<div class="tags">{{search/tag-list documentTags=result.documentTags}}</div>
<ul class="list">
{{#each documents key="doc.id" as |result index|}}
<li class="item">
<a class="link" href="s/{{result.doc.folderId}}/{{result.doc.folderSlug}}/d/{{ result.doc.documentId }}/{{result.doc.documentSlug}}?page={{ result.doc.id }}">
<div class="title">{{ result.doc.documentTitle }}</div><div class="folder">{{ result.doc.folderName }}</div>
<div class="excerpt">{{ result.doc.documentExcerpt }}</div>
<div class="chips">{{search/tag-list documentTags=result.doc.documentTags}}</div>
</a>
{{#if result.hasReferences}}
<div class="references">
<span class="label">referenced &raquo;</span>
{{#each result.ref as |ref index|}}
<a class="link" href="s/{{result.doc.folderId}}/{{result.doc.folderSlug}}/d/{{ result.doc.documentId }}/{{result.doc.documentSlug}}?page={{ ref.id }}">
{{ref.pageTitle}}{{ref.comma}}
</a>
{{/each}}
</div>
{{/if}}
</li>
{{/each}}
</ul>

View file

@ -1,5 +1,7 @@
<div class="tags">
<div class="chips">
{{#each tagz as |tg|}}
<div class="tag">#{{tg}}</div>
<div class="chip">
<span class="chip-text">#{{tg}}</span>
</div>
{{/each}}
</div>

View file

@ -1,6 +1,6 @@
<div class="user-list">
<div class="heading">{{users.length}} users</div>
<table class="basic-table no-table-border">
<table class="basic-table">
<thead>
<tr>
<th class="border-bottom border-top">Firstname</th>
@ -130,4 +130,4 @@
</div>
</div>
<div class="clearfix"></div>
</div>
</div>

View file

@ -1,11 +1,11 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
// by contacting <sales@documize.com>.
//
// https://documize.com
@ -18,7 +18,6 @@ import (
"io/ioutil"
"net/http"
"net/url"
"strings"
"github.com/documize/community/documize/api/entity"
"github.com/documize/community/documize/api/plugins"
@ -54,6 +53,10 @@ func SearchDocuments(w http.ResponseWriter, r *http.Request) {
results[key] = result
}
if len(results) == 0 {
results = []entity.DocumentSearch{}
}
data, err := json.Marshal(results)
if err != nil {
@ -61,10 +64,6 @@ func SearchDocuments(w http.ResponseWriter, r *http.Request) {
return
}
if strings.ToLower(string(data)) == "null" {
data = []byte("[ ]")
}
writeSuccessBytes(w, data)
}

View file

@ -275,15 +275,16 @@ type Search struct {
// DocumentSearch represents 'presentable' search results.
type DocumentSearch struct {
ID string `json:"id"`
DocumentID string `json:"documentId"`
DocumentTitle string `json:"documentTitle"`
DocumentSlug string `json:"documentSlug"`
Tags string `json:"documentTags"`
PageTitle string `json:"pageTitle"`
LabelID string `json:"folderId"`
LabelName string `json:"folderName"`
FolderSlug string `json:"folderSlug"`
ID string `json:"id"`
DocumentID string `json:"documentId"`
DocumentTitle string `json:"documentTitle"`
DocumentSlug string `json:"documentSlug"`
DocumentExcerpt string `json:"documentExcerpt"`
Tags string `json:"documentTags"`
PageTitle string `json:"pageTitle"`
LabelID string `json:"folderId"`
LabelName string `json:"folderName"`
FolderSlug string `json:"folderSlug"`
}
// SiteMeta holds information associated with an Organization.

View file

@ -244,7 +244,7 @@ func (p *Persister) SearchDocument(keywords string) (results []entity.DocumentSe
}
sql := `SELECT search.id, documentid, pagetitle, document.labelid, document.title as documenttitle, document.tags,
COALESCE(label.label,'Unknown') AS labelname
COALESCE(label.label,'Unknown') AS labelname, document.excerpt as documentexcerpt
FROM search, document LEFT JOIN label ON label.orgid=document.orgid AND label.refid = document.labelid
WHERE search.documentid = document.refid AND search.orgid=? AND document.template=0 ` + tagQuery +
`AND document.labelid IN

View file

@ -40,7 +40,7 @@ func init() {
meta.ID = "38c0e4c5-291c-415e-8a4d-262ee80ba5df"
meta.Title = "GitHub"
meta.Description = "Code commits and branches"
meta.Description = "Link code commits and issues"
meta.ContentType = "github"
meta.Callback = Callback
}
@ -652,7 +652,7 @@ func (p *Provider) Render(config, data string) string {
payload.Repo = c.RepoInfo
payload.Limit = c.BranchLines
if len(c.BranchSince) > 0 {
payload.DateMessage = ", created after " + c.BranchSince
payload.DateMessage = "created after " + c.BranchSince
}
switch c.ReportInfo.ID {

View file

@ -42,7 +42,7 @@ var renderTemplates = map[string]string{
<div class="section-github-render">
<p>
There are {{ .CommitCount }} commits for branch <a href="{{.Config.BranchURL}}">{{.Config.Branch}}</a> of repository <a href="{{ .Repo.URL }}">{{.Repo.Name}}.</a>
Up to {{ .Limit }} items are shown{{ .DateMessage }}.
Showing {{ .Limit }} items {{ .DateMessage }}.
</p>
<div class="github-board">
{{range $data := .BranchCommits}}

View file

@ -1,11 +1,11 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
// by contacting <sales@documize.com>.
//
// https://documize.com
@ -44,6 +44,7 @@ func (c *Client) DeleteDocument(documentID string) error {
if string(b) == emptyBraces {
return nil
}
return errors.New(string(b))
}