Skip to content

Commit

Permalink
Merge branch 'feature-sitetree-html-import' into release-0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
teonator committed Apr 8, 2024
2 parents e761ae8 + 748bf44 commit 06743c7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions services/HTMLImportService.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ component {
var totalPages = 0;

arguments.logger?.info( "Importing HTML from ZIP..." );
arguments.progress?.setProgress( 10 );

try {
if ( !$helpers.isEmptyString( arguments.zipFilePath ) ) {
Expand All @@ -45,6 +46,7 @@ component {

if ( !$helpers.isEmptyString( htmlContent ) ) {
arguments.logger?.info( "Parsing HTML..." );
arguments.progress?.setProgress( 20 );

var html = variables._jsoup.parse( htmlContent );
var elements = html.body().children();
Expand Down Expand Up @@ -109,6 +111,7 @@ component {
}

arguments.logger?.info( "Done." );
arguments.progress?.setProgress( 100 );

return parentPageId;
}
Expand Down Expand Up @@ -201,6 +204,8 @@ component {
}

arguments.pages[ i ].id = pageId;

arguments.progress?.setProgress( ( ( 70 / totalPages ) * i ) + 20 );
}
}

Expand Down

0 comments on commit 06743c7

Please sign in to comment.