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 95df902 commit 00aac31
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 4 deletions.
10 changes: 8 additions & 2 deletions src/knockout/templates/question-ranking.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
<!-- /ko -->
<!-- /ko -->
<!-- ko if: question.unRankingChoices.length === 0 -->
<div data-bind="css: cssClasses.containerPlaceholder, text: question.selectToRankEmptyRankedAreaText"></div>
<div data-bind="css: cssClasses.containerPlaceholder">
<!-- ko template: { name: 'survey-string', data: question.locSelectToRankEmptyRankedAreaText } -->
<!-- /ko -->
</div>
<!-- /ko -->
</div>
<div data-bind="css: cssClasses.containersDivider"></div>
Expand All @@ -26,7 +29,10 @@
<!-- /ko -->
<!-- /ko -->
<!-- ko if: question.rankingChoices.length === 0 -->
<div data-bind="css: cssClasses.containerPlaceholder, text: question.selectToRankEmptyUnrankedAreaText"></div>
<div data-bind="css: cssClasses.containerPlaceholder">
<!-- ko template: { name: 'survey-string', data: question.locSelectToRankEmptyUnrankedAreaText } -->
<!-- /ko -->
</div>
<!-- /ko -->
</div>
</div>
Expand Down
18 changes: 18 additions & 0 deletions src/question_ranking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,24 @@ Serializer.addClass(
visible: true,
isSerializable: true,
},
{
name: "selectToRankEmptyRankedAreaText:text",
serializationProperty: "locSelectToRankEmptyRankedAreaText",
category: "general",
dependsOn: "selectToRankEnabled",
visibleIf: (obj: any) => {
return !!obj.selectToRankEnabled;
},
},
{
name: "selectToRankEmptyUnrankedAreaText:text",
serializationProperty: "locSelectToRankEmptyUnrankedAreaText",
category: "general",
dependsOn: "selectToRankEnabled",
visibleIf: (obj: any) => {
return !!obj.selectToRankEnabled;
},
},
{
name: "maxSelectedChoices:number",
visible: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@
<div class="sv-ranking__containers-divider">
</div>
<div class="sv-ranking__container sv-ranking__container--empty sv-ranking__container--to" data-ranking="to-container">
<div class="sv-ranking__container-placeholder">Drag and drop choices here to rank them</div>
<div class="sv-ranking__container-placeholder">
<span class="sv-string-viewer">Drag and drop choices here to rank them</span>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@
<div class="sv-ranking__containers-divider">
</div>
<div class="sv-ranking__container sv-ranking__container--empty sv-ranking__container--to" data-ranking="to-container">
<div class="sv-ranking__container-placeholder">Drag and drop choices here to rank them</div>
<div class="sv-ranking__container-placeholder">
<span class="sv-string-viewer">Drag and drop choices here to rank them</span>
</div>
</div>
</div>

0 comments on commit 00aac31

Please sign in to comment.