From 0118fdbd0036c7a7c4dfc3e17e653d91580f2629 Mon Sep 17 00:00:00 2001 From: Pierre Bondoerffer Date: Mon, 12 Jun 2017 18:16:11 +0200 Subject: [PATCH] use a local variable --- www/poll/main.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/www/poll/main.js b/www/poll/main.js index a805b4c02..400811537 100644 --- a/www/poll/main.js +++ b/www/poll/main.js @@ -108,14 +108,13 @@ define([ }; var unlockElements = function () { - var $input; APP.editable.row.forEach(function (id) { - $input = $('input[type="text"][disabled="disabled"][data-rt-id="' + id + '"]').removeAttr('disabled'); + var $input = $('input[type="text"][disabled="disabled"][data-rt-id="' + id + '"]').removeAttr('disabled'); $input.parent().parent().addClass('editing'); $('span.edit[data-rt-id="' + id + '"]').css('visibility', 'hidden'); }); APP.editable.col.forEach(function (id) { - $input = $('input[disabled="disabled"][data-rt-id^="' + id + '"]').removeAttr('disabled'); + var $input = $('input[disabled="disabled"][data-rt-id^="' + id + '"]').removeAttr('disabled'); $input.parent().addClass('editing'); $('input[type="number"][data-rt-id^="' + id + '"]').addClass('enabled'); $('.lock[data-rt-id="' + id + '"]').addClass('fa-unlock').removeClass('fa-lock').attr('title', Messages.poll_unlocked);