minor fixes and iframe css

This commit is contained in:
Rainer Gümpelein 2022-04-02 20:28:45 +02:00
parent 381943be42
commit fd29218991
9 changed files with 155 additions and 70 deletions

View file

@ -36,24 +36,25 @@ sub tpl(){
$session_and = "&sessionid=$R::sessionid";
}
my $bgcolor1 = "yellow";
my $parent_node = "app";
my $node = {};
my $rows = 0;
$bgcolor1 = $dbt->{website}->{$varenv->{syshost}}->{bgcolor1};
$parent_node = $dbt->{website}->{$varenv->{syshost}}->{parent_node};
my $bgcolor1 = $dbt->{website}->{$varenv->{syshost}}->{bgcolor1} || "yellow";#button background
my $hgcolor1 = $dbt->{website}->{$varenv->{syshost}}->{hgcolor1} || "yellow";#hover background
my $fgcolor1 = $dbt->{website}->{$varenv->{syshost}}->{fgcolor1} || "black";#font color
my $parent_node = $dbt->{website}->{$varenv->{syshost}}->{parent_node} || "app";
($node,$rows) = $dbt->collect_noderel($dbh,$dbt->{website}->{$varenv->{syshost}}->{parent_id});
if($users_sharee->{c_id} && $R::sharee_edit ne "delete_account2" && ($users_sharee->{c_id} eq $varenv->{superu_id} || $users_sharee->{c_id} eq "22262" || $dbt->{copri_conf}->{stage} eq "test")){
if($users_sharee->{c_id} eq $varenv->{superu_id} || $dbt->{copri_conf}->{stage} eq "test"){
my $coo = $q->cookie('domcookie') || $q->param('sessionid') || "";
#my $api_test = "sharee_kn";
my $api_test = "sharee_fr01";
print $q->div({-style=>'float:right;text-align:right;height:25px;padding:6px 15px;background-color:white'},$q->a({-style=>"color:#$bgcolor1;", -href=>"$varenv->{metahost}/src/scripts/tests/index.pl?sessionid=$coo\&api_test=$api_test", -target=>'_blank'}," [ $api_test ] ")),"\n";
print $q->div({-style=>'float:right;text-align:right;height:25px;padding:6px 15px;background-color:white'},$q->a({-style=>"background-color:#ffffff;color:#$bgcolor1;", -href=>"$varenv->{metahost}/src/scripts/tests/index.pl?sessionid=$coo\&api_test=$api_test", -target=>'_blank'}," [ tests --> $api_test ] ")),"\n";
}
if($users_sharee->{c_id} && $R::sharee_edit ne "delete_account2"){
print $q->div({-style=>'text-align:right;height:25px;padding:6px 15px 6px 0px;background-color:white'},"$users_sharee->{txt08}",$q->a({-style=>"color:#$bgcolor1;", -href=>"logout_sharee$session"},"logout")),"\n";
my $site_padding = "20px 0";
if($dbt->{website}->{$varenv->{syshost}}->{layout} eq "iframe"){
$site_padding = "0";
}
if(1==1){
@ -61,7 +62,7 @@ sub tpl(){
print "<style>
ul#TopNavi {
margin:20px 0;
padding:0;
padding:$site_padding;
vertical-align:top;
border: 0px solid white;
}
@ -78,62 +79,133 @@ sub tpl(){
background-color: #$bgcolor1;
text-decoration: none;
font-weight: normal;
color: white;
color: #fffffe;
}
ul#TopNavi a:hover {
color: black;
background-color: white;
color: #fffffe;
background-color: #$hgcolor1;
}
ul#TopNavi a:active {
color: white;
background-color: gray;
color: fffffe;
background-color: #$hgcolor1;
}
</style>";
my $lmenu0 = "";
foreach my $id (sort {$node->{$a}->{n_sort} <=> $node->{$b}->{n_sort}} keys (%$node)){
#if($node->{$id}->{main_id} && $node->{$id}->{node_name} =~ /$dbt->{shareeapp_conf}->{mod_active}/){
$node->{$id}->{node_path} = $node->{$id}->{node_name} if(!$node->{$id}->{node_path});
my $mstyle = "";
#print "$node->{$id}->{main_id} eq $node_meta->{main_id}|$node_meta->{parent_id}|$node_meta->{template_id}|$node->{$id}->{node_name} - $node_meta->{node_name}<br />\n" if($debug);
if($node->{$id}->{main_id} == $node_meta->{main_id} || $node->{$id}->{main_id} == $node_meta->{parent_id}){
$mstyle = "background-color:silver;color:black;";
$mstyle = "background-color:#$hgcolor1;color:#fffffe;";
}
if($node->{$id}->{node_name} eq "Anmelden" && $node_meta->{parent_id} == 200010){
$mstyle = "background-color:silver;color:black;";
$mstyle = "background-color:#$hgcolor1;color:#fffffe;";
}
if($node->{$id}->{node_name} eq "Anmelden" && $users_sharee->{c_id}){
$lmenu0 .= $but->lia_button("/$parent_node/$varenv->{profile}$session","Mein Profil",$node->{$id}->{main_id},"","$mstyle",$users_dms->{u_id});
}else{
$lmenu0 .= $but->lia_button("/$parent_node/$node->{$id}->{node_path}",$node->{$id}->{node_name},$node->{$id}->{main_id},"","$mstyle",$users_dms->{u_id});
$lmenu0 .= $but->lia_button("/$parent_node/$node->{$id}->{node_path}",$node->{$id}->{node_name},$node->{$id}->{main_id},"","$mstyle",$users_dms->{u_id});
}
}
#}
#print "<div class='container' style='border:0px dotted black;'>\n";
print $q->div({-style=>'text-align:left;border:0px dotted black;'},$q->ul({-id=>'TopNavi'},$lmenu0)),"\n";
#print "</div>\n";
#end Topmenue
#bootstrap 5 with standalone site
print "<div class='container' style='border:1px dotted silver;'>\n" if($dbt->{website}->{$varenv->{syshost}}->{layout} eq "standalone");
print "<div style='text-align:right;height:25px;'>\n";
print "<button type='button' style='background-color:#ffffff;color:#$bgcolor1;border:1px solid #ffffff;font-size:1em;padding-right:1em;width:8px;' onclick='change_fontsize1();'>A</button>";
print "<button type='button' style='background-color:#ffffff;color:#$bgcolor1;border:1px solid #ffffff;font-size:1.2em;padding-right:1em;width:8px;' onclick='change_fontsize2();'>A</button>";
print "<button type='button' style='background-color:#ffffff;color:#$bgcolor1;border:1px solid #ffffff;font-size:1.4em;padding-right:1em;width:8px;' onclick='change_fontsize3();'>A</button>";
print "<button type='button' style='background-color:#ffffff;color:#$bgcolor1;border:1px solid #ffffff;font-size:1em;padding-right:1em;width:10px;' onclick='change_contrast();'><span class='bi bi-circle-half'></span></button>";
if($users_sharee->{c_id} && $R::sharee_edit ne "delete_account2"){
print "<span style='padding-left:10px;'> | $users_sharee->{txt08}</span> <a style='background-color:#ffffff;color:#$bgcolor1;' href='logout_sharee$session'>logout</a>\n";
}
print "</div>\n";
print "<div id='Contenttxt' style='margin:20px 5px 40px 0;border:0px dotted #$fgcolor1;'>\n";
print $q->div({-style=>"text-align:left;border:0px dotted #$fgcolor1;"},$q->ul({-id=>'TopNavi'},$lmenu0)),"\n";
if(($node_meta->{tpl_id} == 1 || $node_meta->{tpl_id} == 3) && $node_meta->{main_id} == 200017){
if(($node_meta->{tpl_id} == 1 || $node_meta->{tpl_id} == 3) && $node_meta->{main_id} == 200017){
require "Tpl/Karte.pm";
&Karte::tpl($node_meta,$users_dms,$mode,$varenv,$users_sharee,$return);
}else{
# print "<div class='container'>\n";
print "<div id='Contenttxt' style='margin:40px 5px 40px 0;border:0px dotted black;'>\n";
}else{
$self->tplselect($node_meta,$users_dms,$mode,$varenv,$users_sharee,$return);
print "</div>\n";
#print "</div>\n";
}
}
print "<div style='margin-top:1em;border-top:1px dotted #$bgcolor1;background-color:#fff;width:100%;height:10px;text-align:right;'>\n";
print "</div>\n";
my $sharee_impress_text = {};
$sharee_impress_text->{ct_name} = "Impressum";
$sharee_impress_text->{txt01} = "<iframe src='$varenv->{wwwhost}/site/impress_1.html' style='width:100%;height:1500px;border:none;' scrolling='auto'></iframe>";
my $sharee_privacy_text = {};
$sharee_privacy_text->{ct_name} = "Datenschutzhinweise";
$sharee_privacy_text->{txt01} = "<iframe src='$varenv->{wwwhost}/site/privacy_2.html' style='width:100%;height:6000px;border:none;' scrolling='auto'></iframe>";
print <<EOF
<!-- Modal -->
<div class="modal fade" id="sharee_impress" tabindex="-1" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">$sharee_impress_text->{ct_name}</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="text-default">$sharee_impress_text->{txt01}</div>
</div>
<div class="modal-footer">
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
</div>
</div>
</div>
EOF
;
print <<EOF
<!-- Modal -->
<div class="modal fade" id="sharee_privacy" tabindex="-1" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">$sharee_privacy_text->{ct_name}</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="text-default">$sharee_privacy_text->{txt01}</div>
</div>
<div class="modal-footer">
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
</div>
</div>
</div>
EOF
;
print $q->div({ -style=>"width:100%;text-align:right;"},
"<button type='button' style='padding:0 2em;color:#$bgcolor1;border:1px solid #ffffff;background-color:#ffffff;' data-bs-toggle='modal' data-bs-target='#sharee_impress'>Impressum</button>
<button type='button' style='padding: 0 2em;color:#$bgcolor1;border:1px solid #ffffff;background-color:#ffffff;' data-bs-toggle='modal' data-bs-target='#sharee_privacy'>Datenschutzhinweise</button>"
#$q->a({-style=>"background-color:#ffffff;color:#$bgcolor1;text-decoration:none;", -href=>"$varenv->{wwwhost}/site/impress_1.html"}, "Impressum"),
#$q->a({-style=>"background-color:#ffffff;color:#$bgcolor1;text-decoration:none;padding:0 1em;", -href=>"$varenv->{wwwhost}/site/privacy_2.html"}, "Datenschutz")
),"\n";
print "</div>\n";#Contenttxt
print "</div>\n" if($dbt->{website}->{$varenv->{syshost}}->{layout} eq "standalone");#container
}
print "<script type='text/javascript' src='$varenv->{metahost}/js/iframeResizer.contentWindow.min.js'></script>\n";
#print "<script type='text/javascript' src='$varenv->{metahost}/js/iframeResizer.contentWindow.min.js'></script>\n";
my $debug_footer = "Mlogic --> (syshost: $varenv->{syshost} | users_sharee->{c_id}: $users_sharee->{c_id} | ct_table: $node_meta->{ct_table} | parent_id: $node_meta->{parent_id} | main_id: $node_meta->{main_id} | tpl_id: $node_meta->{tpl_id} | $users_dms->{u_id})";
print $q->div({-style=>'position:fixed;bottom:0%;right:2%;z-index:10;font-size:13px;'},"$debug_footer"),"\n" if($users_sharee->{c_id} eq $varenv->{superu_id});
print $q->div({-style=>'position:fixed;bottom:0%;left:2%;z-index:10;font-size:13px;'},"$debug_footer"),"\n" if($users_sharee->{c_id} eq $varenv->{superu_id});
if($return && $return =~ /failure/){
require "Mod/Failure.pm";
@ -169,9 +241,9 @@ sub tplselect(){
}elsif($tpl_id == 197){
require "Tpl/Contact.pm";
&Contact::tpl($node_meta,$users_dms,$mode,$varenv,$users_sharee,$return);
}elsif($tpl_id == 1 || $tpl_id == 3){
require "Tpl/Listing.pm";
&Listing::tpl($node_meta,$users_dms,$mode,$varenv,$users_sharee,$return);
#}elsif($tpl_id == 1 || $tpl_id == 3){
#require "Tpl/Listing.pm";
#&Listing::tpl($node_meta,$users_dms,$mode,$varenv,$users_sharee,$return);
#require "Tpl/ModalboxDialog.pm";
#&ModalboxDialog::mobox2($node_meta,$users_dms,$mode,$varenv,$users_sharee,$return);