You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2015/07/29 23:10:23 UTC

[23/41] allura git commit: [#7897] ticket:814 Focus editor by click & fix z-index for help & preview

[#7897] ticket:814 Focus editor by click & fix z-index for help & preview


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/242a83c6
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/242a83c6
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/242a83c6

Branch: refs/heads/master
Commit: 242a83c6bafc283ef972e1240f63554aeaea336f
Parents: 920b78e
Author: Igor Bondarenko <je...@gmail.com>
Authored: Tue Jul 7 17:26:09 2015 +0300
Committer: Igor Bondarenko <je...@gmail.com>
Committed: Mon Jul 27 14:23:55 2015 +0300

----------------------------------------------------------------------
 Allura/allura/lib/widgets/resources/css/markitup_sf.css | 5 +++++
 Allura/allura/lib/widgets/resources/js/sf_markitup.js   | 3 +++
 2 files changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/242a83c6/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 2c12807..5310c69 100644
--- a/Allura/allura/lib/widgets/resources/css/markitup_sf.css
+++ b/Allura/allura/lib/widgets/resources/css/markitup_sf.css
@@ -51,3 +51,8 @@
 .markdown_edit .editor-preview {
   padding: 5px;
 }
+
+
+.markdown_edit .editor-preview {
+  z-index: 1001;  /* should always be under help modal */
+}

http://git-wip-us.apache.org/repos/asf/allura/blob/242a83c6/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 f3f2c44..4c0cd20 100644
--- a/Allura/allura/lib/widgets/resources/js/sf_markitup.js
+++ b/Allura/allura/lib/widgets/resources/js/sf_markitup.js
@@ -60,6 +60,9 @@ $(window).load(function() {
             });
             editor.render();
 
+            // focus editor by clicking anywhere on it, not only on the first few lines
+            $('.CodeMirror').click(function () { cm.focus(); });
+
             function show_help(editor) {
               $help_contents.html('Loading...');
               $.get($help_contents.attr('data-url'), function (data) {