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:16 UTC
[35/50] [abbrv] 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/bc26ab1f
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/bc26ab1f
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/bc26ab1f
Branch: refs/heads/ib/7897
Commit: bc26ab1ff7b40aafc268b84d308a9a5de28f40d7
Parents: 542841d
Author: Igor Bondarenko <je...@gmail.com>
Authored: Tue Jul 7 17:26:09 2015 +0300
Committer: Igor Bondarenko <je...@gmail.com>
Committed: Tue Jul 14 11:46:02 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/bc26ab1f/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/bc26ab1f/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) {