Commits

Sebastian Sdorra committed 2906ac6

fix bug with multiple property panels

Comments (0)

Files changed (1)

scm-webapp/src/main/webapp/resources/js/repository/sonia.repository.propertiesformpanel.js

   },
   
   loadProperties: function(){
+    this.properties[this.id] = [];
+    
     this.items.each(function(field){
       if (!Ext.isEmpty(field.property)){
-        this.properties.push({
+        this.properties[this.id].push({
           'name': field.name,
           'property': field.property
         });
       var filtered = item.properties.filter(function(p){
         var result = !Ext.isEmpty(p.key);
         if ( result ){
-          for (var i in this.properties){
-            if ( p.key == this.properties[i].property ){
+          for (var i in this.properties[this.id]){
+            if ( p.key == this.properties[this.id][i].property ){
               result = false;
               break;
             }
     }
     
     // copy fields to properties
-    for ( var k in this.properties ){
-      var property = this.properties[k];
+    for ( var k in this.properties[this.id] ){
+      var property = this.properties[this.id][k];
       if (!Ext.isEmpty(property.name)){
         item.properties.push({
           key: property.property,