|
|
@@ -260,16 +260,27 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (! _isSkipColumns){
|
|
|
+ var firstSolrCollection = false;
|
|
|
+ var firstSolrConfig = false;
|
|
|
+
|
|
|
+ if (!_isSkipColumns) {
|
|
|
$(_iterable).each(function (cnt, item) {
|
|
|
if (_this.options.serverType == "SOLR") {
|
|
|
+ if (item.isCollection && !firstSolrCollection) {
|
|
|
+ _currentFiles.push('<li class="hiveAutocompleteItem" data-value="collections.*" title="collections.*"><i class="fa fa-search-plus"></i> collections.*</li>');
|
|
|
+ firstSolrCollection = true;
|
|
|
+ }
|
|
|
if (item.isConfig) {
|
|
|
- _ico = 'fa-cogs';
|
|
|
+ _ico = 'fa-cog';
|
|
|
+ if (!firstSolrConfig) {
|
|
|
+ _currentFiles.push('<li class="hiveAutocompleteItem" data-value="configs.*" title="configs.*"><i class="fa fa-cogs"></i> configs.*</li>');
|
|
|
+ firstSolrConfig = true;
|
|
|
+ }
|
|
|
}
|
|
|
- _currentFiles.push('<li class="hiveAutocompleteItem" data-value="' + item.name + '" title="' + item.name + '"><i class="fa '+ _ico +'"></i> ' + item.name + '</li>');
|
|
|
+ _currentFiles.push('<li class="hiveAutocompleteItem" data-value="' + item.name + '" title="' + item.name + '"><i class="fa ' + _ico + '"></i> ' + item.name + '</li>');
|
|
|
}
|
|
|
else {
|
|
|
- _currentFiles.push('<li class="hiveAutocompleteItem" data-value="' + item + '" title="' + item + '"><i class="fa '+ _ico +'"></i> ' + item + '</li>');
|
|
|
+ _currentFiles.push('<li class="hiveAutocompleteItem" data-value="' + item + '" title="' + item + '"><i class="fa ' + _ico + '"></i> ' + item + '</li>');
|
|
|
}
|
|
|
});
|
|
|
|
|
|
@@ -281,20 +292,23 @@
|
|
|
var item = $(this).text().trim();
|
|
|
var path = autocompleteUrl.substring(BASE_PATH.length);
|
|
|
|
|
|
- if ($(this).html().indexOf("search") > -1 || $(this).html().indexOf("cogs") > -1) {
|
|
|
- if ($(this).html().indexOf("search") > -1){
|
|
|
+ if ($(this).html().indexOf("search") > -1 || $(this).html().indexOf("cog") > -1) {
|
|
|
+ if ($(this).html().indexOf("search") > -1 && $(this).html().indexOf("search-plus") == -1) {
|
|
|
_el.val("collections." + item);
|
|
|
}
|
|
|
- else {
|
|
|
+ else if ($(this).html().indexOf("cog") > -1 && $(this).html().indexOf("cogs") == -1) {
|
|
|
_el.val("configs." + item);
|
|
|
}
|
|
|
+ else {
|
|
|
+ _el.val(item);
|
|
|
+ }
|
|
|
_this.options.onPathChange(_el.val());
|
|
|
$("#jHueGenericAutocomplete").hide();
|
|
|
_hiveAutocompleteSelectedIndex = -1;
|
|
|
_this.options.onEnter(_el);
|
|
|
}
|
|
|
|
|
|
- if ($(this).html().indexOf("database") > -1){
|
|
|
+ if ($(this).html().indexOf("database") > -1) {
|
|
|
_el.val(item + ".");
|
|
|
_this.options.onPathChange(_el.val());
|
|
|
showAutocomplete();
|