mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 04:29:28 +01:00
fix not working click on URL
static method Et2Url.action() can NOT use this.egw(), but global egw
This commit is contained in:
parent
5f67bd720a
commit
259bc4cd71
@ -12,6 +12,7 @@ import {Et2InvokerMixin} from "./Et2InvokerMixin";
|
|||||||
import {Et2Textbox} from "../Et2Textbox/Et2Textbox";
|
import {Et2Textbox} from "../Et2Textbox/Et2Textbox";
|
||||||
import {colorsDefStyles} from "../Styles/colorsDefStyles";
|
import {colorsDefStyles} from "../Styles/colorsDefStyles";
|
||||||
import {css} from "@lion/core";
|
import {css} from "@lion/core";
|
||||||
|
import {egw} from "../../jsapi/egw_global";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @customElement et2-url
|
* @customElement et2-url
|
||||||
@ -99,7 +100,8 @@ export class Et2Url extends Et2InvokerMixin(Et2Textbox)
|
|||||||
if (!value) return;
|
if (!value) return;
|
||||||
// implicit add http:// if no protocol given
|
// implicit add http:// if no protocol given
|
||||||
if(value.indexOf("://") === -1) value = "http://"+value;
|
if(value.indexOf("://") === -1) value = "http://"+value;
|
||||||
this.egw().open_link(value, '_blank');
|
// as this is static, we can NOT use this.egw(), but global egw
|
||||||
|
egw.open_link(value, '_blank');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// @ts-ignore TypeScript is not recognizing that this is a LitElement
|
// @ts-ignore TypeScript is not recognizing that this is a LitElement
|
||||||
|
Loading…
Reference in New Issue
Block a user