0012936: Fix RecordPickerManager and wrong registered pickercombo
authorMichael Spahn <m.spahn@metaways.de>
Mon, 3 Apr 2017 13:57:17 +0000 (15:57 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Tue, 4 Apr 2017 18:00:44 +0000 (20:00 +0200)
https://forge.tine20.org/view.php?id=12936

Change-Id: I639f4afa8024efa4b9d905973f2fd2331e12ba39
Reviewed-on: http://gerrit.tine20.com/customers/4482
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
Tested-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Crm/js/ProductPickerCombo.js
tine20/Tinebase/js/widgets/form/RecordPickerManager.js

index 0bdae6d..44e12e0 100644 (file)
@@ -5,7 +5,6 @@
  * @author      Michael Spahn <kontakt@michaelspahn.de>
  * @copyright   Copyright (c) 2015 Metaways Infosystems GmbH (http://www.metaways.de)
  */
-
 Ext.ns('Tine.Crm');
 
 Tine.Crm.ProductPickerCombo = Ext.extend(Tine.Tinebase.widgets.form.RecordPickerComboBox, {
@@ -19,4 +18,4 @@ Tine.Crm.ProductPickerCombo = Ext.extend(Tine.Tinebase.widgets.form.RecordPicker
     }
 });
 
-Tine.widgets.form.RecordPickerManager.register('Crm', 'Lead', Tine.Crm.ProductPickerCombo);
\ No newline at end of file
+Tine.widgets.form.RecordPickerManager.register('Crm', 'Product', Tine.Crm.ProductPickerCombo);
\ No newline at end of file
index 48318a9..9ceb9d6 100644 (file)
@@ -59,7 +59,6 @@ Tine.widgets.form.RecordPickerManager = function() {
          * @param {String/Object} component the component or xtype to register 
          */
         register: function(appName, modelName, component) {
-            
             if(!Tine.hasOwnProperty('log')) {
                 this.register.defer(100, this, [appName, modelName, component]);
                 return false;
@@ -69,10 +68,8 @@ Tine.widgets.form.RecordPickerManager = function() {
                 modelName = Ext.isFunction(modelName) ? modelName.getMeta('modelName') : modelName,
                 key = appName+modelName;
 
-            if(!items[key]) {
-                Tine.log.debug('RecordPickerManager::registerItem: ' + appName + modelName);
-                items[key] = component;
-            }
+            Tine.log.debug('RecordPickerManager::registerItem: ' + appName + modelName);
+            items[key] = component;
         }
     };
 }();