Skip to content

Commit

Permalink
updated title link for text widget
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaisi committed Jun 19, 2024
1 parent fc60583 commit 104445a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions js_plugins/adei.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,13 @@ function open_adei_page(key) {
return;
}
}

function open_link(key) {
var data_link = $("#" + key).attr('data-title-link');

if (data_link != undefined) {
window.open(data_link, '_blank');
} else {
return;
}
}
2 changes: 1 addition & 1 deletion template/text.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% if data['style'][key]['type'] == "text" %}
<div id="{{ key }}" style='position: absolute; top: {{ data['style'][key]['top'] }}; left:{{
<div id="{{ key }}" onclick="open_link('{{ key }}')" data-title-link="{{ data['style'][key]['div']['data-title-link'] }}" style='position: absolute; top: {{ data['style'][key]['top'] }}; left:{{
data['style'][key]['left'] }}; width:{{ data['style'][key]['width'] }}px;
height:{{ data['style'][key]['height'] }}px;' data-type='text'>
<span style='color: #000; font-size: {{ data['style'][key]['div']['font-size'] }}; font-weight: {{ data['style'][key]['div']['font-weight'] }};' class='title'>{{ data['style'][key]['div']['text-name'] }}</span>
Expand Down

0 comments on commit 104445a

Please sign in to comment.