From 1503e521964e26396224a32e6a189d7036204b1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rainer=20G=C3=BCmpelein?= Date: Thu, 24 Mar 2022 07:25:20 +0100 Subject: [PATCH] web-bayern contrast methods --- copri4/main/js/mobile_script.js | 44 ++++++++++++ copri4/main/src/Mod/DBtank.pm | 5 +- copri4/main/src/scripts/sms_message.pl | 1 + .../css/local_style2022-03-20.css | 10 ++- .../src/Tpl/AccountSubmenu.pm | 40 ++++++----- copri4/shareeapp-operator/src/Tpl/FormEdit.pm | 70 +++++++++++++------ 6 files changed, 127 insertions(+), 43 deletions(-) diff --git a/copri4/main/js/mobile_script.js b/copri4/main/js/mobile_script.js index c66f050..817004d 100644 --- a/copri4/main/js/mobile_script.js +++ b/copri4/main/js/mobile_script.js @@ -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") { diff --git a/copri4/main/src/Mod/DBtank.pm b/copri4/main/src/Mod/DBtank.pm index 27476b5..de0022a 100755 --- a/copri4/main/src/Mod/DBtank.pm +++ b/copri4/main/src/Mod/DBtank.pm @@ -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"); } diff --git a/copri4/main/src/scripts/sms_message.pl b/copri4/main/src/scripts/sms_message.pl index d66b9d9..70a3c1d 100755 --- a/copri4/main/src/scripts/sms_message.pl +++ b/copri4/main/src/scripts/sms_message.pl @@ -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 = { diff --git a/copri4/shareeapp-operator/css/local_style2022-03-20.css b/copri4/shareeapp-operator/css/local_style2022-03-20.css index c8d66f7..945fc23 100755 --- a/copri4/shareeapp-operator/css/local_style2022-03-20.css +++ b/copri4/shareeapp-operator/css/local_style2022-03-20.css @@ -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; } /* diff --git a/copri4/shareeapp-operator/src/Tpl/AccountSubmenu.pm b/copri4/shareeapp-operator/src/Tpl/AccountSubmenu.pm index d33a20e..3116b0e 100755 --- a/copri4/shareeapp-operator/src/Tpl/AccountSubmenu.pm +++ b/copri4/shareeapp-operator/src/Tpl/AccountSubmenu.pm @@ -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; } \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; } \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}){ diff --git a/copri4/shareeapp-operator/src/Tpl/FormEdit.pm b/copri4/shareeapp-operator/src/Tpl/FormEdit.pm index 04e4b5d..d1444e0 100755 --- a/copri4/shareeapp-operator/src/Tpl/FormEdit.pm +++ b/copri4/shareeapp-operator/src/Tpl/FormEdit.pm @@ -176,29 +176,6 @@ print < EOF ; -}else{ -print < - - -EOF -; - -} print < @@ -222,6 +199,53 @@ EOF ; +}else{ + +print < + + +EOF +; + +print < + +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 = "";