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/07/14 17:03:29 UTC

[48/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/2eb97de2
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/2eb97de2
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/2eb97de2

Branch: refs/heads/ib/7897
Commit: 2eb97de2e5742947f3f0671cee4763bde9b82dd7
Parents: 98c11e1
Author: Igor Bondarenko <je...@gmail.com>
Authored: Tue Jul 14 17:00:19 2015 +0300
Committer: Igor Bondarenko <je...@gmail.com>
Committed: Tue Jul 14 17:00:19 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/2eb97de2/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/2eb97de2/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);
             }