Skip to content

Commit

Permalink
work for the #7357
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-kurmanov committed Dec 4, 2023
1 parent c90df07 commit abb8db3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<ng-template [component]="{ name: getItemValueComponentName(item), data: getItemValueComponentData(item, index, true) }"></ng-template>
</ng-container>

<div *ngIf="model.unRankingChoices.length === 0" [class]="model.cssClasses.containerPlaceholder">{{model.selectToRankEmptyRankedAreaText}}</div>
<div *ngIf="model.unRankingChoices.length === 0" [class]="model.cssClasses.containerPlaceholder" [model]="$any(model).locSelectToRankEmptyRankedAreaText" sv-ng-string></div>
</div>

<div [class]="model.cssClasses.containersDivider"></div>
Expand All @@ -20,6 +20,6 @@
<ng-template [component]="{ name: getItemValueComponentName(item), data: getItemValueComponentData(item, index) }"></ng-template>
</ng-container>

<div *ngIf="model.rankingChoices.length === 0" [class]="model.cssClasses.containerPlaceholder">{{model.selectToRankEmptyUnrankedAreaText}}</div>
<div *ngIf="model.rankingChoices.length === 0" [class]="model.cssClasses.containerPlaceholder" [model]="$any(model).locSelectToRankEmptyUnrankedAreaText" sv-ng-string></div>
</div>
</div>
4 changes: 2 additions & 2 deletions packages/survey-vue3-ui/src/Ranking.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
v-if="question.unRankingChoices.length === 0"
:class="question.cssClasses.containerPlaceholder"
>
{{ question.selectToRankEmptyRankedAreaText }}
<survey-string :locString="question.locSelectToRankEmptyRankedAreaText"></survey-string>
</div>
</div>

Expand All @@ -50,7 +50,7 @@
v-if="question.rankingChoices.length === 0"
:class="question.cssClasses.containerPlaceholder"
>
{{ question.selectToRankEmptyUnrankedAreaText }}
<survey-string :locString="question.locSelectToRankEmptyUnrankedAreaText"></survey-string>
</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/react/reactquestion_ranking.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ export class SurveyQuestionRanking extends SurveyQuestionElementBase {
>
<div className={this.question.getContainerClasses("from")} data-ranking="from-container">
{this.getItems(this.question.unRankingChoices, unrankedItem)}
{this.question.unRankingChoices.length === 0 ? <div className={this.question.cssClasses.containerPlaceholder}> {this.question.selectToRankEmptyRankedAreaText} </div> : null}
{this.question.unRankingChoices.length === 0 ? <div className={this.question.cssClasses.containerPlaceholder}> {this.renderLocString(this.question.locSelectToRankEmptyRankedAreaText)} </div> : null}
</div>

<div className={this.question.cssClasses.containersDivider}></div>

<div className={this.question.getContainerClasses("to")} data-ranking="to-container">
{this.getItems()}
{this.question.rankingChoices.length === 0 ? <div className={this.question.cssClasses.containerPlaceholder}>{this.question.selectToRankEmptyUnrankedAreaText}</div> : null}
{this.question.rankingChoices.length === 0 ? <div className={this.question.cssClasses.containerPlaceholder}> {this.renderLocString(this.question.locSelectToRankEmptyUnrankedAreaText)} </div> : null}
</div>
</div>
);
Expand Down
7 changes: 5 additions & 2 deletions src/vue/ranking/ranking.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
:cssClasses="question.cssClasses" :question="question" :item="item" :unrankedItem=true></survey-ranking-item>

<div v-if="question.unRankingChoices.length === 0" :class="question.cssClasses.containerPlaceholder">
{{ question.selectToRankEmptyRankedAreaText }} </div>
<survey-string :locString="question.locSelectToRankEmptyRankedAreaText"></survey-string>
</div>
</div>

<div v-if="question.selectToRankEnabled" :class="question.cssClasses.containersDivider"></div>
Expand All @@ -21,7 +22,9 @@
:class="question.getItemClass(item)" :text="item.locText" :index="index" :indexText="getNumberByIndex(index)"
:cssClasses="question.cssClasses" :question="question" :item="item"></survey-ranking-item>

<div v-if="question.rankingChoices.length === 0" :class="question.cssClasses.containerPlaceholder">{{ question.selectToRankEmptyUnrankedAreaText }}</div>
<div v-if="question.rankingChoices.length === 0" :class="question.cssClasses.containerPlaceholder">
<survey-string :locString="question.locSelectToRankEmptyUnrankedAreaText"></survey-string>
</div>
</div>
</div>
</template>
Expand Down

0 comments on commit abb8db3

Please sign in to comment.