Skip to content

Commit f2781a5

Browse files
SeifjeMike Tutkowski
authored andcommitted
Update the hint appropriately
1 parent a0f1012 commit f2781a5

2 files changed

Lines changed: 39 additions & 2 deletions

File tree

‎ui/scripts/ui/dialog.js‎

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,11 +466,32 @@
466466
}
467467
} else if (field.isTokenInput) { // jquery.tokeninput.js
468468
isAsync = true;
469+
470+
var hint= "Type in a search term";
471+
var noResults= "No results";
472+
473+
if (field.label === 'label.storage.tags')
474+
{
475+
hint = "Type in part of a storage tag";
476+
noResults = "No storage tags found";
477+
}
478+
else if (field.label === 'label.host.tags')
479+
{
480+
hint = "Type in part of a host tag";
481+
noResults = "No host tags found";
482+
}
483+
469484
selectArgs = {
470485
context: args.context,
471486
response: {
472487
success: function(args) {
473-
$input.tokenInput(unique_tags(args.data), { theme: "facebook", preventDuplicates: true });
488+
$input.tokenInput(unique_tags(args.data),
489+
{
490+
theme: "facebook",
491+
preventDuplicates: true,
492+
hintText: hint,
493+
noResultsText: noResults
494+
});
474495
}
475496
}
476497
};

‎ui/scripts/ui/widgets/detailView.js‎

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,20 @@
734734

735735
isAsync = true;
736736

737+
var hint = "Type in a search term";
738+
var noResults = "No results";
739+
740+
if ($value.data('value_token').label === 'label.storage.tags')
741+
{
742+
hint = "Type in part of a storage tag";
743+
noResults= "No storage tags found";
744+
}
745+
else if ($value.data('value_token').label === 'label.host.tags')
746+
{
747+
hint = "Type in part of a host tag";
748+
noResults = "No host tags found";
749+
}
750+
737751
selectArgs = {
738752
context: $detailView.data('view-args').context,
739753
response: {
@@ -743,7 +757,9 @@
743757
theme: "facebook",
744758
preventDuplicates: true,
745759
prePopulate: existing_tags,
746-
processPrePopulate: true
760+
processPrePopulate: true,
761+
hintText: hint,
762+
noResultsText: noResults
747763
});
748764
}
749765
}

0 commit comments

Comments
 (0)