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

13 lines
332 B
JavaScript
Raw Normal View History

2017-05-19 01:50:56 +08:00
function updateLabel() {
var form = $('contentForm');
var preset_ddm = form.elements['preset'];
var presetIndex = preset_ddm[preset_ddm.selectedIndex].value;
2017-05-19 01:50:56 +08:00
if ( labels[presetIndex] ) {
form.newLabel.value = labels[presetIndex];
2017-05-19 01:50:56 +08:00
} else {
form.newLabel.value = '';
2017-05-19 01:50:56 +08:00
}
}
window.addEvent('domready', updateLabel);