summaryrefslogtreecommitdiff
path: root/ishtar_common/templates
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/templates')
-rw-r--r--ishtar_common/templates/blocks/JQueryAutocomplete.js2
-rw-r--r--ishtar_common/templates/ishtar/wizard/default_wizard.html1
2 files changed, 3 insertions, 0 deletions
diff --git a/ishtar_common/templates/blocks/JQueryAutocomplete.js b/ishtar_common/templates/blocks/JQueryAutocomplete.js
index 54b0cb645..47ff687e0 100644
--- a/ishtar_common/templates/blocks/JQueryAutocomplete.js
+++ b/ishtar_common/templates/blocks/JQueryAutocomplete.js
@@ -20,6 +20,8 @@ $(function() {
{{options}}
{% endif %}
});
+ {% if autofocus %}autofocus_field = "#id_select_{{field_id}}";
+ {% endif %}
$(document).on("click", '#id_select_{{field_id}}', function(){
$('#id_{{field_id}}').val(null);
diff --git a/ishtar_common/templates/ishtar/wizard/default_wizard.html b/ishtar_common/templates/ishtar/wizard/default_wizard.html
index 50e0662ae..405c52965 100644
--- a/ishtar_common/templates/ishtar/wizard/default_wizard.html
+++ b/ishtar_common/templates/ishtar/wizard/default_wizard.html
@@ -65,6 +65,7 @@ $(document).ready(function(){
{% if open_url %}load_window("{{open_url}}");{% endif %}
{% block "js_extra_ready" %}
{% endblock %}
+ if ($("[autofocus]").length > 0) autofocus_field = "#" + $($("[autofocus]")[0]).attr('id');
});
{% endlocalize %}</script>
{% endblock %}