zoneminder/web/skins/classic/views/js/controlpreset.js

13 lines
348 B
JavaScript

function updateLabel() {
var form = $('contentForm');
var preset_ddm = form.elements['preset'];
var presetIndex = preset_ddm[preset_ddm.selectedIndex].value;
if ( labels[presetIndex] ) {
form.newLabel.value = labels[presetIndex];
} else {
form.newLabel.value = '';
}
}
window.addEventListener('DOMContentLoaded', updateLabel);