mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-05-13 23:26:29 +02:00
minor refactoring some buttons and styles
This commit is contained in:
parent
ad478aa3ee
commit
003df87598
23 changed files with 64 additions and 187 deletions
|
@ -1192,7 +1192,8 @@ sub booking_update(){
|
|||
c_id => "$record_pos->{c_id}",
|
||||
};
|
||||
$record_pos = $dbt->fetch_tablerecord($dbh,$booking_pos);
|
||||
$bw->log("smartlock lock_state $lock_state | int10 $record_pos->{int10} | int20 $record_pos->{int20}",$booking_values,"");
|
||||
my $if_gps = $gps_data->{gps} || "";
|
||||
$bw->log("smartlock lock_state $bike $lock_state | int10 $record_pos->{int10} | int20 $record_pos->{int20} | if_gps $if_gps",$booking_values,"");
|
||||
}
|
||||
|
||||
|
||||
|
@ -1468,7 +1469,6 @@ sub booking_update(){
|
|||
}
|
||||
|
||||
my $co2saving = "";
|
||||
$booking->{int26} = 10 if(!$booking->{int26} && ($auth->{c_id} == 1842 || $auth->{c_id} == 1843 || $auth->{c_id} == 5781 || $auth->{c_id} == 11765 || $auth->{c_id} == 38883));#10 km test
|
||||
if($booking->{int26}){
|
||||
$co2saving = "Einsparung: ";
|
||||
my $co2diff = $pri->co2calc($booking);
|
||||
|
@ -2003,12 +2003,11 @@ sub bikes_all(){
|
|||
keyfield => "barcode",#2018-02-21 changed to bike id
|
||||
template_id => "205",#Leihrad_liste
|
||||
};
|
||||
#int10 => "!=::3",#changed to select also occupied bikes in servicetool
|
||||
|
||||
my ($bike_group,$bike_node,$user_tour,$tariff_content,$adrtarif_hash) = $self->fetch_tariff($varenv->{dbname},$auth,$q->param('authcookie'));
|
||||
my $main_ids = join(",",@{$bike_node});
|
||||
$main_ids =~ s/[a-z_]+//ig;
|
||||
$pref = { %$pref, main_id => "IN::($main_ids)" };
|
||||
$pref->{main_id} = "IN::($main_ids)";
|
||||
|
||||
my $station_id = "";
|
||||
my $bike_id = "";
|
||||
|
@ -2016,7 +2015,10 @@ sub bikes_all(){
|
|||
$station_id = $1 if($q->param('station') =~ /(\d+)/);
|
||||
$bike_id = $1 if($q->param('bike') && $q->param('bike') =~ /(\d+)/);
|
||||
$pref->{int04} = "=::$station_id" if(looks_like_number($station_id));
|
||||
$pref->{ barcode} = "=::$bike_id" if(looks_like_number($bike_id));
|
||||
if(looks_like_number($bike_id)){
|
||||
$pref->{ barcode} = "=::$bike_id";
|
||||
$pref->{int10} = "!=::3";#2022-12-02 do not select occupied bikes in servicetool by direct bike-select
|
||||
}
|
||||
|
||||
my $record = {};
|
||||
#on servicetool only stations on user_tour
|
||||
|
|
|
@ -260,8 +260,7 @@ sub sig_available {
|
|||
$response_out->{$bike}->{rental_description}->{name} = "$tariff_content->{$tid}->{ct_name}";
|
||||
$response_out->{$bike}->{rental_description}->{id} = "$tariff_content->{$tid}->{barcode}";
|
||||
$response_out->{$bike}->{rental_description}->{reserve_timerange} = "30";
|
||||
$response_out->{$bike}->{rental_description}->{rental_info}->{1} = ["Tracking","Ich stimme der Speicherung (Tracking) meiner Fahrstrecke zwecks wissenschaftlicher Auswertung und Berechnung der CO2-Einsparung zu!"];#TODO if($resp->{gps_tracker_id});
|
||||
#$response_out->{$bike}->{rental_description}->{rental_info}->{2} = ["AGB","Mit der Mietrad Anmietung wird folgender Betreiber <a href='$varenv->{wwwhost}/site/agb.html' target='_blank'>AGB</a> zugestimmt (als Demo sharee AGB)."] if($ctadr->{c_id} && ($ctadr->{c_id} == 1842 || $ctadr->{c_id} == 1843 || $ctadr->{c_id} == 5781 || $ctadr->{c_id} == 11765 || $ctadr->{c_id} == 38883));
|
||||
$response_out->{$bike}->{rental_description}->{rental_info}->{1} = ["Tracking","Ich stimme der Speicherung (Tracking) meiner Fahrstrecke zwecks wissenschaftlicher Auswertung und Berechnung der CO2-Einsparung zu!"];# if($resp->{gps_tracker_id});
|
||||
|
||||
my $i = 0;
|
||||
foreach my $td (sort keys (%$td_template)){
|
||||
|
|
|
@ -75,7 +75,7 @@ print<<EOF
|
|||
EOF
|
||||
;
|
||||
my $debug = "";
|
||||
$debug = $feedb->{debug} if($users_dms->{u_id} eq "1842");
|
||||
#$debug = $feedb->{debug};
|
||||
|
||||
if($feedb->{message} =~ /(failure::.*)/){
|
||||
$return = $1;
|
||||
|
|
|
@ -568,19 +568,6 @@ sub singlesubmit1(){
|
|||
return $button;
|
||||
}
|
||||
|
||||
# with counter field
|
||||
sub singlesubmit6(){
|
||||
my $self = shift;
|
||||
my ($function,$b_name,$counter) = @_;
|
||||
%ib = &ibuttons("","$counter");
|
||||
my ($key,$val,$ibv);
|
||||
while (($key,$val) = each(%ib)) {
|
||||
#print "$val if($b_name eq $key) <br>";
|
||||
$ibv = $val if($b_name eq $key);
|
||||
}
|
||||
my $button = "<input type='submit' class='ebutton' name='$function' value='$ibv'>";
|
||||
return $button;
|
||||
}
|
||||
|
||||
sub singlesubmit3(){
|
||||
my $self = shift;
|
||||
|
@ -649,136 +636,52 @@ sub singlesubmit7(){
|
|||
return $button;
|
||||
}
|
||||
|
||||
#without submit
|
||||
sub singlesubmit17(){
|
||||
my $self = shift;
|
||||
my ($function,$b_name,$title,$set_style,$jscript,$ebutton) = @_;
|
||||
$ebutton = "ebutton" if(!$ebutton);
|
||||
my ($b_img,$a_key);
|
||||
$b_img = "Barcode" if("$b_name" =~ /barcode/);
|
||||
$b_img = "Copy" if("$b_name" =~ /copy/);
|
||||
$b_img = "Relate" if("$b_name" =~ /relate/);
|
||||
$b_img = "Move" if("$b_name" =~ /move_/);
|
||||
$b_img = "Delete" if("$b_name" =~ /delete|remove/);
|
||||
$b_img = "Delete" if("$b_name" =~ /delete_media/);
|
||||
$b_img = "Save" if("$b_name" =~ /save/);
|
||||
$a_key = "y" if("$b_name" =~ /save/);
|
||||
$b_img = "Text Save" if("$b_name" =~ /save_text/);
|
||||
$b_img = "Delete All" if("$b_name" =~ /delete_all/);
|
||||
$b_img = "Search" if("$b_name" =~ /search/);
|
||||
$b_img = "New" if("$b_name" =~ /^new/);
|
||||
$b_img = "Open" if("$b_name" eq "open");
|
||||
$b_img = "Close" if("$b_name" eq "close");
|
||||
$b_img = "Print" if("$b_name" eq "print_sheet");
|
||||
$b_img = "Change Login" if("$b_name" eq "change_login");
|
||||
$b_img = "Senden" if("$b_name" =~ /send_newsletter/);
|
||||
$b_img = "XLS Export" if("$b_name" =~ /XLSout/);
|
||||
$b_img = "Save & Close" if("$b_name" =~ /_and_close/);
|
||||
$b_img = "Save & Close & Print " if("$b_name" =~ /_print_and_close/);
|
||||
$b_img = "Print" if("$b_name" =~ /_print_only/);
|
||||
$b_img = "Kunde" if("$b_name" =~ /client/);
|
||||
$b_img = "Artikel" if("$b_name" =~ /part/);
|
||||
|
||||
my $button = "<span style='width:25px;height=15px;'> </span>";
|
||||
if($b_name){
|
||||
$button = "<div onClick='javascript:$jscript' class='$ebutton' style='$set_style' name='$function' value='$b_name' title='$title'>$b_img</div>";
|
||||
}
|
||||
return $button;
|
||||
}
|
||||
|
||||
# Grafic Submit Buttons
|
||||
sub singlesubmit2glyph(){
|
||||
my $self = shift;
|
||||
my ($function,$b_name,$title,$set_style,$jscript) = @_;
|
||||
my $b_img; my $a_key;
|
||||
$b_img = "submit.png" if("$b_name" =~ /post_email/);
|
||||
$b_img = "actions/view-barcode.png" if("$b_name" =~ /barcode/);
|
||||
$b_img = "actions/edit-copy.png" if("$b_name" =~ /copy|relate/);
|
||||
$b_img = "actions/edit-paste.png" if("$b_name" =~ /move_/);
|
||||
$b_img = "glyphicons/glyphicons-151-edit.png" if("$b_name" =~ /delete|remove/);
|
||||
$b_img = "actions/edit-delete.png" if("$b_name" =~ /delete_media/);
|
||||
$b_img = "actions/document-save.png" if("$b_name" =~ /save/);
|
||||
my $a_key = "";
|
||||
$a_key = "y" if("$b_name" =~ /save/);
|
||||
$b_img = "edittrash.png" if("$b_name" =~ /delete_all/);
|
||||
$b_img = "search.png" if("$b_name" =~ /search/);
|
||||
$b_img = "glyphicons/glyphicons-151-edit.png" if("$b_name" =~ /_done|_contenttverpos/);
|
||||
$b_img = "glyphicons/glyphicons-703-file-plus.png" if("$b_name" =~ /new/);
|
||||
$b_img = "glyphicons/glyphicons-151-edit.png" if("$b_name" =~ /open|client/);
|
||||
$b_img = "fileclose.png" if("$b_name" eq "close");
|
||||
$b_img = "actions/view-media-artist.png" if("$b_name" eq "change_login");
|
||||
my $b_img = "";
|
||||
$b_img = "<span class='bi bi-check-circle' style='font-size:1.5em;'</span>" if("$b_name" =~ /save/);
|
||||
$b_img = "<span class='bi bi-x-circle' style='font-size:1.5em;'</span>" if("$b_name" =~ /delete|remove/);
|
||||
$b_img = "<span class='bi bi-file-earmark-plus-fill' style='font-size:1.5em;'</span>" if("$b_name" =~ /new/);
|
||||
$b_img = "<span class='bi bi-file-earmark-text-fill' style='font-size:1.5em;'</span>" if("$b_name" =~ /open|client/);
|
||||
my $button = "<span style='width:25px;height=15px;'> </span>";
|
||||
if($b_name){
|
||||
if("$b_name" =~ /delete/ && "$b_name" !~ /delete_verposdate/){
|
||||
if("$b_name" =~ /delete/){
|
||||
if($jscript){
|
||||
$button = "<button type='submit' onClick=\"javascript:$jscript; return confirm('Wirklich löschen?')\" style='width:25px;height=15px; border: 0px solid;$set_style' name='$function' value='$b_name' title='$title'><img src='$varenv{metahost}/$b_img' style='height:18px;' /></button>";
|
||||
$button = "<button type='submit' onClick=\"javascript:$jscript; return confirm('Wirklich löschen?')\" style='width:25px;height=15px; border: 0px solid;$set_style' name='$function' value='$b_name' title='$title'>$b_img</button>";
|
||||
}else{
|
||||
$button = "<button type='submit' onClick=\"return confirm('Wirklich löschen?')\" style='width:25px;height=15px; border: 0px solid;$set_style' name='$function' value='$b_name' title='$title'><img src='$varenv{metahost}/$b_img' style='height:18px;' /></button>";
|
||||
$button = "<button type='submit' onClick=\"return confirm('Wirklich löschen?')\" style='width:25px;height=15px; border: 0px solid;$set_style' name='$function' value='$b_name' title='$title'>$b_img</button>";
|
||||
}
|
||||
}else{
|
||||
$button = "<button type='submit' style='border: 0px solid;$set_style' name='$function' value='$b_name' title='$title' accesskey='$a_key'><img src='$varenv{metahost}/$b_img' style='height:18px;' /></button>";
|
||||
$button = "<button type='submit' style='border: 0px solid;$set_style' name='$function' value='$b_name' title='$title' accesskey='$a_key'>$b_img</button>";
|
||||
}
|
||||
}
|
||||
return $button;
|
||||
}
|
||||
|
||||
# Grafic Submit Buttons
|
||||
#Submit Buttons
|
||||
sub singlesubmit2(){
|
||||
my $self = shift;
|
||||
my ($function,$b_name,$title,$set_style,$jscript) = @_;
|
||||
my $b_img; my $a_key;
|
||||
$b_img = "glyphicons-446-floppy-remove.png" if("$b_name" =~ /delete|remove/);
|
||||
$b_img = "glyphicons-445-floppy-saved.png" if("$b_name" =~ /save/);
|
||||
my $a_key = "";
|
||||
$a_key = "y" if("$b_name" =~ /save/);
|
||||
my $button = "<span style='width:25px;height=15px;'> </span>";
|
||||
if($b_name){
|
||||
if("$b_name" =~ /delete/ && "$b_name" !~ /delete_verposdate/){
|
||||
if("$b_name" =~ /delete/){
|
||||
if($jscript){
|
||||
$button = "<button type='submit' onClick=\"javascript:$jscript; return confirm('Wirklich löschen?')\" style='width:25px;height=15px; border: 0px solid;$set_style' name='$function' value='$b_name' title='$title'><img src='$varenv{metahost}/glyphicons/$b_img' style='height:18px;' /></button>";
|
||||
$button = "<button type='submit' onClick=\"javascript:$jscript; return confirm('Wirklich löschen?')\" style='width:25px;height=15px; border: 0px solid;$set_style' name='$function' value='$b_name' title='$title'></button>";
|
||||
}else{
|
||||
$button = "<button type='submit' onClick=\"return confirm('Wirklich löschen?')\" style='width:25px;height=15px; border: 0px solid;$set_style' name='$function' value='$b_name' title='$title'><img src='$varenv{metahost}/glyphicons/$b_img' style='height:18px;' /></button>";
|
||||
$button = "<button type='submit' onClick=\"return confirm('Wirklich löschen?')\" style='width:25px;height=15px; border: 0px solid;$set_style' name='$function' value='$b_name' title='$title'></button>";
|
||||
}
|
||||
}else{
|
||||
$button = "<button type='submit' style='width:25px;height=15px; border: 0px solid;$set_style' name='$function' value='$b_name' title='$title' accesskey='$a_key'><img src='$varenv{metahost}/glyphicons/$b_img' style='height:18px;' /></button>";
|
||||
$button = "<button type='submit' style='width:25px;height=15px; border: 0px solid;$set_style' name='$function' value='$b_name' title='$title' accesskey='$a_key'></button>";
|
||||
}
|
||||
}
|
||||
return $button;
|
||||
}
|
||||
|
||||
#with onclick
|
||||
sub singlesubmit4(){
|
||||
my $self = shift;
|
||||
my ($function,$b_name,$title,$jscript,$url) = @_;
|
||||
my $b_img;
|
||||
$b_img = "search.png";# if("$title" =~ /suchen/);
|
||||
my $button = "<input type='image' src='/img/$b_img' class='ebutton2' name='$function' value='$b_name' onClick='javascript:$jscript()' title='$title'>";
|
||||
return $button;
|
||||
}
|
||||
|
||||
#with onclick
|
||||
sub singlesubmit5(){
|
||||
my $self = shift;
|
||||
my ($function,$b_name,$jscript,$url) = @_;
|
||||
my ($key,$val,$ibv);
|
||||
while (($key,$val) = each(%ib)) {
|
||||
$ibv = $val if($b_name eq $key);
|
||||
}
|
||||
my $button = "<input type='submit' class='ebutton' name='$function' value='$ibv' onClick='javascript:$jscript(this.form,\"$url\")'>";
|
||||
return $button;
|
||||
}
|
||||
|
||||
#with onclick script
|
||||
sub singlesubmit9(){
|
||||
my $self = shift;
|
||||
my ($function,$b_name,$main_id,$class,$style,$owner) = @_;
|
||||
my $debug = $main_id if($owner && $owner eq $varenv{superu_id});
|
||||
my $button = "<input type='button' class='$class' style='$style' name='$function' value='$b_name' title='$debug' onclick='javascript:history.back()'>\n";
|
||||
return $button;
|
||||
}
|
||||
|
||||
sub singlesubmit8(){
|
||||
my $self = shift;
|
||||
my ($function,$b_name,$jscript,$url) = @_;
|
||||
my $button = "<button type='submit' onClick='javascript:$jscript' class='ebutton' name='$function' value='$b_name'>$b_name</button>";
|
||||
return $button;
|
||||
}
|
||||
1;
|
||||
|
|
|
@ -724,7 +724,6 @@ sub handler {
|
|||
|
||||
|
||||
my $url = "$varenv{wwwhost}/$path";
|
||||
#my $onload="onLoad();";
|
||||
my $onload="";
|
||||
|
||||
my $local_style = "$varenv{metahost}/$dbt->{shareeapp_conf}->{local_style}";
|
||||
|
@ -734,21 +733,12 @@ sub handler {
|
|||
my $js_bootstrap = "$varenv{metahost}/$dbt->{shareeapp_conf}->{js_bootstrap}";
|
||||
my $style_bootstrap = "$varenv{metahost}/$dbt->{shareeapp_conf}->{style_bootstrap}";
|
||||
my $style_bootstrap_icons = "$varenv{metahost}/$dbt->{copri_conf}->{style_bootstrap_icons}";
|
||||
my $jquery_resize = "";
|
||||
#2022-03-30 global set bootstrap with bayern standalone
|
||||
#if($varenv{syshost} eq "shareeweb-bayern"){
|
||||
# $js_bootstrap = "$varenv{metahost}/js/bootstrap-5.1.3-dist/js/bootstrap.min.js";
|
||||
# $style_bootstrap = "$varenv{metahost}/js/bootstrap-5.1.3-dist/css/bootstrap.css";
|
||||
#}else{
|
||||
# $jquery = "$varenv{metahost}/js/jquery-1.9.1.js";#bootstrap 3 needs jquery
|
||||
#}
|
||||
|
||||
if($varenv{wwwhost} =~ /shareedms/){
|
||||
$local_style = "$varenv{metahost}/$dbt->{shareedms_conf}->{local_style}";
|
||||
$jquery = "$varenv{metahost}/$dbt->{shareedms_conf}->{jquery}";
|
||||
$jquery_ui = "$varenv{metahost}/$dbt->{shareedms_conf}->{jquery_ui}";
|
||||
$style_jquery_ui = "$varenv{metahost}/$dbt->{shareedms_conf}->{style_jquery_ui}";
|
||||
$jquery_resize = "$varenv{metahost}/$dbt->{shareedms_conf}->{jquery_resize}";
|
||||
$js_bootstrap = "$varenv{metahost}/$dbt->{shareedms_conf}->{js_bootstrap}";
|
||||
$style_bootstrap = "$varenv{metahost}/$dbt->{shareedms_conf}->{style_bootstrap}";
|
||||
$dyn_js = "\$(function() {
|
||||
|
@ -797,8 +787,6 @@ sub handler {
|
|||
-src=>"$jquery"},
|
||||
{-language=>'JAVASCRIPT',
|
||||
-src=>"$jquery_ui"},
|
||||
{-language=>'JAVASCRIPT',
|
||||
-src=>"$jquery_resize"},
|
||||
{-language=>'JAVASCRIPT',
|
||||
-src=>"$varenv{metahost}/$dbt->{copri_conf}->{jsscript}"},
|
||||
{-language=>'JAVASCRIPT',
|
||||
|
|
|
@ -38,18 +38,10 @@ sub mobox(){
|
|||
my $lang = "de";
|
||||
my $dbh = "";
|
||||
|
||||
#TODO do it BrowserTab save
|
||||
#my $kind_of_trans = $R::kind_of_trans || $users->{kind_of_trans} || "";
|
||||
#my $c_id4trans = $R::c_id4trans || $users->{c_id4trans} || "";
|
||||
#my $tpl_id4trans = $R::tpl_id4trans || $users->{tpl_id4trans} || "";
|
||||
#my $kind_of_trans = $users_dms->{kind_of_trans} || "";
|
||||
#my $c_id4trans = $users_dms->{c_id4trans} || "";
|
||||
#my $tpl_id4trans = $users_dms->{tpl_id4trans} || "";
|
||||
|
||||
if($users_dms->{kind_of_trans} && looks_like_number($users_dms->{c_id4trans}) && looks_like_number($users_dms->{tpl_id4trans})){
|
||||
my $width = $node_meta->{tpl_width} || "990";
|
||||
my $bg_color = "white";
|
||||
my $bg_color2 = $varenv{term_active_color} || "";
|
||||
my $bg_color2 = "#f7ae37" || "";
|
||||
|
||||
my $table = "contenttrans";
|
||||
my $ctt = $db->get_content1($table,$users_dms->{c_id4trans});
|
||||
|
|
|
@ -296,8 +296,8 @@ sub save_contenttranspos {
|
|||
|
||||
}
|
||||
}elsif($R::int02 && $R::int03){
|
||||
$R::int02 =~ s/\./\,/ if($R::int02 =~ /\,/);
|
||||
$R::int03 =~ s/\./\,/ if($R::int03 =~ /\,/);
|
||||
$R::int02 =~ s/,/\./ if($R::int02 =~ /\,/);
|
||||
$R::int03 =~ s/,/\./ if($R::int03 =~ /\,/);
|
||||
$R::txt01 = $q->escapeHTML($R::txt01) if($R::txt01);
|
||||
$R::txt23 = $q->escapeHTML($R::txt23) if($R::txt23);
|
||||
if($c_id && looks_like_number($R::int02) && looks_like_number($R::int03)){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue