Skip to content

Commit

Permalink
Merge pull request #4097 from FAJ-Munich/master
Browse files Browse the repository at this point in the history
MacOS functionalities
  • Loading branch information
APMarcello3 authored Oct 14, 2024
2 parents 45a3d40 + 2b08b11 commit 73cd2b4
Show file tree
Hide file tree
Showing 7 changed files with 179 additions and 165 deletions.
10 changes: 5 additions & 5 deletions standalone/tools/epubgen2/Ewebdia.pl
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ sub setup {

if ($parmode[$i] =~ /^label/i) {
my $ilabel = $parvalue[$i];
if ($parpar[$i]) { $ilabel = wrap($ilabel, $parpar[$i], "<BR>\n"); }
if ($parpar[$i]) { $ilabel = wrap($ilabel, $parpar[$i], "<BR />\n"); }
$input .= "$ilabel";
$input .= "<INPUT TYPE=HIDDEN NAME=\'I$k\' VALUE=\'$parvalue[$i]\'>\n";

Expand Down Expand Up @@ -157,7 +157,7 @@ sub setup {
do_write("$datafolder/gen/$savefile.gen", $pv);
}

$input .= "<TEXTAREA NAME=\'I$k\' ID=\'I$k\' COLS=$size[1] ROWS=$size[0]>$pv</TEXTAREA><BR>\n";
$input .= "<TEXTAREA NAME=\'I$k\' ID=\'I$k\' COLS=$size[1] ROWS=$size[0]>$pv</TEXTAREA><BR />\n";
$input .= "<A HREF='#' onclick='loadrut();'>";
$input .= setfont($dialogfont) . "Load</FONT></A>";

Expand Down Expand Up @@ -444,7 +444,7 @@ sub setvrbar {
# #remove auxiliary characters
# $text =~ s/wait[0-9]+//ig;
# $text =~ s/\_/ /g;
# $text =~ s/\{\:.*?\:\}(<BR>)*\s*//g;
# $text =~ s/\{\:.*?\:\}(<BR />)*\s*//g;
# $text =~ s/\{\:.*?\:\}//sg;
# $text =~ s/\`//g;
#
Expand Down Expand Up @@ -542,8 +542,8 @@ sub longtd {
my $a1 = shift;
my $a2 = shift;

my @a1 = split('<BR>', $a1);
my @a2 = split('<BR>', $a2);
my @a1 = split('<BR />', $a1);
my @a2 = split('<BR />', $a2);
my @b1 = splice(@b1, @b1);
my @b2 = splice(@b2, @b2);
my $i;
Expand Down
6 changes: 3 additions & 3 deletions web/cgi-bin/horas/horas.pl
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,11 @@ sub resolve_refs {

# Concatenate the expansions of the lines with a line break between each.
push @resolved_lines, '';
my $resolved_block = join "<BR>\n", @resolved_lines;
my $resolved_block = join "<BR />\n", @resolved_lines;

#removes occasional double linebreaks
$resolved_block =~ s/<BR>\s*<BR>/<BR>/g;
$resolved_block =~ s/<\/P>\s*<BR>/<\/P>/g;
$resolved_block =~ s/<BR \/>\s*<BR \/>/<BR \/>/g;
$resolved_block =~ s/<\/P>\s*<BR \/>/<\/P>/g;
return $resolved_block;
}

Expand Down
30 changes: 15 additions & 15 deletions web/cgi-bin/horas/horascommon.pl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

sub error {
my $t = shift;
our $error .= "= $t =<br>";
our $error .= "= $t =<br />";
}

sub occurrence {
Expand Down Expand Up @@ -777,7 +777,7 @@ sub concurrence {
&& $version !~ /1955|196/)
{
$vespera = 3;
$dayname[2] = $tomorrowname[2] . "<br>Vespera de Officium occurente, Commemoratio Sanctorum tantum";
$dayname[2] = $tomorrowname[2] . "<br />Vespera de Officium occurente, Commemoratio Sanctorum tantum";
$cwrank = '';
$ctname = '';
%cwinner = undef;
Expand All @@ -789,7 +789,7 @@ sub concurrence {
&& $version !~ /1955|196/)
{
$vespera = 3;
$dayname[2] .= "<br>Vespera de Officium occurente; nihil de sequenti";
$dayname[2] .= "<br />Vespera de Officium occurente; nihil de sequenti";
$cwrank = '';
$csname = '';
%cwinner = undef;
Expand All @@ -801,7 +801,7 @@ sub concurrence {
} else {
$vespera = 3;
$dayname[2] = '' unless $dayname[2] =~ /Dominica|Advent|Quadr|Pass/i;
$dayname[2] .= "<br>Vespera de Officium occurente " unless $version =~ /1955|196/;
$dayname[2] .= "<br />Vespera de Officium occurente " unless $version =~ /1955|196/;
$cwrank = '';
$ctname = '';
%cwinner = undef;
Expand All @@ -821,9 +821,9 @@ sub concurrence {
$winner = $cwinner;

if ($crank < 7 && $comrank >= $ccomrank && $comrank > 2) {
$tomorrowname[2] = $dayname[2] .= "<br>Vespera de sequenti; nihil de præcedenti (tempora)";
$tomorrowname[2] = $dayname[2] .= "<br />Vespera de sequenti; nihil de præcedenti (tempora)";
} else {
$tomorrowname[2] .= "<br>Vespera de sequenti; nihil de præcedenti";
$tomorrowname[2] .= "<br />Vespera de sequenti; nihil de præcedenti";
@commemoentries = ();
$commemoratio = '';
}
Expand All @@ -837,7 +837,7 @@ sub concurrence {
} else {
$vespera = 3;
$tvesp = 3;
$dayname[2] .= "<br>Vespera de præcedenti; nihil de sequenti (tempora)";
$dayname[2] .= "<br />Vespera de præcedenti; nihil de sequenti (tempora)";
$ctrank = '';
$ctname = '';
%cwinner = undef;
Expand Down Expand Up @@ -880,7 +880,7 @@ sub concurrence {
|| ($rank >= ($version =~ /trident/i ? 6 : 5) && $winner !~ /feria|in.*octava/i && $crank < 2.1)
)
{ # on Duplex I. cl / II. cl no commemoration of following Simplex and Common Octaves
$dayname[2] .= "<br>Vespera de præcedenti; nihil de sequenti";
$dayname[2] .= "<br />Vespera de præcedenti; nihil de sequenti";
$cwinner = '';
%cwinner = ();
$vespera = 3;
Expand All @@ -906,9 +906,9 @@ sub concurrence {
$cvespera = 3;

if ($comrank == 2.1 || $comrank == 2.99 || $comrank == 3.9) { # privilidged Feria, Dominica, or infra 8vam
$dayname[2] .= "<br>Vespera de sequenti; commemoratio de off. priv. tantum";
$dayname[2] .= "<br />Vespera de sequenti; commemoratio de off. priv. tantum";
} else {
$dayname[2] .= "<br>Vespera de sequenti; nihil de præcedenti";
$dayname[2] .= "<br />Vespera de sequenti; nihil de præcedenti";
}
$rank = $crank;
$commune = $ccommune;
Expand All @@ -931,7 +931,7 @@ sub concurrence {
$winner = $cwinner;
$cwinner = $commemoratio;
@dayname = @tomorrowname;
$dayname[2] .= "<br>Vespera de sequenti; commemoratio de præcedenti Dominica";
$dayname[2] .= "<br />Vespera de sequenti; commemoratio de præcedenti Dominica";
$rank = $crank;
$commune = $ccommune;
$communetype = $ccommunetype;
Expand All @@ -948,7 +948,7 @@ sub concurrence {
$cvespera = 1;
$commemoratio = $cwinner;
$dayname[2] = "Commemoratio: $cwrank[0]";
$dayname[2] .= "<br>Vespera de præcedenti; commemoratio de sequenti";
$dayname[2] .= "<br />Vespera de præcedenti; commemoratio de sequenti";
$dayname[2] .= " Dominica" if $cwinner{Rank} =~ /Dominica/i;
} elsif ($flcrank == $flrank) { # "flattend ranks" are equal => a capitulo
$commemoratio = $winner;
Expand Down Expand Up @@ -995,7 +995,7 @@ sub concurrence {
$rank = $crank;
$commune = $ccommune;
$communetype = $ccommunetype;
$dayname[2] .= "<br>A capitulo de sequenti; commemoratio de præcedenti";
$dayname[2] .= "<br />A capitulo de sequenti; commemoratio de præcedenti";
} elsif ($crank > $rank) { # tommorow is outranking today
$vespera = 1;
$commemoratio = $winner;
Expand All @@ -1007,13 +1007,13 @@ sub concurrence {
$rank = $crank;
$commune = $ccommune;
$communetype = $ccommunetype;
$dayname[2] .= "<br>Vespera de sequenti; commemoratio de præcedenti";
$dayname[2] .= "<br />Vespera de sequenti; commemoratio de præcedenti";
} else { # today is outranking tomorrow
$commemoratio = $cwinner;
$dayname[2] = "Commemoratio: $cwrank[0]";
$vespera = 3;
$cvespera = 1;
$dayname[2] .= "<br>Vespera de præcedenti; commemoratio de sequenti";
$dayname[2] .= "<br />Vespera de præcedenti; commemoratio de sequenti";

if ($cwinner{Rank} =~ /infra octavam/i || $ccommemoentries[0] =~ /infra octavam/i) {
my @comentries = ();
Expand Down
64 changes: 32 additions & 32 deletions web/cgi-bin/horas/kalendar.pl
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,10 @@ sub kalendar_entry {
# prepare html table with entries
sub kalendar_table {
my ($kyear, $kmonth) = @_;

my $background = ($whitebground) ? ' class="contrastbg"' : '';
my $output = << "PrintTag";
<P ALIGN=CENTER>
<TABLE BORDER=$border WIDTH=90% CELLPADDING=3 STYLE="color: black">
<P ALIGN="CENTER">
<TABLE BORDER="$border" WIDTH="90%" CELLPADDING="3" $background>
<TR><TH>Dies</TH><TH>de Tempore</TH><TH>Sanctorum</TH><TH>d.h.</TH></TR>
PrintTag

Expand All @@ -250,7 +250,7 @@ sub kalendar_table {

if ($yday == 1) { # add extra headline at the start of a new month
$output .= << "PrintTag";
<TR><TH COLSPAN="4" ALIGN=CENTER">
<TR><TH COLSPAN="4" ALIGN="CENTER">
<A HREF=# onclick=\"setkm($ymonth)\">@{[(MONTHNAMES)[$ymonth]]} $kyear</A>
</TH></TR>
PrintTag
Expand All @@ -263,13 +263,13 @@ sub kalendar_table {
push(@c1, $c1);
push(@c2, $c2);
}
my $c1 = join('<BR>', @c1);
my $c2 = join('<BR>', @c2);
my $c1 = join('<BR />', @c1);
my $c2 = join('<BR />', @c2);
$output .= << "PrintTag";
<TR><TD ALIGN=CENTER><A HREF=# onclick="callbrevi('$date1');">$d1</A></TD>
<TR><TD ALIGN="CENTER"><A HREF=# onclick="callbrevi('$date1');">$d1</A></TD>
<TD>$c1</TD>
<TD>$c2</TD>
<TD ALIGN=CENTER>@{[(DAYNAMES)[$dayofweek]]}</TD>
<TD ALIGN="CENTER">@{[(DAYNAMES)[$dayofweek]]}</TD>
</TR>
PrintTag
}
Expand All @@ -287,18 +287,18 @@ sub html_output {

my $output = << "PrintTag";
<H1>
<FONT COLOR=MAROON SIZE=+1><B><I>Divinum Officium</I></B></FONT>&nbsp;
<FONT COLOR=RED SIZE=+1>$vers</FONT>
<FONT COLOR="MAROON" SIZE="+1"><B><I>Divinum Officium</I></B></FONT>&nbsp;
<FONT COLOR="RED" SIZE="+1">$vers</FONT>
</H1>
<P ALIGN=CENTER>
<FONT COLOR=MAROON SIZE=+1><B><I>Ordo @{[(MONTHNAMES)[$kmonth]]} A. D.</I></B></FONT>&nbsp;
<LABEL FOR=kyear CLASS=offscreen>Year</LABEL>
<INPUT TYPE=TEXT ID=kyear NAME=kyear VALUE="$kyear" SIZE=4>
<P ALIGN="CENTER">
<FONT COLOR="MAROON" SIZE="+1"><B><I>Ordo @{[(MONTHNAMES)[$kmonth]]} A. D.</I></B></FONT>&nbsp;
<LABEL FOR="kyear" CLASS="offscreen">Year</LABEL>
<INPUT TYPE="TEXT" ID="kyear" NAME="kyear" VALUE="$kyear" SIZE=4>
<A HREF=# onclick="prevnext(-1)">&darr;</A>
<INPUT TYPE=submit NAME=SUBMIT VALUE=" " onclick="document.forms[0].submit();">
<INPUT TYPE="submit" NAME="SUBMIT" VALUE=" " onclick="document.forms[0].submit();">
<A HREF=# onclick="prevnext(1)">&uarr;</A>
&nbsp;&nbsp;&nbsp;<A HREF=# onclick="setkm(14)">Totus</A>
</P><P ALIGN=CENTER>
&ensp;<A HREF=# onclick="setkm(14)">Totus</A>
</P><P ALIGN="CENTER">
PrintTag

my @mmenu;
Expand All @@ -316,23 +316,23 @@ sub html_output {

print kalendar_table($kyear, $kmonth);

print "<P ALIGN=CENTER>\n";
print "<P ALIGN='CENTER'>\n";
print htmlInput('version', $ver[0], 'options', 'versions', "document.forms[0].submit()");

if ($compare) {
print htmlInput('version2', $ver[1], 'options', 'versions', "document.forms[0].submit()");
}
print "</P><P ALIGN=CENTER>\n" . bottom_links_menu() . "</P>\n";
print "</P><P ALIGN='CENTER'>\n" . bottom_links_menu() . "</P>\n";

# if ($savesetup > 1) { print "&nbsp;&nbsp;&nbsp;<A HREF=# onclick=\"readings();\">Readings</A>"; }
if ($error) { print "<P ALIGN=CENTER><FONT COLOR=red>$error</FONT></P>\n"; }
if ($debug) { print "<P ALIGN=CENTER><FONT COLOR=blue>$debug</FONT></P>\n"; }
if ($error) { print "<P ALIGN='CENTER'><FONT COLOR=red>$error</FONT></P>\n"; }
if ($debug) { print "<P ALIGN='CENTER'><FONT COLOR=blue>$debug</FONT></P>\n"; }

# if ($Readings) { Readings(); } # not reachable
if ($compare) {
print '<P ALIGN=CENTER><A HREF="#" onclick="callkalendar(0)">Single Calendar</A>';
print '<P ALIGN="CENTER"><A HREF="#" onclick="callkalendar(0)">Single Calendar</A>';
} else {
print '<P ALIGN=CENTER><A HREF="#" onclick="callkalendar(1)">Compare Calendars</A>';
print '<P ALIGN="CENTER"><A HREF="#" onclick="callkalendar(1)">Compare Calendars</A>';
my $tyear;
($tyear = gettoday()) =~ s/.*-//;
my $iyear = $tyear != $kyear ? "&kyear=$kyear" : '';
Expand All @@ -352,15 +352,15 @@ sub html_output {

print << "PrintTag";
</P>
<INPUT TYPE=HIDDEN NAME=setup VALUE="$setupsave">
<INPUT TYPE=HIDDEN NAME=date1 VALUE="$date1">
<INPUT TYPE=HIDDEN NAME=kmonth VALUE=$kmonth>
<INPUT TYPE=HIDDEN NAME=date VALUE="$date1">
<INPUT TYPE=HIDDEN NAME=command VALUE="$command">
<INPUT TYPE=HIDDEN NAME=officium VALUE="$officium">
<INPUT TYPE=HIDDEN NAME=browsertime VALUE="$browsertime">
<INPUT TYPE=HIDDEN NAME=compare VALUE="$compare">
<INPUT TYPE=HIDDEN NAME=readings VALUE="0">
<INPUT TYPE="HIDDEN" NAME="setup" VALUE="$setupsave">
<INPUT TYPE="HIDDEN" NAME="date1" VALUE="$date1">
<INPUT TYPE="HIDDEN" NAME="kmonth" VALUE=$kmonth>
<INPUT TYPE="HIDDEN" NAME="date" VALUE="$date1">
<INPUT TYPE="HIDDEN" NAME="command" VALUE="$command">
<INPUT TYPE="HIDDEN" NAME="officium" VALUE="$officium">
<INPUT TYPE="HIDDEN" NAME="browsertime" VALUE="$browsertime">
<INPUT TYPE="HIDDEN" NAME="compare" VALUE="$compare">
<INPUT TYPE="HIDDEN" NAME="readings" VALUE="0">
</FORM>
</BODY></HTML>
PrintTag
Expand Down
Loading

0 comments on commit 73cd2b4

Please sign in to comment.