mirror of https://github.com/apache/archiva.git
adding repository with existing location, confirm modal was not closed
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1308494 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
69f3413fcb
commit
59420ec4c4
|
@ -568,6 +568,7 @@ public class DefaultManagedRepositoryAdmin
|
|||
if ( !indexDirectory.isAbsolute() )
|
||||
{
|
||||
indexDirectory = new File( managedRepository, repository.getIndexDirectory() );
|
||||
repository.setIndexDirectory( indexDirectory.getAbsolutePath() );
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -579,6 +580,7 @@ public class DefaultManagedRepositoryAdmin
|
|||
getRegistry().getString( "appserver.base" ) + File.separatorChar + "repositories"
|
||||
+ File.separatorChar +
|
||||
repository.getLocation(), ".indexer" );
|
||||
repository.setIndexDirectory( indexDirectory.getAbsolutePath() );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -211,8 +211,9 @@ define("archiva.repositories",["jquery","i18n","jquery.tmpl","bootstrap","jquery
|
|||
dataType: 'json',
|
||||
success: function(data) {
|
||||
if (data){
|
||||
var completeCallbackFn = function(){window.modalConfirmDialog.modal('hide')};
|
||||
openDialogConfirm(
|
||||
function(){addManagedRepository(self.managedRepository),function(){window.modalConfirmDialog.modal('hide')}},
|
||||
function(){addManagedRepository(self.managedRepository,completeCallbackFn)},
|
||||
$.i18n.prop('ok'), $.i18n.prop('cancel'),
|
||||
$.i18n.prop('managedrepository.add.title'),
|
||||
$("#managed-repository-location-warning-tmpl").tmpl(self.managedRepository));
|
||||
|
@ -225,7 +226,6 @@ define("archiva.repositories",["jquery","i18n","jquery.tmpl","bootstrap","jquery
|
|||
}
|
||||
|
||||
addManagedRepository=function(managedRepository,completeCallbackFn){
|
||||
$.log("add managedRepo");
|
||||
var curManagedRepository=managedRepository;
|
||||
var callbackFn = completeCallbackFn;
|
||||
$.ajax("restServices/archivaServices/managedRepositoriesService/addManagedRepository",
|
||||
|
@ -235,9 +235,9 @@ define("archiva.repositories",["jquery","i18n","jquery.tmpl","bootstrap","jquery
|
|||
data: ko.toJSON(managedRepository),
|
||||
dataType: 'json',
|
||||
success: function(data) {
|
||||
curManagedRepository.location(data.managedRepository.location);
|
||||
curManagedRepository.location(data.location);
|
||||
self.managedRepositoriesViewModel.managedRepositories.push(curManagedRepository);
|
||||
displaySuccessMessage($.i18n.prop('managedrepository.added'));
|
||||
displaySuccessMessage($.i18n.prop('managedrepository.added',curManagedRepository.id()));
|
||||
curManagedRepository.modified(false);
|
||||
activateManagedRepositoriesGridTab();
|
||||
},
|
||||
|
@ -247,7 +247,10 @@ define("archiva.repositories",["jquery","i18n","jquery.tmpl","bootstrap","jquery
|
|||
},
|
||||
complete:function(data){
|
||||
if(callbackFn){
|
||||
$.log("complete with callback");
|
||||
callbackFn();
|
||||
} else {
|
||||
$.log("complete with no callback");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue