-
Notifications
You must be signed in to change notification settings - Fork 823
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PR: PopupSurveyModel: Redesign (#7576)
* work for the surveyjs/service#1668 * work for the surveyjs/service#1668 * work for the surveyjs/service#1668 * work for the surveyjs/service#1668 * work for the surveyjs/service#1668 * work for the surveyjs/service#1668 * work for the surveyjs/service#1668 * work for the surveyjs/service#1668 * work for the surveyjs/service#1668 * work for the surveyjs/service#1668 * work for the surveyjs/service#1668 * work for the surveyjs/service#1668 * work for the surveyjs/service#1668 * work for the surveyjs/service#1668 (lint) * work for the surveyjs/service#1668 * work for the surveyjs/service#1668 * work for the surveyjs/service#1668 * work for the surveyjs/service#1668 * work for the surveyjs/service#1668 (lint) * work for the surveyjs/service#1668 * work for the surveyjs/service#1668 * work for the surveyjs/service#1668 * work for the surveyjs/service#1668 * work for the surveyjs/service#1668 * work for the surveyjs/service#1668 * work for the surveyjs/service#1668 * work for the surveyjs/service#1668 * work for the surveyjs/service#1668 * work for the surveyjs/service#1668 * work for the surveyjs/service#1668
- Loading branch information
1 parent
6efa592
commit 54ca5ad
Showing
24 changed files
with
453 additions
and
258 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
packages/survey-angular-ui/example/src/app/components/test/test.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,4 +1,4 @@ | ||
<div id="surveyElement"> | ||
<popup-survey *ngIf="!!model && isPopup" [model]="$any(model)"></popup-survey> | ||
<popup-survey *ngIf="!!model && isPopup" [model]="$any(model)" [isExpanded]="isExpanded" [allowClose]="true"></popup-survey> | ||
<survey *ngIf="!!model && !isPopup" [model]="$any(model)"></survey></div> | ||
<div id="surveyResultElement"></div> |
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
31 changes: 18 additions & 13 deletions
31
packages/survey-angular-ui/src/popup.survey.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,17 +1,22 @@ | ||
<div *ngIf="!!popup && popup.isShowing" [class]="popup.cssRoot" style="position: fixed; bottom: 3px; right: 10px;" [style.width]="popup.renderedWidth" [style.maxWidth]="popup.renderedWidth"> | ||
<div [class]="popup.cssHeaderRoot"> | ||
<span (click)="popup.changeExpandCollapse()" style="width: 100%; cursor: pointer;"> | ||
<span style="padding-right:10px" [class]="popup.cssHeaderTitle">{{popup.locTitle.renderedHtml}}</span> | ||
<span aria-hidden="true" [class]="popup.cssButton"></span> | ||
</span> | ||
<span *ngIf="popup.allowClose" (click)="popup.hide()" [class]="popup.cssHeaderButton" style="float: right; cursor: pointer; width: 24px; height: 24px; transform: rotate(45deg);"> | ||
<svg [iconName]="'icon-expanddetail'" [size]="16" sv-ng-svg-icon></svg> | ||
</span> | ||
<span *ngIf="popup.isExpanded" (click)="popup.changeExpandCollapse()" [class]="popup.cssHeaderButton" style="float: right; cursor: pointer; width: 24px; height: 24px;"> | ||
<svg [iconName]="'icon-collapsedetail'" [size]="16" sv-ng-svg-icon></svg> | ||
</span> | ||
<div *ngIf="!!popup && popup.isShowing" [class]="popup.cssRoot" [style.width]="popup.renderedWidth" [style.maxWidth]="popup.renderedWidth" (scroll)="popup.onScroll()"> | ||
<div [class]="popup.cssRootContent"> | ||
<div [class]="getHeaderCss()"> | ||
<div *ngIf="popup.isCollapsed && !!popup.locTitle" [class]="popup.cssHeaderTitleCollapsed"> | ||
{{popup.locTitle.renderedHtml}} | ||
</div> | ||
<div [class]="popup.cssHeaderButtonsContainer"> | ||
<div [class]="popup.cssHeaderCollapseButton" (click)="popup.changeExpandCollapse()"> | ||
<svg *ngIf="popup.isExpanded" [iconName]="'icon-minimize_16x16'" [size]="16" sv-ng-svg-icon></svg> | ||
<svg *ngIf="popup.isCollapsed" [iconName]="'icon-restore_16x16'" [size]="16" sv-ng-svg-icon></svg> | ||
</div> | ||
|
||
<div *ngIf="popup.allowClose" [class]="popup.cssHeaderCloseButton" (click)="popup.hide()"> | ||
<svg [iconName]="'icon-close_16x16'" [size]="16" sv-ng-svg-icon></svg> | ||
</div> | ||
</div> | ||
</div> | ||
<div *ngIf="popup.isExpanded" [class]="popup.cssBody" (scroll)="popup.onScroll()"> | ||
<div [class]="popup.cssBody"> | ||
<survey [model]="popup.survey"></survey> | ||
</div> | ||
</div> | ||
</div> |
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 |
---|---|---|
@@ -1,62 +1,90 @@ | ||
@import "../defaultV2-theme/variables.scss"; | ||
@import "../defaultV2-theme/mixins.scss"; | ||
|
||
.sv_window { | ||
position: fixed; | ||
bottom: 3px; | ||
right: 10px; | ||
background-color: cadetblue; | ||
padding: 1px; | ||
font-family: $font-family; | ||
font-size: calcFontSize(0.875); | ||
font-style: normal; | ||
font-weight: 400; | ||
line-height: 1.42857143; | ||
text-align: left; | ||
text-align: start; | ||
text-decoration: none; | ||
text-shadow: none; | ||
text-transform: none; | ||
letter-spacing: normal; | ||
word-break: normal; | ||
word-spacing: normal; | ||
word-wrap: normal; | ||
white-space: normal; | ||
background-color: #fff; | ||
-webkit-background-clip: padding-box; | ||
bottom: calcSize(2); | ||
right: calcSize(2); | ||
border-radius: calcSize(1); | ||
border: 1px solid $border-inside; | ||
box-shadow: $shadow-large, $shadow-medium; | ||
background-clip: padding-box; | ||
border: 1px solid #ccc; | ||
border: 1px solid rgba(0, 0, 0, 0.2); | ||
border-radius: calcCornerRadius(1.5); | ||
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); | ||
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); | ||
line-break: auto; | ||
z-index: 100; | ||
max-height: 90vh; | ||
overflow: auto; | ||
box-sizing: border-box; | ||
} | ||
|
||
.sv_window_title { | ||
padding: 8px 14px; | ||
margin: 0; | ||
font-size: calcFontSize(0.875); | ||
background-color: #f7f7f7; | ||
border-bottom: 1px solid #ebebeb; | ||
border-radius: calcCornerRadius(1) calcCornerRadius(1) 0 0; | ||
display: flex; | ||
.sv_window_content { | ||
border-radius: calcSize(1); | ||
overflow: hidden; | ||
} | ||
|
||
.sv_window_content { | ||
padding: 0; | ||
margin: 0; | ||
max-height: 80vh; | ||
overflow-y: auto; | ||
.sv_window--collapsed { | ||
.sv_window_header { | ||
height: calcSize(4); | ||
padding: calcSize(1) calcSize(1) calcSize(1) calcSize(2); | ||
border-radius: calcSize(1); | ||
display: flex; | ||
background-color: $background-dim; | ||
} | ||
|
||
.sv_window_content { | ||
display: none; | ||
} | ||
} | ||
|
||
.sv_window_header_title_collapsed { | ||
color: $foreground-dim; | ||
@include defaultBold; | ||
flex: 1; | ||
display: flex; | ||
justify-content: start; | ||
align-items: center; | ||
} | ||
|
||
.sv_window_title a, | ||
.sv_window_title a:link, | ||
.sv_window_title a:visited { | ||
text-decoration: none; | ||
font-size: calcFontSize(0.875); | ||
font-style: normal; | ||
color: black; | ||
.sv_window_header_description{ | ||
color: $font-questiondescription-color; | ||
font-feature-settings: 'salt' on; | ||
@include defaultFont; | ||
white-space: nowrap; | ||
text-overflow: ellipsis; | ||
overflow: hidden; | ||
} | ||
|
||
.sv_window_button .sv-svg-icon { | ||
margin: 4px; | ||
.sv_window_buttons_container { | ||
position: absolute; | ||
top: calcSize(1); | ||
right: calcSize(1); | ||
display: flex; | ||
gap: calcSize(1); | ||
z-index: 1; | ||
} | ||
|
||
.sv_window_button { | ||
display: flex; | ||
padding: calcSize(1); | ||
justify-content: center; | ||
align-items: center; | ||
border-radius: calcSize(0.5); | ||
cursor: pointer; | ||
|
||
&:hover, &:active { | ||
background-color: $primary-light; | ||
svg { | ||
use, path { | ||
fill: $primary; | ||
} | ||
} | ||
} | ||
|
||
&:active { | ||
opacity: 0.5; | ||
} | ||
|
||
svg { | ||
use, path { | ||
fill: $foreground-dim-light; | ||
} | ||
} | ||
} |
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
Oops, something went wrong.