-
Notifications
You must be signed in to change notification settings - Fork 383
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed#4371 - Theme builder/Preview : strange resulting page
- Loading branch information
tsv2013
committed
Sep 19, 2023
1 parent
c89e92a
commit 398ffcd
Showing
18 changed files
with
67 additions
and
33 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
packages/survey-creator-angular/src/tabs/preview/test-again.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<ng-template #template> | ||
<div role="button" class="svc-preview__test-again svc-btn" (click)="model.action()" [key2click]> | ||
<div role="button" class="svc-preview__test-again svc-btn" (click)="action.action()" [key2click]> | ||
<span class="svc-text svc-text--normal svc-text--bold"> | ||
{{model.title}} | ||
{{action.title}} | ||
</span> | ||
</div> | ||
</ng-template> |
13 changes: 9 additions & 4 deletions
13
packages/survey-creator-angular/src/tabs/preview/test-again.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,20 @@ | ||
import { Component, Input } from "@angular/core"; | ||
import { BaseAngular } from "survey-angular-ui"; | ||
import { AngularComponentFactory, BaseAngular } from "survey-angular-ui"; | ||
import { Action } from "survey-core"; | ||
import { TestSurveyTabViewModel } from "survey-creator-core"; | ||
|
||
@Component({ | ||
selector: "survey-test-again", | ||
templateUrl: "./test-again.component.html", | ||
styles: [":host { display: none; }"] | ||
}) | ||
export class TestAgainActionComponent extends BaseAngular<Action> { | ||
@Input() model!: Action; | ||
@Input() model!: { testAgainAction: Action }; | ||
protected getModel(): Action { | ||
return this.model; | ||
return this.model.testAgainAction; | ||
} | ||
} | ||
get action() { | ||
return this.getModel(); | ||
} | ||
} | ||
AngularComponentFactory.Instance.registerComponent("svc-complete-page", TestAgainActionComponent); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<div role="button" class="svc-preview__test-again svc-btn" | ||
data-bind="click: testAgainAction.action, key2click, clickBubble: false"> | ||
<span class="svc-text svc-text--normal svc-text--bold" data-bind="text: testAgainAction.title"> | ||
</span> | ||
</div> |
19 changes: 19 additions & 0 deletions
19
packages/survey-creator-knockout/src/tabs/test-complete.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import * as ko from "knockout"; | ||
import { ImplementorBase } from "survey-knockout-ui"; | ||
import { TestSurveyTabViewModel } from "survey-creator-core"; | ||
|
||
const template = require("./test-complete.html"); | ||
// import template from "./test-complete.html"; | ||
|
||
ko.components.register("svc-complete-page", { | ||
viewModel: { | ||
createViewModel: (params: any, componentInfo: any) => { | ||
const model: TestSurveyTabViewModel = params.model; | ||
new ImplementorBase(model.testAgainAction); | ||
return { | ||
testAgainAction: model.testAgainAction | ||
}; | ||
}, | ||
}, | ||
template: template | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters