diff --git a/dist/main.js b/dist/main.js index f6597c1..1e650af 100644 --- a/dist/main.js +++ b/dist/main.js @@ -1,4 +1,5 @@ let subnetMap = {}; +let subnetNotes = {}; let maxNetSize = 0; let infoColumnCount = 5 // NORMAL mode: @@ -15,6 +16,7 @@ let infoColumnCount = 5 // - AWS Reserved - Future Use // - Broadcast Address (last network address) let operatingMode = 'NORMAL' +let noteTimeout; $('input#network,input#netsize').on('input', function() { $('#input_form')[0].classList.add('was-validated'); @@ -92,6 +94,17 @@ $('#calcbody').on('click', 'td.split,td.join', function(event) { renderTable(); }) +$('#calcbody').on('keyup', 'td.note input', function(event) { + // HTML DOM Data elements! Yay! See the `data-*` attributes of the HTML tags + let delay = 1000; + clearTimeout(noteTimeout); + noteTimeout = setTimeout(function(element) { + console.log('CAP') + subnetNotes[element.dataset.subnet] = element.value + }, delay, this); +}) + + function renderTable() { // TODO: Validation Code $('#calcbody').empty(); @@ -124,7 +137,7 @@ function addRow(network, netSize, colspan) { '