From: kilian Date: Wed, 1 Apr 2020 12:22:38 +0000 (+0200) Subject: toolbar design X-Git-Tag: 0.7beta~19 X-Git-Url: http://cloud.dks.lu/git/?a=commitdiff_plain;h=d4ce04d4f73f5aaa3d358ca74dc666366a60d804;p=invoicejournal.git toolbar design --- diff --git a/server/CGI/api/db.cgi b/server/CGI/api/db.cgi index d888269..7eb1a07 100644 --- a/server/CGI/api/db.cgi +++ b/server/CGI/api/db.cgi @@ -130,7 +130,16 @@ if (($cgi->request_method() eq "GET") || ($cgi->request_method() eq "POST")){ else { $html->{result} = $db->queryarray($p->{sql}); } - } + } + elsif (exists($p->{ins})){ + + } + elsif (exists($p->{dupl})){ + + } + elsif (exists($p->{save})){ + $html->{result} = $db->exec("UPDATE ".$db->securetext($p->{table})." SET ".$db->securetext($p->{column})."='".$db->securetext($p->{value})."' WHERE id='".$db->securetext($p->{id})."';"); + } elsif (exists($p->{exec})){ $html->{result} = $db->exec($p->{exec}); } diff --git a/server/CGI/api/lib/dksconfig.pm b/server/CGI/api/lib/dksconfig.pm index cdeada5..26d8aac 100644 --- a/server/CGI/api/lib/dksconfig.pm +++ b/server/CGI/api/lib/dksconfig.pm @@ -28,7 +28,6 @@ our $sitecfg ={ dsn => 'DBI:SQLite:dbname='.$cfgpath.'/'.$name.'.sqlite', # dbuser => '', # dbpassword => '', - basepath => '/', staticpath => 'htdocs/', #dsn => 'DBI:PgPP:dbname=fldlu_db;host=DKS-LAPTOP.fritz.box', #dsn => 'DBI:PgPP:dbname=fldlu_db;host=sql629.your-server.de', @@ -36,9 +35,10 @@ our $sitecfg ={ #dbpassword => 'Tm6G1bjQSudiEBAY', page => 'index.tt', pagename => 'index', + basename => '/', # basepath => substr((exists($ENV{"SCRIPT_FILENAME"})?dirname($ENV{"SCRIPT_FILENAME"}):dirname($0)),length($ENV{"DOCUMENT_ROOT"})), # datapath => substr((exists($ENV{"SCRIPT_FILENAME"})?dirname($ENV{"SCRIPT_FILENAME"}):dirname($0)),length($ENV{"DOCUMENT_ROOT"})).'/data/', - # docroot => $ENV{"DOCUMENT_ROOT"}, + docroot => $ENV{"DOCUMENT_ROOT"}, # registration_enabled => '1', # default_group => 'users', # sitename => 'FLD Member Area', diff --git a/server/CGI/api/page.cgi b/server/CGI/api/page.cgi new file mode 100644 index 0000000..d2dff2a --- /dev/null +++ b/server/CGI/api/page.cgi @@ -0,0 +1,57 @@ +#!/usr/local/bin/perl +use strict; +use lib ('./server/CGI/api/lib/perl5'); +use lib ('./server/CGI/api/lib'); +use lib ('./lib/perl5'); +use lib ('./lib'); +use CGI; +use CGI::Cookie; +use CGI::Carp qw/fatalsToBrowser/; +use File::Basename; +use FindBin qw/$RealBin/; +use Template; +#use session; +use dksconfig qw/$sitecfg/; +use JSON::PP; +use Data::Dumper; +my $cgi = new CGI(); +my $scriptpath = $cgi->url(-absolute => 1); +my $p = (); +my @params = $cgi->param(); +foreach my $pe (@params){ + $p->{$pe} = $cgi->param($pe); +} +print $cgi->header(-type=>"text/html", -charset => "utf-8"); +my $html->{result} = (); +# $p->{sid} = $cgi->cookie($sitecfg->{cookiename}); +#print Dumper($p); +#my $se = session->new(); +#my $sess = $se->getsession($p->{sid}); +#print Dumper($sess); +# if ($sess == undef){ +# $html->{error} = "No Authorisation"; +# print JSON::PP::encode_json($html); +# exit(0); +# } +my $vars = $sitecfg; +#$vars->{session} = $sess; +$vars->{params} = $p; +$vars->{filepath} = 'module/'.$p->{page}.'.tt'; +$vars->{baseurl} = $cgi->url({-base=>1}); +$vars->{siteurl} = $cgi->url({-base=>1}).'/'.$sitecfg->{staticpath}; + +if ($vars->{filepath} ne ""){ + $vars->{suffix} = substr($vars->{filepath},rindex($vars->{filepath},'.')); + $vars->{page} = $vars->{filepath}; + $vars->{page} =~ s/html$/tt/; +} +my $tmplincpath2 = $RealBin.'/CGI/tmpl'; +my ($browserlang2) = $ENV{HTTP_ACCEPT_LANGUAGE} =~ /^(\w+)[,|;|-]/; +$vars->{lang} = 'de'; +if (-e $tmplincpath2.'/lang/'.$browserlang2.'.tt'){ + $vars->{lang} = $browserlang2; +} +#print '
'.Dumper($vars).'
'; +my $template = Template->new({INCLUDE_PATH => [$tmplincpath2]}); + +$template->process($vars->{filepath},$vars) || die "Template process failed: ", $template->error(), "\n"; diff --git a/server/CGI/index.cgi b/server/CGI/index.cgi index 96324b4..eb38d04 100644 --- a/server/CGI/index.cgi +++ b/server/CGI/index.cgi @@ -30,14 +30,14 @@ my $vars = $sitecfg; #$vars->{filepath} = substr($cgi->url({-absolute=>1}),length($vars->{basepath})+1); $vars->{filepath} = substr($ENV{PATH_INFO},1); -$vars->{baseurl} = $cgi->url({-base=>1}).$vars->{basepath}; -if ($vars->{basepath} eq "/"){ - $vars->{siteurl} = $cgi->url({-base=>1}); -}else { - $vars->{siteurl} = $cgi->url({-base=>1}).dirname($vars->{basepath}); - $vars->{docroot} = $vars->{docroot}.dirname($vars->{basepath}); - #$vars->{sitepath} = dirname($vars->{basepath}); -} +# $vars->{baseurl} = $cgi->url({-base=>1}).$vars->{basepath}; +# if ($vars->{basepath} eq "/"){ +# $vars->{siteurl} = $cgi->url({-base=>1}); +# }else { +# $vars->{siteurl} = $cgi->url({-base=>1}).dirname($vars->{basepath}); +# $vars->{docroot} = $vars->{docroot}.dirname($vars->{basepath}); +# #$vars->{sitepath} = dirname($vars->{basepath}); +# } if ($vars->{filepath} ne ""){ $vars->{suffix} = substr($vars->{filepath},rindex($vars->{filepath},'.')); $vars->{page} = $vars->{filepath}; @@ -73,16 +73,15 @@ $vars->{abspath} = ""; for (my $i=0;$i<$absnum;$i++){ $vars->{abspath} .= "../"; } -$vars->{appname} = 'invoicejournal'; -$vars->{pagename} = basename($vars->{page}); -$vars->{pagename} =~ s/\.tt$//; if ($vars->{page} !~ /\.tt$/) { - $skl = "skeleton/file.tt"; -} elsif ($vars->{page} =~ /module/){ - $skl = "skeleton/module.tt"; + $skl = "skeleton/file.tt"; } else { - $vars->{page} = "app/".$vars->{page}; + $vars->{page} = 'module/'.$vars->{page}; } +$vars->{appname} = 'invoicejournal'; +$vars->{pagename} = basename($vars->{page}); +$vars->{pagename} =~ s/\.tt$//; + $vars->{params}= $p; my ($browserlang) = $ENV{HTTP_ACCEPT_LANGUAGE} =~ /^(\w+)[,|;|-]/; $vars->{lang} = 'de'; @@ -91,7 +90,7 @@ if (-e $tmplincpath.'/lang/'.$browserlang.'.tt'){ } $template->process($skl,$vars) || die "Template process failed: ", $template->error(), "\n"; -# print '/*
'.Dumper($vars)."
*/";
+# print '
'.Dumper($vars)."
";
 
 
 
