//private boolean includePomArtifacts = false;
this.includePomArtifacts=ko.observable(false);
+
+ this.classifier=ko.observable();
}
applyAutocompleteOnHeader=function(property,resultViewModel){
source: function(request, response){
var founds=[];
$(resultViewModel.artifacts()).each(function(idx,artifact){
- if(artifact[property].startsWith(request.term)){
+ if(artifact[property] && artifact[property].startsWith(request.term)){
founds.push(artifact[property]);
}
});
$.log("property:"+property+','+ui.item.value);
var artifacts=[];
$(resultViewModel.artifacts()).each(function(idx,artifact){
- if(artifact[property].startsWith(ui.item.value)){
+ if(artifact[property] && artifact[property].startsWith(ui.item.value)){
artifacts.push(artifact);
}
});
+ $.log("property:"+property+','+ui.item.value+",size:"+artifacts.length);
resultViewModel.artifacts(artifacts);
return false;
}
headerText: $.i18n.prop('search.artifact.results.version'),
rowText: "version",
id: "version"
+ },
+ {
+ headerText: $.i18n.prop('search.artifact.results.classifier'),
+ rowText: "classifier",
+ id: "classifier"
}
],
pageSize: 10,
applyAutocompleteOnHeader('groupId',self);
applyAutocompleteOnHeader('artifactId',self);
applyAutocompleteOnHeader('version',self);
+ applyAutocompleteOnHeader('classifier',self);
}
});
}
data-bind="value: searchRequest().version"/>
</div>
</div>
+ <div class="control-group">
+ <label class="control-label" for="artifactId">${$.i18n.prop('search.artifact.search.form.query.classifier')}</label>
+ <div class="controls">
+ <input type="text" class="input-medium search-query" id="classifier" name="classifier" size="50"
+ data-bind="value: searchRequest().classifier"/>
+ </div>
+ </div>
<div class="control-group">
<label class="control-label" for="artifactId">${$.i18n.prop('search.artifact.search.form.query.packaging')}</label>
<div class="controls">
data-bind="value: searchRequest().className"/>
</div>
</div>
+
</fieldset>
<button type="submit" id="btn-advanced-search" class="btn btn-primary"
data-bind="click: advancedSearch">${$.i18n.prop('search.artifact.search.form.btn.search')}</button>
<tr>
{{each(i, columnDefinition) columns}}
<th title="${ columnDefinition.title }">
- <input type="text" class="form-search" id="search-filter-auto-${ columnDefinition.id }" place-holder="filtering"/>
+ <input type="text" class="form-search" id="search-filter-auto-${ columnDefinition.id }" placeholder="filtering"/>
</th>
{{/each}}
</tr>