2020-02-29 22:28:04 +08:00
|
|
|
function deleteVideo(e) {
|
2020-02-26 07:12:25 +08:00
|
|
|
index = e.getAttribute('data-file-index');
|
2020-02-29 22:28:04 +08:00
|
|
|
window.location.replace(thisUrl+'?view='+currentView+'&eid='+eventId+'&deleteIndex='+index);
|
2008-07-14 21:54:50 +08:00
|
|
|
}
|
|
|
|
|
2020-02-29 22:28:04 +08:00
|
|
|
function downloadVideo(e) {
|
2020-02-26 07:12:25 +08:00
|
|
|
index = e.getAttribute('data-file-index');
|
2020-02-29 22:28:04 +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 ) {
|
2020-02-29 22:28:04 +08:00
|
|
|
$('videoProgressTicker').set('text', '.');
|
2019-01-19 23:32:40 +08:00
|
|
|
} else {
|
2020-02-29 22:28:04 +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 ) {
|
2020-02-29 22:28:04 +08:00
|
|
|
window.location.replace(thisUrl+'?view='+currentView+'&eid='+eventId+'&generated='+((respObj.result=='Ok')?1:0));
|
2008-07-14 21:54:50 +08:00
|
|
|
}
|
|
|
|
|
2020-02-29 22:28:04 +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();
|
2020-02-29 22:28:04 +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();
|
2020-02-29 22:28:04 +08:00
|
|
|
$('videoProgress').removeClass('hidden');
|
|
|
|
$('videoProgress').setProperty('class', 'warnText');
|
|
|
|
$('videoProgressText').set('text', videoGenProgressString);
|
2017-05-19 01:50:56 +08:00
|
|
|
generateVideoProgress();
|
2020-02-29 22:28:04 +08:00
|
|
|
generateVideoTimer = generateVideoProgress.periodical(500);
|
2008-07-14 21:54:50 +08:00
|
|
|
}
|