mirror of https://github.com/apache/archiva.git
link remote repository id for remote index download
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1236447 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6b9d8d7d9a
commit
d3626d0e81
|
@ -529,6 +529,7 @@ $(function() {
|
|||
RemoteRepositoryViewModel=function(remoteRepository, update, remoteRepositoriesViewModel){
|
||||
this.remoteRepository=remoteRepository;
|
||||
this.remoteRepositoriesViewModel = remoteRepositoriesViewModel;
|
||||
this.networkProxies=ko.observableArray([]);
|
||||
this.update = update;
|
||||
|
||||
var self = this;
|
||||
|
@ -586,17 +587,24 @@ $(function() {
|
|||
|
||||
RemoteRepositoriesViewModel=function(){
|
||||
this.remoteRepositories=ko.observableArray([]);
|
||||
|
||||
this.gridViewModel = null;
|
||||
var self = this;
|
||||
|
||||
editRemoteRepository=function(remoteRepository){
|
||||
$.log("editRemoteRepository");
|
||||
var viewModel = new RemoteRepositoryViewModel(remoteRepository,true,self);
|
||||
ko.applyBindings(viewModel,$("#main-content #remote-repository-edit").get(0));
|
||||
activateRemoteRepositoryEditTab();
|
||||
$("#remote-repository-edit-li a").html($.i18n.prop('edit'));
|
||||
activateRemoteRepositoryFormValidation();
|
||||
$.ajax("restServices/archivaServices/networkProxyService/getNetworkProxies", {
|
||||
type: "GET",
|
||||
dataType: 'json',
|
||||
success: function(data) {
|
||||
var viewModel = new RemoteRepositoryViewModel(remoteRepository,true,self);
|
||||
viewModel.networkProxies(mapNetworkProxies(data));
|
||||
ko.applyBindings(viewModel,$("#main-content #remote-repository-edit").get(0));
|
||||
activateRemoteRepositoryEditTab();
|
||||
$("#remote-repository-edit-li a").html($.i18n.prop('edit'));
|
||||
activateRemoteRepositoryFormValidation();
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
removeRemoteRepository=function(remoteRepository){
|
||||
|
@ -784,6 +792,7 @@ $(function() {
|
|||
);
|
||||
|
||||
|
||||
|
||||
$("#main-content #managed-repositories-pills").bind('change', function (e) {
|
||||
if ($(e.target).attr("href")=="#managed-repository-edit") {
|
||||
var viewModel = new ManagedRepositoryViewModel(new ManagedRepository(),false,managedRepositoriesViewModel);
|
||||
|
@ -798,9 +807,16 @@ $(function() {
|
|||
|
||||
$("#main-content #remote-repositories-pills").bind('change', function (e) {
|
||||
if ($(e.target).attr("href")=="#remote-repository-edit") {
|
||||
var viewModel = new RemoteRepositoryViewModel(new RemoteRepository(),false,remoteRepositoriesViewModel);
|
||||
ko.applyBindings(viewModel,$("#main-content #remote-repository-edit").get(0));
|
||||
activateRemoteRepositoryFormValidation();
|
||||
$.ajax("restServices/archivaServices/networkProxyService/getNetworkProxies", {
|
||||
type: "GET",
|
||||
dataType: 'json',
|
||||
success: function(data) {
|
||||
var viewModel = new RemoteRepositoryViewModel(new RemoteRepository(),false,remoteRepositoriesViewModel);
|
||||
viewModel.networkProxies(mapNetworkProxies(data));
|
||||
ko.applyBindings(viewModel,$("#main-content #remote-repository-edit").get(0));
|
||||
activateRemoteRepositoryFormValidation();
|
||||
}
|
||||
})
|
||||
}
|
||||
if ($(e.target).attr("href")=="#remote-repositories-view") {
|
||||
$("#main-content #remote-repository-edit-li a").html($.i18n.prop("add"));
|
||||
|
|
|
@ -415,7 +415,12 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<!-- FIXME proxy id to use -->
|
||||
<div class="clearfix">
|
||||
<div class="input">
|
||||
<select data-bind="options: networkProxies, optionsText: 'id',optionsValue:'id', value: remoteRepository.remoteDownloadNetworkProxyId, optionsCaption: 'Choose...'"></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="clearfix">
|
||||
<label for="downloadRemoteIndexOnStartup">${$.i18n.prop('downloadRemoteIndexOnStartup')}</label>
|
||||
|
|
Loading…
Reference in New Issue