diff --git a/project/ws/viewer/src/lib/components/viewer-secondary-top-bar/viewer-secondary-top-bar.component.ts b/project/ws/viewer/src/lib/components/viewer-secondary-top-bar/viewer-secondary-top-bar.component.ts
index fcf139c90b..98d00b50c0 100644
--- a/project/ws/viewer/src/lib/components/viewer-secondary-top-bar/viewer-secondary-top-bar.component.ts
+++ b/project/ws/viewer/src/lib/components/viewer-secondary-top-bar/viewer-secondary-top-bar.component.ts
@@ -352,7 +352,12 @@ export class ViewerSecondaryTopBarComponent implements OnInit, OnDestroy {
})
}
} else {
- this.router.navigateByUrl(`public/toc/${this.collectionId}/overview`)
+ if (window.location.href.includes('editMode=true')) {
+ this.router.navigateByUrl(`public/toc/${this.collectionId}/overview?editMode=true`)
+ } else {
+ this.router.navigateByUrl(`public/toc/${this.collectionId}/overview`)
+ }
+
}
}
diff --git a/project/ws/viewer/src/lib/components/viewer-top-bar/viewer-top-bar.component.html b/project/ws/viewer/src/lib/components/viewer-top-bar/viewer-top-bar.component.html
index e3e2876d89..31a629ea45 100755
--- a/project/ws/viewer/src/lib/components/viewer-top-bar/viewer-top-bar.component.html
+++ b/project/ws/viewer/src/lib/components/viewer-top-bar/viewer-top-bar.component.html
@@ -75,9 +75,9 @@
share
{{'apptocsinglepage.share' | translate}}
@@ -152,7 +152,7 @@
star
-
+
{{'apptocsinglepage.rateNow' | translate}}
-
+
{{'apptocsinglepage.editRating' | translate}}
diff --git a/project/ws/viewer/src/lib/components/viewer-top-bar/viewer-top-bar.component.ts b/project/ws/viewer/src/lib/components/viewer-top-bar/viewer-top-bar.component.ts
index a68e27dadf..9eed613420 100755
--- a/project/ws/viewer/src/lib/components/viewer-top-bar/viewer-top-bar.component.ts
+++ b/project/ws/viewer/src/lib/components/viewer-top-bar/viewer-top-bar.component.ts
@@ -247,7 +247,7 @@ export class ViewerTopBarComponent implements OnInit, OnDestroy, OnChanges {
ComputeCompletedNodesAndPercent(identifier: string) {
if(this.hierarchyMapData && this.hierarchyMapData[identifier]) {
// tslint:disable
- const completedItems = _.filter(this.hierarchyMapData[identifier].leafNodes, r => this.hierarchyMapData[r].completionStatus === 2 || this.hierarchyMapData[r].completionPercentage === 100)
+ const completedItems = _.filter(this.hierarchyMapData[identifier].leafNodes, r => (this.hierarchyMapData[r] && (this.hierarchyMapData[r].completionStatus === 2 || this.hierarchyMapData[r].completionPercentage === 100)))
this.completedCount = completedItems.length
this.completedCountOutput.emit(this.completedCount)
this.overallLeafNodes = _.toInteger(_.get(this.hierarchyMapData[identifier], 'leafNodesCount')) || 1
diff --git a/project/ws/viewer/src/lib/plugins/html/html.component.ts b/project/ws/viewer/src/lib/plugins/html/html.component.ts
index 213540ef01..e086f1005e 100755
--- a/project/ws/viewer/src/lib/plugins/html/html.component.ts
+++ b/project/ws/viewer/src/lib/plugins/html/html.component.ts
@@ -133,7 +133,9 @@ export class HtmlComponent implements OnInit, OnChanges, OnDestroy {
// this.fireRealTimeProgress(this.htmlContent)
// // this.store.clearAll()
// }
- this.sub.unsubscribe()
+ if (this.sub) {
+ this.sub.unsubscribe()
+ }
}
private fireRealTimeProgress(htmlContent: any) {
@@ -250,7 +252,10 @@ export class HtmlComponent implements OnInit, OnChanges, OnDestroy {
// }
// call fireRealTimeProgress func for LMS data and non-LMS data also
this.fireRealTimeProgress(this.oldData)
- this.sub.unsubscribe()
+ if (this.sub) {
+ this.sub.unsubscribe()
+ }
+
this.ticks = 0
this.timer = timer(1000, 1000)
// subscribing to a observable returns a subscription object
@@ -358,7 +363,7 @@ export class HtmlComponent implements OnInit, OnChanges, OnDestroy {
// `${this.htmlContent.streamingUrl}/${this.htmlContent.initFile}?timestamp='${new Date().getTime()}`)
this.iframeUrl = this.domSanitizer.bypassSecurityTrustResourceUrl(
// tslint:disable-next-line:max-line-length
- `${this.generateUrl(this.htmlContent.streamingUrl)}/${this.htmlContent.initFile}?timestamp='${new Date().getTime()}`
+ `${this.generateUrl(this.htmlContent.streamingUrl)}?timestamp='${new Date().getTime()}`
)
}
} else {
@@ -536,7 +541,7 @@ export class HtmlComponent implements OnInit, OnChanges, OnDestroy {
newLink.push(chunk[i])
}
}
- const newUrl = newLink.join('/')
- return newUrl
+ // const newUrl = newLink.join('/')
+ return oldUrl
}
}
diff --git a/project/ws/viewer/src/lib/viewer.component.html b/project/ws/viewer/src/lib/viewer.component.html
index 0da90d225e..93d7bc34dd 100755
--- a/project/ws/viewer/src/lib/viewer.component.html
+++ b/project/ws/viewer/src/lib/viewer.component.html
@@ -79,12 +79,13 @@
-
+
+
diff --git a/project/ws/viewer/src/lib/viewer.component.scss b/project/ws/viewer/src/lib/viewer.component.scss
index 30b8ae19da..c8467782f4 100755
--- a/project/ws/viewer/src/lib/viewer.component.scss
+++ b/project/ws/viewer/src/lib/viewer.component.scss
@@ -164,4 +164,6 @@
::ng-deep .mat-drawer.mat-drawer-side{
z-index: 0 !important;
-}
\ No newline at end of file
+}
+
+.display-none {display: none !important;}
\ No newline at end of file