mirror of https://gitlab.com/brutaldon/brutaldon
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