2020-02-26 07:12:25 +08:00
|
|
|
function deleteVideo( e ) {
|
|
|
|
index = e.getAttribute('data-file-index');
|
2017-05-19 01:50:56 +08:00
|
|
|
window.location.replace( thisUrl+'?view='+currentView+'&eid='+eventId+'&deleteIndex='+index );
|
2008-07-14 21:54:50 +08:00
|
|
|
}
|
|
|
|
|
2020-02-26 07:12:25 +08:00
|
|
|
function downloadVideo( e ) {
|
|
|
|
index = e.getAttribute('data-file-index');
|
2017-05-19 01:50:56 +08:00
|
|
|
window.location.replace( thisUrl+'?view='+currentView+'&eid='+eventId+'&downloadIndex='+index );
|
2008-07-14 21:54:50 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
var generateVideoTimer = null;
|
|
|
|
|
2017-05-19 01:50:56 +08:00
|
|
|
function generateVideoProgress() {
|
|
|
|
var tickerText = $('videoProgressTicker').get('text');
|
2019-01-19 23:32:40 +08:00
|
|
|
if ( tickerText.length < 1 || tickerText.length > 4 ) {
|
2017-05-19 01:50:56 +08:00
|
|
|
$('videoProgressTicker').set( 'text', '.' );
|
2019-01-19 23:32:40 +08:00
|
|
|
} else {
|
2017-05-19 01:50:56 +08:00
|
|
|
$('videoProgressTicker').appendText( '.' );
|
2019-01-19 23:32:40 +08:00
|
|
|
}
|
2008-07-14 21:54:50 +08:00
|
|
|
}
|
|
|
|
|
2017-05-19 01:50:56 +08:00
|
|
|
function generateVideoResponse( respObj, respText ) {
|
|
|
|
window.location.replace( thisUrl+'?view='+currentView+'&eid='+eventId+'&generated='+((respObj.result=='Ok')?1:0) );
|
2008-07-14 21:54:50 +08:00
|
|
|
}
|
|
|
|
|
2020-03-10 02:43:54 +08:00
|
|
|
function generateVideo() {
|
2020-02-26 07:12:25 +08:00
|
|
|
form = $j('#contentForm')[0];
|
2017-05-19 01:50:56 +08:00
|
|
|
var parms = 'view=request&request=event&action=video';
|
|
|
|
parms += '&'+$(form).toQueryString();
|
2019-01-19 23:32:40 +08:00
|
|
|
var query = new Request.JSON( {url: thisUrl, method: 'post', data: parms, onSuccess: generateVideoResponse} );
|
2017-05-19 01:50:56 +08:00
|
|
|
query.send();
|
|
|
|
$('videoProgress').removeClass( 'hidden' );
|
|
|
|
$('videoProgress').setProperty( 'class', 'warnText' );
|
|
|
|
$('videoProgressText').set( 'text', videoGenProgressString );
|
|
|
|
generateVideoProgress();
|
|
|
|
generateVideoTimer = generateVideoProgress.periodical( 500 );
|
2008-07-14 21:54:50 +08:00
|
|
|
}
|