Merge branch 'pu/inventory'
[tine20] / tine20 / Tinebase / js / ApplicationStarter.js
index 875ae57..8103a0f 100644 (file)
@@ -282,7 +282,9 @@ Tine.Tinebase.ApplicationStarter = {
                             if(initial) {
                                 var renderer = this.getGridRenderer(config.fields[key], key, appName, model);
                                 if(renderer) {
-                                    Tine.widgets.grid.RendererManager.register(appName, model, key, renderer);
+                                    if(! Tine.widgets.grid.RendererManager.has(appName, model, key)) {
+                                        Tine.widgets.grid.RendererManager.register(appName, model, key, renderer);
+                                    }
                                 }
                             }
                         }
@@ -363,7 +365,7 @@ Tine.Tinebase.ApplicationStarter = {
                         }
                         // add customfields if needed
                         if(config.meta.hasCustomFields) {
-                            defaultData['customfields'] = [];
+                            defaultData['customfields'] = {};
                         }
                         // overwrite function
                         Tine[appName].Model[model].getDefaultData = function() {
@@ -402,7 +404,7 @@ Tine.Tinebase.ApplicationStarter = {
                     }
                     
                     var editDialogName = model + 'EditDialog';
-                    // create editDialog openWindow function only when edit dialog exists
+                    // create editDialog openWindow function only if edit dialog exists
                     if(Tine[appName].hasOwnProperty(editDialogName)) {
                         if(config.meta.containerProperty) {
                             Tine[appName][editDialogName].prototype.showContainerSelector = true;