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

39 lines
839 B
JavaScript
Raw Normal View History

2017-05-19 01:50:56 +08:00
function newGroup() {
createPopup( '?view=group', 'zmGroup', 'group' );
}
2017-05-19 01:50:56 +08:00
function editGroup( element ) {
var form = element.form;
form.action.value = 'setgroup';
form.submit();
}
2017-05-19 01:50:56 +08:00
function editGroup( element ) {
var form = element.form;
for ( var i = 0; i < form.gid.length; i++ ) {
if ( form.gid[i].checked ) {
createPopup( '?view=group&gid='+form.gid[i].value, 'zmGroup', 'group' );
return;
}
2017-05-19 01:50:56 +08:00
}
}
2017-05-19 01:50:56 +08:00
function deleteGroup( element ) {
var form = element.form;
form.view.value = currentView;
form.action.value = 'delete';
form.submit();
}
2017-05-19 01:50:56 +08:00
function configureButtons( element ) {
if ( canEditGroups ) {
var form = element.form;
if ( element.checked ) {
form.editBtn.disabled = (element.value == 0);
form.deleteBtn.disabled = (element.value == 0);
}
2017-05-19 01:50:56 +08:00
}
}
window.focus();