From 5f5be2129ae2118b30121837c320e21ed5bbfdde Mon Sep 17 00:00:00 2001
From: chris <kokosias@yahoo.gr>
Date: Wed, 12 Apr 2017 11:00:34 +0300
Subject: [PATCH] resolved comments work in mini editor

---
 app/components/SimpleEditor/miniEditor/miniEditor.js       | 7 ++-----
 app/components/SimpleEditor/panes/Comments/CommentBox.js   | 1 -
 .../SimpleEditor/panes/Comments/CommentsProvider.js        | 1 -
 app/components/SimpleEditor/panes/Notes/Notes.js           | 1 -
 4 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/app/components/SimpleEditor/miniEditor/miniEditor.js b/app/components/SimpleEditor/miniEditor/miniEditor.js
index 04af978..ebaba0f 100644
--- a/app/components/SimpleEditor/miniEditor/miniEditor.js
+++ b/app/components/SimpleEditor/miniEditor/miniEditor.js
@@ -30,10 +30,7 @@ class MiniEditor extends ProseEditor {
     let ScrollPane = this.componentRegistry.get('scroll-pane')
     let Overlay = this.componentRegistry.get('overlay')
 
-    // TEMP
-    // const commentsPane = $$('ul').addClass('sc-comment-pane-list').addClass('sc-comments-pane').append('notes Editor Comments')
     var commentsPane = $$(Comments, {
-      // TODO -- should probably remove the || {}
       comments: this.props.comments || {},
       fragment: this.props.fragment,
       update: this.props.update,
@@ -94,8 +91,8 @@ class MiniEditor extends ProseEditor {
     // comments provider
     const commentsProvider = new CommentsProvider(doc, {
       commandManager: this.commandManager,
-      // comments: this.props.fragment.comments,
-      containerId: this.props.containerId,
+      comments: this.props.fragment.comments,
+      containerId: 'body',
       controller: this,
       editorSession: this.editorSession,
       fragment: this.props.fragment,
diff --git a/app/components/SimpleEditor/panes/Comments/CommentBox.js b/app/components/SimpleEditor/panes/Comments/CommentBox.js
index f9ec67b..8e9fa86 100644
--- a/app/components/SimpleEditor/panes/Comments/CommentBox.js
+++ b/app/components/SimpleEditor/panes/Comments/CommentBox.js
@@ -101,7 +101,6 @@ class CommentBox extends Component {
     const comments = this.props.comments
     const id = this.props.entry.id
     const provider = this.getProvider()
-    console.log('this props', this.props)
     const user = this.props.user.username
 
     let textarea = this.refs.commentReply
diff --git a/app/components/SimpleEditor/panes/Comments/CommentsProvider.js b/app/components/SimpleEditor/panes/Comments/CommentsProvider.js
index ebf2403..9767f19 100644
--- a/app/components/SimpleEditor/panes/Comments/CommentsProvider.js
+++ b/app/components/SimpleEditor/panes/Comments/CommentsProvider.js
@@ -365,7 +365,6 @@ class CommentsProvider extends TocProvider {
     // const update = this.config.update
     const { comments, fragment, update } = this.config
     const id = commentId
-
     if (!comments[id]) return
     comments[id].resolved = resolvedId
 
diff --git a/app/components/SimpleEditor/panes/Notes/Notes.js b/app/components/SimpleEditor/panes/Notes/Notes.js
index 8a65fd5..ae25254 100644
--- a/app/components/SimpleEditor/panes/Notes/Notes.js
+++ b/app/components/SimpleEditor/panes/Notes/Notes.js
@@ -87,7 +87,6 @@ class Notes extends Component {
   }
 
   saveNotes (source) {
-    console.log('save???')
     const provider = this.getProvider()
     const notes = provider.computeEntries()
     let self = this
-- 
GitLab