mirror of https://github.com/apache/cloudstack.git
Update the hint appropriately
This commit is contained in:
parent
a0f1012903
commit
f2781a5ce3
|
|
@ -466,11 +466,32 @@
|
|||
}
|
||||
} else if (field.isTokenInput) { // jquery.tokeninput.js
|
||||
isAsync = true;
|
||||
|
||||
var hint= "Type in a search term";
|
||||
var noResults= "No results";
|
||||
|
||||
if (field.label === 'label.storage.tags')
|
||||
{
|
||||
hint = "Type in part of a storage tag";
|
||||
noResults = "No storage tags found";
|
||||
}
|
||||
else if (field.label === 'label.host.tags')
|
||||
{
|
||||
hint = "Type in part of a host tag";
|
||||
noResults = "No host tags found";
|
||||
}
|
||||
|
||||
selectArgs = {
|
||||
context: args.context,
|
||||
response: {
|
||||
success: function(args) {
|
||||
$input.tokenInput(unique_tags(args.data), { theme: "facebook", preventDuplicates: true });
|
||||
$input.tokenInput(unique_tags(args.data),
|
||||
{
|
||||
theme: "facebook",
|
||||
preventDuplicates: true,
|
||||
hintText: hint,
|
||||
noResultsText: noResults
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -734,6 +734,20 @@
|
|||
|
||||
isAsync = true;
|
||||
|
||||
var hint = "Type in a search term";
|
||||
var noResults = "No results";
|
||||
|
||||
if ($value.data('value_token').label === 'label.storage.tags')
|
||||
{
|
||||
hint = "Type in part of a storage tag";
|
||||
noResults= "No storage tags found";
|
||||
}
|
||||
else if ($value.data('value_token').label === 'label.host.tags')
|
||||
{
|
||||
hint = "Type in part of a host tag";
|
||||
noResults = "No host tags found";
|
||||
}
|
||||
|
||||
selectArgs = {
|
||||
context: $detailView.data('view-args').context,
|
||||
response: {
|
||||
|
|
@ -743,7 +757,9 @@
|
|||
theme: "facebook",
|
||||
preventDuplicates: true,
|
||||
prePopulate: existing_tags,
|
||||
processPrePopulate: true
|
||||
processPrePopulate: true,
|
||||
hintText: hint,
|
||||
noResultsText: noResults
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue