mirror of
http://git.carcosa.net/jmcbray/brutaldon.git
synced 2024-11-12 18:08:40 -05:00
Fix ctrl-enter handling in forms (so that it goes through Intercooler_
This commit is contained in:
parent
c28c5af2bb
commit
393dad26bf
@ -11,9 +11,7 @@
|
||||
$(".modal-background").on("click", function () { $("#new-toot-modal").toggleClass("is-active"); });
|
||||
|
||||
Mousetrap.bind('ctrl+enter', function(e) {
|
||||
var form = document.querySelector('#post-form');
|
||||
form.submit();
|
||||
return true;
|
||||
Intercooler.triggerRequest("#post-form");
|
||||
});
|
||||
Mousetrap.bind('esc', function(e) { $("#new-toot-modal").toggleClass("is-active"); });
|
||||
</script>
|
||||
|
@ -14,9 +14,7 @@
|
||||
<script type="application/javascript">
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
Mousetrap.bind('ctrl+enter', function(e) {
|
||||
var form = document.querySelector('#post-form');
|
||||
form.submit();
|
||||
return true;
|
||||
Intercooler.triggerRequest("#post-form");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
@ -33,9 +33,7 @@ Brutaldon ({{ own_acct.username }}) - reply
|
||||
<script type="application/javascript">
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
Mousetrap.bind('ctrl+enter', function(e) {
|
||||
var form = document.querySelector('#post-form');
|
||||
form.submit();
|
||||
return true;
|
||||
Intercooler.triggerRequest("#post-form");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
@ -65,9 +65,7 @@
|
||||
<script type="application/javascript">
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
Mousetrap.bind('ctrl+enter', function(e) {
|
||||
var form = document.querySelector('#post-form');
|
||||
form.submit();
|
||||
return true;
|
||||
Intercooler.triggerRequest("#post-form");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
@ -187,6 +187,7 @@
|
||||
redraft
|
||||
</a>
|
||||
<a class="level-item" href="{% url "delete" toot.id %}"
|
||||
ic-enhance="false"
|
||||
ic-delete-from="{% url "delete" toot.id %}"
|
||||
ic-indicator="#toot-spinner-{{toot.id}}"
|
||||
ic-confirm="Really delete that toot?"
|
||||
|
Loading…
Reference in New Issue
Block a user