use a local variable

pull/1/head
Pierre Bondoerffer 8 years ago
parent b8e394db67
commit 0118fdbd00
No known key found for this signature in database
GPG Key ID: C0C7C0C5063F2236

@ -108,14 +108,13 @@ define([
}; };
var unlockElements = function () { var unlockElements = function () {
var $input;
APP.editable.row.forEach(function (id) { 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'); $input.parent().parent().addClass('editing');
$('span.edit[data-rt-id="' + id + '"]').css('visibility', 'hidden'); $('span.edit[data-rt-id="' + id + '"]').css('visibility', 'hidden');
}); });
APP.editable.col.forEach(function (id) { 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.parent().addClass('editing');
$('input[type="number"][data-rt-id^="' + id + '"]').addClass('enabled'); $('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); $('.lock[data-rt-id="' + id + '"]').addClass('fa-unlock').removeClass('fa-lock').attr('title', Messages.poll_unlocked);

Loading…
Cancel
Save