diff --git a/server/CGI/tmpl/block/dlgdeleterow.tt b/server/CGI/tmpl/block/dlgdeleterow.tt
index b3d5fb7..814718e 100644
--- a/server/CGI/tmpl/block/dlgdeleterow.tt
+++ b/server/CGI/tmpl/block/dlgdeleterow.tt
@@ -1,65 +1,18 @@
-[% PROCESS macro/fields.tt %]
-
+
× -

Supprimer

+

[% lbl.deletedatasettitle %]

- êtes vous sûre de vouloir supprimer la rangé sélectionné? - [% fieldhidden("dlgdeltable","delete",'','') %] - [% fieldhidden("dlgdelrowid","delete",'','') %] + [% lbl.deletedatasetmessage %] +
- - + +
- \ No newline at end of file diff --git a/server/CGI/tmpl/macro/fields.tt b/server/CGI/tmpl/macro/fields.tt index 3d859fd..19c3894 100644 --- a/server/CGI/tmpl/macro/fields.tt +++ b/server/CGI/tmpl/macro/fields.tt @@ -5,7 +5,7 @@
[% IF title %][% END %] - +
[% END -%] @@ -15,7 +15,7 @@ [% ELSE %]
[% IF title %][% END %] - 0 %][% state %][% END %] onblur="record.savefield(this);"> [% IF xoptions %] [% FOREACH opt IN xoptions %] diff --git a/server/CGI/tmpl/module/addresses.tt b/server/CGI/tmpl/module/addresses.tt new file mode 100644 index 0000000..889fc0b --- /dev/null +++ b/server/CGI/tmpl/module/addresses.tt @@ -0,0 +1,67 @@ +[% USE dksdb = DBI(dsn,dbuser,dbpassword) %] +[% #PROCESS macro/fields.tt %] +[% PROCESS "lang/${lang}.tt" %] +[% cols = { clientnumber => 100 , displayname=> 350, address => 200, email => 200, phone => 200, action=> 120 }%] +
+
+ +
[% lbl.addresses %]
+ + + + + + +
+
+ + + + + + + + + + + + + + + [% FOREACH adr = dksdb.query("select * from addresses order by receipient;") %] + + + + + + + + + [% END %] + + +
Kd-Nr.
Name
Adresse
E-Mail
Telefon
[% adr.clientnumber %][% adr.receipient %][% adr.address %]
[% adr.country %] [% adr.zip %] [% adr.city %]
[% adr.email %][% adr.phone %]
+
+ +
diff --git a/server/CGI/tmpl/module/addresses/address.tt b/server/CGI/tmpl/module/addresses/address.tt new file mode 100644 index 0000000..71fc1a7 --- /dev/null +++ b/server/CGI/tmpl/module/addresses/address.tt @@ -0,0 +1,79 @@ +[% PROCESS macro/fields.tt %] +[% USE dksdb = DBI(dsn,dbuser,dbpassword) %] +[% PROCESS "lang/${lang}.tt" %] +[% #USE Dumper %] +[% qadr =dksdb.query("select * from addresses where id='${params.id}';") %] +[% adr = qadr.get_all() %] +
+
+ +
[% lbl.address %]
+ + +
+
+ +
+
+ [% inputbox('receipient','addresses',params.id,lbl.displayname,'text','','','',adr.0.receipient,'') %] +
+
+ [% inputbox('clientnumber','addresses',params.id,lbl.clientnumber,'text','','','',adr.0.clientnumber,'YYMMDDNNN') %] +
+
+
+
+ [% inputbox('title','addresses',params.id,lbl.title,'text','','','',adr.0.title,'') %] +
+
+ [% inputbox('prename','addresses',params.id,lbl.prename,'text','','','','',adr.0.prename,'') %] +
+
+ [% inputbox('surname','addresses',params.id,lbl.surname,'text','','','',adr.0.surname,'') %] +
+
+
+
+ [% inputbox('address','addresses',params.id,lbl.address,'text','','','',adr.0.address,'') %] +
+
+
+
+ [% inputbox('country','addresses',params.id,lbl.country,'text','','','',adr.0.country,'') %] +
+
+ [% inputbox('zip','addresses',params.id,lbl.zip,'text','','','',adr.0.zip,'') %] +
+
+ [% inputbox('city','addresses',params.id,lbl.city,'text','','','',adr.0.city,'') %] +
+
+
+
+ [% inputbox('email','addresses',params.id,lbl.email,'text','','','',adr.0.email,'') %] +
+
+
+
+ [% inputbox('phone','addresses',params.id,lbl.phone,'text','','','',adr.0.phone,'') %] +
+
+
+
+ [% inputbox('iban','addresses',params.id,lbl.iban,'text','','','',adr.0.iban,'') %] +
+
+ [% inputbox('bic','addresses',params.id,lbl.bic,'text','','','',adr.0.bic,'') %] +
+
+
+
+ [% inputbox('vatid','addresses',params.id,lbl.vatid,'text','','','',adr.0.vatid,'') %] +
+
+ [% inputbox('lang','addresses',params.id,lbl.lang,'text','','','',adr.0.lang,'') %] +
+
+
+ +
\ No newline at end of file diff --git a/server/CGI/tmpl/modules/invoices/bookings.tt b/server/CGI/tmpl/module/bookings.tt similarity index 100% rename from server/CGI/tmpl/modules/invoices/bookings.tt rename to server/CGI/tmpl/module/bookings.tt diff --git a/server/CGI/tmpl/app/index.tt b/server/CGI/tmpl/module/index.tt similarity index 97% rename from server/CGI/tmpl/app/index.tt rename to server/CGI/tmpl/module/index.tt index 08c028f..f7e319a 100644 --- a/server/CGI/tmpl/app/index.tt +++ b/server/CGI/tmpl/module/index.tt @@ -1,4 +1,4 @@ -
+ \ No newline at end of file diff --git a/server/CGI/tmpl/modules/invoices/index.tt b/server/CGI/tmpl/module/invoices.tt similarity index 69% rename from server/CGI/tmpl/modules/invoices/index.tt rename to server/CGI/tmpl/module/invoices.tt index 5820d13..a3c22f3 100644 --- a/server/CGI/tmpl/modules/invoices/index.tt +++ b/server/CGI/tmpl/module/invoices.tt @@ -1,13 +1,18 @@ [% PROCESS macro/fields.tt %] +[% PROCESS "lang/${lang}.tt" %]
- + +
[% lbl.invoices %]
- + + + +
[% cols = { date => 100 , inout=> 80, receipient => 350, reference => 350, status => 110, amount => 110 , action=> 120 }%] - +
@@ -20,7 +25,7 @@ - + [% WHILE i < 100 %] diff --git a/server/CGI/tmpl/modules/invoices/invoice.tt b/server/CGI/tmpl/module/invoices/invoice.tt similarity index 100% rename from server/CGI/tmpl/modules/invoices/invoice.tt rename to server/CGI/tmpl/module/invoices/invoice.tt diff --git a/server/CGI/tmpl/modules/offers/index.tt b/server/CGI/tmpl/module/offers.tt similarity index 100% rename from server/CGI/tmpl/modules/offers/index.tt rename to server/CGI/tmpl/module/offers.tt diff --git a/server/CGI/tmpl/modules/offers/offer.tt b/server/CGI/tmpl/module/offers/offer.tt similarity index 100% rename from server/CGI/tmpl/modules/offers/offer.tt rename to server/CGI/tmpl/module/offers/offer.tt diff --git a/server/CGI/tmpl/modules/products/index.tt b/server/CGI/tmpl/module/products.tt similarity index 100% rename from server/CGI/tmpl/modules/products/index.tt rename to server/CGI/tmpl/module/products.tt diff --git a/server/CGI/tmpl/modules/products/product.tt b/server/CGI/tmpl/module/products/product.tt similarity index 100% rename from server/CGI/tmpl/modules/products/product.tt rename to server/CGI/tmpl/module/products/product.tt diff --git a/server/CGI/tmpl/modules/reports/email.tt b/server/CGI/tmpl/module/reports/email.tt similarity index 100% rename from server/CGI/tmpl/modules/reports/email.tt rename to server/CGI/tmpl/module/reports/email.tt diff --git a/server/CGI/tmpl/modules/reports/report.tt b/server/CGI/tmpl/module/reports/report.tt similarity index 100% rename from server/CGI/tmpl/modules/reports/report.tt rename to server/CGI/tmpl/module/reports/report.tt diff --git a/server/CGI/tmpl/app/settings.tt b/server/CGI/tmpl/module/settings.tt similarity index 100% rename from server/CGI/tmpl/app/settings.tt rename to server/CGI/tmpl/module/settings.tt diff --git a/server/CGI/tmpl/modules/reports/index.tt b/server/CGI/tmpl/module/settings/templates.tt similarity index 100% rename from server/CGI/tmpl/modules/reports/index.tt rename to server/CGI/tmpl/module/settings/templates.tt diff --git a/server/CGI/tmpl/modules/transactions/index.tt b/server/CGI/tmpl/module/transactions.tt similarity index 100% rename from server/CGI/tmpl/modules/transactions/index.tt rename to server/CGI/tmpl/module/transactions.tt diff --git a/server/CGI/tmpl/modules/transactions/tramsaction.tt b/server/CGI/tmpl/module/transactions/transaction.tt similarity index 100% rename from server/CGI/tmpl/modules/transactions/tramsaction.tt rename to server/CGI/tmpl/module/transactions/transaction.tt diff --git a/server/CGI/tmpl/modules/addresses/address.js b/server/CGI/tmpl/modules/addresses/address.js deleted file mode 100644 index 0feac30..0000000 --- a/server/CGI/tmpl/modules/addresses/address.js +++ /dev/null @@ -1,4 +0,0 @@ -function initpage(){ - console.log("init page " + location.href); -} - diff --git a/server/CGI/tmpl/modules/addresses/address.tt b/server/CGI/tmpl/modules/addresses/address.tt deleted file mode 100644 index 208288a..0000000 --- a/server/CGI/tmpl/modules/addresses/address.tt +++ /dev/null @@ -1,77 +0,0 @@ -[% PROCESS macro/fields.tt %] -[% USE Dumper %] -[% qadr =dksdb.query("select * from addresses where id='${params.id}';") %] -[% adr = qadr.get_all() %] -
-
- -
[% lbl.address %]
- - -
-
- [% Dumper.dump(params) %] -
-
- [% inputbox('receipient','addresses','',lbl.displayname,'text','','','',adr.0.receipient,'') %] -
-
- [% inputbox('clientnumber','addresses','',lbl.clientnumber,'text','','','',adr.0.clientnumber,'YYMMDDNNN') %] -
-
-
-
- [% inputbox('title','addresses','',lbl.title,'text','','','',adr.0.title,'') %] -
-
- [% inputbox('prename','addresses','',lbl.prename,'text','','','','',adr.0.prename,'') %] -
-
- [% inputbox('surname','addresses','',lbl.surname,'text','','','',adr.0.surname,'') %] -
-
-
-
- [% inputbox('address','addresses','',lbl.address,'text','','','',adr.0.address,'') %] -
-
-
-
- [% inputbox('country','addresses','',lbl.country,'text','','','',adr.0.country,'') %] -
-
- [% inputbox('zip','addresses','',lbl.zip,'text','','','',adr.0.zip,'') %] -
-
- [% inputbox('city','addresses','',lbl.city,'text','','','',adr.0.city,'') %] -
-
-
-
- [% inputbox('email','addresses','',lbl.email,'text','','','',adr.0.email,'') %] -
-
-
-
- [% inputbox('phone','addresses','',lbl.phone,'text','','','',adr.0.phone,'') %] -
-
-
-
- [% inputbox('iban','addresses','',lbl.iban,'text','','','',adr.0.iban,'LU 0000 0000 0000 0000 0000') %] -
-
- [% inputbox('bic','addresses','',lbl.bic,'text','','','',adr.0.bic,'XXXXXXXXXX') %] -
-
-
-
- [% inputbox('vatid','addresses','',lbl.vatid,'text','','','',adr.0.vatid,'LU 0000 0000 00') %] -
-
- [% inputbox('lang','addresses','',lbl.lang,'text','','','',adr.0.lang,'') %] -
-
-
- -
\ No newline at end of file diff --git a/server/CGI/tmpl/modules/addresses/index.js b/server/CGI/tmpl/modules/addresses/index.js deleted file mode 100644 index 9fae363..0000000 --- a/server/CGI/tmpl/modules/addresses/index.js +++ /dev/null @@ -1,79 +0,0 @@ -function initpage(){ - console.log("init page " + location.href); - addresses.inittable(); - addresses.gettabledata(); -} - - var addresses = { - data: null, - tbl: null, - cols: null, - selection: null, - inittable: function(){ - addresses.tbl = document.getElementById("tbl_addresses"); - addresses.cols = document.getElementById("tblhead_addresses").children; - addresses.settableheight(); - }, - settableheight: function(){ - var tbl_height = document.getElementById("addresses_toolbar").style.height; - var tblhead_addresses = document.getElementById("tblhead_addresses").style.height; - var winh = window.innerHeight; - console.log("height: " + winh + " - " + tbl_height + " - " +tblhead_addresses ); - addresses.tbl.style.height = winh-101 + 'px'; - return false; - }, - gettabledata: function(){ - req.reqdata("POST","db.cgi",{"sql":"select * from addresses order by receipient,clientnumber;"},addresses.filltable); - }, - filltable: function(data){ - addresses.data = data; - addresses.tbl.innerHTML = ''; - console.log(data); - console.log(addresses.cols); - for (var r in addresses.data){ - var row = ''; - row += ''; - row += ''; - row += ''; - row += ''; - row += ''; - // row += ''; - row += ''; - addresses.tbl.innerHTML += row; - } - var selrows = document.getElementsByClassName("ds_addresses"); - for (var i=0;i 100 , displayname=> 350, address => 200, email => 200, phone => 200, action=> 120 }%] -
-
- -
[% lbl.addresses %]
- - - - - - -
-
- -
[% selectbox('preferences','preferences',pagename,'','','','','','test','Zeitraum','') %]
DD.MM.YYYY
'+ ((addresses.data[r].clientnumber)?addresses.data[r].clientnumber:'') +''+ ((addresses.data[r].receipient)?addresses.data[r].receipient:'') + ''+ ((addresses.data[r].address)?addresses.data[r].address+ '
':'') + ((addresses.data[r].country)? addresses.data[r].country +' - ':'') + ((addresses.data[r].zip)?addresses.data[r].zip + ' ':'') + ((addresses.data[r].city)? addresses.data[r].city:'') +'
'+ ((addresses.data[r].email)?addresses.data[r].email:'') +''+ ((addresses.data[r].phone)?addresses.data[r].phone:'')+'
- - - - - - - - - - - - - - -
Kd-Nr.
Name
Adresse
E-Mail
Telefon
-
- -
diff --git a/server/CGI/tmpl/modules/invoices/bookings.js b/server/CGI/tmpl/modules/invoices/bookings.js deleted file mode 100644 index 7d399fd..0000000 --- a/server/CGI/tmpl/modules/invoices/bookings.js +++ /dev/null @@ -1,3 +0,0 @@ -function initpage(){ - console.log("init page " + location.href); -} \ No newline at end of file diff --git a/server/CGI/tmpl/modules/invoices/index.js b/server/CGI/tmpl/modules/invoices/index.js deleted file mode 100644 index 7d399fd..0000000 --- a/server/CGI/tmpl/modules/invoices/index.js +++ /dev/null @@ -1,3 +0,0 @@ -function initpage(){ - console.log("init page " + location.href); -} \ No newline at end of file diff --git a/server/CGI/tmpl/modules/invoices/invoice.js b/server/CGI/tmpl/modules/invoices/invoice.js deleted file mode 100644 index 7d399fd..0000000 --- a/server/CGI/tmpl/modules/invoices/invoice.js +++ /dev/null @@ -1,3 +0,0 @@ -function initpage(){ - console.log("init page " + location.href); -} \ No newline at end of file diff --git a/server/CGI/tmpl/modules/offers/index.js b/server/CGI/tmpl/modules/offers/index.js deleted file mode 100644 index 7d399fd..0000000 --- a/server/CGI/tmpl/modules/offers/index.js +++ /dev/null @@ -1,3 +0,0 @@ -function initpage(){ - console.log("init page " + location.href); -} \ No newline at end of file diff --git a/server/CGI/tmpl/modules/offers/offer.js b/server/CGI/tmpl/modules/offers/offer.js deleted file mode 100644 index 7d399fd..0000000 --- a/server/CGI/tmpl/modules/offers/offer.js +++ /dev/null @@ -1,3 +0,0 @@ -function initpage(){ - console.log("init page " + location.href); -} \ No newline at end of file diff --git a/server/CGI/tmpl/modules/products/index.js b/server/CGI/tmpl/modules/products/index.js deleted file mode 100644 index 7d399fd..0000000 --- a/server/CGI/tmpl/modules/products/index.js +++ /dev/null @@ -1,3 +0,0 @@ -function initpage(){ - console.log("init page " + location.href); -} \ No newline at end of file diff --git a/server/CGI/tmpl/modules/products/product.js b/server/CGI/tmpl/modules/products/product.js deleted file mode 100644 index 7d399fd..0000000 --- a/server/CGI/tmpl/modules/products/product.js +++ /dev/null @@ -1,3 +0,0 @@ -function initpage(){ - console.log("init page " + location.href); -} \ No newline at end of file diff --git a/server/CGI/tmpl/modules/reports/email.js b/server/CGI/tmpl/modules/reports/email.js deleted file mode 100644 index 7d399fd..0000000 --- a/server/CGI/tmpl/modules/reports/email.js +++ /dev/null @@ -1,3 +0,0 @@ -function initpage(){ - console.log("init page " + location.href); -} \ No newline at end of file diff --git a/server/CGI/tmpl/modules/reports/index.js b/server/CGI/tmpl/modules/reports/index.js deleted file mode 100644 index 7d399fd..0000000 --- a/server/CGI/tmpl/modules/reports/index.js +++ /dev/null @@ -1,3 +0,0 @@ -function initpage(){ - console.log("init page " + location.href); -} \ No newline at end of file diff --git a/server/CGI/tmpl/modules/reports/report.js b/server/CGI/tmpl/modules/reports/report.js deleted file mode 100644 index 7d399fd..0000000 --- a/server/CGI/tmpl/modules/reports/report.js +++ /dev/null @@ -1,3 +0,0 @@ -function initpage(){ - console.log("init page " + location.href); -} \ No newline at end of file diff --git a/server/CGI/tmpl/modules/transactions/index.js b/server/CGI/tmpl/modules/transactions/index.js deleted file mode 100644 index 7d399fd..0000000 --- a/server/CGI/tmpl/modules/transactions/index.js +++ /dev/null @@ -1,3 +0,0 @@ -function initpage(){ - console.log("init page " + location.href); -} \ No newline at end of file diff --git a/server/CGI/tmpl/modules/transactions/transaction.js b/server/CGI/tmpl/modules/transactions/transaction.js deleted file mode 100644 index 7d399fd..0000000 --- a/server/CGI/tmpl/modules/transactions/transaction.js +++ /dev/null @@ -1,3 +0,0 @@ -function initpage(){ - console.log("init page " + location.href); -} \ No newline at end of file diff --git a/server/CGI/tmpl/skeleton/index.tt b/server/CGI/tmpl/skeleton/index.tt index 9c06def..4f54a18 100644 --- a/server/CGI/tmpl/skeleton/index.tt +++ b/server/CGI/tmpl/skeleton/index.tt @@ -15,14 +15,30 @@ [% appname %] - [% pagename %] -
- [% INCLUDE $page %] -
- +
+
+ +
Invoice Journal
+ + + + + + + + + + +
+
+
+ [% INCLUDE $page %] +
+ + diff --git a/server/CGI/tmpl/skeleton/module.tt b/server/CGI/tmpl/skeleton/module.tt deleted file mode 100644 index 6d1fb8f..0000000 --- a/server/CGI/tmpl/skeleton/module.tt +++ /dev/null @@ -1,26 +0,0 @@ -[% USE dksdb = DBI(dsn,dbuser,dbpassword) %] -[% USE date %] -[% vstamp=date.format(date.now, '%d%m%Y%H%M%S') %] -[% PROCESS "lang/${lang}.tt" %] - - - - - - - -[% appname %] -> [% pagename %] - - -
- [% INCLUDE $page %] -
- - - - - - - \ No newline at end of file diff --git a/server/htdocs/img/icons/Banking_Transaction_white.svg b/server/htdocs/img/icons/Banking_Transaction_white.svg new file mode 100644 index 0000000..e59f26f --- /dev/null +++ b/server/htdocs/img/icons/Banking_Transaction_white.svg @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/server/htdocs/img/icons/Bill2_white.svg b/server/htdocs/img/icons/Bill2_white.svg new file mode 100644 index 0000000..d9fd285 --- /dev/null +++ b/server/htdocs/img/icons/Bill2_white.svg @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/server/htdocs/img/icons/Bookings2_white.svg b/server/htdocs/img/icons/Bookings2_white.svg new file mode 100644 index 0000000..f2e0838 --- /dev/null +++ b/server/htdocs/img/icons/Bookings2_white.svg @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/server/htdocs/img/icons/Box_white.svg b/server/htdocs/img/icons/Box_white.svg new file mode 100644 index 0000000..035f607 --- /dev/null +++ b/server/htdocs/img/icons/Box_white.svg @@ -0,0 +1,9 @@ + + + + + + + diff --git a/server/htdocs/img/icons/Contacts_white.svg b/server/htdocs/img/icons/Contacts_white.svg new file mode 100644 index 0000000..06c0c86 --- /dev/null +++ b/server/htdocs/img/icons/Contacts_white.svg @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/server/htdocs/img/icons/Product2_white.svg b/server/htdocs/img/icons/Product2_white.svg new file mode 100644 index 0000000..dd64d1d --- /dev/null +++ b/server/htdocs/img/icons/Product2_white.svg @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/server/htdocs/js/app.js b/server/htdocs/js/app.js index 4ddeaea..7d27642 100644 --- a/server/htdocs/js/app.js +++ b/server/htdocs/js/app.js @@ -1,5 +1,18 @@ var app = { dataset: null, + getpage: function(modulepage,data) { + var rdata = {"page":modulepage}; + if (typeof data == 'object') { + for (var i in data) { + rdata[i] = data[i]; + } + } + req.reqdata("POST","page.cgi",rdata,app.loadpage); + }, + loadpage: function(data){ + document.getElementById("mainapp").innerHTML = data; + + }, loadappview: function(panelid) { document.getElementById('modules').style.display = 'none'; document.getElementById('appview').style.display = 'block'; diff --git a/server/htdocs/js/record.js b/server/htdocs/js/record.js new file mode 100644 index 0000000..d15a745 --- /dev/null +++ b/server/htdocs/js/record.js @@ -0,0 +1,44 @@ +var record = { + redirectpage:null, + add: function(page,tbl){ + record.redirectpage = page; + req.reqdata("POST","db.cgi",{"ins":tbl},record.afterrequest); + }, + remove: function(page){ + record.redirectpage = page; + req.reqdata("POST","db.cgi",{"del":tbl},record.afterrequest); + }, + edit: function(page){ + record.redirectpage = page; + app.getpage(page,{"id":table.selection}); + }, + duplicate: function(page){ + record.redirectpage = page; + req.reqdata("POST","db.cgi",{"dupl":tbl},record.afterrequest); + }, + afterrequest: function(data){ + app.getpage(tecord.redirectpage,null); + }, + confirm: function(){ + + }, + savefield: function(obj){ + + var fdata = obj.dataset; + fdata["save"] = "field"; + fdata["value"] = obj.value; + console.log(obj.tagName); + console.log(obj.dataset); + console.log("Value:" + obj.value); + req.reqdata("POST","db.cgi",fdata,record.saveresult); + // if (obj.TagName == "INPUT"){ + + // } + // if (obj.TagName == "SELECT"){ + + // } + }, + saveresult: function(data){ + console.log(data); + } +} \ No newline at end of file diff --git a/server/htdocs/js/table.js b/server/htdocs/js/table.js new file mode 100644 index 0000000..5eb69bf --- /dev/null +++ b/server/htdocs/js/table.js @@ -0,0 +1,18 @@ +var table = { + table:null, + selection:null, + setselection(objid){ + //table.selection = objid; + console.log(table.selection); + if (table.selection != null){ + document.getElementById("ds_" + table.selection).classList.remove("portal_selected"); + if (objid == table.selection){ + table.selection = null; + return false; + } + } + table.selection = objid; + document.getElementById("ds_" + objid).classList.add("portal_selected"); + return false; + } +} \ No newline at end of file diff --git a/server/invoicejournal.pl b/server/invoicejournal.pl index 246cfc4..f8d9c68 100644 --- a/server/invoicejournal.pl +++ b/server/invoicejournal.pl @@ -63,7 +63,7 @@ my $allapp = builder { }; -my @args = ("-p","6060","--error-log",$RealBin."/error.log","--access-log",$RealBin."/access.log");#,"-R",$RealBin.'/CGI,'.$RealBin.'/CGI/api,'.$RealBin.'/CGI/api/lib' +my @args = ("-p","6060");#,"-R",$RealBin.'/CGI,'.$RealBin.'/CGI/api,'.$RealBin.'/CGI/api/lib',"--error-log",$RealBin."/error.log","--access-log",$RealBin."/access.log" my $runner = Plack::Runner->new(server => 'Starlight', env => 'deployment', ipv6 => '1' );#env => ,deployment,development, test $runner->parse_options(@args); $runner->run($allapp);