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/08 11:58:50 UTC
[15/21] 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/eb627a91
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/eb627a91
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/eb627a91
Branch: refs/heads/ib/7897
Commit: eb627a9106337922c61042f00e3effc2ad2224ac
Parents: 92b6536
Author: Igor Bondarenko <je...@gmail.com>
Authored: Tue Jul 7 17:26:09 2015 +0300
Committer: Igor Bondarenko <je...@gmail.com>
Committed: Tue Jul 7 17:26:09 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/eb627a91/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/eb627a91/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) {