From: Olivier Lamy Date: Mon, 19 Nov 2012 12:50:07 +0000 (+0000) Subject: in case of long list repositories configuring group can be a pain with drag&drop X-Git-Tag: archiva-1.4-M4~621 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d412df4dd2c1e50d2ff95cefe5234b03e7fb912a;p=archiva.git in case of long list repositories configuring group can be a pain with drag&drop so add a button on repos to setup group. git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1411156 13f79535-47bb-0310-9956-ffa450edef68 --- 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 306816a91..a4117fe29 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 @@ -62,6 +62,7 @@ function(jquery,i18n,jqueryTmpl,bootstrap,jqueryValidate,jqueryUi,ko) { self.repositoryGroup.repositories(repositories); self.repositoryGroup.modified(true); } + this.saveRepositoryGroup=function(repositoryGroup){ if (self.update){ self.repositoryGroupsViewModel.saveRepositoryGroup(repositoryGroup); @@ -73,6 +74,43 @@ function(jquery,i18n,jqueryTmpl,bootstrap,jqueryValidate,jqueryUi,ko) { this.removeRepository=function(id){ $.log("removeRepository:"+id); } + + this.renderSortableAvailables=function(){ + $.log("renderSortableAvailables"); + //$("#main-content").find("#repository-groups-edit-available-repositories" ).find(".icon-minus-sign" ).hide(); + + } + + this.removeChoosed=function(id){ + $.log("removeChoosed:"+id); + } + + this.renderSortableChoosed=function(repositoryGroupsViewModel){ + $("#main-content").find("#repository-groups-edit-order-div").find(".icon-minus-sign" ).on("click",function(){ + var idVal = $(this).attr("id"); + idVal=idVal.substringAfterFirst("minus-"); + $.log("renderSortableChoosed:"+idVal); + for (var i=0;i
+ data-bind="sortable: { template: 'repository-group-edit-order-tmpl-choosed',data:repositoryGroup.managedRepositories,afterMove:repositoryMoved}">
@@ -1190,7 +1190,7 @@
${$.i18n.prop('repository.groups.available.repositories')}

+ data-bind="sortable: { template: 'repository-group-edit-order-tmpl-available',data:availableRepositories,afterMove:repositoryMoved}">
@@ -1202,6 +1202,44 @@ + + + + -