Updates to event export and javascript fixes.
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@2814 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
parent
75c654e654
commit
cfccc4b9bf
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
if ( empty($_REQUEST['id']) )
|
||||
if ( empty($_REQUEST['id']) && empty($_REQUEST['eids']) )
|
||||
{
|
||||
ajaxError( "No event id(s) supplied" );
|
||||
}
|
||||
|
@ -73,7 +73,8 @@ if ( canView( 'Events' ) )
|
|||
else
|
||||
$exportFormat = '';
|
||||
|
||||
if ( $exportFile = exportEvents( $_REQUEST['id'], $exportDetail, $exportFrames, $exportImages, $exportVideo, $exportMisc, $exportFormat ) )
|
||||
$exportIds = !empty($_REQUEST['eids'])?$_REQUEST['eids']:$_REQUEST['id'];
|
||||
if ( $exportFile = exportEvents( $exportIds, $exportDetail, $exportFrames, $exportImages, $exportVideo, $exportMisc, $exportFormat ) )
|
||||
ajaxResponse( array( 'exportFile'=>$exportFile ) );
|
||||
else
|
||||
ajaxError( "Export Failed" );
|
||||
|
@ -81,6 +82,7 @@ if ( canView( 'Events' ) )
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( canEdit( 'Events' ) )
|
||||
{
|
||||
switch ( $_REQUEST['action'] )
|
||||
|
|
|
@ -242,7 +242,7 @@ function exportFileList( $eid, $exportDetail, $exportFrames, $exportImages, $exp
|
|||
|
||||
function exportEvents( $eids, $exportDetail, $exportFrames, $exportImages, $exportVideo, $exportMisc, $exportFormat )
|
||||
{
|
||||
if ( canView( 'Events' ) && $eids )
|
||||
if ( canView( 'Events' ) && !empty($eids) )
|
||||
{
|
||||
$export_root = "zmExport";
|
||||
$export_listFile = "zmFileList.txt";
|
||||
|
@ -252,7 +252,7 @@ function exportEvents( $eids, $exportDetail, $exportFrames, $exportImages, $expo
|
|||
{
|
||||
foreach ( $eids as $eid )
|
||||
{
|
||||
$exportFileList = array_merge( $exportFileList, exportFileList( $eid ) );
|
||||
$exportFileList = array_merge( $exportFileList, exportFileList( $eid ), $exportDetail, $exportFrames, $exportImages, $exportVideo, $exportMisc );
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -40,7 +40,7 @@ function exportResponse( respText )
|
|||
function exportEvent( form )
|
||||
{
|
||||
var parms = 'view=request&request=event&action=export';
|
||||
parms += '&'+form.toQueryString();
|
||||
parms += '&'+$(form).toQueryString();
|
||||
var query = new Ajax( thisUrl, { method: 'post', data: parms, onComplete: exportResponse } );
|
||||
query.request();
|
||||
$('exportProgress').removeClass( 'hidden' );
|
||||
|
|
|
@ -31,7 +31,7 @@ function generateVideoResponse( respText )
|
|||
function generateVideo( form )
|
||||
{
|
||||
var parms = 'view=request&request=event&action=video';
|
||||
parms += '&'+form.toQueryString();
|
||||
parms += '&'+$(form).toQueryString();
|
||||
var query = new Ajax( thisUrl, { method: 'post', data: parms, onComplete: generateVideoResponse } );
|
||||
query.request();
|
||||
$('videoProgress').removeClass( 'hidden' );
|
||||
|
|
Loading…
Reference in New Issue