From 6c67c8c0280f1fe7811e69ab312bdd8e22dd8e25 Mon Sep 17 00:00:00 2001 From: Bachurin Sergey Date: Wed, 11 Jun 2014 00:58:03 +0300 Subject: [PATCH] fix previous --- project/static/js/dialogs.js | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/project/static/js/dialogs.js b/project/static/js/dialogs.js index 061c727..6befcde 100644 --- a/project/static/js/dialogs.js +++ b/project/static/js/dialogs.js @@ -25,18 +25,11 @@ $(document).ready(function() { if (data.success) { if (form[0].id == 'client-edit-form') { - var autocomplete = $('#id_client_text').yourlabsAutocomplete(); $('#id_client_text').val(data.name); - var choices = autocomplete.box.find(autocomplete.choiceSelector); - autocomplete.refresh(); - autocomplete.show = function(html) { - yourlabs.Autocomplete.prototype.show.call(this, html) - var choices = this.box.find(this.choiceSelector); - - if (choices.length == 1) { - this.input.trigger('selectChoice', [choices, this]); - } - } + $('#id_client_text').hide() + $('#id_client-deck').html('X' + data.name + ''); + + $('#id_client').html(''); } form.dialog('close'); form.clearForm();