diff options
author | Olivier Lamy <olamy@apache.org> | 2012-11-19 12:50:38 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2012-11-19 12:50:38 +0000 |
commit | 8c7eab9c12d83d4c2a67f8c4370ed196b937503d (patch) | |
tree | b2f76e6fc65beae8e8fc62a2745ab0c2b1ce831e | |
parent | 7e5ef1556beae860c03c3fab803876fb7fbf4b28 (diff) | |
download | archiva-8c7eab9c12d83d4c2a67f8c4370ed196b937503d.tar.gz archiva-8c7eab9c12d83d4c2a67f8c4370ed196b937503d.zip |
code simplification
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1411158 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repository-groups.js | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repository-groups.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repository-groups.js index 4330f2886..0c4e98f43 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repository-groups.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repository-groups.js @@ -84,7 +84,6 @@ function(jquery,i18n,jqueryTmpl,bootstrap,jqueryValidate,jqueryUi,ko) { self.availableRepositories.remove(repositoryGroupsViewModel.managedRepositories()[i]); } } - $.log("size before:"+self.repositoryGroup.repositories().length+","+self.repositoryGroup.managedRepositories().length); for(var i= 0;i<self.repositoryGroupsViewModel.managedRepositories().length;i++){ if(self.repositoryGroupsViewModel.managedRepositories()[i].id()==idVal){ @@ -105,15 +104,12 @@ function(jquery,i18n,jqueryTmpl,bootstrap,jqueryValidate,jqueryUi,ko) { self.availableRepositories.push(repositoryGroupsViewModel.managedRepositories()[i]); } } - $.log("size before:"+self.repositoryGroup.repositories().length+","+self.repositoryGroup.managedRepositories().length); - var repositories=[]; + for(var i= 0;i<self.repositoryGroup.repositories().length;i++){ if(self.repositoryGroup.repositories()[i]==idVal){ $.log("find repo to remove"); self.repositoryGroup.repositories.remove(self.repositoryGroup.repositories()[i]); self.repositoryGroup.managedRepositories.remove(findManagedRepository(idVal,self.repositoryGroupsViewModel.managedRepositories())); - } else { - repositories.push(self.repositoryGroup.managedRepositories()[i].id()); } } }); |