Browse Source
Merge pull request #6916 from vvlladd28/bug/maps/tooltip-action-with-space
[3.4] UI: Fixed not handle tooltip actions with contains space in name for map widgets
pull/6924/head
Igor Kulikov
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
ui-ngx/src/app/modules/home/components/widget/lib/maps/common-maps-utils.ts
|
|
@ -116,11 +116,11 @@ const linkActionRegex = /<link-act name=['"]([^['"]*)['"]>([^<]*)<\/link-act>/g; |
|
|
const buttonActionRegex = /<button-act name=['"]([^['"]*)['"]>([^<]*)<\/button-act>/g; |
|
|
const buttonActionRegex = /<button-act name=['"]([^['"]*)['"]>([^<]*)<\/button-act>/g; |
|
|
|
|
|
|
|
|
function createLinkElement(actionName: string, actionText: string): string { |
|
|
function createLinkElement(actionName: string, actionText: string): string { |
|
|
return `<a href="javascript:void(0);" class="tb-custom-action" data-action-name=${actionName}>${actionText}</a>`; |
|
|
return `<a href="javascript:void(0);" class="tb-custom-action" data-action-name="${actionName}">${actionText}</a>`; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function createButtonElement(actionName: string, actionText: string) { |
|
|
function createButtonElement(actionName: string, actionText: string) { |
|
|
return `<button mat-button class="tb-custom-action" data-action-name=${actionName}>${actionText}</button>`; |
|
|
return `<button mat-button class="tb-custom-action" data-action-name="${actionName}">${actionText}</button>`; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function parseTemplate(template: string, data: FormattedData, |
|
|
function parseTemplate(template: string, data: FormattedData, |
|
|
|