From: Moritz Bunkus Date: Fri, 20 Jan 2017 11:42:43 +0000 (+0100) Subject: ProjectPicker: unbenutzte Variable last_unverified_dummy entfernt X-Git-Tag: release-3.5.4~1674 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=b592435b709841b65441d5fef5c41e3ad2c91413;p=kivitendo-erp.git ProjectPicker: unbenutzte Variable last_unverified_dummy entfernt Sie wird nur gesetzt, nie gelesen, und vor allem auch nicht mit »var« deklariert — wodurch es im Strict-Modus zu JavaScript-Fehlermeldungen kommt. --- diff --git a/js/autocomplete_project.js b/js/autocomplete_project.js index 923434027..8858b9797 100644 --- a/js/autocomplete_project.js +++ b/js/autocomplete_project.js @@ -58,10 +58,9 @@ namespace('kivi', function(k){ $real.val(''); $dummy.val(''); } - state = STATES.PICKED; - last_real = $real.val(); - last_dummy = $dummy.val(); - last_unverified_dummy = $dummy.val(); + state = STATES.PICKED; + last_real = $real.val(); + last_dummy = $dummy.val(); $real.trigger('change'); $real.trigger('set_item:ProjectPicker', item); @@ -76,7 +75,6 @@ namespace('kivi', function(k){ } else if (state == STATES.UNDEFINED && $dummy.val() === '') set_item({}) else { - last_unverified_dummy = $dummy.val(); set_item({ id: last_real, name: last_dummy }) } annotate_state(); @@ -88,7 +86,6 @@ namespace('kivi', function(k){ else if (state == STATES.UNDEFINED && $dummy.val() === '') $dummy.removeClass(STATES.UNDEFINED).addClass(STATES.PICKED); else { - last_unverified_dummy = $dummy.val(); $dummy.addClass(STATES.UNDEFINED).removeClass(STATES.PICKED); } }