From 3f109a9d1dfc217268e94300a8c9c024f1b5576a Mon Sep 17 00:00:00 2001 From: Harvey Kandola Date: Tue, 7 Mar 2017 16:10:13 +0000 Subject: [PATCH] document sidebar index view --- app/app/components/document/document-page.js | 13 +- .../components/document/document-sidebar.js | 124 ------- ...t-sidebar-toc.js => sidebar-view-index.js} | 19 +- app/app/components/document/sidebar-zone.js | 14 +- .../section/markdown/type-editor.js | 2 - app/app/pods/document/controller.js | 311 ------------------ app/app/pods/document/index/controller.js | 7 +- app/app/pods/document/index/template.hbs | 3 +- app/app/pods/document/route.js | 2 +- app/app/pods/document/section/route.js | 2 +- app/app/styles/view/document/all.scss | 3 +- .../document/sidebar-view-attachments.scss | 59 ---- .../view/document/sidebar-view-index.scss | 57 ++++ app/app/styles/widget/widget-chip.scss | 2 +- .../document/document-sidebar-toc.hbs | 29 -- .../components/document/document-sidebar.hbs | 31 -- .../document/sidebar-view-index.hbs | 34 ++ .../components/document/sidebar-zone.hbs | 5 + 18 files changed, 139 insertions(+), 578 deletions(-) delete mode 100644 app/app/components/document/document-sidebar.js rename app/app/components/document/{document-sidebar-toc.js => sidebar-view-index.js} (92%) create mode 100644 app/app/styles/view/document/sidebar-view-index.scss delete mode 100644 app/app/templates/components/document/document-sidebar-toc.hbs delete mode 100644 app/app/templates/components/document/document-sidebar.hbs create mode 100644 app/app/templates/components/document/sidebar-view-index.hbs diff --git a/app/app/components/document/document-page.js b/app/app/components/document/document-page.js index eaf2614f..301cce71 100644 --- a/app/app/components/document/document-page.js +++ b/app/app/components/document/document-page.js @@ -18,24 +18,19 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, { sectionService: Ember.inject.service('section'), editMode: false, - init() { + didReceiveAttrs() { this._super(...arguments); let page = this.get('page'); this.get('documentService').getPageMeta(page.get('documentId'), page.get('id')).then((meta) => { this.set('meta', meta); + if (this.get('toEdit') === this.get('page.id') && this.get('isEditor')) { + this.send('onEdit'); + } }); }, - didReceiveAttrs() { - this._super(...arguments); - - if (this.get('toEdit') === this.get('page.id') && this.get('isEditor')) { - this.send('onEdit'); - } - }, - actions: { onSavePage(page, meta) { this.set('page', page); diff --git a/app/app/components/document/document-sidebar.js b/app/app/components/document/document-sidebar.js deleted file mode 100644 index e280177d..00000000 --- a/app/app/components/document/document-sidebar.js +++ /dev/null @@ -1,124 +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'; -import TooltipMixin from '../../mixins/tooltip'; -import NotifierMixin from '../../mixins/notifier'; - -export default Ember.Component.extend(TooltipMixin, NotifierMixin, { - documentService: Ember.inject.service('document'), - sectionService: Ember.inject.service('section'), - document: {}, - folder: {}, - showToc: true, - showSections: false, - showScrollTool: false, - showingSections: false, - - init() { - this._super(...arguments); - this.get('sectionService').getSpaceBlocks(this.get('folder.id')).then((b) => { - this.set('blocks', b); - }); - }, - - didRender() { - if (this.session.authenticated) { - this.addTooltip(document.getElementById("section-tool")); - } - }, - - didInsertElement() { - this.eventBus.subscribe('resized', this, 'positionTool'); - this.eventBus.subscribe('scrolled', this, 'positionTool'); - }, - - willDestroyElement() { - this.eventBus.unsubscribe('resized'); - this.eventBus.unsubscribe('scrolled'); - this.destroyTooltips(); - }, - - positionTool() { - if (this.get('isDestroyed') || this.get('isDestroying')) { - return; - } - - let s = $(".scroll-tool"); - let windowpos = $(window).scrollTop(); - - if (windowpos >= 300) { - this.set('showScrollTool', true); - s.addClass("stuck-tool"); - s.css('left', parseInt($(".zone-navigation").css('width')) + parseInt($(".zone-sidebar").css('width')) - 16 + 'px'); - } else { - this.set('showScrollTool', false); - s.removeClass("stuck-tool"); - } - }, - - actions: { - // Page up - above pages shunt down. - onPageSequenceChange(pendingChanges) { - this.attrs.changePageSequence(pendingChanges); - }, - - // Move down - pages below shift up. - onPageLevelChange(pendingChanges) { - this.attrs.changePageLevel(pendingChanges); - }, - - gotoPage(id) { - return this.attrs.gotoPage(id); - }, - - showToc() { - this.set('showToc', true); - this.set('showSections', false); - this.set('showingSections', false); - }, - - - showSections() { - this.set('showToc', false); - this.set('showSections', true); - this.set('showingSections', true); - }, - - onCancel() { - this.send('showToc'); - this.set('showingSections', false); - }, - - onAddSection(section) { - this.send('showToc'); - this.attrs.onAddSection(section); - }, - - onInsertBlock(block) { - this.send('showToc'); - this.attrs.onInsertBlock(block); - }, - - onDeleteBlock(id) { - this.set('blocks', this.get('blocks').filter((item) => item.get('id') !== id)); - this.attrs.onDeleteBlock(id); - }, - - scrollTop() { - this.set('showScrollTool', false); - - $("html,body").animate({ - scrollTop: 0 - }, 500, "linear"); - } - } -}); diff --git a/app/app/components/document/document-sidebar-toc.js b/app/app/components/document/sidebar-view-index.js similarity index 92% rename from app/app/components/document/document-sidebar-toc.js rename to app/app/components/document/sidebar-view-index.js index 3d4d6be0..0f3548fd 100644 --- a/app/app/components/document/document-sidebar-toc.js +++ b/app/app/components/document/sidebar-view-index.js @@ -31,13 +31,18 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, { }), didReceiveAttrs: function () { + this._super(...arguments); + this.set('showToc', is.not.undefined(this.get('pages')) && this.get('pages').get('length') > 0); + if (is.not.null(this.get('page'))) { this.send('onEntryClick', this.get('page')); } }, didRender: function () { + this._super(...arguments); + if (this.session.authenticated) { this.addTooltip(document.getElementById("toc-up-button")); this.addTooltip(document.getElementById("toc-down-button")); @@ -47,10 +52,14 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, { }, didInsertElement() { + this._super(...arguments); + this.eventBus.subscribe('documentPageAdded', this, 'onDocumentPageAdded'); }, willDestroyElement() { + this._super(...arguments); + this.eventBus.unsubscribe('documentPageAdded'); this.destroyTooltips(); }, @@ -89,7 +98,7 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, { let pendingChanges = tocUtil.moveUp(state, pages, page); if (pendingChanges.length > 0) { - this.attrs.changePageSequence(pendingChanges); + this.attrs.onPageSequenceChange(pendingChanges); this.send('onEntryClick', this.get('page')); this.audit.record("moved-page-up"); @@ -109,7 +118,7 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, { let pendingChanges = tocUtil.moveDown(state, pages, page); if (pendingChanges.length > 0) { - this.attrs.changePageSequence(pendingChanges); + this.attrs.onPageSequenceChange(pendingChanges); this.send('onEntryClick', this.get('page')); this.audit.record("moved-page-down"); @@ -129,7 +138,7 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, { let pendingChanges = tocUtil.indent(state, pages, page); if (pendingChanges.length > 0) { - this.attrs.changePageLevel(pendingChanges); + this.attrs.onPageLevelChange(pendingChanges); this.showNotification("Indent"); this.audit.record("changed-page-sequence"); @@ -149,7 +158,7 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, { let pendingChanges = tocUtil.outdent(state, pages, page); if (pendingChanges.length > 0) { - this.attrs.changePageLevel(pendingChanges); + this.attrs.onPageLevelChange(pendingChanges); this.showNotification("Outdent"); this.audit.record("changed-page-sequence"); @@ -159,7 +168,7 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, { onEntryClick(id) { this.setState(id); - this.attrs.gotoPage(id); + this.attrs.onGotoPage(id); } } }); diff --git a/app/app/components/document/sidebar-zone.js b/app/app/components/document/sidebar-zone.js index 52c07f44..3902f3d7 100644 --- a/app/app/components/document/sidebar-zone.js +++ b/app/app/components/document/sidebar-zone.js @@ -36,7 +36,7 @@ export default Ember.Component.extend(TooltipMixin, NotifierMixin, { this._super(...arguments); if (is.empty(this.get('tab'))) { - this.set('tab', 'attachments'); + this.set('tab', 'index'); } }, @@ -86,6 +86,18 @@ export default Ember.Component.extend(TooltipMixin, NotifierMixin, { window.print(); }, + onPageSequenceChange(changes) { + this.get('onPageSequenceChange')(changes); + }, + + onPageLevelChange(changes) { + this.get('onPageLevelChange')(changes); + }, + + onGotoPage(id) { + this.get('onGotoPage')(id); + }, + onUnpin() { this.audit.record('unpinned-document'); diff --git a/app/app/components/section/markdown/type-editor.js b/app/app/components/section/markdown/type-editor.js index 6755b1ae..e4ffd5b1 100644 --- a/app/app/components/section/markdown/type-editor.js +++ b/app/app/components/section/markdown/type-editor.js @@ -23,7 +23,6 @@ export default Ember.Component.extend(TooltipMixin, { editMode: true, codeSyntax: null, codeEditor: null, - editorId: Ember.computed('page', function () { let page = this.get('page'); return `markdown-editor-${page.id}`; @@ -85,7 +84,6 @@ export default Ember.Component.extend(TooltipMixin, { willDestroyElement() { this.set('codeEditor', null); this.destroyTooltips(); - // $("#" + this.get('editorId')).off("keyup"); }, getBody() { diff --git a/app/app/pods/document/controller.js b/app/app/pods/document/controller.js index 5db64f2c..09b0b641 100644 --- a/app/app/pods/document/controller.js +++ b/app/app/pods/document/controller.js @@ -13,315 +13,4 @@ import Ember from 'ember'; import NotifierMixin from '../../mixins/notifier'; export default Ember.Controller.extend(NotifierMixin, { - // documentService: Ember.inject.service('document'), - // templateService: Ember.inject.service('template'), - // sectionService: Ember.inject.service('section'), - // page: null, - // folder: {}, - // pages: [], - // toggled: false, - // - // // to test - // // to test - // // Jump to the right part of the document. - // scrollToPage(pageId) { - // Ember.run.schedule('afterRender', function () { - // let dest; - // let target = "#page-title-" + pageId; - // let targetOffset = $(target).offset(); - // - // if (is.undefined(targetOffset)) { - // return; - // } - // - // dest = targetOffset.top > $(document).height() - $(window).height() ? $(document).height() - $(window).height() : targetOffset.top; - // // small correction to ensure we also show page title - // dest = dest > 50 ? dest - 74 : dest; - // - // $("html,body").animate({ - // scrollTop: dest - // }, 500, "linear"); - // $(".toc-index-item").removeClass("selected"); - // $("#index-" + pageId).addClass("selected"); - // }); - // }, - // - // actions: { - // toggleSidebar() { - // this.set('toggled', !this.get('toggled')); - // }, - // - // onTagChange(tags) { - // let doc = this.get('model.document'); - // doc.set('tags', tags); - // this.get('documentService').save(doc); - // }, - // - // onSaveDocument(doc) { - // this.get('documentService').save(doc); - // this.showNotification('Saved'); - // }, - // - // onCopyPage(pageId, targetDocumentId) { - // let documentId = this.get('model.document.id'); - // this.get('documentService').copyPage(documentId, pageId, targetDocumentId).then(() => { - // this.showNotification("Copied"); - // - // // refresh data if copied to same document - // if (documentId === targetDocumentId) { - // this.get('target.router').refresh(); - // } - // }); - // }, - // - // onMovePage(pageId, targetDocumentId) { - // let documentId = this.get('model.document.id'); - // - // this.get('documentService').copyPage(documentId, pageId, targetDocumentId).then(() => { - // this.showNotification("Moved"); - // - // this.send('onPageDeleted', { id: pageId, children: false }); - // }); - // }, - // - // onSavePage(page, meta) { - // let self = this; - // let documentId = this.get('model.document.id'); - // let model = { - // page: page.toJSON({ includeId: true }), - // meta: meta.toJSON({ includeId: true }) - // }; - // - // this.get('documentService').updatePage(documentId, page.get('id'), model).then(function () { - // self.audit.record("edited-page"); - // self.get('documentService').getPages(documentId).then((pages) => { - // self.set('model.allPages', pages); - // self.set('model.pages', pages.filterBy('pageType', 'section')); - // self.set('model.tabs', pages.filterBy('pageType', 'tab')); - // }); - // - // }); - // }, - // - // onPageDeleted(deletePage) { - // let documentId = this.get('model.document.id'); - // let pages = this.get('model.pages'); - // let deleteId = deletePage.id; - // let deleteChildren = deletePage.children; - // let page = _.findWhere(pages, { - // id: deleteId - // }); - // let pageIndex = _.indexOf(pages, page, false); - // let pendingChanges = []; - // - // this.audit.record("deleted-page"); - // - // // select affected pages - // for (var i = pageIndex + 1; i < pages.get('length'); i++) { - // if (pages[i].get('level') <= page.get('level')) { - // break; - // } - // - // pendingChanges.push({ - // pageId: pages[i].get('id'), - // level: pages[i].get('level') - 1 - // }); - // } - // - // if (deleteChildren) { - // // nuke of page tree - // pendingChanges.push({ - // pageId: deleteId - // }); - // - // this.get('documentService').deletePages(documentId, deleteId, pendingChanges).then(() => { - // // update our models so we don't have to reload from db - // for (var i = 0; i < pendingChanges.length; i++) { - // let pageId = pendingChanges[i].pageId; - // this.set('model.pages', _.reject(pages, function (p) { //jshint ignore: line - // return p.get('id') === pageId; - // })); - // } - // - // this.set('model.pages', _.sortBy(pages, "sequence")); - // this.get('target.router').refresh(); - // }); - // } else { - // // page delete followed by re-leveling child pages - // this.get('documentService').deletePage(documentId, deleteId).then(() => { - // this.set('model.pages', _.reject(pages, function (p) { - // return p.get('id') === deleteId; - // })); - // - // this.send('onPageLevelChange', pendingChanges); - // }); - // } - // }, - // - // onInsertSection(data) { - // return new Ember.RSVP.Promise((resolve) => { - // this.get('documentService').addPage(this.get('model.document.id'), data).then((newPage) => { - // let data = this.get('store').normalize('page', newPage); - // this.get('store').push(data); - // - // this.get('documentService').getPages(this.get('model.document.id')).then((pages) => { - // this.set('model.allPages', pages); - // this.set('model.pages', pages.filterBy('pageType', 'section')); - // this.set('model.tabs', pages.filterBy('pageType', 'tab')); - // - // resolve(newPage.id); - // - // // this.get('documentService').getPageMeta(this.get('model.document.id'), newPage.id).then(() => { - // // console.log("ready to edit"); - // // // this.transitionToRoute('document.edit', - // // // this.get('model.folder.id'), - // // // this.get('model.folder.slug'), - // // // this.get('model.document.id'), - // // // this.get('model.document.slug'), - // // // newPage.id); - // // }); - // }); - // }); - // }); - // }, - // - // // to test - // onPageSequenceChange(changes) { - // this.get('documentService').changePageSequence(this.get('model.document.id'), changes).then(() => { - // _.each(changes, (change) => { - // let pageContent = _.findWhere(this.get('model.pages'), { - // id: change.pageId - // }); - // - // if (is.not.undefined(pageContent)) { - // pageContent.set('sequence', change.sequence); - // } - // }); - // - // this.set('model.pages', this.get('model.pages').sortBy('sequence')); - // this.get('target.router').refresh(); - // }); - // }, - // - // // to test - // onPageLevelChange(changes) { - // this.get('documentService').changePageLevel(this.get('model.document.id'), changes).then(() => { - // _.each(changes, (change) => { - // let pageContent = _.findWhere(this.get('model.pages'), { - // id: change.pageId - // }); - // - // if (is.not.undefined(pageContent)) { - // pageContent.set('level', change.level); - // } - // }); - // - // let pages = this.get('model.pages'); - // pages = pages.sortBy('sequence'); - // this.set('model.pages', []); - // this.set('model.pages', pages); - // this.get('target.router').refresh(); - // }); - // }, - // - // // to test - // gotoPage(pageId) { - // if (is.null(pageId)) { - // return; - // } - // - // this.scrollToPage(pageId); - // }, - // - // // to test - // onSavePageAsBlock(block) { - // this.get('sectionService').addBlock(block).then(() => { - // this.showNotification("Published"); - // }); - // } - // } }); - -/* -gotoPage(pageId) { - if (is.null(pageId)) { - return; - } - - this.scrollToPage(pageId); -}, - - -onSaveTemplate(name, desc) { - this.get('templateService').saveAsTemplate(this.get('model.document.id'), name, desc).then(function () {}); -}, - -onSaveMeta(doc) { - this.get('documentService').save(doc).then(() => { - this.transitionToRoute('document.index'); - }); -}, - -onInsertBlock(block) { - this.audit.record("added-content-block-" + block.get('contentType')); - - let page = { - documentId: this.get('model.document.id'), - title: `${block.get('title')}`, - level: 1, - sequence: 0, - body: block.get('body'), - contentType: block.get('contentType'), - pageType: block.get('pageType'), - blockId: block.get('id') - }; - - let meta = { - documentId: this.get('model.document.id'), - rawBody: block.get('rawBody'), - config: block.get('config'), - externalSource: block.get('externalSource') - }; - - let model = { - page: page, - meta: meta - }; - - this.get('documentService').addPage(this.get('model.document.id'), model).then((newPage) => { - let data = this.get('store').normalize('page', newPage); - this.get('store').push(data); - - this.get('documentService').getPages(this.get('model.document.id')).then((pages) => { - this.set('model.pages', pages.filterBy('pageType', 'section')); - this.set('model.tabs', pages.filterBy('pageType', 'tab')); - - this.get('documentService').getPageMeta(this.get('model.document.id'), newPage.id).then(() => { - this.transitionToRoute('document.edit', - this.get('model.folder.id'), - this.get('model.folder.slug'), - this.get('model.document.id'), - this.get('model.document.slug'), - newPage.id); - }); - }); - }); -}, - -onDeleteBlock(blockId) { - this.get('sectionService').deleteBlock(blockId).then(() => { - this.audit.record("deleted-block"); - this.send("showNotification", "Deleted"); - this.transitionToRoute('document.index'); - }); -}, - -onDocumentDelete() { - this.get('documentService').deleteDocument(this.get('model.document.id')).then(() => { - this.audit.record("deleted-page"); - this.send("showNotification", "Deleted"); - this.transitionToRoute('folder', this.get('model.folder.id'), this.get('model.folder.slug')); - }); -} - -*/ diff --git a/app/app/pods/document/index/controller.js b/app/app/pods/document/index/controller.js index a5295646..c710817e 100644 --- a/app/app/pods/document/index/controller.js +++ b/app/app/pods/document/index/controller.js @@ -175,7 +175,6 @@ export default Ember.Controller.extend(NotifierMixin, { this.get('templateService').saveAsTemplate(this.get('model.document.id'), name, desc).then(function () {}); }, - // to test onPageSequenceChange(changes) { this.get('documentService').changePageSequence(this.get('model.document.id'), changes).then(() => { _.each(changes, (change) => { @@ -193,7 +192,6 @@ export default Ember.Controller.extend(NotifierMixin, { }); }, - // to test onPageLevelChange(changes) { this.get('documentService').changePageLevel(this.get('model.document.id'), changes).then(() => { _.each(changes, (change) => { @@ -212,6 +210,11 @@ export default Ember.Controller.extend(NotifierMixin, { this.set('model.pages', pages); this.get('target.router').refresh(); }); + }, + + // tbd + onGotoPage(id) { + this.set('pageId', id); } } }); diff --git a/app/app/pods/document/index/template.hbs b/app/app/pods/document/index/template.hbs index ab09ced5..d1b6b62e 100644 --- a/app/app/pods/document/index/template.hbs +++ b/app/app/pods/document/index/template.hbs @@ -3,7 +3,8 @@
diff --git a/app/app/pods/document/route.js b/app/app/pods/document/route.js index 94211411..54908395 100644 --- a/app/app/pods/document/route.js +++ b/app/app/pods/document/route.js @@ -17,7 +17,7 @@ export default Ember.Route.extend(AuthenticatedRouteMixin, { documentService: Ember.inject.service('document'), folderService: Ember.inject.service('folder'), linkService: Ember.inject.service('link'), - + beforeModel(transition) { this.set('pageId', is.not.undefined(transition.queryParams.page) ? transition.queryParams.page : ""); this.set('folderId', this.paramsFor('document').folder_id); diff --git a/app/app/pods/document/section/route.js b/app/app/pods/document/section/route.js index 327de3fe..293085de 100644 --- a/app/app/pods/document/section/route.js +++ b/app/app/pods/document/section/route.js @@ -16,7 +16,7 @@ export default Ember.Route.extend(AuthenticatedRouteMixin, { documentService: Ember.inject.service('document'), folderService: Ember.inject.service('folder'), userService: Ember.inject.service('user'), - + model(params) { return Ember.RSVP.hash({ folders: this.modelFor('document').folders, diff --git a/app/app/styles/view/document/all.scss b/app/app/styles/view/document/all.scss index 47fbf109..8aa3d917 100644 --- a/app/app/styles/view/document/all.scss +++ b/app/app/styles/view/document/all.scss @@ -3,8 +3,9 @@ @import "inline-editor.scss"; @import "layout.scss"; @import "section-editor.scss"; -@import "sidebar-view-attachments.scss"; @import "sidebar-view-activity.scss"; +@import "sidebar-view-attachments.scss"; +@import "sidebar-view-index.scss"; @import "sidebar-zone.scss"; @import "view.scss"; @import "wysiwyg.scss"; diff --git a/app/app/styles/view/document/sidebar-view-attachments.scss b/app/app/styles/view/document/sidebar-view-attachments.scss index 433790bc..cc5b23cc 100644 --- a/app/app/styles/view/document/sidebar-view-attachments.scss +++ b/app/app/styles/view/document/sidebar-view-attachments.scss @@ -83,62 +83,3 @@ .delete-page-dialog { display: none; } - - - -// .document-structure { -// > .toc-controls { -// margin: 0; -// color: $color-gray; - -// > .round-button-mono { -// color: $color-green; -// border-color: $color-green; - -// > .material-icons { -// color: $color-green; -// } -// } - -// > .disabled { -// @extend .cursor-not-allowed; -// color: $color-stroke; -// 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; -// margin: 20px 0 0; -// font-family: $font-semibold; - -// .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; -// } -// } -// } -// } diff --git a/app/app/styles/view/document/sidebar-view-index.scss b/app/app/styles/view/document/sidebar-view-index.scss new file mode 100644 index 00000000..ff68b5db --- /dev/null +++ b/app/app/styles/view/document/sidebar-view-index.scss @@ -0,0 +1,57 @@ +.document-sidebar-view-index { + margin: 0; + + >.structure { + > .toc-controls { + margin: 0; + color: $color-gray; + + > .round-button-mono { + > .material-icons { + color: $color-link; + } + } + + > .disabled { + @extend .cursor-not-allowed; + color: $color-stroke; + border-color: $color-stroke; + + > .material-icons { + color: $color-stroke; + } + } + } + + > .index-list { + padding: 0; + list-style: none; + font-size: 13px; + overflow-x: hidden; + list-style-type: none; + margin: 20px 0 0; + font-family: $font-semibold; + + .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; + } + } + } + } +} diff --git a/app/app/styles/widget/widget-chip.scss b/app/app/styles/widget/widget-chip.scss index b1e92526..ce7b668c 100644 --- a/app/app/styles/widget/widget-chip.scss +++ b/app/app/styles/widget/widget-chip.scss @@ -5,7 +5,7 @@ padding: 0; height: 25px; line-height: 0; - margin-right: 5px; + margin: 0 5px 10px 0; background-color: $color-chip; color: $color-chip-text; diff --git a/app/app/templates/components/document/document-sidebar-toc.hbs b/app/app/templates/components/document/document-sidebar-toc.hbs deleted file mode 100644 index 97aa36cd..00000000 --- a/app/app/templates/components/document/document-sidebar-toc.hbs +++ /dev/null @@ -1,29 +0,0 @@ -
- {{#if this.session.authenticated}} - {{#unless emptyState}} -