mirror of https://github.com/apache/archiva.git
search result add a column with classifier
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1297057 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c21bb53a98
commit
5a365283f8
|
@ -227,7 +227,8 @@ search.artifact.searching=Searching .....
|
|||
search.artifact.search.form.btn.search=Search
|
||||
search.artifact.search.form.btn.search.filter=Filter Results
|
||||
search.artifact.result.size=Artifacts found
|
||||
|
||||
search.artifact.results.classifier=Classifier
|
||||
search.artifact.search.form.query.classifier=Classifier
|
||||
|
||||
#login
|
||||
login.username.placehoder=Username
|
||||
|
|
|
@ -657,6 +657,8 @@ $(function() {
|
|||
|
||||
//private boolean includePomArtifacts = false;
|
||||
this.includePomArtifacts=ko.observable(false);
|
||||
|
||||
this.classifier=ko.observable();
|
||||
}
|
||||
|
||||
applyAutocompleteOnHeader=function(property,resultViewModel){
|
||||
|
@ -665,7 +667,7 @@ $(function() {
|
|||
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]);
|
||||
}
|
||||
});
|
||||
|
@ -675,10 +677,11 @@ $(function() {
|
|||
$.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;
|
||||
}
|
||||
|
@ -706,6 +709,11 @@ $(function() {
|
|||
headerText: $.i18n.prop('search.artifact.results.version'),
|
||||
rowText: "version",
|
||||
id: "version"
|
||||
},
|
||||
{
|
||||
headerText: $.i18n.prop('search.artifact.results.classifier'),
|
||||
rowText: "classifier",
|
||||
id: "classifier"
|
||||
}
|
||||
],
|
||||
pageSize: 10,
|
||||
|
@ -713,6 +721,7 @@ $(function() {
|
|||
applyAutocompleteOnHeader('groupId',self);
|
||||
applyAutocompleteOnHeader('artifactId',self);
|
||||
applyAutocompleteOnHeader('version',self);
|
||||
applyAutocompleteOnHeader('classifier',self);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -243,6 +243,13 @@
|
|||
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">
|
||||
|
@ -257,6 +264,7 @@
|
|||
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>
|
||||
|
@ -308,7 +316,7 @@
|
|||
<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>
|
||||
|
|
Loading…
Reference in New Issue