]> source.dussan.org Git - archiva.git/commitdiff
[MRM-1610] Use Jackson as jaxrs provider for cxf for performance reasons
authorOlivier Lamy <olamy@apache.org>
Thu, 1 Mar 2012 11:46:37 +0000 (11:46 +0000)
committerOlivier Lamy <olamy@apache.org>
Thu, 1 Mar 2012 11:46:37 +0000 (11:46 +0000)
fix proxy connector screen update policies when values comes from default values.

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1295526 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/proxy-connectors.js

index 6cc6272a7863b1dd231ab7beb7289ff7ae1a8b98..7961bac463ad6b7fc66cbad8ed5f0e4e1de54964 100644 (file)
@@ -81,13 +81,20 @@ $(function() {
 
     this.updatePolicyEntry=function(key,value){
       $.log("updatePolicyEntry:"+key+":"+value);
+      var found=false;
       for(var i=0;i<self.policiesEntries().length;i++){
+        $.log('loop policiesEntries:'+self.policiesEntries()[i].key);
         if (self.policiesEntries()[i].key==key){
           self.policiesEntries()[i].value=value;
-          $.log("really updatedPolicyEntry:"+key+":"+self.policiesEntries()[i].value);
+          $.log("really updatedPolicyEntry:"+key+":"+self.policiesEntries()[i].value)
+          found=true;
           self.modified(true);
         }
       }
+      if(!found){
+        self.policiesEntries().push(new Entry(key,value));
+        $.log("added updatedPolicyEntry:"+key+":"+self.policiesEntries()[i].value());
+      }
     }
 
   }