From c8c61da12b3d0eb9b64d291284ea65b3624979a2 Mon Sep 17 00:00:00 2001
From: chris <kokosias@yahoo.gr>
Date: Mon, 24 Apr 2017 10:34:22 +0300
Subject: [PATCH] remove toc and rearange containers

---
 app/components/SimpleEditor/Editor.js         | 44 ++++++++-----------
 app/components/SimpleEditor/SimpleEditor.scss |  8 ++--
 2 files changed, 23 insertions(+), 29 deletions(-)

diff --git a/app/components/SimpleEditor/Editor.js b/app/components/SimpleEditor/Editor.js
index aa99944..9116299 100644
--- a/app/components/SimpleEditor/Editor.js
+++ b/app/components/SimpleEditor/Editor.js
@@ -2,7 +2,7 @@ import { includes, some } from 'lodash'
 
 import {
   ProseEditor,
-  TOCProvider,
+  // TOCProvider,
   Toolbar
 } from 'substance'
 
@@ -13,7 +13,7 @@ import ContainerEditor from './ContainerEditor'
 import Notes from './panes/Notes/Notes'
 import NotesProvider from './panes/Notes/NotesProvider'
 
-import TableOfContents from './panes/TableOfContents/TableOfContents'
+// import TableOfContents from './panes/TableOfContents/TableOfContents'
 import TrackChangesProvider from './elements/track_change/TrackChangesProvider'
 
 import ModalWarning from './elements/modal_warning/ModalWarning'
@@ -71,15 +71,15 @@ class Editor extends ProseEditor {
     let ContextMenu = this.componentRegistry.get('context-menu') // new what does it do?
     // let Dropzones = this.componentRegistry.get('dropzones') // new what does it do?
 
-    const footerNotes = $$(Notes).ref('footer-notes')
+    // const footerNotes = $$(Notes).ref('footer-notes')
 
-    const props = {
-      book: this.props.book,
-      fragment: this.props.fragment,
-      history: this.props.history
-    }
+    // const props = {
+    //   book: this.props.book,
+    //   fragment: this.props.fragment,
+    //   history: this.props.history
+    // }
 
-    const toc = $$(TableOfContents, props)
+    // const toc = $$(TableOfContents, props)
 
     var commentsPane = this.state.editorReady
     ? $$(Comments, {
@@ -113,22 +113,17 @@ class Editor extends ProseEditor {
     .attr('id', 'content-panel')
     .ref('contentPanel')
 
-    const contentPanelWithSplitPane = $$(SplitPane, { sizeA: '75%', splitType: 'vertical' })
-      .append(
-        contentPanel,
-        toc
-      )
-    const ToolbarWithEditor = $$(SplitPane, { splitType: 'horizontal' })
-      .append(
-        toolbar,
-        contentPanelWithSplitPane
-      )
+    // const contentPanelWithSplitPane = $$(SplitPane, { sizeA: '75%', splitType: 'vertical' })
+    //   .append(
+    //     contentPanel,
+    //     toc
+    //   )
 
     el.append(
       $$(SplitPane, { splitType: 'horizontal' })
         .append(
-          ToolbarWithEditor,
-          footerNotes
+          toolbar,
+          contentPanel
         )
     )
 
@@ -241,9 +236,9 @@ class Editor extends ProseEditor {
     const doc = this.doc
 
     // toc provider
-    const tocProvider = new TOCProvider(doc, {
-      containerId: 'body'
-    })
+    // const tocProvider = new TOCProvider(doc, {
+    //   containerId: this.props.containerId
+    // })
 
     // notes provider
     const notesProvider = new NotesProvider(doc, {
@@ -277,7 +272,6 @@ class Editor extends ProseEditor {
     // attach all to context
     return {
       ...oldContext,
-      tocProvider,
       notesProvider,
       commentsProvider,
       trackChangesProvider
diff --git a/app/components/SimpleEditor/SimpleEditor.scss b/app/components/SimpleEditor/SimpleEditor.scss
index ee90412..afddded 100644
--- a/app/components/SimpleEditor/SimpleEditor.scss
+++ b/app/components/SimpleEditor/SimpleEditor.scss
@@ -212,7 +212,7 @@ $active-blue: #4a90e2;
   } // End sc-toolbar
 
   .se-scrollable {
-    background-color: $primary;
+    background-color: $white;
     border-right: 1px solid $light-gray;
     margin-top: 1px;
 
@@ -224,9 +224,9 @@ $active-blue: #4a90e2;
       background-color: #e8e8e8;
       // box-shadow: 0 0 12px $dark-gray;
       box-shadow: 2px 0px 1px -1px #ccc;
-      height: 100%;
-      left: 0;
-      margin-top: 149px;
+      height: 50%;
+      left: 2%;
+      margin-top: 189px;
       overflow-x: hidden;
       position: fixed;
       top: 0;
-- 
GitLab