Revision 56780
Added by Konstantina Galouni almost 5 years ago
div-help-contents.component.ts | ||
---|---|---|
144 | 144 |
this.counter.all = this.divHelpContents.length; |
145 | 145 |
this.checkboxes = []; |
146 | 146 |
|
147 |
//for (let i = this.divHelpContents.length - 1; i >= 0; i -= 1) {
|
|
148 |
for (let i = 0; i < this.divHelpContents.length; i++) { |
|
147 |
for (let i = this.divHelpContents.length - 1; i >= 0; i -= 1) { |
|
148 |
//for (let i = 0; i < this.divHelpContents.length; i++) {
|
|
149 | 149 |
let divId: DivId = this.divHelpContents[i].divId as DivId; |
150 | 150 |
let pages: Page[] = divId.pages as Page[]; |
151 | 151 |
const pageIds = pages.map(x => x._id); |
152 | 152 |
|
153 | 153 |
if(!this.selectedPageId || pageIds.includes(this.selectedPageId)) { |
154 | 154 |
this.cutContent(this.divHelpContents[i]); |
155 |
this.checkboxes.push(<CheckDivHelpContent>{divHelpContent : this.divHelpContents[i], checked : false});
|
|
155 |
this.checkboxes.unshift(<CheckDivHelpContent>{divHelpContent : this.divHelpContents[i], checked : false});
|
|
156 | 156 |
} else { |
157 | 157 |
this.divHelpContents.splice(i, 1); |
158 | 158 |
} |
Also available in: Unified diff
[Trunk | Admin]: div-help-contents.component & page-help-contents.component: Bug fix: Show contents properly. Iterate from end to start and unshift in checkboxes at first parsing to show them in correct order.