diff --git a/etemplate/inc/class.etemplate_widget_itempicker.inc.php b/etemplate/inc/class.etemplate_widget_itempicker.inc.php index 8adc9ab1e3..7c1cebaf04 100755 --- a/etemplate/inc/class.etemplate_widget_itempicker.inc.php +++ b/etemplate/inc/class.etemplate_widget_itempicker.inc.php @@ -24,13 +24,16 @@ class etemplate_widget_itempicker extends etemplate_widget * @param string|XMLReader $xml string with xml or XMLReader positioned on the element to construct * @throws egw_exception_wrong_parameter */ - public function __construct($xml) + public function __construct($xml = '') { - parent::__construct($xml); + if($xml) { + parent::__construct($xml); + } } /** * Find items that match the given parameters + * using the egw_link class */ public static function ajax_item_search($app, $type, $pattern, $options=array()) { $options['type'] = $type ? $type : $options['type']; diff --git a/etemplate/js/et2_widget_itempicker.js b/etemplate/js/et2_widget_itempicker.js index dda4149be3..e101c2412f 100755 --- a/etemplate/js/et2_widget_itempicker.js +++ b/etemplate/js/et2_widget_itempicker.js @@ -200,7 +200,7 @@ var et2_itempicker = et2_inputWidget.extend({ this.itemlist.addClass("loading"); this.clear.css("display", "inline-block"); - var request = new egw_json_request("etemplate_widget_link::ajax_link_search::etemplate", + var request = new egw_json_request("etemplate_widget_itempicker::ajax_item_search::etemplate", [this.current_app, '', request.term, request.options], this );