Add ManufacturerId_onchange and ModelId_onchange to hide/show the text input for custom entry
This commit is contained in:
parent
c6209ce460
commit
54f676a501
|
@ -323,7 +323,6 @@ function update_estimated_ram_use() {
|
|||
var max_buffer_count = parseInt(document.querySelectorAll('input[name="newMonitor[MaxImageBufferCount]"]')[0].value);
|
||||
if (max_buffer_count) {
|
||||
var max_buffer_size = (min_buffer_count + max_buffer_count) * width * height * colours;
|
||||
console.log(max_buffer_size);
|
||||
document.getElementById('estimated_ram_use').innerHTML += ' Max: ' + human_filesize(max_buffer_size);
|
||||
} else {
|
||||
document.getElementById('estimated_ram_use').innerHTML += ' Max: Unlimited';
|
||||
|
@ -345,4 +344,17 @@ function getLocation() {
|
|||
}
|
||||
}
|
||||
|
||||
function ManufacturerId_onchange(ManufacturerId_select) {
|
||||
if (ManufacturerId_select.value())
|
||||
$j('newMonitor[Manufacturer]').hide();
|
||||
else
|
||||
$j('newMonitor[Manufacturer]').show();
|
||||
}
|
||||
function ModelId_onchange(ModelId_select) {
|
||||
if (ModelId_select.value())
|
||||
$j('newMonitor[Model]').hide();
|
||||
else
|
||||
$j('newMonitor[Model]').show();
|
||||
}
|
||||
|
||||
window.addEventListener('DOMContentLoaded', initPage);
|
||||
|
|
Loading…
Reference in New Issue