Commits

Maciej Wiśniowski  committed e0da73b

added handler for focus event of manufacturer autocomplete

  • Participants
  • Parent commits 0d35bed

Comments (0)

Files changed (1)

File lfs/static/js/lfs.manage.product.js

              $('#id_manufacturer_autocomplete').val(ui.item.label);
              return false;
          },
+         focus: function(event, ui){
+            console.log('focus')
+             $('#id_manufacturer').val(ui.item.value);
+             $('#id_manufacturer_autocomplete').val(ui.item.label);
+             return false;
+         },
          change: function(event, ui){
              if (ui.item === null){
                  // only accept items selected from the list
              return false;
          },
          minLength: 1
-    }
+    };
 
     $('#id_manufacturer_autocomplete').autocomplete(MANUFACTURER_AUTOCOMPLETE_SETTINGS);
     // when form is reloaded we have to reattach autocomplete