this.availableProxyConnectors.id="availableProxyConnectors";
this.update=update;
-
$.each(this.proxyConnectorRulesViewModel.proxyConnectors(), function(idx, value) {
//$.log(idx + ': ' + value.sourceRepoId() +":"+value.targetRepoId());
var available=true;
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(){
+ var mainContent=$("#main-content");
+ mainContent.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"));
});
- $("#main-content" ).find("#proxy-connectors-rules-edit-order-div" ).find("[data-source-repoId="+sourceRepoId+"][data-target-repoId="+targetRepoId+"]" ).off("click");
+ mainContent.find("#proxy-connectors-rules-edit-order-div" ).find("[data-source-repoId="+sourceRepoId+"][data-target-repoId="+targetRepoId+"]" ).off("click");
}
this.activateRemoveChoosen=function(proxyConnectorRulesViewModel){
self.proxyConnectorRule.proxyConnectors.push(proxyConnectorToAdd);
self.availableProxyConnectors.remove(proxyConnectorToAdd);
$.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(){
+ var mainContent=$("#main-content");
+ mainContent.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"));
});
- $("#main-content" ).find("#proxy-connectors-rules-available-proxy-connectors" ).find("[data-source-repoId="+sourceRepoId+"][data-target-repoId="+targetRepoId+"]" ).off("click");
+ mainContent.find("#proxy-connectors-rules-available-proxy-connectors" ).find("[data-source-repoId="+sourceRepoId+"][data-target-repoId="+targetRepoId+"]" ).off("click");
}
this.activateRemoveAvailable=function(proxyConnectorRulesViewModel){
}
self.repositoryGroup.repositories(repositories);
self.repositoryGroup.modified(true);
- $("#main-content").find("#repository-groups-edit-available-repositories").find(".icon-plus-sign" ).off("click");
- $("#main-content").find("#repository-groups-edit-order-div").find(".icon-minus-sign" ).off("click");
+ var mainContent=$("#main-content");
+ mainContent.find("#repository-groups-edit-available-repositories").find(".icon-plus-sign" ).off("click");
+ mainContent.find("#repository-groups-edit-order-div").find(".icon-minus-sign" ).off("click");
self.renderSortableAvailables(self.repositoryGroupsViewModel);
self.renderSortableChoosed(self.repositoryGroupsViewModel);
}