Skip to content

Commit

Permalink
Merge pull request #4102 from FAJ-Munich/master
Browse files Browse the repository at this point in the history
Restore popup functionalities for Psalmi & Lectiones
  • Loading branch information
APMarcello3 authored Oct 16, 2024
2 parents db4aa07 + 74549e7 commit c8d5673
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
13 changes: 11 additions & 2 deletions web/cgi-bin/horas/popup.pl
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,21 @@ package main;
$textwidth = 90;
$only = $lang1 && $lang1 =~ /^$lang2$/i;
precedence();
setsecondcol();

load_languages_data($lang1, $lang2, $version, $missa);
$title = translate(get_link_name($popup), $lang1);

# We need to revert the masked parantheses at this point
$popup =~ s/\&lpar/\(/;
$popup =~ s/\&rpar/\)/;
my $title = $popup;
$title =~ s/^[\$\&]?([a-z])/\u$1/;
$title =~ s/,/ /;
$title =~ s/,/-/;
$title = translate(get_link_name($title), $lang1);
$title =~ s/[\$\&]//;
$expand = 'all';
if ($popup =~ /\&/) { $popup =~ s /\s/\_/g; }
if ($popup =~ /\&/) { $popup =~ s/\s/\_/g; }
$text = resolve_refs($popup, $lang1);
$t = length($text);

Expand Down
4 changes: 4 additions & 0 deletions web/cgi-bin/horas/webdia.pl
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,10 @@ sub wnum {
# set a link line
sub linkcode {
my ($name, $ind, $lang, $disabled) = @_;
# We need to mask paranthesis to be passed via JavaScript to popup.pl
$name =~ s/\(/\&lpar/;
$name =~ s/\)/\&rpar/;
return "<INPUT TYPE='RADIO' NAME='link' $disabled onclick='linkit(\"$name\", $ind, \"$lang\");'>";
}
Expand Down

0 comments on commit c8d5673

Please sign in to comment.