1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Show used/unused on field labels

This commit is contained in:
Hillel Coren 2017-11-06 19:26:33 +02:00
parent 3a0b246c09
commit 36fcb645c5

View File

@ -101,6 +101,14 @@
var id = $select.val();
$select.val(null).blur();
$('.' + id + '-label-group').fadeIn();
showUsedFields();
}
function showUsedFields() {
$('#label_field > option').each(function(key, option) {
var isUsed = $('#labels_' + option.value).is(':visible');
$(this).css('color', isUsed ? '#888' : 'black');
});
}
$(function() {
@ -120,6 +128,10 @@
updateFieldLabels();
refreshPDF();
setTimeout(function() {
showUsedFields();
}, 1);
});
</script>