pressing ctrl/meta + m toggles the question box
This commit is contained in:
parent
d8f964bda2
commit
66734193b0
|
@ -30,4 +30,4 @@ _ready = ->
|
||||||
sweetAlertInitialize()
|
sweetAlertInitialize()
|
||||||
|
|
||||||
$(document).ready _ready
|
$(document).ready _ready
|
||||||
$(document).on 'page:load', _ready
|
$(document).on 'page:load', _ready
|
||||||
|
|
|
@ -22,8 +22,12 @@ $(document).on "click", "button[name=qb-all-ask]", ->
|
||||||
btn.button "reset"
|
btn.button "reset"
|
||||||
$("textarea[name=qb-all-question]").removeAttr "readonly"
|
$("textarea[name=qb-all-question]").removeAttr "readonly"
|
||||||
|
|
||||||
|
# hotkey for accessing this quickly
|
||||||
|
$(document).on "keydown", (evt) ->
|
||||||
|
if evt.keyCode == 77 and (evt.ctrlKey or evt.metaKey)
|
||||||
|
$('button[name=toggle-all-ask]').trigger 'click'
|
||||||
|
|
||||||
# see GitHub issue #2
|
# see GitHub issue #2
|
||||||
($ document).on "keydown", "textarea[name=qb-all-question]", (evt) ->
|
($ document).on "keydown", "textarea[name=qb-all-question]", (evt) ->
|
||||||
if evt.keyCode == 13 and evt.ctrlKey
|
if evt.keyCode == 13 and (evt.ctrlKey or evt.metaKey)
|
||||||
($ "button[name=qb-all-ask]").trigger 'click'
|
($ "button[name=qb-all-ask]").trigger 'click'
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
= render "layouts/notifications"
|
= render "layouts/notifications"
|
||||||
%ul.nav.navbar-nav.navbar-right
|
%ul.nav.navbar-nav.navbar-right
|
||||||
%li
|
%li
|
||||||
.btn.btn-primary.navbar-btn.btn-sm.hidden-xs{"data-target" => "#modal-ask-followers", "data-toggle" => "modal", :type => "button"}
|
.btn.btn-primary.navbar-btn.btn-sm.hidden-xs{name: "toggle-all-ask", "data-target" => "#modal-ask-followers", "data-toggle" => "modal", :type => "button"}
|
||||||
%i.fa.fa-pencil-square-o
|
%i.fa.fa-pencil-square-o
|
||||||
%li.dropdown
|
%li.dropdown
|
||||||
%a.dropdown-toggle{href: "#", "data-toggle" => "dropdown"}
|
%a.dropdown-toggle{href: "#", "data-toggle" => "dropdown"}
|
||||||
|
|
Loading…
Reference in New Issue