X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/2313b5225dff4d76ca58dae83829cd04ad84c3b3..cb0ae4e41048ffba9a7e3c6f52c21ea11728f42d:/js/autocomplete_part.js diff --git a/js/autocomplete_part.js b/js/autocomplete_part.js index de8f6e535..9d3c0ae0a 100644 --- a/js/autocomplete_part.js +++ b/js/autocomplete_part.js @@ -32,7 +32,6 @@ namespace('kivi', function(k){ var $type = $('#' + real_id + '_type'); var $unit = $('#' + real_id + '_unit'); var $convertible_unit = $('#' + real_id + '_convertible_unit'); - var $column = $('#' + real_id + '_column'); var state = STATES.PICKED; var last_real = $real.val(); var last_dummy = $dummy.val(); @@ -61,7 +60,6 @@ namespace('kivi', function(k){ 'filter.obsolete': 0, 'filter.unit_obj.convertible_to': $convertible_unit && $convertible_unit.val() ? $convertible_unit.val() : '', no_paginate: $('#no_paginate').prop('checked') ? 1 : 0, - column: $column && $column.val() ? $column.val() : '', current: $real.val(), }; @@ -77,8 +75,8 @@ namespace('kivi', function(k){ function set_item (item) { if (item.id) { $real.val(item.id); - // autocomplete ui has name, ajax items have description - $dummy.val(item.name ? item.name : item.description); + // autocomplete ui has name, use the value for ajax items, which contains displayable_name + $dummy.val(item.name ? item.name : item.value); } else { $real.val(''); $dummy.val(''); @@ -233,7 +231,6 @@ namespace('kivi', function(k){ type: function() { return $type }, unit: function() { return $unit }, convertible_unit: function() { return $convertible_unit }, - column: function() { return $column }, update_results: update_results, result_timer: result_timer, set_item: set_item,