mirror of https://github.com/apache/archiva.git
[MRM-1712] Add buttons for managing proxy connectors rules as can be a pain with long list of repositories.
fix handling of click after a drag&drop. git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1411244 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3292b98b72
commit
2f2b9cb22f
|
@ -175,14 +175,10 @@ define("archiva.proxy-connectors-rules",["jquery","i18n","jquery.tmpl","bootstra
|
|||
proxyConnectorRuleViewModel.activateRemoveAvailable(self);
|
||||
}
|
||||
|
||||
|
||||
|
||||
remove=function(){
|
||||
$.log("remove");
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
ProxyConnectorRuleViewModel=function(proxyConnectorRule,proxyConnectorRulesViewModel,update){
|
||||
|
@ -195,7 +191,7 @@ define("archiva.proxy-connectors-rules",["jquery","i18n","jquery.tmpl","bootstra
|
|||
|
||||
|
||||
$.each(this.proxyConnectorRulesViewModel.proxyConnectors(), function(idx, value) {
|
||||
$.log(idx + ': ' + value.sourceRepoId() +":"+value.targetRepoId());
|
||||
//$.log(idx + ': ' + value.sourceRepoId() +":"+value.targetRepoId());
|
||||
var available=true;
|
||||
// is it in proxyConnectorRule.proxyConnectors
|
||||
$.each(self.proxyConnectorRule.proxyConnectors(),function(index,proxyConnector){
|
||||
|
@ -212,6 +208,7 @@ define("archiva.proxy-connectors-rules",["jquery","i18n","jquery.tmpl","bootstra
|
|||
$.log("repositoryMoved:"+arg.sourceIndex+" to " + arg.targetIndex);
|
||||
self.proxyConnectorRule.modified(true);
|
||||
self.activateRemoveChoosen(self.proxyConnectorRulesViewModel);
|
||||
self.activateRemoveAvailable(self.proxyConnectorRulesViewModel);
|
||||
}
|
||||
|
||||
saveProxyConnectorRule=function(){
|
||||
|
@ -233,6 +230,9 @@ define("archiva.proxy-connectors-rules",["jquery","i18n","jquery.tmpl","bootstra
|
|||
self.proxyConnectorRule.proxyConnectors.remove(proxyConnectorToRemove);
|
||||
self.availableProxyConnectors.push(proxyConnectorToRemove);
|
||||
$.log("size after:"+self.proxyConnectorRule.proxyConnectors().length);
|
||||
$("#main-content" ).find("#proxy-connectors-rules-available-proxy-connectors" ).find("[data-source-repoId="+sourceRepoId+"][data-target-repoId="+targetRepoId+"]" ).on("click", function(){
|
||||
self.removeAvailable(proxyConnectorRulesViewModel,$(this).attr("data-source-repoId"),$(this).attr("data-target-repoId"));
|
||||
});
|
||||
}
|
||||
|
||||
this.activateRemoveChoosen=function(proxyConnectorRulesViewModel){
|
||||
|
@ -255,7 +255,10 @@ define("archiva.proxy-connectors-rules",["jquery","i18n","jquery.tmpl","bootstra
|
|||
}
|
||||
self.proxyConnectorRule.proxyConnectors.push(proxyConnectorToAdd);
|
||||
self.availableProxyConnectors.remove(proxyConnectorToAdd);
|
||||
$.log("size after:"+self.proxyConnectorRule.proxyConnectors().length);
|
||||
$.log("size after:"+self.availableProxyConnectors().length);
|
||||
$("#main-content" ).find("#proxy-connectors-rules-edit-order-div" ).find("[data-source-repoId="+sourceRepoId+"][data-target-repoId="+targetRepoId+"]" ).on("click", function(){
|
||||
self.removeChoosen(proxyConnectorRulesViewModel,$(this).attr("data-source-repoId"),$(this).attr("data-target-repoId"));
|
||||
});
|
||||
}
|
||||
|
||||
this.activateRemoveAvailable=function(proxyConnectorRulesViewModel){
|
||||
|
|
Loading…
Reference in New Issue