web-bayern contrast methods

This commit is contained in:
Rainer Gümpelein 2022-03-24 07:25:20 +01:00
parent be4d83cc8d
commit 1503e52196
6 changed files with 127 additions and 43 deletions

View file

@ -1,3 +1,4 @@
function change_fontsize1(){
document.getElementById('Contenttxt').style.cssText = 'font-size:1em;';
}
@ -8,6 +9,49 @@ function change_fontsize3(){
document.getElementById('Contenttxt').style.cssText = 'font-size:1.4em;';
}
function change_contrast(){
var element = document.querySelectorAll('*');
for (var i = 0; i < element.length; i++) {
//const bgcol = element[i].style.backgroundColor;
const style = getComputedStyle(element[i]);
const bgcol = style.backgroundColor;
console.log(bgcol);
const fgcol = style.color;
console.log(fgcol);
if(bgcol == ('rgb(0, 141, 210)')){ //008dd2 (blue)
element[i].style.backgroundColor = "rgb(63, 63, 63)";//3f3f3f (black)
element[i].style.color = "rgb(255, 255, 254)";//white
}
if(bgcol == ('rgb(63, 63, 63)')){ //black
element[i].style.backgroundColor = "rgb(0, 141, 210)";
element[i].style.color = "rgb(255, 255, 254)";
}
//hover active
if(bgcol == ('rgb(3, 101, 149)')){ //036595 (darkblue)
element[i].style.backgroundColor = "rgb(255, 255, 254)";
element[i].style.color = "rgb(63, 63, 63)";
}
//hover active
if(bgcol == ('rgb(255, 255, 254)')){ //fffffe (white)
element[i].style.backgroundColor = "rgb(3, 101, 149)";
element[i].style.color = "rgb(255, 255, 254)";
}
//if only font ist colored and backround is white
if(fgcol == ('rgb(0, 141, 210)') && bgcol == ('rgb(255, 255, 255)')){ //008dd2
element[i].style.color = "rgb(63, 63, 63)";
element[i].style.backgroundColor = "rgb(255, 255, 255)";
}
if(fgcol == ('rgb(63, 63, 63)') && bgcol == ('rgb(255, 255, 255)')){ //black
element[i].style.color = "rgb(0, 141, 210)";
element[i].style.backgroundColor = "rgb(255, 255, 255)";
}
}
}
function show_passwd() {
var x = document.getElementById('txt04');
if (x.type === "password") {

View file

@ -1079,6 +1079,7 @@ sub collect_transpos {
$where .= " and cp.$key = $search->{$key}" if($key eq "barcode" && looks_like_number($search->{$key}));
$where .= " and cp.$key = $search->{$key}" if($key eq "int12" && looks_like_number($search->{$key}));#bike_group
$where .= " and cp.$key = $search->{$key}" if($key eq "owner" && looks_like_number($search->{$key}));
$where .= " and cp.$key is $search->{$key}" if($key eq "int34" && $search->{$key} eq "null");
}
$where .= " ORDER BY cp.end_time $updown LIMIT $search->{limit} OFFSET $search->{offset}" if($search->{limit});
@ -1249,6 +1250,8 @@ sub insert_pos(){
$artikelnr = $ct->{barcode} if(!$artikelnr);#RadID
my $user_name = $ctadr->{txt01};
$user_name = $ctadr->{txt08} if(!$user_name || $user_name eq "no name");
my $staff = 0;
$staff = 1 if($ctadr->{txt18});#service staff (no sms message)
my $deviceId = $ct->{int13} || 0;
my $bike_charge = $ct->{int19} || 0;
@ -1278,7 +1281,7 @@ sub insert_pos(){
my $sth;
#Verleihräder
if($ct->{template_id} && $ct->{template_id} == 205){#Leihrad_list
$sth = $dbh->prepare("INSERT INTO contenttranspos (ct_id,cc_id,ca_id,ct_name,barcode,txt01,txt08,txt02,txt09,itime,start_time,end_time,int02,int03,int06,int04,txt05,txt06,txt07,int10,int12,int13,owner,int07,txt04,int09,int17,int15,int16,int11,int18,int19,txt17,txt18,int20,int25) VALUES ('$ctt_id','$ct->{c_id}','$ctadr->{c_id}','$artikelnr','$ct->{barcode}','$ct->{txt01}','$user_name','$ct->{txt02}','$ctadr->{txt09}',now(),now(),'$endRental','$unit_price','$menge','$station','$station','$ct->{txt06}','$ct->{txt06}','$ct->{txt07}','$status','$from_main_id','$deviceId','$owner','$rabatt','$tariff_desc','$tariff_nr','$day_maxprice','$abo_price','$free_hours','$ct->{int11}','$sharing_type','$bike_charge','$ct->{txt17}','$ct->{txt18}','$ct->{int20}','$trackon') RETURNING c_id");
$sth = $dbh->prepare("INSERT INTO contenttranspos (ct_id,cc_id,ca_id,ct_name,barcode,txt01,txt08,txt02,txt09,itime,start_time,end_time,int02,int03,int06,int04,txt05,txt06,txt07,int10,int12,int13,owner,int07,txt04,int09,int17,int15,int16,int11,int18,int19,txt17,txt18,int20,int25,int34) VALUES ('$ctt_id','$ct->{c_id}','$ctadr->{c_id}','$artikelnr','$ct->{barcode}','$ct->{txt01}','$user_name','$ct->{txt02}','$ctadr->{txt09}',now(),now(),'$endRental','$unit_price','$menge','$station','$station','$ct->{txt06}','$ct->{txt06}','$ct->{txt07}','$status','$from_main_id','$deviceId','$owner','$rabatt','$tariff_desc','$tariff_nr','$day_maxprice','$abo_price','$free_hours','$ct->{int11}','$sharing_type','$bike_charge','$ct->{txt17}','$ct->{txt18}','$ct->{int20}','$trackon','$staff') RETURNING c_id");
}else{
$sth = $dbh->prepare("INSERT INTO contenttranspos (ct_id,cc_id,ca_id,ct_name,barcode,txt08,txt09,itime,int02,int03,txt01,txt06,txt07,int10,int12,owner) VALUES ('$ctt_id','$ct->{c_id}','$ctadr->{c_id}','$artikelnr','0','$user_name','$ctadr->{txt09}',now(),'$unit_price','1','$ct->{txt01}','$ct->{txt06}','$ct->{txt07}','0','$from_main_id','$owner') RETURNING c_id");
}

View file

@ -56,6 +56,7 @@ if($todo eq "24h_occupied"){
my $search = {
table => "contenttranspos",
int10 => 3,
int34 => "null",#if not staff
start_time_interval => "(now() - interval '1 day')",
};
my $update_pos = {

View file

@ -24,6 +24,7 @@ div#Contenttxt {
padding-left:0px;
border:0px solid silver;
text-align: left;
color: #4f3f3f;
}
div#ContentLogin {
@ -33,6 +34,7 @@ div#ContentLogin {
padding:0px;
margin:0;
border: 0px solid #cccccc;
color: #4f3f3f;
}
select,input {
@ -41,7 +43,7 @@ select,input {
}
div a {
color:#3f3f3f;
color:#4f3f3f;
text-decoration: underline;
}
div a:hover {
@ -50,11 +52,13 @@ div a:hover {
}
.content_title2 {
font-size:1.2em;
color: #4f3f3f;
}
.content_title3 {
font-size:1.5em;
padding-top:1.0em;
color: #4f3f3f;
}
.content1 {
@ -62,21 +66,25 @@ div a:hover {
line-height:1.2;
font-weight:bold;
padding-bottom:0.7em;
color: #4f3f3f;
}
.content2 {
line-height:1.2;
padding-top:1.0em;
max-width:750px;
color: #4f3f3f;
}
.content2_contact {
font-size:1em;
line-height:1.5;
max-width:750px;
color: #4f3f3f;
}
.content2_legende {
line-height:2.0;
max-width:750px;
text-align:left;
color: #4f3f3f;
}
/*

View file

@ -61,9 +61,13 @@ sub tpl(){
#$merchant_id = $1 if($coo =~ /_(\w+)$/);
my $bgcolor1 = "009899";#sharee
my $hgcolor1 = "c0c0c0";#silver
my $fgcolor1 = "ffffff";#white
#my $bgcolor1 = "e2001a";
$bgcolor1 = $dbt->{website}->{$varenv->{syshost}}->{bgcolor1} if($dbt->{website}->{$varenv->{syshost}}->{bgcolor1});
$hgcolor1 = $dbt->{website}->{$varenv->{syshost}}->{hgcolor1} if($dbt->{website}->{$varenv->{syshost}}->{hgcolor1});
$fgcolor1 = $dbt->{website}->{$varenv->{syshost}}->{fgcolor1} if($dbt->{website}->{$varenv->{syshost}}->{fgcolor1});
#$bgcolor1 = $dbt->{merchant_ids}->{$merchant_id}->{bgcolor1} if($merchant_id && $dbt->{merchant_ids}->{$merchant_id}->{bgcolor1});
$bgcolor1 = $dbt->{merchant_ids}->{$varenv->{merchant_id}}->{bgcolor1} if($dbt->{merchant_ids}->{$varenv->{merchant_id}}->{bgcolor1});
@ -103,15 +107,15 @@ if($varenv->{syshost} eq "shareeweb-bayern"){
font-family:Arial,sans-serif;
text-decoration: none;
font-weight: normal;
color: white;
color: #fffffe;
}
ul#AccNavi a:hover {
color: black;
background-color: white;
color: #fffffe;
background-color: #$hgcolor1;
}
ul#AccNavi a:active {
color: white;
background-color: gray;
color: #fffffe;
background-color: #$hgcolor1;
}
</style>\n";
@ -126,10 +130,10 @@ if($varenv->{syshost} eq "shareeweb-bayern"){
my $mstyle_3="";
if($node_meta->{main_id} == $node1->{$id1}->{main_id}){
$mstyle_1 .= "background-color: silver;" if("$node1->{$id1}->{node_name}" eq "$varenv->{accounting_1}");
$mstyle_1_5 .= "background-color: silver;" if("$node1->{$id1}->{node_name}" eq "$varenv->{accounting_1_5}");
$mstyle_2 .= "background-color: silver;" if("$node1->{$id1}->{node_name}" eq "$varenv->{accounting_2}");
$mstyle_3 .= "background-color: silver;" if("$node1->{$id1}->{node_name}" eq "$varenv->{accounting_3}");
$mstyle_1 .= "background-color: #$hgcolor1;" if("$node1->{$id1}->{node_name}" eq "$varenv->{accounting_1}");
$mstyle_1_5 .= "background-color: #$hgcolor1;" if("$node1->{$id1}->{node_name}" eq "$varenv->{accounting_1_5}");
$mstyle_2 .= "background-color: #$hgcolor1;" if("$node1->{$id1}->{node_name}" eq "$varenv->{accounting_2}");
$mstyle_3 .= "background-color: #$hgcolor1;" if("$node1->{$id1}->{node_name}" eq "$varenv->{accounting_3}");
#Konrad & TINK & sharee AGB
if(!$users_sharee->{int14} && !$users_sharee->{int15} && !$users_sharee->{txt30}){
@ -185,15 +189,15 @@ if($varenv->{syshost} eq "shareeweb-bayern"){
font-family:Arial,sans-serif;
text-decoration: none;
font-weight: normal;
color: white;
color: #fffffe;
}
ul#AccNavi a:hover {
color: black;
background-color: white;
color: #fffffe;
background-color: #$hgcolor1;
}
ul#AccNavi a:active {
color: white;
background-color: gray;
color: #fffffe;
background-color: #$hgcolor1;
}
</style>\n";
@ -209,10 +213,10 @@ if($varenv->{syshost} eq "shareeweb-bayern"){
my $mstyle_3="";
if($node_meta->{main_id} == $node1->{$id1}->{main_id}){
$mstyle_1 .= "background-color: silver;" if("$node1->{$id1}->{node_name}" eq "$varenv->{accounting_1}");
$mstyle_1_5 .= "background-color: silver;" if("$node1->{$id1}->{node_name}" eq "$varenv->{accounting_1_5}");
$mstyle_2 .= "background-color: silver;" if("$node1->{$id1}->{node_name}" eq "$varenv->{accounting_2}");
$mstyle_3 .= "background-color: silver;" if("$node1->{$id1}->{node_name}" eq "$varenv->{accounting_3}");
$mstyle_1 .= "background-color: #$hgcolor1;" if("$node1->{$id1}->{node_name}" eq "$varenv->{accounting_1}");
$mstyle_1_5 .= "background-color: #$hgcolor1;" if("$node1->{$id1}->{node_name}" eq "$varenv->{accounting_1_5}");
$mstyle_2 .= "background-color: #$hgcolor1;" if("$node1->{$id1}->{node_name}" eq "$varenv->{accounting_2}");
$mstyle_3 .= "background-color: #$hgcolor1;" if("$node1->{$id1}->{node_name}" eq "$varenv->{accounting_3}");
#Konrad & TINK & sharee AGB
if(!$users_sharee->{int14} && !$users_sharee->{int15} && !$users_sharee->{txt30}){

View file

@ -176,29 +176,6 @@ print <<EOF
</div>
EOF
;
}else{
print <<EOF
<!-- Modal -->
<div class="modal fade" id="sharee_agb" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true" style="text-decoration:underline;">AGB schließen</span><span class="sr-only">Close</span></button>
</div>
<div class="modal-body">
<div class="text-default"><h4>$sharee_agb_text->{ct_name}</h4>$sharee_agb_text->{txt01}</div>
</div>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true" style="text-decoration:underline;">AGB schließen</span><span class="sr-only">Close</span></button>
</div>
</div>
</div>
</div>
EOF
;
}
print <<EOF
<!-- Modal -->
@ -222,6 +199,53 @@ EOF
;
}else{
print <<EOF
<!-- Modal -->
<div class="modal fade" id="sharee_agb" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true" style="text-decoration:underline;">AGB schließen</span><span class="sr-only">Close</span></button>
</div>
<div class="modal-body">
<div class="text-default"><h4>$sharee_agb_text->{ct_name}</h4>$sharee_agb_text->{txt01}</div>
</div>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true" style="text-decoration:underline;">AGB schließen</span><span class="sr-only">Close</span></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">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true" style="text-decoration:underline;">schließen</span><span class="sr-only">Close</span></button>
</div>
<div class="modal-body">
<div class="text-default"><h4>$sharee_privacy_text->{ct_name}</h4>$sharee_privacy_text->{txt01}</div>
</div>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true" style="text-decoration:underline;">schließen</span><span class="sr-only">Close</span></button>
</div>
</div>
</div>
</div>
EOF
;
}
my $debug=0;
$debug=1 if($users_sharee->{c_id} eq $dbt->{copri_conf}->{superu_id} || $dbt->{copri_conf}->{stage} eq "test");
my $debug_message = "";