2
0
mirror of https://github.com/jfmcbrayer/brutaldon synced 2024-12-22 05:23:03 +01:00

Fix ctrl-enter handling in forms (so that it goes through Intercooler_

This commit is contained in:
Jason McBrayer 2019-03-29 20:09:18 -04:00
parent c28c5af2bb
commit 393dad26bf
5 changed files with 5 additions and 12 deletions

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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?"