mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-05-10 14:06:26 +02:00
external jquery and bootstrap
This commit is contained in:
parent
003df87598
commit
58819fd615
28 changed files with 109 additions and 135 deletions
|
@ -1 +0,0 @@
|
|||
/etc/shareeconf/bootstrap-icons-1.8.1
|
1
copri4/main/external
Symbolic link
1
copri4/main/external
Symbolic link
|
@ -0,0 +1 @@
|
|||
/var/www/external
|
|
@ -1 +0,0 @@
|
|||
/etc/shareeconf/bootstrap-5.0.2-dist
|
|
@ -1 +0,0 @@
|
|||
/etc/shareeconf/bootstrap-5.1.3-dist
|
1
copri4/main/js/jquery-3.3.1.min.js
vendored
1
copri4/main/js/jquery-3.3.1.min.js
vendored
|
@ -1 +0,0 @@
|
|||
/etc/shareeconf/jquery-3.3.1.min.js
|
|
@ -1 +0,0 @@
|
|||
/etc/shareeconf/jquery-ui-1.12.1
|
|
@ -87,12 +87,14 @@ sub station_information {
|
|||
|
||||
my $rest_stations = "request=stations_available&project=$project&authcookie=$authcookie->{authcookie}";
|
||||
my $gbfs_resp = {};
|
||||
my @gbfs_stations = ();
|
||||
my $stations_json = fetch_primary_json("",$uri_request,$rest_stations);
|
||||
#decode json to hash
|
||||
my $response_stations = decode_json($stations_json);
|
||||
my @gbfs_stations = ();
|
||||
eval {
|
||||
my $response_stations = {};
|
||||
$response_stations = decode_json($stations_json);
|
||||
|
||||
foreach my $station (keys (%{ $response_stations->{shareejson}->{stations} })) {
|
||||
foreach my $station (keys (%{ $response_stations->{shareejson}->{stations} })) {
|
||||
#print Dumper($response_stations->{shareejson}->{stations}->{$station});
|
||||
my %gbfs_station = ();
|
||||
$gbfs_station{$station}{station_id} = $response_stations->{shareejson}->{stations}->{$station}->{station};
|
||||
|
@ -102,9 +104,10 @@ sub station_information {
|
|||
$gbfs_station{$station}{lon} = $response_stations->{shareejson}->{stations}->{$station}->{gps}->{longitude};
|
||||
#$gbfs_station{$station}{is_charging_station} = 1 if(grep(/300102/, @{$response_stations->{shareejson}->{stations}->{$station}->{station_group}}));#E-L
|
||||
push (@gbfs_stations, $gbfs_station{$station});
|
||||
}
|
||||
}
|
||||
};
|
||||
my $last_updated = time();
|
||||
$gbfs_resp = {
|
||||
$gbfs_resp = {
|
||||
"last_updated" => $last_updated,
|
||||
"ttl" => 10,
|
||||
"version" => "2.2",
|
||||
|
@ -112,7 +115,10 @@ sub station_information {
|
|||
"stations" => [ @gbfs_stations ]
|
||||
}
|
||||
};
|
||||
|
||||
if ($@){
|
||||
$bw->log("Failure, GBFSout station_information not valid","","");
|
||||
warn $@;
|
||||
}
|
||||
my $jrout = $json->pretty->encode($gbfs_resp);
|
||||
print $jrout;
|
||||
|
||||
|
@ -131,12 +137,14 @@ sub vehicle_status {
|
|||
my $rest_bikes = "request=bikes_available&project=$project&authcookie=$authcookie->{authcookie}";
|
||||
|
||||
my $gbfs_resp = {};
|
||||
my @gbfs_bikes = ();
|
||||
my $bikes_json = fetch_primary_json("",$uri_request,$rest_bikes);
|
||||
#decode json to hash
|
||||
my $response_bikes = decode_json($bikes_json);
|
||||
my @gbfs_bikes = ();
|
||||
eval {
|
||||
my $response_bikes = {};
|
||||
$response_bikes = decode_json($bikes_json);
|
||||
|
||||
foreach my $bike (keys (%{ $response_bikes->{shareejson}->{bikes} })) {
|
||||
foreach my $bike (keys (%{ $response_bikes->{shareejson}->{bikes} })) {
|
||||
#if($response_bikes->{shareejson}->{bikes}->{$bike}->{station} eq "FR105"){
|
||||
my %gbfs_bike = ();
|
||||
$gbfs_bike{$bike}{station_id} = $response_bikes->{shareejson}->{bikes}->{$bike}->{station};
|
||||
|
@ -147,7 +155,7 @@ sub vehicle_status {
|
|||
#$gbfs_bike{$bike}{is_disabled} = 0;
|
||||
push (@gbfs_bikes, $gbfs_bike{$bike});
|
||||
#}
|
||||
}
|
||||
}
|
||||
|
||||
#{
|
||||
#"vehicle_id":"987fd100-b822-4347-86a4-b3eef8ca8b53",
|
||||
|
@ -159,7 +167,7 @@ sub vehicle_status {
|
|||
#"station_id":"86",
|
||||
#"pricing_plan_id":"plan3"
|
||||
#}
|
||||
|
||||
};
|
||||
my $last_updated = time();
|
||||
$gbfs_resp = {
|
||||
"last_updated" => $last_updated,
|
||||
|
@ -169,6 +177,10 @@ sub vehicle_status {
|
|||
"vehicles" => [ @gbfs_bikes ]
|
||||
}
|
||||
};
|
||||
if ($@){
|
||||
$bw->log("Failure, GBFSout vehicle_status not valid","","");
|
||||
warn $@;
|
||||
}
|
||||
|
||||
my $jrout = $json->pretty->encode($gbfs_resp);
|
||||
print $jrout;
|
||||
|
@ -194,6 +206,8 @@ sub fetch_primary_json {
|
|||
|
||||
#Pass request to the user agent and get a response back
|
||||
my $res = $ua->request($req);
|
||||
#SSL certificate must be valid
|
||||
#print Dumper($res);
|
||||
# Check the outcome of the response
|
||||
if ($res->is_success) {
|
||||
#print $res->content;
|
||||
|
|
|
@ -693,58 +693,7 @@ sub maininit(){
|
|||
my $ctrel_ck;
|
||||
$ctrel_ck = $db->get_ctrel($table,$R::set_main_id,$lang,"",$R::set_content_id,$R::template_id);
|
||||
|
||||
if($varenv{orga} eq "dms" && $varenv{wwwhost} =~ /wogedms|fsdm/){
|
||||
my @set_main_ids = ();
|
||||
my $set_main_ids = "";
|
||||
foreach(@keywords){
|
||||
if($_ =~ /set_main_id/){
|
||||
@set_main_ids = $q->param($_);
|
||||
}
|
||||
}
|
||||
$set_main_ids = join(',',@set_main_ids);
|
||||
|
||||
my $ct4rel_ck = $db->collect_ct4rel("$table","","$lang","","","","","$R::template_id","","","$R::set_content_id","main_id");
|
||||
my $ctrel;
|
||||
foreach(@set_main_ids){
|
||||
if($_ != $ct4rel_ck->{$_}->{main_id}){
|
||||
#print "insert: $table,$_,$lang,$R::set_content_id,$R::template_id,$foreign_key<br>";
|
||||
$return_rel_id = $db->insert_relationlist($table,$_,$lang,$R::set_content_id,$R::template_id,$foreign_key) if($R::rel_edit =~ /relate_/ && $_);
|
||||
$ctrel_ck = $db->get_ctrel($table,$_,$lang,"",$R::set_content_id,$R::template_id);
|
||||
|
||||
if($ctrel_ck->{int02} == 1 && $return_rel_id && $R::template_id eq "202"){
|
||||
`sudo $varenv{basedir}/src/scripts/mailman_member.pl add $return_rel_id $varenv{syshost}`;
|
||||
}
|
||||
if( -d "$varenv{data}/$R::main_id/$R::set_content_id" ){
|
||||
#print "$varenv{data}/$R::main_id/$R::set_content_id --> $varenv{data}/$_/$R::set_content_id";
|
||||
rcopy("$varenv{data}/$R::main_id/$R::set_content_id","$varenv{data}/$_/$R::set_content_id");
|
||||
rcopy("$varenv{data}/$R::main_id-thumb/$R::set_content_id","$varenv{data}/$_-thumb/$R::set_content_id");
|
||||
rcopy("$varenv{data}/$R::main_id-resize/$R::set_content_id","$varenv{data}/$_-resize/$R::set_content_id");
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach my $id (keys(%$ct4rel_ck)){
|
||||
if($ct4rel_ck->{$id}->{main_id} && $set_main_ids !~ /$ct4rel_ck->{$id}->{main_id}/){
|
||||
#print "delete: $ct4rel_ck->{$id}->{main_id},$lang,$ct4rel_ck->{$id}->{rel_id}<br>";
|
||||
if($R::template_id eq "202"){
|
||||
`sudo $varenv{basedir}/src/scripts/mailman_member.pl remove $ct4rel_ck->{$id}->{rel_id} $varenv{syshost}`;
|
||||
}
|
||||
if($R::rel_edit =~ /relate_/ && $ct4rel_ck->{$id}->{c_id}){
|
||||
$db->delete_relation($ct4rel_ck->{$id}->{main_id},$lang,$ct4rel_ck->{$id}->{rel_id});
|
||||
if( -d "$varenv{data}/$ct4rel_ck->{$id}->{main_id}/$ct4rel_ck->{$id}->{c_id}" ){
|
||||
remove_tree("$varenv{data}/$ct4rel_ck->{$id}->{main_id}/$ct4rel_ck->{$id}->{c_id}");
|
||||
remove_tree("$varenv{data}/$ct4rel_ck->{$id}->{main_id}-thumb/$ct4rel_ck->{$id}->{c_id}");
|
||||
remove_tree("$varenv{data}/$ct4rel_ck->{$id}->{main_id}-resize/$ct4rel_ck->{$id}->{c_id}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if($users_dms->{mandant_id} && $users_dms->{mandant_id} < "200000"){
|
||||
my $uri_path = $dbt->recurse_node($dbh,$R::set_main_id);
|
||||
print redirect("$varenv{wwwhost}/$uri_path?exit_box2=1\&rel_id=$return_rel_id\&return=$i_rows-$u_rows-$d_rows");
|
||||
exit 0;
|
||||
}
|
||||
|
||||
}elsif($varenv{orga} eq "dms"){
|
||||
if($varenv{orga} eq "dms"){
|
||||
my @ck_ids = $R::rel_id;
|
||||
@ck_ids = split(/\s/,$R::ck_ids) if($R::ck_ids);
|
||||
foreach(@ck_ids){
|
||||
|
@ -1039,9 +988,6 @@ sub maininit(){
|
|||
|
||||
#delete Only relation ... without content
|
||||
if("$ib_key" eq "delete_rel4ct" && $R::main_id && $R::rel_id){
|
||||
if($varenv{wwwhost} =~ /wogedms|fsdm/){
|
||||
`sudo $varenv{basedir}/src/scripts/mailman_member.pl remove $R::rel_id $varenv{syshost}` if($R::rel_id);
|
||||
}
|
||||
$d_rows += $db->delete_relation($R::main_id,$lang,$R::rel_id);
|
||||
|
||||
$db->cleanup_users($users_dms->{u_id}) if($users_dms->{u_id});
|
||||
|
|
|
@ -451,7 +451,9 @@ sub save_account(){
|
|||
$u_rows = $dbt->update_one($dbh,$update_primary,"$_=$valxx");
|
||||
}elsif($_ eq "ct_name" && $R::base_edit){
|
||||
$u_rows = $dbt->update_one($dbh,$update_primary,"$_='$valxx'");
|
||||
#}elsif($_ !~ /ct_name|txt22|txt23|txt15/){
|
||||
}elsif($_ =~ /txt22|txt23/){
|
||||
$valxx =~ s/\s//g;
|
||||
$u_rows = $dbt->update_one($dbh,$update_primary,"$_='$valxx'");
|
||||
}elsif($_ !~ /ct_name|txt15/){
|
||||
$u_rows = $dbt->update_one($dbh,$update_primary,"$_='$valxx'");
|
||||
}
|
||||
|
|
|
@ -353,7 +353,7 @@ EOF
|
|||
}
|
||||
|
||||
print "<td class='content1_cms' style='$occupied_style;'\n>";
|
||||
print $q->textarea(-class=>'autos',-style=>"border: 1px solid silver;",-name=>"$key",-default=>"$cttpos->{$key}", -override=>'1',-rows=>"3",-cols=>50),"\n";
|
||||
print $q->textarea(-class=>'etxt',-style=>"border: 1px solid silver;",-name=>"$key",-default=>"$cttpos->{$key}", -override=>'1',-rows=>"5",-cols=>50),"\n";
|
||||
|
||||
|
||||
print "</td>\n";
|
||||
|
@ -764,10 +764,10 @@ EOF
|
|||
}
|
||||
}
|
||||
elsif($key =~ /txt/ && $size =~ /area$/){
|
||||
my $h= 1;# if($size =~ /area(\d+)/);
|
||||
my $h= 5;# if($size =~ /area(\d+)/);
|
||||
print $q->Tr();
|
||||
print $q->td({-class=>'left_italic_cms',-colspan=>1},"$des"),"\n";
|
||||
print $q->td({-class=>'content1_cms', -colspan=>'3'},$q->textarea(-class=>"autos", -style=>'border: 1px solid silver;',-rows=>"$h",-cols=>'35em;', -name=>"$key", -override=>'1',-default=>"$ctrel->{$key}")),"\n";
|
||||
print $q->td({-class=>'content1_cms', -colspan=>'3'},$q->textarea(-class=>"etxt", -style=>'border: 1px solid silver;',-rows=>"$h",-cols=>'35em;', -name=>"$key", -override=>'1',-default=>"$ctrel->{$key}")),"\n";
|
||||
}
|
||||
elsif($key =~ /txt/ && $size =~ /area(\d+)/){
|
||||
#my $h= $1 if($size =~ /area(\d+)/);
|
||||
|
@ -785,7 +785,7 @@ EOF
|
|||
$ctrel->{txt28} =~ s/\+/ /g;
|
||||
print $q->td({-style=>'border:1px solid silver;'},$ctrel->{txt28}),"\n";
|
||||
}else{
|
||||
print $q->td({-class=>'content1_cms', -colspan=>'3'},$q->textarea(-id=>"$key", -class=>"autos", -style=>"border: 1px solid silver;$h $w", -name=>"$key", -override=>'1',-default=>"$ctrel->{$key}")),"\n";
|
||||
print $q->td({-class=>'content1_cms', -colspan=>'3'},$q->textarea(-id=>"$key", -class=>"etxt", -style=>"border: 1px solid silver;$h $w", -name=>"$key", -override=>'1',-default=>"$ctrel->{$key}")),"\n";
|
||||
}
|
||||
}
|
||||
elsif($key =~ /txt02/ && $varenv{syshost} =~ /sharee/){
|
||||
|
|
|
@ -312,7 +312,7 @@ EOF
|
|||
$q->textfield(-class=>'etxt',-name=>"e_mi",-default=>"$e_mi",-size=>"1",-maxlength=>2)),"\n";
|
||||
}
|
||||
|
||||
print "<br /><b>Interner Kommentar:</b> $cttpos->{$id}->{txt23}\n" if($cttpos->{$id}->{txt23});
|
||||
print "<br /><b>Bemerkung (Mietjournal)</b> $cttpos->{$id}->{txt23}\n" if($cttpos->{$id}->{txt23});
|
||||
print "</td>\n";
|
||||
}elsif($key =~ /txt/){
|
||||
print $q->td({-class=>'element',-style=>"$txtstyle $set_style"},$q->textfield(-class=>'etxt',-style=>"$txtstyle",-name=>"col_$key",-default=>"$cttpos->{$id}->{$key}", -override=>'1',-size=>"$isize",-maxlength=>100)),"\n";
|
||||
|
@ -430,7 +430,7 @@ EOF
|
|||
print "<br />\n";
|
||||
print $q->span({-style=>"$time_style"}, "Mietzeit: $start_time → $end_time"),"\n";
|
||||
}
|
||||
print "<br /><b>Interner Kommentar:</b> $cttpos->{$id}->{txt23}\n" if($cttpos->{$id}->{txt23});
|
||||
print "<br /><b>Bemerkung (Mietjournal)</b> $cttpos->{$id}->{txt23}\n" if($cttpos->{$id}->{txt23});
|
||||
print "</td>\n";
|
||||
}elsif($key =~ /txt/){
|
||||
print $q->td({-class=>'tdtxt'},"$cttpos->{$id}->{$key}"),"\n";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue