Fixes #14636 - correctly search puppet class on host form
Searching for puppet classes that were ellipsized did not work as expected on the host edit form. This was due to the search looking only in the span content which was truncated and did not contain the entire puppet class name. Also, cleaned up the js code to be clearer and more efficiant.
Related issues
Bug #14636: Unable to search puppet classes with long names
Fixes #14636 - correctly search puppet class on host form
Searching for puppet classes that were ellipsized did not work as
expected on the host edit form. This was due to the search looking only
in the span content which was truncated and did not contain the entire
puppet class name. Also, cleaned up the js code to be clearer and more
efficiant.