diff --git a/web/ajax/snapshots.php b/web/ajax/snapshots.php index e3da25ae3..bfe6b536d 100644 --- a/web/ajax/snapshots.php +++ b/web/ajax/snapshots.php @@ -190,13 +190,14 @@ function queryRequest($search, $advsearch, $sort, $offset, $order, $limit) { foreach ( array_slice($filtered_rows, $offset, $limit) as $row ) { $snapshot = new ZM\Snapshot($row); - //$scale = intval(5*100*ZM_WEB_LIST_THUMB_WIDTH / $event->Width()); - //$imgSrc = $event->getThumbnailSrc(array(), '&'); - //$streamSrc = $event->getStreamSrc(array( - //'mode'=>'jpeg', 'scale'=>$scale, 'maxfps'=>ZM_WEB_VIDEO_MAXFPS, 'replay'=>'single', 'rate'=>'400'), '&'); - + $row['imgHtml'] = ''; // Modify the row data as needed - //$row['imgHtml'] = 'Event '.$event->Id().''; + foreach ( $snapshot->Events() as $event ) { + $scale = intval(5*100*ZM_WEB_LIST_THUMB_WIDTH / $event->Width()); + $imgSrc = $event->getThumbnailSrc(array(), '&'); + + $row['imgHtml'] .= 'Event '.$event->Id().''; + } $row['Name'] = validHtmlStr($row['Name']); $row['Description'] = validHtmlStr($row['Description']); //$row['Archived'] = $row['Archived'] ? translate('Yes') : translate('No'); @@ -209,6 +210,7 @@ function queryRequest($search, $advsearch, $sort, $offset, $order, $limit) { //$row['Storage'] = ( $row['StorageId'] and isset($StorageById[$row['StorageId']]) ) ? $StorageById[$row['StorageId']]->Name() : 'Default'; //$row['Notes'] = nl2br(htmlspecialchars($row['Notes'])); //$row['DiskSpace'] = human_filesize($event->DiskSpace()); + // $returned_rows[] = $row; } # end foreach row matching search diff --git a/web/skins/classic/views/js/snapshots.js b/web/skins/classic/views/js/snapshots.js index 235fd709f..dff843374 100644 --- a/web/skins/classic/views/js/snapshots.js +++ b/web/skins/classic/views/js/snapshots.js @@ -54,7 +54,7 @@ function processRows(rows) { row.Name = '' + row.Name + ''; row.Description = '' + row.Description + ''; - //if ( WEB_LIST_THUMBS ) row.Thumbnail = '' + row.imgHtml + ''; + if (WEB_LIST_THUMBS) row.Thumbnail = '' + row.imgHtml + ''; }); return rows; diff --git a/web/skins/classic/views/snapshots.php b/web/skins/classic/views/snapshots.php index 4fefc2b98..781aff967 100644 --- a/web/skins/classic/views/snapshots.php +++ b/web/skins/classic/views/snapshots.php @@ -77,7 +77,7 @@ getBodyTopHTML(); - +