diff --git a/.jsbeautifyrc b/.jsbeautifyrc index 9e2ba268..93e2e835 100644 --- a/.jsbeautifyrc +++ b/.jsbeautifyrc @@ -1,15 +1,47 @@ { - "indent_size": 4, - "indent_char": " ", - "preserve_newlines": true, "css": { "indent_size": 4, "allowed_file_extensions": ["css", "scss", "sass", "less"] }, "html": { - "allowed_file_extensions": ["htm", "html", "xhtml", "shtml", "xml", "svg", "hbs"] + "indent_size": 4, + "indent_char": " ", + "preserve_newlines": true, + "wrap_line_length": 0, + "indent_handlebars": true, + "indent_inner_html": false, + "indent_scripts": "keep" + }, + "hbs": { + "indent_size": 4, + "indent_char": " ", + "preserve_newlines": true, + "wrap_line_length": 0 }, "js": { - "break_chained_methods": false + "indent_size": 4, + "indent_char": " ", + "preserve_newlines": true, + "wrap_line_length": 0, + "break_chained_methods": false, + "indent_with_tabs": false, + "max_preserve_newlines": 2, + "jslint_happy": true, + "brace_style": "collapse-preserve-inline", + "space_after_anon_function": false, + "keep_function_indentation": false, + "space_before_conditional": true + }, + "sql": { + "indent_size": 4, + "indent_char": " ", + "indent_level": 0, + "indent_with_tabs": false + }, + "_default": { + "indent_size": 4, + "indent_char": " ", + "preserve_newlines": true, + "wrap_line_length": 0 } } \ No newline at end of file diff --git a/app/.editorconfig b/app/.editorconfig deleted file mode 100644 index 3ef6636e..00000000 --- a/app/.editorconfig +++ /dev/null @@ -1,34 +0,0 @@ -# EditorConfig helps developers define and maintain consistent -# coding styles between different editors and IDEs -# editorconfig.org - -root = true - - -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -indent_style = space -indent_size = 4 - -[*.js] -indent_style = space -indent_size = 4 - -[*.hbs] -insert_final_newline = false -indent_style = space -indent_size = 4 - -[*.css] -indent_style = space -indent_size = 4 - -[*.html] -indent_style = space -indent_size = 4 - -[*.{diff,md}] -trim_trailing_whitespace = false diff --git a/app/app/components/document/document-sidebar-toc.js b/app/app/components/document/document-sidebar-toc.js index 4fc5a44c..3cc285b0 100644 --- a/app/app/components/document/document-sidebar-toc.js +++ b/app/app/components/document/document-sidebar-toc.js @@ -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); diff --git a/app/app/components/document/document-sidebar.js b/app/app/components/document/document-sidebar.js index 9e333e9a..39a967ed 100644 --- a/app/app/components/document/document-sidebar.js +++ b/app/app/components/document/document-sidebar.js @@ -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; } } }); diff --git a/app/app/components/document/document-toolbar.js b/app/app/components/document/document-toolbar.js index 253deb2a..0baff562 100644 --- a/app/app/components/document/document-toolbar.js +++ b/app/app/components/document/document-toolbar.js @@ -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; - }, } }); diff --git a/app/app/components/folder/documents-list.js b/app/app/components/folder/documents-list.js index 05932992..f6850fd6 100644 --- a/app/app/components/folder/documents-list.js +++ b/app/app/components/folder/documents-list.js @@ -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'); diff --git a/app/app/components/folder/folder-dashboard.js b/app/app/components/folder/folder-toolbar.js similarity index 76% rename from app/app/components/folder/folder-dashboard.js rename to app/app/components/folder/folder-toolbar.js index 0f31e243..5ece1015 100644 --- a/app/app/components/folder/folder-dashboard.js +++ b/app/app/components/folder/folder-toolbar.js @@ -1,11 +1,11 @@ // Copyright 2016 Documize Inc. . 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 . +// by contacting . // // 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; } } -}); \ No newline at end of file +}); diff --git a/app/app/components/header/search-box.js b/app/app/components/header/search-box.js deleted file mode 100644 index 67cc0f65..00000000 --- a/app/app/components/header/search-box.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2016 Documize Inc. . 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 . -// -// 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')); - }, -}); \ No newline at end of file diff --git a/app/app/components/layout/page-sidebar.js b/app/app/components/layout/button-home.js similarity index 68% rename from app/app/components/layout/page-sidebar.js rename to app/app/components/layout/button-home.js index a5417462..f62de890 100644 --- a/app/app/components/layout/page-sidebar.js +++ b/app/app/components/layout/button-home.js @@ -1,14 +1,14 @@ // Copyright 2016 Documize Inc. . 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 . +// by contacting . // // https://documize.com import Ember from 'ember'; -export default Ember.Component.extend({}); \ No newline at end of file +export default Ember.Component.extend({}); diff --git a/app/app/components/header/message-box.js b/app/app/components/layout/zone-container.js similarity index 100% rename from app/app/components/header/message-box.js rename to app/app/components/layout/zone-container.js diff --git a/app/app/components/layout/page-container.js b/app/app/components/layout/zone-content.js similarity index 68% rename from app/app/components/layout/page-container.js rename to app/app/components/layout/zone-content.js index a5417462..cb25c125 100644 --- a/app/app/components/layout/page-container.js +++ b/app/app/components/layout/zone-content.js @@ -1,14 +1,15 @@ // Copyright 2016 Documize Inc. . 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 . +// by contacting . // // https://documize.com import Ember from 'ember'; -export default Ember.Component.extend({}); \ No newline at end of file +export default Ember.Component.extend({ +}); diff --git a/app/app/components/layout/zone-header.js b/app/app/components/layout/zone-header.js new file mode 100644 index 00000000..937dca3c --- /dev/null +++ b/app/app/components/layout/zone-header.js @@ -0,0 +1,21 @@ +// Copyright 2016 Documize Inc. . 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 . +// +// 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; + }) +}); diff --git a/app/app/components/header/page-navigation.js b/app/app/components/layout/zone-navigation.js similarity index 73% rename from app/app/components/header/page-navigation.js rename to app/app/components/layout/zone-navigation.js index c161fed1..0c7acc0e 100644 --- a/app/app/components/header/page-navigation.js +++ b/app/app/components/layout/zone-navigation.js @@ -1,11 +1,11 @@ // Copyright 2016 Documize Inc. . 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 . +// by contacting . // // 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); } } -}); \ No newline at end of file +}); diff --git a/app/app/components/layout/page-content.js b/app/app/components/layout/zone-sidebar.js similarity index 68% rename from app/app/components/layout/page-content.js rename to app/app/components/layout/zone-sidebar.js index a5417462..cb25c125 100644 --- a/app/app/components/layout/page-content.js +++ b/app/app/components/layout/zone-sidebar.js @@ -1,14 +1,15 @@ // Copyright 2016 Documize Inc. . 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 . +// by contacting . // // https://documize.com import Ember from 'ember'; -export default Ember.Component.extend({}); \ No newline at end of file +export default Ember.Component.extend({ +}); diff --git a/app/app/components/search/search-results.js b/app/app/components/search/search-results.js index dca722aa..453e27dc 100644 --- a/app/app/components/search/search-results.js +++ b/app/app/components/search/search-results.js @@ -1,11 +1,11 @@ // Copyright 2016 Documize Inc. . 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 . +// by contacting . // // 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); } -}); \ No newline at end of file +}); diff --git a/app/app/helpers/document/file-icon.js b/app/app/helpers/document/file-icon.js index 04058c71..1d1d6904 100644 --- a/app/app/helpers/document/file-icon.js +++ b/app/app/helpers/document/file-icon.js @@ -1,11 +1,11 @@ // Copyright 2016 Documize Inc. . 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 . +// by contacting . // // 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); \ No newline at end of file +export default Ember.Helper.helper(documentFileIcon); diff --git a/app/app/initializers/application.js b/app/app/initializers/application.js index 0cc3d498..11372ba4 100644 --- a/app/app/initializers/application.js +++ b/app/app/initializers/application.js @@ -1,11 +1,11 @@ // Copyright 2016 Documize Inc. . 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 . +// by contacting . // // https://documize.com @@ -25,4 +25,4 @@ export function initialize( /*application*/ ) { export default { name: 'application', initialize: initialize -}; \ No newline at end of file +}; diff --git a/app/app/pods/customize/folders/template.hbs b/app/app/pods/customize/folders/template.hbs index f19f6e52..09bbcf09 100644 --- a/app/app/pods/customize/folders/template.hbs +++ b/app/app/pods/customize/folders/template.hbs @@ -1,43 +1,45 @@ -
-
-
-
{{folders.length}} shared {{label}}
-
View and change shared space ownership
-
-
- - - - - - - - - {{#each folders as |folder|}} - - - + + {{/each}} + +
SpaceParticipants
- {{#link-to 'folders.folder' folder.id folder.slug}}{{folder.name}}{{/link-to}} - - {{#each folder.sharedWith as |person|}} - {{#if person.isEveryone}} - Everyone - {{else}} +
+
+ +
+
{{folders.length}} shared {{label}}
+
View and change shared space ownership
+
+
+ + + + + + + + + {{#each folders as |folder|}} + + + - - {{/each}} - -
SpaceParticipants
+ {{#link-to 'folders.folder' folder.id folder.slug class="alt"}}{{folder.name}}{{/link-to}} + + {{#each folder.sharedWith as |person|}} + {{#if person.isEveryone}} + Everyone + {{else}} - {{#if person.isOwner}} - {{person.firstname}} {{person.lastname}} (owner) - {{else}} - {{person.firstname}} {{person.lastname}} - make owner - {{/if}} - {{/if}} -
- {{/each}} -
-
- -
\ No newline at end of file + {{#if person.isOwner}} + {{person.firstname}} {{person.lastname}} (owner) + {{else}} + {{person.firstname}} {{person.lastname}} + make owner + {{/if}} + {{/if}} +
+ {{/each}} +
+
+ +
+ diff --git a/app/app/pods/customize/general/template.hbs b/app/app/pods/customize/general/template.hbs index c7b26e69..c161a5c8 100644 --- a/app/app/pods/customize/general/template.hbs +++ b/app/app/pods/customize/general/template.hbs @@ -1,4 +1,4 @@ -
+
General Settings
@@ -26,4 +26,4 @@
save
-
\ No newline at end of file +
diff --git a/app/app/pods/customize/template.hbs b/app/app/pods/customize/template.hbs index 22a00a02..ae1e4594 100644 --- a/app/app/pods/customize/template.hbs +++ b/app/app/pods/customize/template.hbs @@ -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}} - - {{/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}} + + {{/layout/zone-sidebar}} + + {{#layout/zone-content}} + {{outlet}} + {{/layout/zone-content}} + +{{/layout/zone-container}} diff --git a/app/app/pods/customize/users/template.hbs b/app/app/pods/customize/users/template.hbs index 2e196261..e858f5a8 100644 --- a/app/app/pods/customize/users/template.hbs +++ b/app/app/pods/customize/users/template.hbs @@ -1,4 +1,4 @@ -
+
Add User
@@ -20,4 +20,4 @@
-
{{settings/user-list users=model onDelete=(action "onDelete") onSave=(action "onSave") onPassword=(action "onPassword")}} \ No newline at end of file +
{{settings/user-list users=model onDelete=(action "onDelete") onSave=(action "onSave") onPassword=(action "onPassword")}} diff --git a/app/app/pods/document/index/template.hbs b/app/app/pods/document/index/template.hbs index 2c036ac4..52901e8d 100644 --- a/app/app/pods/document/index/template.hbs +++ b/app/app/pods/document/index/template.hbs @@ -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}} -
-
-
- {{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')}} -
-
- {{document/document-view document=model pages=pages attachments=attachments folder=folder folders=folders isEditor=isEditor onAttachmentDeleted=(action 'onAttachmentDeleted') onDeletePage=(action 'onPageDeleted')}} -
-
-
+ {{#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}} diff --git a/app/app/pods/folders/folder/controller.js b/app/app/pods/folders/folder/controller.js index 365b5ba4..8237cb61 100644 --- a/app/app/pods/folders/folder/controller.js +++ b/app/app/pods/folders/folder/controller.js @@ -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')); }, diff --git a/app/app/pods/folders/folder/template.hbs b/app/app/pods/folders/folder/template.hbs index 5e059912..0e8d010d 100644 --- a/app/app/pods/folders/folder/template.hbs +++ b/app/app/pods/folders/folder/template.hbs @@ -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}} diff --git a/app/app/pods/folders/settings/template.hbs b/app/app/pods/folders/settings/template.hbs index 8da9e971..121c5013 100644 --- a/app/app/pods/folders/settings/template.hbs +++ b/app/app/pods/folders/settings/template.hbs @@ -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}} +
+ arrow_back +
space
+
+ {{/link-to}} + {{/layout/zone-header}} + + {{#layout/zone-sidebar}} - {{/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}} diff --git a/app/app/pods/profile/route.js b/app/app/pods/profile/route.js index f6dc5b21..851ac21f 100644 --- a/app/app/pods/profile/route.js +++ b/app/app/pods/profile/route.js @@ -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')); } }); diff --git a/app/app/pods/profile/template.hbs b/app/app/pods/profile/template.hbs index 62860e4f..69cc6f6d 100644 --- a/app/app/pods/profile/template.hbs +++ b/app/app/pods/profile/template.hbs @@ -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}} + + {{/layout/zone-sidebar}} + + {{#layout/zone-content}} +
+
+
+ + {{focus-input id="firstname" type="text" value=model.firstname}} +
+
+ + {{input id="lastname" type="text" value=model.lastname}} +
+
+ + {{input id="email" type="text" value=model.email}} +
+
+ +
Optional change your password
+ {{input id="password" type="password" value=password.password}} +
+
+ +
Confirm your new password
+ {{input id="confirmPassword" type="password" value=password.confirmation}} +
+
save
+
+
+ {{/layout/zone-content}} + +{{/layout/zone-container}} diff --git a/app/app/pods/search/controller.js b/app/app/pods/search/controller.js index 7437690e..8d992b6b 100644 --- a/app/app/pods/search/controller.js +++ b/app/app/pods/search/controller.js @@ -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); - } } }); diff --git a/app/app/pods/search/template.hbs b/app/app/pods/search/template.hbs index 18790d63..ccdf0b50 100644 --- a/app/app/pods/search/template.hbs +++ b/app/app/pods/search/template.hbs @@ -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}} + + + +{{/layout/zone-container}} diff --git a/app/app/routes/application.js b/app/app/routes/application.js index af1ef9b8..bdc1c112 100644 --- a/app/app/routes/application.js +++ b/app/app/routes/application.js @@ -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)) { diff --git a/app/app/styles/app.scss b/app/app/styles/app.scss index b66df98b..2d73151f 100644 --- a/app/app/styles/app.scss +++ b/app/app/styles/app.scss @@ -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"; diff --git a/app/app/styles/base.scss b/app/app/styles/base.scss index 575e7ac5..2caa40fa 100644 --- a/app/app/styles/base.scss +++ b/app/app/styles/base.scss @@ -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; } diff --git a/app/app/styles/color.scss b/app/app/styles/color.scss index 40c0151f..b4bbd8fc 100644 --- a/app/app/styles/color.scss +++ b/app/app/styles/color.scss @@ -8,35 +8,35 @@ // by contacting . // // 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; -} diff --git a/app/app/styles/functions.scss b/app/app/styles/functions.scss index a18ccc45..5282693a 100644 --- a/app/app/styles/functions.scss +++ b/app/app/styles/functions.scss @@ -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) diff --git a/app/app/styles/print.scss b/app/app/styles/print.scss index 39da0655..48c8a469 100644 --- a/app/app/styles/print.scss +++ b/app/app/styles/print.scss @@ -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; } } } diff --git a/app/app/styles/view/document/content.scss b/app/app/styles/view/document/content.scss index a24d3f31..609b88c1 100644 --- a/app/app/styles/view/document/content.scss +++ b/app/app/styles/view/document/content.scss @@ -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; } - } } diff --git a/app/app/styles/view/document/sidebar.scss b/app/app/styles/view/document/sidebar.scss index 3c3d76ef..1be28d1f 100644 --- a/app/app/styles/view/document/sidebar.scss +++ b/app/app/styles/view/document/sidebar.scss @@ -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; + } } } } diff --git a/app/app/styles/view/document/toolbar.scss b/app/app/styles/view/document/toolbar.scss index 3919be20..eff0fcdd 100644 --- a/app/app/styles/view/document/toolbar.scss +++ b/app/app/styles/view/document/toolbar.scss @@ -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 { } diff --git a/app/app/styles/view/document/wizard.scss b/app/app/styles/view/document/wizard.scss index 62fde865..cd7d777d 100644 --- a/app/app/styles/view/document/wizard.scss +++ b/app/app/styles/view/document/wizard.scss @@ -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; diff --git a/app/app/styles/view/document/wysiwyg.scss b/app/app/styles/view/document/wysiwyg.scss index 3629737d..5963084e 100644 --- a/app/app/styles/view/document/wysiwyg.scss +++ b/app/app/styles/view/document/wysiwyg.scss @@ -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); } diff --git a/app/app/styles/view/layout.scss b/app/app/styles/view/layout.scss index 54439c7e..981e9611 100644 --- a/app/app/styles/view/layout.scss +++ b/app/app/styles/view/layout.scss @@ -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; + } } diff --git a/app/app/styles/view/page-auth.scss b/app/app/styles/view/page-auth.scss index 4edbc9c2..a0112460 100644 --- a/app/app/styles/view/page-auth.scss +++ b/app/app/styles/view/page-auth.scss @@ -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; diff --git a/app/app/styles/view/page-documents.scss b/app/app/styles/view/page-documents.scss index 4708b660..6a541785 100644 --- a/app/app/styles/view/page-documents.scss +++ b/app/app/styles/view/page-documents.scss @@ -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; diff --git a/app/app/styles/view/page-folder-settings.scss b/app/app/styles/view/page-folder-settings.scss new file mode 100644 index 00000000..e69de29b diff --git a/app/app/styles/view/page-profile.scss b/app/app/styles/view/page-profile.scss new file mode 100644 index 00000000..e69de29b diff --git a/app/app/styles/view/page-search.scss b/app/app/styles/view/page-search.scss index 5c396ef1..36819ea2 100644 --- a/app/app/styles/view/page-search.scss +++ b/app/app/styles/view/page-search.scss @@ -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; + } + } + } + } + } } } diff --git a/app/app/styles/view/page-settings.scss b/app/app/styles/view/page-settings.scss index 99959170..d40f5863 100644 --- a/app/app/styles/view/page-settings.scss +++ b/app/app/styles/view/page-settings.scss @@ -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; } } diff --git a/app/app/styles/widget/widget-avatar.scss b/app/app/styles/widget/widget-avatar.scss index 94c88a52..e09dc5d2 100644 --- a/app/app/styles/widget/widget-avatar.scss +++ b/app/app/styles/widget/widget-avatar.scss @@ -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; } diff --git a/app/app/styles/widget/widget-button.scss b/app/app/styles/widget/widget-button.scss index ffe0a484..31bff6e7 100644 --- a/app/app/styles/widget/widget-button.scss +++ b/app/app/styles/widget/widget-button.scss @@ -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; diff --git a/app/app/styles/widget/widget-card.scss b/app/app/styles/widget/widget-card.scss index 2408b48c..26a743e2 100644 --- a/app/app/styles/widget/widget-card.scss +++ b/app/app/styles/widget/widget-card.scss @@ -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; diff --git a/app/app/styles/widget/widget-chip.scss b/app/app/styles/widget/widget-chip.scss index 9c10afd0..b1e92526 100644 --- a/app/app/styles/widget/widget-chip.scss +++ b/app/app/styles/widget/widget-chip.scss @@ -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; } } diff --git a/app/app/styles/widget/widget-dropdown.scss b/app/app/styles/widget/widget-dropdown.scss index df6427c9..e0ccb37b 100644 --- a/app/app/styles/widget/widget-dropdown.scss +++ b/app/app/styles/widget/widget-dropdown.scss @@ -99,7 +99,7 @@ > li.divider { height: 1px; - border-top: 1px solid $color-border2; + border-top: 1px solid $color-border; margin: 5px 0; } diff --git a/app/app/styles/widget/widget-input.scss b/app/app/styles/widget/widget-input.scss index 54e4eed2..120b8b2c 100644 --- a/app/app/styles/widget/widget-input.scss +++ b/app/app/styles/widget/widget-input.scss @@ -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; -} \ No newline at end of file +} diff --git a/app/app/styles/widget/widget-sidebar-menu.scss b/app/app/styles/widget/widget-sidebar-menu.scss index da02f6a0..a309f1a0 100644 --- a/app/app/styles/widget/widget-sidebar-menu.scss +++ b/app/app/styles/widget/widget-sidebar-menu.scss @@ -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; diff --git a/app/app/styles/widget/widget-table.scss b/app/app/styles/widget/widget-table.scss index ae3645ed..03258a9d 100644 --- a/app/app/styles/widget/widget-table.scss +++ b/app/app/styles/widget/widget-table.scss @@ -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 { diff --git a/app/app/templates/components/document/document-sidebar-toc.hbs b/app/app/templates/components/document/document-sidebar-toc.hbs index b471d11a..57659328 100644 --- a/app/app/templates/components/document/document-sidebar-toc.hbs +++ b/app/app/templates/components/document/document-sidebar-toc.hbs @@ -1,4 +1,4 @@ -