Skip to content

Commit 15e5199

Browse files
fixes #12 and #13
1 parent e22d40c commit 15e5199

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

assets/javascripts/view_layouts_base_body_bottom_markdown.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function styleSelectedText(textarea, prepend, append) {
2323

2424
$(document).keydown(function (e) {
2525
if ($(document.activeElement).hasClass('wiki-edit')) {
26-
if (e.ctrlKey || e.metaKey) {
26+
if ((e.ctrlKey || e.metaKey) && !e.shiftKey) {
2727
// CTRL/CMD + B
2828
if (e.keyCode == 66) {
2929
styleSelectedText($(document.activeElement), '**');

assets/javascripts/view_layouts_base_body_bottom_questionmark.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
// Question Mark.
2-
$questionMarkModalRoot = $('<div class="question-mark-modal-root"></div>');
2+
var baseUrl = $("head link[rel='stylesheet']:first").attr('href').replace(/stylesheets.+$/, '');
3+
$questionMarkModalRoot = $('<div class="question-mark-modal-root" />');
34
$questionMarkModal = $('<div class="question-mark-modal"><span aria-label="Close" aria-role="button" class="question-mark--close"/></div>')
45
$questionMarkModalRoot.append($questionMarkModal);
5-
$questionMarkModal.append('<iframe width="500px" height="500px" src="' + window.location.origin + '/redmine_shortcuts/help"></iframe>');
6+
$questionMarkModal.append('<iframe width="500px" height="500px" src="' + baseUrl + 'redmine_shortcuts/help" />');
67
$('body').append($questionMarkModalRoot);
78
$(document).on('keypress', function(e) {
89
e = e || window.event;

assets/javascripts/view_layouts_base_body_bottom_textile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function styleSelectedText(textarea, prepend, append) {
2323

2424
$(document).keydown(function (e) {
2525
if ($(document.activeElement).hasClass('wiki-edit')) {
26-
if (e.ctrlKey || e.metaKey) {
26+
if ((e.ctrlKey || e.metaKey) && !e.shiftKey) {
2727
// CTRL/CMD + B
2828
if (e.keyCode == 66) {
2929
styleSelectedText($(document.activeElement), '*');

init.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
name 'Redmine Shortcuts'
55
author 'Davide Giacometti'
66
description 'Provides useful keyboard shortcuts'
7-
version '0.5.1'
7+
version '0.5.2'
88
url 'https://github.com/davidegiacometti/redmine_shortcuts'
99
author_url 'https://github.com/davidegiacometti'
1010

0 commit comments

Comments
 (0)