Skip to content

Commit 7e1db50

Browse files
author
Doris Lam
committed
fix pdf bookmark level
1 parent 6af11e4 commit 7e1db50

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

src/ve-components/presentations/view.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ export const ViewComponent: VeComponentOptions = {
385385
<div id="{{$ctrl.mmsElementId}}" ng-class="{landscape: $ctrl.view._printLandscape}">
386386
<div ng-if="!$ctrl.noTitle">
387387
<div ng-if="!$ctrl.mmsLink" >
388-
<h1 class="view-title h{{$ctrl.level}}">
388+
<h1 class="view-title bm-level-{{$ctrl.level}}">
389389
<span class="ve-view-number" ng-show="$ctrl.showNumbering">{{$ctrl.view._veNumber}}</span>
390390
<transclude-name mms-element-id="{{$ctrl.view.id}}" mms-project-id="{{$ctrl.view._projectId}}" mms-ref-id="{{$ctrl.view._refId}}" mms-watch-id="true"></transclude-name>
391391
</h1>

src/ve-components/transclusions/components/transclude-section.component.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export class TranscludeSectionController extends DeletableTransclusion implement
4646
showNumbering: boolean;
4747
noCompile: boolean = true;
4848
//Locals
49-
49+
level: number = 0;
5050
static $inject = [...DeletableTransclusion.$inject, 'PresentationService', 'RootScopeService'];
5151

5252
constructor(
@@ -129,6 +129,9 @@ export class TranscludeSectionController extends DeletableTransclusion implement
129129
this.growl.warning('There are duplicates in this section, duplicates ignored!');
130130
}
131131
}
132+
if (this.element._veNumber) {
133+
this.level = this.element._veNumber.split('.').length;
134+
}
132135
const deferred = this.$q.defer<string>();
133136
deferred.reject({ status: 200 }); //don't recompile
134137
return deferred.promise;
@@ -140,7 +143,7 @@ export const TranscludeSectionComponent: VeComponentOptions = {
140143
template: `
141144
<div ng-if="$ctrl.element.specification">
142145
<div ng-show="!$ctrl.isEditing">
143-
<h1 class="section-title h{{$ctrl.level}}">
146+
<h1 class="section-title bm-level-{{$ctrl.level}}">
144147
<span class="ve-view-number" ng-show="$ctrl.showNumbering">{{$ctrl.element._veNumber}}</span> {{$ctrl.element.name}}
145148
</h1>
146149
</div>

src/ve-utils/application/Utils.service.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -529,11 +529,9 @@ p, div {widows: 2; orphans: 2;}
529529
------------------------------------------------------------------*/
530530
@page:first {@top {content: ''} @bottom {content: ''} @top-left {content: ''} @top-right {content: ''} @bottom-left {content: ''} @bottom-right {content: ''}}
531531
532-
/*------------------------------------------------------------------
533-
8. Signature Box
534532
`;
535533
for (let i = 1; i < 10; i++) {
536-
ret += `.h${i} {-prince-bookmark-level: ${i};}
534+
ret += `.bm-level-${i} {bookmark-level: ${i};}
537535
`;
538536
}
539537
if (htmlFlag) {

0 commit comments

Comments
 (0)