mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 23:00:56 +01:00
fix call with empty xml and use own item search ajax method (which still uses the egw_link class)
This commit is contained in:
parent
6123e479b2
commit
e3e801ff40
@ -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
|
* @param string|XMLReader $xml string with xml or XMLReader positioned on the element to construct
|
||||||
* @throws egw_exception_wrong_parameter
|
* @throws egw_exception_wrong_parameter
|
||||||
*/
|
*/
|
||||||
public function __construct($xml)
|
public function __construct($xml = '')
|
||||||
{
|
{
|
||||||
|
if($xml) {
|
||||||
parent::__construct($xml);
|
parent::__construct($xml);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find items that match the given parameters
|
* Find items that match the given parameters
|
||||||
|
* using the egw_link class
|
||||||
*/
|
*/
|
||||||
public static function ajax_item_search($app, $type, $pattern, $options=array()) {
|
public static function ajax_item_search($app, $type, $pattern, $options=array()) {
|
||||||
$options['type'] = $type ? $type : $options['type'];
|
$options['type'] = $type ? $type : $options['type'];
|
||||||
|
@ -200,7 +200,7 @@ var et2_itempicker = et2_inputWidget.extend({
|
|||||||
|
|
||||||
this.itemlist.addClass("loading");
|
this.itemlist.addClass("loading");
|
||||||
this.clear.css("display", "inline-block");
|
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.current_app, '', request.term, request.options],
|
||||||
this
|
this
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user