mirror of
https://github.com/jfmcbrayer/brutaldon
synced 2024-12-22 13:26:14 +01: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"); });
|
$(".modal-background").on("click", function () { $("#new-toot-modal").toggleClass("is-active"); });
|
||||||
|
|
||||||
Mousetrap.bind('ctrl+enter', function(e) {
|
Mousetrap.bind('ctrl+enter', function(e) {
|
||||||
var form = document.querySelector('#post-form');
|
Intercooler.triggerRequest("#post-form");
|
||||||
form.submit();
|
|
||||||
return true;
|
|
||||||
});
|
});
|
||||||
Mousetrap.bind('esc', function(e) { $("#new-toot-modal").toggleClass("is-active"); });
|
Mousetrap.bind('esc', function(e) { $("#new-toot-modal").toggleClass("is-active"); });
|
||||||
</script>
|
</script>
|
||||||
|
@ -14,9 +14,7 @@
|
|||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
document.addEventListener('DOMContentLoaded', function () {
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
Mousetrap.bind('ctrl+enter', function(e) {
|
Mousetrap.bind('ctrl+enter', function(e) {
|
||||||
var form = document.querySelector('#post-form');
|
Intercooler.triggerRequest("#post-form");
|
||||||
form.submit();
|
|
||||||
return true;
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
@ -33,9 +33,7 @@ Brutaldon ({{ own_acct.username }}) - reply
|
|||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
document.addEventListener('DOMContentLoaded', function () {
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
Mousetrap.bind('ctrl+enter', function(e) {
|
Mousetrap.bind('ctrl+enter', function(e) {
|
||||||
var form = document.querySelector('#post-form');
|
Intercooler.triggerRequest("#post-form");
|
||||||
form.submit();
|
|
||||||
return true;
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
@ -65,9 +65,7 @@
|
|||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
document.addEventListener('DOMContentLoaded', function () {
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
Mousetrap.bind('ctrl+enter', function(e) {
|
Mousetrap.bind('ctrl+enter', function(e) {
|
||||||
var form = document.querySelector('#post-form');
|
Intercooler.triggerRequest("#post-form");
|
||||||
form.submit();
|
|
||||||
return true;
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
@ -187,6 +187,7 @@
|
|||||||
redraft
|
redraft
|
||||||
</a>
|
</a>
|
||||||
<a class="level-item" href="{% url "delete" toot.id %}"
|
<a class="level-item" href="{% url "delete" toot.id %}"
|
||||||
|
ic-enhance="false"
|
||||||
ic-delete-from="{% url "delete" toot.id %}"
|
ic-delete-from="{% url "delete" toot.id %}"
|
||||||
ic-indicator="#toot-spinner-{{toot.id}}"
|
ic-indicator="#toot-spinner-{{toot.id}}"
|
||||||
ic-confirm="Really delete that toot?"
|
ic-confirm="Really delete that toot?"
|
||||||
|
Loading…
Reference in New Issue
Block a user