Skip to content

Commit

Permalink
Merge pull request #2585 from Defman21/pr/commando-multifolder-tip
Browse files Browse the repository at this point in the history
Commando: show a tip when next/previous/current item is not available…
  • Loading branch information
th3coop authored Jul 16, 2019
2 parents 0a368bf + af430af commit 89c9134
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions src/modules/commando/content/sdk/commando.js
Original file line number Diff line number Diff line change
Expand Up @@ -1699,9 +1699,16 @@
{
resultElem.addItemToSelection(sibling);
resultElem.ensureElementIsVisible(sibling);
c.tip("Selected " + resultElem.selectedCount + " items");
} else if (!selItem.resultData.allowMultiSelect) {
c.tip("Cannot expand selection to item meant for single selection only");
} else if (sibling || !sibling.resultData.allowMultiSelect) {
let tip = 'Cannot expand selection to item meant for single selection only';
if (resultElem.selectedCount > 1) {
tip += `, selected ${resultElem.selectedCount} items`;
}
c.tip(tip);
}

c.tip("Selected " + resultElem.selectedCount + " items");
}
else
{
Expand Down Expand Up @@ -1770,9 +1777,16 @@
{
resultElem.addItemToSelection(sibling);
resultElem.ensureElementIsVisible(sibling);
c.tip("Selected " + resultElem.selectedCount + " items");
} else if (!selItem.resultData.allowMultiSelect) {
c.tip("Cannot expand selection to item meant for single selection only");
} else if (sibling || !sibling.resultData.allowMultiSelect) {
let tip = 'Cannot expand selection to item meant for single selection only';
if (resultElem.selectedCount > 1) {
tip += `, selected ${resultElem.selectedCount} items`;
}
c.tip(tip);
}

c.tip("Selected " + resultElem.selectedCount + " items");
}
else
{
Expand Down

0 comments on commit 89c9134

Please sign in to comment.