You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by he...@apache.org on 2015/08/10 19:32:33 UTC
[02/50] [abbrv] allura git commit: [#7897] ticket:820 Make preview bg
transparent & remove borders
[#7897] ticket:820 Make preview bg transparent & remove borders
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/78c0842c
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/78c0842c
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/78c0842c
Branch: refs/heads/hs/7925
Commit: 78c0842c00311124ad673dfa6dfdf6da6de33ea1
Parents: d78d322
Author: Igor Bondarenko <je...@gmail.com>
Authored: Tue Jul 14 17:00:19 2015 +0300
Committer: Igor Bondarenko <je...@gmail.com>
Committed: Mon Jul 27 14:23:56 2015 +0300
----------------------------------------------------------------------
.../lib/widgets/resources/css/markitup_sf.css | 20 ++++++++++++++++++++
.../lib/widgets/resources/js/sf_markitup.js | 5 ++++-
2 files changed, 24 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/78c0842c/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 5837469..059721a 100644
--- a/Allura/allura/lib/widgets/resources/css/markitup_sf.css
+++ b/Allura/allura/lib/widgets/resources/css/markitup_sf.css
@@ -37,3 +37,23 @@
.markdown_edit .editor-preview {
z-index: 1001; /* should always be under help modal */
}
+.markdown_edit .editor-preview-active {
+ background-color: transparent;
+ position: relative;
+ padding: 0;
+}
+.markdown_edit.preview-active {
+ background-color: transparent;
+}
+.markdown_edit.preview-active .CodeMirror,
+.markdown_edit.preview-active .editor-toolbar {
+ border: 0;
+}
+.markdown_edit.preview-active .CodeMirror-scroll,
+.markdown_edit.preview-active .editor-statusbar,
+span.arw.preview-active {
+ display: none;
+}
+.markdown_edit.preview-active .editor-toolbar a {
+ background-color: transparent;
+}
http://git-wip-us.apache.org/repos/asf/allura/blob/78c0842c/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 b05f698..4162c9a 100644
--- a/Allura/allura/lib/widgets/resources/js/sf_markitup.js
+++ b/Allura/allura/lib/widgets/resources/js/sf_markitup.js
@@ -80,7 +80,7 @@ $(window).load(function() {
function show_preview(editor) {
/*
* This is pretty much the same as original SimpleMDE.togglePreview,
- * but rendered text is fetched from the server.
+ * but rendered text is fetched from the server (see the comment bellow)
* 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];
@@ -112,6 +112,9 @@ $(window).load(function() {
toolbar_div.className += ' disabled-for-preview';
}
var text = cm.getValue();
+ /* Code modified by Allura is here */
+ $container.toggleClass('preview-active');
+ $container.siblings('span.arw').toggleClass('preview-active');
get_rendered_text(preview, text);
}