From 676f680c5e979be7ccb0830bda2b9574c6ac6046 Mon Sep 17 00:00:00 2001
From: =?utf8?q?Philipp=20Sch=C3=BCle?=
Date: Tue, 17 Feb 2015 13:45:33 +0100
Subject: [PATCH 1/1] 0010834: defining a key-value costumfield breaks
addressbook
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit
* use set() to update config item in registry
* trying to set the object directly did not work any longer (did it ever
work?)
https://forge.tine20.org/view.php?id=10834
Change-Id: If9e0325648cdbe3c372e878d1b365d226291c8fb
Reviewed-on: http://gerrit.tine20.com/customers/1667
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle
---
tine20/Tinebase/js/widgets/customfields/ConfigManager.js | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/tine20/Tinebase/js/widgets/customfields/ConfigManager.js b/tine20/Tinebase/js/widgets/customfields/ConfigManager.js
index 5b05752..d8ef207 100644
--- a/tine20/Tinebase/js/widgets/customfields/ConfigManager.js
+++ b/tine20/Tinebase/js/widgets/customfields/ConfigManager.js
@@ -20,14 +20,17 @@ Tine.widgets.customfields.ConfigManager = function() {
data: allCfs ? allCfs : []
});
- // place keyFieldConfig in registry so we can use the standard widgets
+ // place customefield keyFieldConfig in registry so we can use the standard widgets
+ // keyfields are used for key/value customfields with a defined store
stores[app.appName].each(function(cfConfig) {
var definition = cfConfig.get('definition'),
options = definition.options ? definition.options : {},
keyFieldConfig = definition.keyFieldConfig ? definition.keyFieldConfig : null;
if (keyFieldConfig) {
- app.getRegistry().get('config')[cfConfig.get('name')] = keyFieldConfig;
+ var config = app.getRegistry().get('config');
+ config[cfConfig.get('name')] = keyFieldConfig;
+ app.getRegistry().set('config', config);
}
});
}
--
2.7.4