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 { ...@@ -10,6 +10,17 @@ export default class Navigation extends React.Component {
constructor (props) { constructor (props) {
super(props) super(props)
this.logout = this.logout.bind(this) 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 () { logout () {
...@@ -31,6 +42,16 @@ export default class Navigation extends React.Component { ...@@ -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 // TODO -- fix object properties underneath
return ( return (
<Navbar fluid> <Navbar fluid>
...@@ -59,6 +80,9 @@ export default class Navigation extends React.Component { ...@@ -59,6 +80,9 @@ export default class Navigation extends React.Component {
<NavItem>Teams</NavItem> <NavItem>Teams</NavItem>
</LinkContainer> </LinkContainer>
</Authorize> </Authorize>
{BackToBooks}
</Nav> </Nav>
{ logoutButtonIfAuthenticated } { logoutButtonIfAuthenticated }
......
...@@ -20,7 +20,6 @@ class NotesEditor extends ProseEditor { ...@@ -20,7 +20,6 @@ class NotesEditor extends ProseEditor {
render ($$) { render ($$) {
const el = $$('div').addClass('sc-notes-editor') const el = $$('div').addClass('sc-notes-editor')
let toolbar = this._renderNotesToolbar($$)
let editor = this._renderEditor($$) let editor = this._renderEditor($$)
let SplitPane = this.componentRegistry.get('split-pane') let SplitPane = this.componentRegistry.get('split-pane')
let ScrollPane = this.componentRegistry.get('scroll-pane') let ScrollPane = this.componentRegistry.get('scroll-pane')
...@@ -47,24 +46,11 @@ class NotesEditor extends ProseEditor { ...@@ -47,24 +46,11 @@ class NotesEditor extends ProseEditor {
.attr('id', 'notes-editor-content-panel') .attr('id', 'notes-editor-content-panel')
.ref('notesEditorContentPanel') .ref('notesEditorContentPanel')
el.append( el.append(contentPanel)
$$(SplitPane, { splitType: 'horizontal' })
.append(toolbar, contentPanel)
)
return el return el
} }
_renderNotesToolbar ($$) {
let commandStates = this.commandManager.getCommandStates()
return $$('div').addClass('se-toolbar-wrapper').append(
$$(Toolbar, {
commandStates: commandStates,
toolGroups: ['annotations']
}).ref('notes_toolbar')
)
}
_renderEditor ($$) { _renderEditor ($$) {
const hasIsolatedNotes = this.getIsolatedNodes() const hasIsolatedNotes = this.getIsolatedNodes()
const disabled = (isEmpty(hasIsolatedNotes)) const disabled = (isEmpty(hasIsolatedNotes))
......
...@@ -4,20 +4,6 @@ $content: #4a4a4a; ...@@ -4,20 +4,6 @@ $content: #4a4a4a;
.sc-notes-editor { .sc-notes-editor {
margin-top: 6px; 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 { .se-scrollable {
background: $background; background: $background;
margin: 0% 0% 5%; margin: 0% 0% 5%;
...@@ -30,7 +16,7 @@ $content: #4a4a4a; ...@@ -30,7 +16,7 @@ $content: #4a4a4a;
font-family: Vollkorn-Italic; font-family: Vollkorn-Italic;
margin: 0; margin: 0;
min-height: 110px; min-height: 110px;
padding: 3% 0 0 2.3%; padding: 0 0 0 2.3%;
.sc-entity::before { .sc-entity::before {
content: ''counter(note-footer)'. '; 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