Skip to content
Snippets Groups Projects
Commit 9d26e7ac authored by chris's avatar chris Committed by john
Browse files

remove notesEditorToolbar

parent fe8653b2
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,17 @@ export default class Navigation extends React.Component {
constructor (props) {
super(props)
this.logout = this.logout.bind(this)
browserHistory.listen(function (event) {
this.inEditor = false
this.url = ''
let match = event.pathname.match(/fragments/g)
if (match) {
let res = event.pathname.split('/')
this.inEditor = true
this.url = res[2]
}
}.bind(this))
}
logout () {
......@@ -31,6 +42,16 @@ export default class Navigation extends React.Component {
)
}
let BackToBooks
if (this.inEditor) {
console.log('dldld', this.url)
BackToBooks = (
<LinkContainer to={'/books/' + this.url + '/book-builder'}>
<NavItem>Back To book</NavItem>
</LinkContainer>
)
}
// TODO -- fix object properties underneath
return (
<Navbar fluid>
......@@ -59,6 +80,9 @@ export default class Navigation extends React.Component {
<NavItem>Teams</NavItem>
</LinkContainer>
</Authorize>
{BackToBooks}
</Nav>
{ logoutButtonIfAuthenticated }
......
......@@ -20,7 +20,6 @@ class NotesEditor extends ProseEditor {
render ($$) {
const el = $$('div').addClass('sc-notes-editor')
let toolbar = this._renderNotesToolbar($$)
let editor = this._renderEditor($$)
let SplitPane = this.componentRegistry.get('split-pane')
let ScrollPane = this.componentRegistry.get('scroll-pane')
......@@ -47,24 +46,11 @@ class NotesEditor extends ProseEditor {
.attr('id', 'notes-editor-content-panel')
.ref('notesEditorContentPanel')
el.append(
$$(SplitPane, { splitType: 'horizontal' })
.append(toolbar, contentPanel)
)
el.append(contentPanel)
return el
}
_renderNotesToolbar ($$) {
let commandStates = this.commandManager.getCommandStates()
return $$('div').addClass('se-toolbar-wrapper').append(
$$(Toolbar, {
commandStates: commandStates,
toolGroups: ['annotations']
}).ref('notes_toolbar')
)
}
_renderEditor ($$) {
const hasIsolatedNotes = this.getIsolatedNodes()
const disabled = (isEmpty(hasIsolatedNotes))
......
......@@ -4,20 +4,6 @@ $content: #4a4a4a;
.sc-notes-editor {
margin-top: 6px;
.se-toolbar-wrapper {
background-color: $background;
position: absolute;
width: 1280px;
z-index: 9999;
.sc-toolbar {
border: 0;
float: left;
width: 100%;
}
}
.se-scrollable {
background: $background;
margin: 0% 0% 5%;
......@@ -30,7 +16,7 @@ $content: #4a4a4a;
font-family: Vollkorn-Italic;
margin: 0;
min-height: 110px;
padding: 3% 0 0 2.3%;
padding: 0 0 0 2.3%;
.sc-entity::before {
content: ''counter(note-footer)'. ';
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment