Browse Source

Focus the "name" input in the "Add Project" modal.

pull/340/head
Pēteris Caune 5 years ago
parent
commit
eb7f51f6f5
No known key found for this signature in database GPG Key ID: E28D7679E9A9EDE2
4 changed files with 9 additions and 2 deletions
  1. +5
    -0
      static/js/add_project_modal.js
  2. +2
    -1
      templates/accounts/add_project_modal.html
  3. +1
    -0
      templates/accounts/profile.html
  4. +1
    -1
      templates/front/projects.html

+ 5
- 0
static/js/add_project_modal.js View File

@ -0,0 +1,5 @@
$(function () {
$("#add-project-modal").on('shown.bs.modal', function () {
$("#add-project-name").focus();
})
});

+ 2
- 1
templates/accounts/add_project_modal.html View File

@ -12,10 +12,11 @@
<p>Name your project</p> <p>Name your project</p>
<input <input
id="add-project-name"
type="text" type="text"
name="name" name="name"
class="form-control input-lg" class="form-control input-lg"
autocomplete="off">
autocomplete="off" />
<p>&nbsp;</p> <p>&nbsp;</p>


+ 1
- 0
templates/accounts/profile.html View File

@ -205,6 +205,7 @@
{% compress js %} {% compress js %}
<script src="{% static 'js/jquery-2.1.4.min.js' %}"></script> <script src="{% static 'js/jquery-2.1.4.min.js' %}"></script>
<script src="{% static 'js/bootstrap.min.js' %}"></script> <script src="{% static 'js/bootstrap.min.js' %}"></script>
<script src="{% static 'js/add_project_modal.js' %}"></script>
<script src="{% static 'js/profile.js' %}"></script> <script src="{% static 'js/profile.js' %}"></script>
{% endcompress %} {% endcompress %}
{% endblock %} {% endblock %}

+ 1
- 1
templates/front/projects.html View File

@ -58,6 +58,6 @@
{% compress js %} {% compress js %}
<script src="{% static 'js/jquery-2.1.4.min.js' %}"></script> <script src="{% static 'js/jquery-2.1.4.min.js' %}"></script>
<script src="{% static 'js/bootstrap.min.js' %}"></script> <script src="{% static 'js/bootstrap.min.js' %}"></script>
<script src="{% static 'js/project.js' %}"></script>
<script src="{% static 'js/add_project_modal.js' %}"></script>
{% endcompress %} {% endcompress %}
{% endblock %} {% endblock %}

Loading…
Cancel
Save