diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 2c03a7006..9e7c894ac 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -13,6 +13,7 @@ - fixed #11222: testEnvironment.pl Missing Dependencies - fixed #11226: New stylesheet (wg-base.css), new style templates (from the TWG) - fixed #11216: LDAP Connections status incorrect + - fixed #11229: ProgressBar throws errors on some messages. 7.8.4 - Fixed a compatibility problem between WRE and new Spectre code. diff --git a/lib/WebGUI/AssetBranch.pm b/lib/WebGUI/AssetBranch.pm index 6dd5dd746..faca1854c 100644 --- a/lib/WebGUI/AssetBranch.pm +++ b/lib/WebGUI/AssetBranch.pm @@ -317,6 +317,8 @@ sub www_editBranchSave { my %data; my $pb = WebGUI::ProgressBar->new($session); my $i18n = WebGUI::International->new($session, 'Asset'); + $pb->start($i18n->get('edit branch'), $session->url->extras('adminConsole/assets.gif')); + $pb->update($i18n->get('Processing form data')); $data{isHidden} = $form->yesNo("isHidden") if ($form->yesNo("change_isHidden")); $data{newWindow} = $form->yesNo("newWindow") if ($form->yesNo("change_newWindow")); $data{encryptPage} = $form->yesNo("encryptPage") if ($form->yesNo("change_encryptPage")); @@ -353,7 +355,6 @@ sub www_editBranchSave { $urlBase = $form->text("baseUrl"); $endOfUrl = $form->selectBox("endOfUrl"); } - $pb->start($i18n->get('edit branch'), $session->url->extras('adminConsole/assets.gif')); my $descendants = $self->getLineage(["self","descendants"],{returnObjects=>1}); DESCENDANT: foreach my $descendant (@{$descendants}) { if ( !$descendant->canEdit ) { @@ -401,6 +402,7 @@ sub www_editBranchSave { } } } + $pb->update(sprintf $i18n->get('Attempting to commit changes')); if (WebGUI::VersionTag->autoCommitWorkingIfEnabled($self->session, { allowComments => 1, returnUrl => $self->getUrl, diff --git a/lib/WebGUI/ProgressBar.pm b/lib/WebGUI/ProgressBar.pm index 6fb9990eb..5be25932a 100644 --- a/lib/WebGUI/ProgressBar.pm +++ b/lib/WebGUI/ProgressBar.pm @@ -147,7 +147,8 @@ A message to be displayed in the status bar. sub update { my $self = shift; - my $message = shift; ##JS string escaping? + my $message = shift; + $message =~ s/'/\\'/g; ##Encode single quotes for JSON; $self->session->log->preventDebugOutput; $self->{_counter} += 1; diff --git a/lib/WebGUI/i18n/English/Asset.pm b/lib/WebGUI/i18n/English/Asset.pm index 72817513f..708f23973 100644 --- a/lib/WebGUI/i18n/English/Asset.pm +++ b/lib/WebGUI/i18n/English/Asset.pm @@ -343,12 +343,24 @@ our $I18N = { context => q|To skip, to move over, to not process| }, + 'Processing form data' => { + message => q|Processing form data|, + lastUpdated => 1245343280, + context => q|To edit or change| + }, + 'editing %s' => { message => q|editing %s|, lastUpdated => 1245343280, context => q|To edit or change| }, + 'Attempting to commit changes' => { + message => q|Attempting to commit changes|, + lastUpdated => 1245343280, + context => q||, + }, + 'this asset only' => { message => q|This Asset Only|, lastUpdated => 0,