@@ -630,6 +630,7 @@ const photoBooth = (function () {
630630 endTime = new Date ( ) . getTime ( ) ;
631631 totalTime = endTime - startTime ;
632632 photoboothTools . console . logDev ( 'Processing ' + photoStyle + ' took ' + totalTime + 'ms' ) ;
633+ photoboothTools . console . logDev ( 'Images:' , data . images ) ;
633634
634635 if ( config . get_request . processed ) {
635636 const getUrl = config . get_request . server + '/' + photoStyle ;
@@ -644,7 +645,7 @@ const photoBooth = (function () {
644645 } else if ( photoStyle === 'chroma' ) {
645646 api . renderChroma ( data . file ) ;
646647 } else {
647- api . renderPic ( data . file ) ;
648+ api . renderPic ( data . file , data . images ) ;
648649 }
649650 } ,
650651 error : ( jqXHR , textStatus ) => {
@@ -688,7 +689,7 @@ const photoBooth = (function () {
688689 } ;
689690
690691 // Render Picture after taking
691- api . renderPic = function ( filename ) {
692+ api . renderPic = function ( filename , files ) {
692693 // Add QR Code Image
693694 const qrCodeModal = $ ( '#qrCode' ) ;
694695 photoboothTools . modal . empty ( qrCodeModal ) ;
@@ -739,23 +740,27 @@ const photoBooth = (function () {
739740 const msg = photoboothTools . getTranslation ( 'really_delete_image' ) ;
740741 const really = config . delete . no_request ? true : confirm ( filename + ' ' + msg ) ;
741742 if ( really ) {
742- api . deleteImage ( filename , ( data ) => {
743- if ( data . success ) {
744- photoboothTools . console . log ( 'Deleted ' + filename ) ;
745- photoboothTools . reloadPage ( ) ;
746- } else {
747- photoboothTools . console . log ( 'Error while deleting ' + filename ) ;
748- if ( data . error ) {
749- photoboothTools . console . log ( data . error ) ;
743+ files . forEach ( function ( file , index , array ) {
744+ photoboothTools . console . logDev ( 'Index:' , index ) ;
745+ photoboothTools . console . logDev ( 'Array:' , array ) ;
746+ api . deleteImage ( file , ( data ) => {
747+ if ( data . success ) {
748+ photoboothTools . console . log ( 'Deleted ' + file ) ;
749+ } else {
750+ photoboothTools . console . log ( 'Error while deleting ' + file ) ;
751+ if ( data . error ) {
752+ photoboothTools . console . log ( data . error ) ;
753+ }
754+ setTimeout ( function ( ) {
755+ photoboothTools . reloadPage ( ) ;
756+ } , 5000 ) ;
750757 }
751- setTimeout ( function ( ) {
752- photoboothTools . reloadPage ( ) ;
753- } , 5000 ) ;
754- }
758+ } ) ;
755759 } ) ;
756760 } else {
757761 $ ( '.deletebtn' ) . blur ( ) ;
758762 }
763+ photoboothTools . reloadPage ( ) ;
759764 } ) ;
760765
761766 // Add Image to gallery and slider
0 commit comments