From ab4ba8f963890872909fbcc97249af6ad3817e6f Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Tue, 11 Sep 2012 07:58:06 +0000 Subject: [PATCH] [MRM-1665] Adding a Snapshot Managed Repository results in Releases being checked too. add default value for boolean (as default can be true) git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1383279 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/webapp/js/archiva/repositories.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js index 91495f4bf..c398d9a99 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js @@ -84,15 +84,15 @@ define("archiva.repositories",["jquery","i18n","jquery.tmpl","bootstrap","jquery this.stageRepoNeeded.subscribe(function(newValue){self.modified(true)}); //private boolean snapshots = false; - this.snapshots=ko.observable(snapshots); + this.snapshots=ko.observable(snapshots?snapshots:false); this.snapshots.subscribe(function(newValue){self.modified(true)}); //private boolean releases = true; - this.releases=ko.observable(releases); + this.releases=ko.observable(releases?releases:false); this.releases.subscribe(function(newValue){self.modified(true)}); //private boolean blockRedeployments = false; - this.blockRedeployments=ko.observable(blockRedeployments); + this.blockRedeployments=ko.observable(blockRedeployments?blockRedeployments:false); this.blockRedeployments.subscribe(function(newValue){self.modified(true)}); @@ -228,11 +228,13 @@ define("archiva.repositories",["jquery","i18n","jquery.tmpl","bootstrap","jquery addManagedRepository=function(managedRepository,completeCallbackFn){ var curManagedRepository=managedRepository; var callbackFn = completeCallbackFn; + var dataJson=ko.toJSON(managedRepository); + $.log("managedRepository.release:"+managedRepository.releases()+",dataJson:"+dataJson); $.ajax("restServices/archivaServices/managedRepositoriesService/addManagedRepository", { type: "POST", contentType: 'application/json', - data: ko.toJSON(managedRepository), + data: dataJson, dataType: 'json', success: function(data) { curManagedRepository.location(data.location); -- 2.39.5