You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by je...@apache.org on 2015/08/11 16:30:08 UTC
[3/3] allura git commit: [#7948] ticket:835 Handle css/js changes in
new SimpleMDE version
[#7948] ticket:835 Handle css/js changes in new SimpleMDE version
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/45e8c080
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/45e8c080
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/45e8c080
Branch: refs/heads/ib/7948
Commit: 45e8c080ab3cdfcfc7d00bd8e20ba6a49c046ba0
Parents: a2ee557
Author: Igor Bondarenko <je...@gmail.com>
Authored: Tue Aug 11 16:37:49 2015 +0300
Committer: Igor Bondarenko <je...@gmail.com>
Committed: Tue Aug 11 16:37:49 2015 +0300
----------------------------------------------------------------------
Allura/allura/lib/widgets/resources/css/markitup_sf.css | 10 +++++++---
Allura/allura/lib/widgets/resources/js/sf_markitup.js | 5 ++---
2 files changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/45e8c080/Allura/allura/lib/widgets/resources/css/markitup_sf.css
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/widgets/resources/css/markitup_sf.css b/Allura/allura/lib/widgets/resources/css/markitup_sf.css
index 03822f4..3b3e946 100644
--- a/Allura/allura/lib/widgets/resources/css/markitup_sf.css
+++ b/Allura/allura/lib/widgets/resources/css/markitup_sf.css
@@ -23,6 +23,7 @@
margin-bottom: 5px;
}
.markdown_edit .CodeMirror {
+ color: rgb(85, 85, 85);
min-height: 60px;
height: auto;
border-bottom: none;
@@ -38,6 +39,8 @@
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
}
+.markdown_edit .fullscreen,
+.markdown_edit .CodeMirror-fullscreen,
.markdown_edit .editor-preview {
z-index: 1001; /* should always be under help modal */
}
@@ -52,8 +55,9 @@
.markdown_edit.preview-active {
background-color: transparent;
}
-.markdown_edit.preview-active .CodeMirror,
-.markdown_edit.preview-active .editor-toolbar {
+.markdown_edit.preview-active .CodeMirror:not(.CodeMirror-fullscreen),
+.markdown_edit.preview-active .editor-toolbar:not(.fullscreen) {
+ background-color: transparent;
border: 0;
}
.markdown_edit.preview-active .CodeMirror-scroll,
@@ -61,6 +65,6 @@
span.arw.preview-active {
display: none;
}
-.markdown_edit.preview-active .editor-toolbar a {
+.markdown_edit.preview-active .editor-toolbar.disabled-for-preview a {
background-color: transparent;
}
http://git-wip-us.apache.org/repos/asf/allura/blob/45e8c080/Allura/allura/lib/widgets/resources/js/sf_markitup.js
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/widgets/resources/js/sf_markitup.js b/Allura/allura/lib/widgets/resources/js/sf_markitup.js
index 4ca7e5d..e478792 100644
--- a/Allura/allura/lib/widgets/resources/js/sf_markitup.js
+++ b/Allura/allura/lib/widgets/resources/js/sf_markitup.js
@@ -99,7 +99,7 @@ $(window).load(function() {
* https://github.com/NextStepWebs/simplemde-markdown-editor/blob/1.2.1/source%20files/markdownify.js#L218-L249
*/
var toolbar_div = document.getElementsByClassName('editor-toolbar')[0];
- var toolbar = editor.toolbar.preview;
+ var toolbar = editor.toolbarElements.preview;
var parse = editor.constructor.markdown;
var cm = editor.codemirror;
var wrapper = cm.getWrapperElement();
@@ -114,7 +114,7 @@ $(window).load(function() {
/\s*editor-preview-active\s*/g, ''
);
toolbar.className = toolbar.className.replace(/\s*active\s*/g, '');
- toolbar_div.className = toolbar_div.className.replace(/\s*disabled-for-preview\s*/g, '');
+ toolbar_div.className = toolbar_div.className.replace(/\s*disabled-for-preview*/g, '');
} else {
/* When the preview button is clicked for the first time,
* give some time for the transition from editor.css to fire and the view to slide from right to left,
@@ -125,7 +125,6 @@ $(window).load(function() {
}, 1);
toolbar.className += ' active';
toolbar_div.className += ' disabled-for-preview';
-
/* Code modified by Allura is here */
var text = cm.getValue();
get_rendered_text(preview, text);