proxyConnectorRuleViewModel.activateRemoveAvailable(self);
}
-
-
remove=function(){
$.log("remove");
}
-
-
}
ProxyConnectorRuleViewModel=function(proxyConnectorRule,proxyConnectorRulesViewModel,update){
$.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){
$.log("repositoryMoved:"+arg.sourceIndex+" to " + arg.targetIndex);
self.proxyConnectorRule.modified(true);
self.activateRemoveChoosen(self.proxyConnectorRulesViewModel);
+ self.activateRemoveAvailable(self.proxyConnectorRulesViewModel);
}
saveProxyConnectorRule=function(){
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){
}
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){