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

25 lines
840 B
JavaScript
Raw Normal View History

function generateVideoResponse( data, responseText ) {
console.log(data);
var generated = (data.result=='Ok') ? 1 : 0;
var fullUrl = thisUrl + '?view=' + currentView + '&eid=' + eventId + '&generated=' + generated;
$j('#videoProgress').removeClass( 'text-warning' );
if ( generated ) {
$j('#videoProgress').addClass( 'text-success' );
$j('#videoProgress').text(exportSucceededString);
$j( "#videoTable" ).load( fullUrl+ ' #videoTable' );
} else {
$j('#videoProgress').addClass( 'text-danger' );
$j('#videoProgress').text(exportFailedString);
}
}
2020-02-29 22:28:04 +08:00
function generateVideo() {
var form = $j('#videoForm').serialize();
$j.getJSON(thisUrl + '?view=request&request=event&action=video', form)
.done(generateVideoResponse)
.fail(logAjaxFail);
$j('#videoProgress').removeClass('invisible');
}