mirror of
https://github.com/spiral-project/ihatemoney.git
synced 2025-04-28 17:32:38 +02:00
Simplifies adding a bill with keyboard only
This commit is contained in:
parent
04c375e2e7
commit
fcdc057dba
1 changed files with 6 additions and 1 deletions
|
@ -11,6 +11,11 @@
|
||||||
{% block js %}
|
{% block js %}
|
||||||
{% if add_bill %} $('#new-bill > a').click(); {% endif %}
|
{% if add_bill %} $('#new-bill > a').click(); {% endif %}
|
||||||
|
|
||||||
|
// focus on first field when adding a bill
|
||||||
|
$("#bill-form").on('shown.bs.modal', function(){
|
||||||
|
$(this).find('#what').focus();
|
||||||
|
});
|
||||||
|
|
||||||
// ask for confirmation before removing an user
|
// ask for confirmation before removing an user
|
||||||
$('.action.delete').each(function(){
|
$('.action.delete').each(function(){
|
||||||
var link = $(this).find('button');
|
var link = $(this).find('button');
|
||||||
|
@ -101,7 +106,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<span id="new-bill" class="ml-auto pb-2" {% if not g.project.members %} data-toggle="tooltip" title="{{_('You should start by adding participants')}}" {% endif %}>
|
<span id="new-bill" class="ml-auto pb-2" {% if not g.project.members %} data-toggle="tooltip" title="{{_('You should start by adding participants')}}" {% endif %}>
|
||||||
<a href="{{ url_for('.add_bill') }}" class="btn btn-primary {% if not g.project.members %} disabled {% endif %}" data-toggle="modal" data-keyboard="false" data-target="#bill-form">
|
<a href="{{ url_for('.add_bill') }}" class="btn btn-primary {% if not g.project.members %} disabled {% endif %}" data-toggle="modal" data-keyboard="true" data-target="#bill-form" autofocus>
|
||||||
<i class="icon icon-white before-text">{{ static_include("images/plus.svg") | safe }}</i>
|
<i class="icon icon-white before-text">{{ static_include("images/plus.svg") | safe }}</i>
|
||||||
{{ _("Add a new bill") }}
|
{{ _("Add a new bill") }}
|
||||||
</a>
|
</a>
|
||||||
|
|
Loading…
Reference in a new issue