From 2da6cd215815a6990bf669e9b980757798e0aa01 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 2 Mar 2015 17:21:57 +0000 Subject: [PATCH] Fix some bugs in export UI - Fix js error when selecting no users - Fix function declaration mismatch --- .../inc/class.importexport_widget_filter.inc.php | 14 +++++++++----- importexport/js/app.js | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/importexport/inc/class.importexport_widget_filter.inc.php b/importexport/inc/class.importexport_widget_filter.inc.php index 9014c5fd51..760b540267 100644 --- a/importexport/inc/class.importexport_widget_filter.inc.php +++ b/importexport/inc/class.importexport_widget_filter.inc.php @@ -35,7 +35,7 @@ class importexport_widget_filter extends etemplate_widget_transformer * * @param string $cname */ - public function beforeSendToClient($cname) + public function beforeSendToClient($cname, Array $expand = Array()) { $form_name = self::form_name($cname, $this->id); if($this->getElementAttribute($form_name, 'customfields')) @@ -140,9 +140,13 @@ class importexport_widget_filter extends etemplate_widget_transformer $this->setElementAttribute($form_name.'['.self::$prefix.$lname.']', 'tags', TRUE); $this->setElementAttribute($form_name.'['.self::$prefix.$lname.']', 'multiple', TRUE); } + else if( $GLOBALS['egw_info']['apps'][$field['type']]) + { + // Links + } else { - error_log('Trying to filter with unsupported field type: ' . $field['type']); + error_log('Trying to filter with unsupported field type ' . $lname . ': ' . $field['type']); } } @@ -164,11 +168,11 @@ class importexport_widget_filter extends etemplate_widget_transformer } unset($widget); } + + parent::beforeSendToClient($cname, $expand); + $this->setElementAttribute($form_name, 'customfields', $fields); $this->setElementAttribute($form_name, 'fields',array_fill_keys(array_keys($fields), true)); - - parent::beforeSendToClient($cname); - return false; } diff --git a/importexport/js/app.js b/importexport/js/app.js index 8b6e1b3635..7ae68cd9e2 100644 --- a/importexport/js/app.js +++ b/importexport/js/app.js @@ -125,7 +125,7 @@ app.classes.importexport = AppJS.extend( var value = widget.getValue(); // Only 1 selected, no checking needed - if(value.length <= 1) return; + if(value == null || value.length <= 1) return; // Don't jump it to the top, it's weird widget.selected_first = false;