File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 } ;
Original file line number Diff line number Diff line change 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 : {
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 }
You can’t perform that action at this time.
0 commit comments