summaryrefslogtreecommitdiff
path: root/ishtar_common/templates/blocks/JQueryAutocomplete.js
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/templates/blocks/JQueryAutocomplete.js')
-rw-r--r--ishtar_common/templates/blocks/JQueryAutocomplete.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/ishtar_common/templates/blocks/JQueryAutocomplete.js b/ishtar_common/templates/blocks/JQueryAutocomplete.js
index 47a5db80b..32351b312 100644
--- a/ishtar_common/templates/blocks/JQueryAutocomplete.js
+++ b/ishtar_common/templates/blocks/JQueryAutocomplete.js
@@ -47,6 +47,16 @@ $(function() {
$('#id_{{field_id}}').change(function(){
$("#id_select_{{field_id}}").attr('title', $('#id_select_{{field_id}}').val());
+ {% if detail %}
+ var current_val = $('#id_{{field_id}}').val();
+ if (current_val){
+ var detail_url = "{{detail}}" + current_val + "/";
+ $.get(detail_url, function(data) {
+ $("#id_{{field_id}}-detail").html(data);
+ });
+ }
+ {% endif %}
+
});
$('#id_{{field_id}}').change();