diff options
author | Olivier Lamy <olamy@apache.org> | 2012-09-11 07:58:06 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2012-09-11 07:58:06 +0000 |
commit | ab4ba8f963890872909fbcc97249af6ad3817e6f (patch) | |
tree | 68c9a3e057dfedbfa8c1cdb31e85a15dacfe19df | |
parent | e75d0d78ae86c80210f4144846637738eb9be140 (diff) | |
download | archiva-ab4ba8f963890872909fbcc97249af6ad3817e6f.tar.gz archiva-ab4ba8f963890872909fbcc97249af6ad3817e6f.zip |
[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
-rw-r--r-- | archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js | 10 |
1 files 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); |