Wrap editor in wrapper div and remove orchard CSS

This commit is contained in:
James Allen 2014-03-05 16:54:46 +00:00
parent 0468cbc300
commit 8bf12f3286
4 changed files with 11 additions and 272 deletions

View file

@ -147,6 +147,7 @@
#editorArea(style='display: none;') #editorArea(style='display: none;')
#editorSplitter #editorSplitter
#leftEditorPanel.ui-layout-center #leftEditorPanel.ui-layout-center
#editorWrapper
#editor #editor
#undoConflictWarning(style="display: none") #undoConflictWarning(style="display: none")
| <strong>Watch out!</strong> We had to undo some of your collaborators changes before we could undo yours. | <strong>Watch out!</strong> We had to undo some of your collaborators changes before we could undo yours.

View file

@ -73,7 +73,7 @@ define [
if @currentViewState != @viewOptions.splitView if @currentViewState != @viewOptions.splitView
@currentViewState = @viewOptions.splitView @currentViewState = @viewOptions.splitView
@leftPanel.prepend( @leftPanel.prepend(
@editorPanel.find("#editor") @editorPanel.find("#editorWrapper")
) )
splitter = @editorPanel.find("#editorSplitter") splitter = @editorPanel.find("#editorSplitter")
splitter.show() splitter.show()
@ -84,7 +84,7 @@ define [
@_saveSplitterState() @_saveSplitterState()
@currentViewState = @viewOptions.flatView @currentViewState = @viewOptions.flatView
@editorPanel.prepend( @editorPanel.prepend(
@editorPanel.find("#editor") @editorPanel.find("#editorWrapper")
) )
@editorPanel.find("#editorSplitter").hide() @editorPanel.find("#editorSplitter").hide()
@aceEditor.resize(true) @aceEditor.resize(true)

View file

@ -177,25 +177,13 @@ body.editor {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
#editor, #orchard { #editor {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
#orchard-toolbar { #editorWrapper {
height: 28px; height: 100%;
padding: 5px; width: 100%;
background-color: white;
border-bottom: 1px solid #aaa;
select {
margin-bottom: 0;
}
}
#orchard-editor {
position: absolute;
top: 39px;
bottom: 0;
left: 0;
right: 0;
} }
#rightEditorPanel { #rightEditorPanel {
border-left: 1px solid #aaa; border-left: 1px solid #aaa;
@ -964,18 +952,6 @@ i[class*="sprite-"] {
background-color: #9a2b1f \9; background-color: #9a2b1f \9;
} }
#orchard-editor {
background: white;
> .CodeMirror > .CodeMirror-scroll > .CodeMirror-sizer > div > .CodeMirror-lines {
background-color: white;
margin: auto;
max-width: 390pt;
min-height: 592pt;
margin-top: 20px;
margin-bottom: 20px;
}
}
#errorMessages { #errorMessages {
z-index: 10000; z-index: 10000;
top: 4px; top: 4px;
@ -998,5 +974,3 @@ i[class*="sprite-"] {
margin-bottom: 6px; margin-bottom: 6px;
} }
} }
@import "./orchard";

View file

@ -1,236 +0,0 @@
.editor-font {
font-size: 11pt;
line-height: 1.4em;
font-family: "Computer Modern", serif;
font-weight: normal;
}
@font-face {
font-family: "Computer Modern";
src: url('../font/cmunrm.otf');
}
@font-face {
font-family: "Computer Modern";
src: url('../font/cmunrb.otf');
font-weight: bold;
}
@font-face {
font-family: "Computer Modern Monospace";
src: url('../font/cmuntt.otf');
font-weight: bold;
}
.CodeMirror {
.CodeMirror-placeholder {
color: #999;
}
height: auto;
background: none;
.editor-font;
.cm-command, .cm-bracket {
color: green;
}
.cm-math {
color: purple;
font-family: "Computer Modern Monospace", monospace;
}
.CodeMirror-lines {
padding: 10px;
}
.oe-chapter {
font-weight: bold;
font-size: 1.8em !important;
line-height: 2em !important;
}
.oe-section {
font-weight: bold;
font-size: 1.5em !important;
line-height: 2em !important;
}
.oe-subsection {
font-weight: bold;
font-size: 1.3em !important;
line-height: 2em !important;
}
.oe-widget-line {
display: none;
}
.oe-figure {
margin: 0 5px;
padding: 12px 0 4px 0;
text-align: center;
position: relative;
.ui-wrapper {
position: relative;
display: inline-block;
}
.oe-figure-image-wrapper {
display: inline-block;
}
.oe-figure-image-placeholder {
background-color: rgb(200,200,200);
}
.oe-figure-image-placeholder.droppable-hover {
background-color: rgb(200,200,255);
}
.oe-figure-toolbar {
display: none;
text-align: right;
padding: 4px;
position: absolute;
top: 0;
left: 0;
right: 0;
}
}
.oe-title {
.CodeMirror-lines {
padding: 0;
}
.oe-title-title {
text-align: center;
margin-top: 40px;
margin-bottom: 20px;
.CodeMirror {
font-size: 1.6em;
line-height: 1.3em;
}
}
.oe-title-author {
text-align: center;
margin-bottom: 10px;
.CodeMirror {
font-size: 1.2em;
line-height: 1.3em;
}
}
.oe-title-abstract {
margin-top: 40px;
margin-bottom: 30px;
.oe-title-abstract-label {
text-align: center;
font-weight: bold;
margin-bottom: 6px;
font-size: 0.9em;
line-height: 1.3em;
}
.oe-title-abstract-content {
width: 80%;
margin: auto;
.CodeMirror {
font-size: 0.9em;
line-height: 1.3em;
}
}
}
}
.oe-widget {
border: 1px solid transparent;
margin: 6px 0;
}
.oe-widget-selected {
border: 1px dashed #bbb;
.oe-figure-toolbar {
display: block;
}
.ui-wrapper {
border: 1px dashed gray;
}
}
.oe-block-math {
.MathJax_Display {
margin: 12px 0;
}
.oe-block-math-toolbar {
text-align: right;
padding: 4px;
z-index: 100;
.bootstrap-select.btn-group {
margin: 0;
}
}
.CodeMirror {
font-family: "Computer Modern Monospace", monospace;
text-align: center;
}
}
.oe-non-editable {
color: gray;
cursor: default;
}
.oe-bibliography {
padding: 4px;
cursor: pointer;
}
}
// These are needed by the citation drop down too, so
// don't wrap them in .oe-bibliography
.oe-bibliography-entry {
display: inline-block;
}
.oe-bibliography-year {
font-weight: bold;
}
.oe-bibliography-author {
font-weight: bold;
}
.oe-bibliography-title {
display: block;
margin-left: 10px;
}
.oe-bibliography {
.oe-bibliography-header {
font-weight: bold;
font-size: 1.8em !important;
line-height: 2em !important;
}
.oe-bibliography-entry-wrapper {
margin-top: 6px;
}
.CodeMirror {
font-family: "Computer Modern Monospace", monospace;
color: green;
height: 400px;
}
.oe-bibliography-no-entries {
font-style: italic;
}
.oe-bibliography-error {
color: red;
}
}
.bootstrap-select.oe-inline-select {
margin: 0;
vertical-align: bottom;
> .btn {
border: none;
background: none;
box-shadow: none;
padding: 0;
margin: 0;
.editor-font;
color: rgb(2, 151, 172);
}
}