Merge branch 'pu/inventory'
authorPhilipp Schüle <p.schuele@metaways.de>
Thu, 10 Jan 2013 09:29:12 +0000 (10:29 +0100)
committerPhilipp Schüle <p.schuele@metaways.de>
Thu, 10 Jan 2013 09:29:12 +0000 (10:29 +0100)
tine20/Tinebase/js/ApplicationStarter.js
tine20/Tinebase/js/widgets/dialog/ImportDialog.js

index 1fac315..8103a0f 100644 (file)
@@ -222,12 +222,12 @@ Tine.Tinebase.ApplicationStarter = {
                     filter = Ext.apply(filter, {label: _('Quick search'), operators: ['contains']});
                     break;
                 default:
-                    if (fieldconfig.type == 'keyfield') {
+                    if (this.filters[filterconfig.filter]) {  // use pre-defined default filter (this.filters)
+                        filter.valueType = this.filters[filterconfig.filter];
+                    } else if (fieldconfig && fieldconfig.hasOwnProperty('type') && fieldconfig.type == 'keyfield') {
                         filter.filtertype = 'tine.widget.keyfield.filter';
                         filter.app = {name: appName};
                         filter.keyfieldName = fieldconfig.name;
-                    } else if (this.filters[filterconfig.filter]) {  // use pre-defined default filter (this.filters)
-                        filter.valueType = this.filters[filterconfig.filter];
                     } else {    // try to find registered filter
                         var keys = filterconfig.filter.split('_'),
                             filterkey = keys[0].toLowerCase() + '.' + keys[2].toLowerCase();
index 01b0d9f..80bc531 100644 (file)
@@ -150,7 +150,7 @@ Tine.widgets.dialog.ImportDialog = Ext.extend(Tine.widgets.dialog.WizardPanel, {
             timeout: 1800000, // 30 minutes
             callback: this.onImportResponse.createDelegate(this, [callback], true),
             params: {
-                method: this.appName + '.import' + this.recordClass.getMeta('recordsName'),
+                method: this.appName + '.import' + this.recordClass.getMeta('modelName')  + 's',
                 tempFileId: this.uploadButton.getTempFileId(),
                 definitionId: this.definitionCombo.getValue(),
                 importOptions: Ext.apply({