mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
Fix some property bugs
- Parse values that should have been objects but came as strings - Decode SearchMixin.searchUrl
This commit is contained in:
parent
3fdad7c160
commit
f85de279c6
@ -315,6 +315,8 @@ export const Et2WithSearchMixin = <T extends Constructor<LitElement>>(superclass
|
||||
if(changedProperties.has("searchUrl") && this.searchUrl)
|
||||
{
|
||||
this.search = true;
|
||||
// Decode URL, possibly again. If set in template, it can wind up double-encoded.
|
||||
this.searchUrl = this.egw().decodePath(this.searchUrl);
|
||||
}
|
||||
}
|
||||
|
||||
@ -840,7 +842,7 @@ export const Et2WithSearchMixin = <T extends Constructor<LitElement>>(superclass
|
||||
*/
|
||||
protected remoteQuery(search : string, options : object)
|
||||
{
|
||||
return this.egw().request(this.egw().link(this.egw().ajaxUrl(this.searchUrl),
|
||||
return this.egw().request(this.egw().link(this.egw().ajaxUrl(this.egw().decodePath(this.searchUrl)),
|
||||
{query: search, ...options}), [search, options]).then((result) =>
|
||||
{
|
||||
this.processRemoteResults(result);
|
||||
|
@ -1461,6 +1461,11 @@ function transformAttributes(widget, mgr : et2_arrayMgr, attributes)
|
||||
attrValue = widget.egw().lang(attrValue);
|
||||
}
|
||||
}
|
||||
else if(attrValue && [Object, Array].indexOf(typeof property === "object" ? property.type : property) != -1)
|
||||
{
|
||||
// Value was not supposed to be a string, but was run through here for expandName
|
||||
attrValue = JSON.parse(attrValue);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user