v20191120
authorkilian (ksmachome) <ksaffran@dks.lu>
Wed, 20 Nov 2019 07:32:21 +0000 (08:32 +0100)
committerkilian (ksmachome) <ksaffran@dks.lu>
Wed, 20 Nov 2019 07:32:21 +0000 (08:32 +0100)
CGI/tmpl/app/coloradio/index.tt
CGI/tmpl/app/coloradio/module/allaudio/index.js
CGI/tmpl/app/coloradio/module/allaudio/index.tt
CGI/tmpl/app/invoicejournal/index.tt
CGI/tmpl/app/invoicejournal/module/invoicejournal/index.js
CGI/tmpl/app/invoicejournal/module/invoicejournal/index.tt
CGI/tmpl/macro/fields.tt
htdocs/vendor/choices/choices.css

index a89a458..c90c48c 100644 (file)
@@ -1,56 +1,58 @@
 <!DOCTYPE html>
 <html lang="en">
+
 <head>
-<meta charset="UTF-8">
-<meta name="viewport" content="width=device-width, initial-scale=1">
-<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
-  <meta http-equiv="Pragma" content="no-cache" />
-  <meta http-equiv="Expires" content="0" />
-<link rel="stylesheet" href="[% abspath %][% staticpath %]css/w3pro.css">
-<title>Coloradio</title>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
+    <meta http-equiv="Pragma" content="no-cache" />
+    <meta http-equiv="Expires" content="0" />
+    <link rel="stylesheet" href="[% abspath %][% staticpath %]css/w3pro.css">
+    <title>Coloradio</title>
 </head>
+
 <body>
     <div class="w3-bar w3-top w3-theme-light w3-large" style="z-index:4">
         <button class="w3-bar-item w3-button w3-hide-large w3-hover-none w3-hover-text-light-grey" onclick="w3_open();"><img src="[% abspath %][% staticpath %]img/icons/menu_white.svg" style="height: 33px;" /></button>
         <span class="w3-bar-item w3-right">Coloradio</span>
-      </div>
-      <!-- Sidebar/menu -->
-      <nav class="w3-sidebar w3-collapse w3-theme-light w3-animate-left" style="z-index:3;width:200px;" id="mySidebar"><br>
+    </div>
+    <!-- Sidebar/menu -->
+    <nav class="w3-sidebar w3-collapse w3-theme-light w3-animate-left" style="z-index:3;width:200px;" id="mySidebar">
         <!-- <div class="w3-container w3-row">
             <div class="w3-col s4">
                 <a href="index.html" class="w3-bar-item"><img src="[% abspath %][% staticpath %]img/coloradio.jpg" class="w3-circle w3-margin-right" style="width: 46px;"></a>
             </div> -->
-          <!-- <div class="w3-col s8 w3-bar">
+        <!-- <div class="w3-col s8 w3-bar">
             <span>Welcome, <strong>Mike</strong></span><br> -->
-            <!--<a href="#" class="w3-bar-item w3-button"><i class="fa fa-envelope"></i></a>
+        <!--<a href="#" class="w3-bar-item w3-button"><i class="fa fa-envelope"></i></a>
             <a href="#" class="w3-bar-item w3-button"><i class="fa fa-user"></i></a>
             <a href="#" class="w3-bar-item w3-button"><i class="fa fa-cog"></i></a>-->
-          <!-- </div> -->
+        <!-- </div> -->
         <!-- </div>
         <hr> -->
         <!-- <div class="w3-container">
           <h5>Coloradio</h5>
         </div> -->
         <div class="w3-bar-block">
-          <a href="#" class="w3-bar-item w3-button w3-padding-16 w3-hide-large w3-dark-grey w3-hover-black" onclick="w3_close()" title="close menu">Close Menu</a>
-          <a href="javascript:admin.loadpage('module/dashboard/index.html','Dashboard');" id="modulename" class="w3-bar-item w3-button w3-padding">Dashboard</a>
-          <a href="javascript:admin.loadpage('module/allaudio/index.html','Local Audio');" class="w3-bar-item w3-button w3-padding">Local Audio</a>
-          <a href="javascript:admin.loadpage('module/sync/index.html','Synchronize');" class="w3-bar-item w3-button w3-padding">Synchronize</a>
-          <a href="javascript:admin.loadpage('module/convert/index.html','Convert');" class="w3-bar-item w3-button w3-padding">Convert</a>
-          <h4>Networks</h4>
-          <select class="w3-select" id="globaldatasets" onchange="admin.loaddataset();"></select>
-      
-      <a href="javascript:admin.loadpage('module/audio/index.html','Audio');" class="w3-bar-item w3-button w3-padding">Audio</a>
-      
-      <a href="javascript:admin.loadpage('module/spots/index.html','Spots');" class="w3-bar-item w3-button w3-padding">Spots</a>
-      <a href="javascript:admin.loadpage('module/stations/index.html','Stations');" class="w3-bar-item w3-button w3-padding">Stations</a>
-      <a href="javascript:admin.loadpage('module/playlists/index.html','Playlists');" class="w3-bar-item w3-button w3-padding">Playlists</a>
-      <br><br>
+            <a href="#" class="w3-bar-item w3-button w3-padding-16 w3-hide-large w3-dark-grey w3-hover-black" onclick="w3_close()" title="close menu">Close Menu</a>
+            <a href="javascript:admin.loadpage('module/dashboard/index.html','Dashboard');" id="modulename" class="w3-bar-item w3-button w3-padding">Dashboard</a>
+            <a href="javascript:admin.loadpage('module/allaudio/index.html','Local Audio');" class="w3-bar-item w3-button w3-padding">Local Audio</a>
+            <a href="javascript:admin.loadpage('module/sync/index.html','Synchronize');" class="w3-bar-item w3-button w3-padding">Synchronize</a>
+            <a href="javascript:admin.loadpage('module/convert/index.html','Convert');" class="w3-bar-item w3-button w3-padding">Convert</a>
+            <h4>Networks</h4>
+            <select class="w3-select" id="globaldatasets" onchange="admin.loaddataset();"></select>
+
+            <a href="javascript:admin.loadpage('module/audio/index.html','Audio');" class="w3-bar-item w3-button w3-padding">Audio</a>
+
+            <a href="javascript:admin.loadpage('module/spots/index.html','Spots');" class="w3-bar-item w3-button w3-padding">Spots</a>
+            <a href="javascript:admin.loadpage('module/stations/index.html','Stations');" class="w3-bar-item w3-button w3-padding">Stations</a>
+            <a href="javascript:admin.loadpage('module/playlists/index.html','Playlists');" class="w3-bar-item w3-button w3-padding">Playlists</a>
+            <br><br>
         </div>
-      </nav>
-      <!-- Overlay effect when opening sidebar on small screens -->
-<div class="w3-overlay w3-hide-large w3-animate-opacity" onclick="w3_close()" style="cursor:pointer" title="close side menu" id="myOverlay"></div>
-<!--begin sidebar
+    </nav>
+    <!-- Overlay effect when opening sidebar on small screens -->
+    <div class="w3-overlay w3-hide-large w3-animate-opacity" onclick="w3_close()" style="cursor:pointer" title="close side menu" id="myOverlay"></div>
+    <!--begin sidebar
 <div class="w3-sidebar w3-card-4 w3-border-right w3-theme-light" id="sidebar" style="width: 160px; z-index: 3;"> 
   <div class="w3-bar w3-blue-grey">
 
@@ -62,27 +64,28 @@ class="w3-bar-item w3-button w3-right w3-padding-16" title="close Sidebar">&time
   
 </div>
 end sidebar -->
-<!--start new  content -->
-<div class="w3-display-container w3-main" style="margin-left:200px;margin-top:13px;">
-      
+    <!--start new  content -->
+    <div class="w3-display-container w3-main" style="margin-left:200px;margin-top:13px;">
 
-      
-    <!-- <div class="main-panel"> -->
-      <div class="w3-display-container" id="main">
-       
-       <iframe id="moduleframe" src="" sandbox="allow-forms allow-pointer-lock allow-same-origin allow-scripts allow-top-navigation allow-modals allow-popups allow-popups-to-escape-sandbox" style="margin-top: 30px; bottom: 0px;border: 1px solid red;height: 92vh;width: 100%; overflow-y: scroll;"></iframe>
-      </div>
-    <!-- </div> -->
 
-</div>
-<script>
-var app = "[% app %]";
-var basedb = "[% app %]/[% app %]";
-</script>
-</script>
-<script src="[% abspath %][% staticpath %]js/request.js"></script>
-<script src="[% abspath %][% staticpath %]js/admin.js"></script>
-<!-- end new content -->
+
+        <!-- <div class="main-panel"> -->
+        <div class="w3-display-container" id="main">
+
+            <iframe id="moduleframe" src="" sandbox="allow-forms allow-pointer-lock allow-same-origin allow-scripts allow-top-navigation allow-modals allow-popups allow-popups-to-escape-sandbox" style="margin-top: 30px; bottom: 0px;border: 1px solid red;height: 92vh;width: 100%; overflow-y: scroll;"></iframe>
+        </div>
+        <!-- </div> -->
+
+    </div>
+    <script>
+        var app = "[% app %]";
+        var basedb = "[% app %]/[% app %]";
+    </script>
+    </script>
+    <script src="[% abspath %][% staticpath %]js/request.js"></script>
+    <script src="[% abspath %][% staticpath %]js/admin.js"></script>
+    <!-- end new content -->
 
 </body>
+
 </html>
\ No newline at end of file
index a7fe45e..a23b1fa 100644 (file)
@@ -1,13 +1,81 @@
-var tbl=null;
-function initpage(){
-  console.log(mpref.cfg);
-  console.log("APP:" + parent.app);
+var tblaudio = null;
+
+function initpage() {
+    console.log("INIT ALL Audio");
+    console.log(mpref.cfg);
+    console.log("APP:" + parent.app);
+    loadtblaudio();
+    flatpickr(".datefield", {
+        altInput: true,
+        altFormat: "d.m.Y",
+        dateFormat: "Y-m-d",
+        allowInput: true,
+        "locale": "de"
+    });
+    flatpickr(".timefield", {
+        altInput: true,
+        altFormat: "i:s",
+        dateFormat: "i:s",
+        allowInput: true,
+        enableTime: true,
+        "locale": "de"
+    });
 }
 
-function loadtblaudio(){
-  
+function loadtblaudio() {
+    tblaudio = new Tabulator("#tbl_audio", {
+        headerFilterPlaceholder: "filter...",
+        height: "92vh",
+        layout: "fitData",
+        selectable: 1,
+        columns: [
+            { title: "Titel", field: "title", headerFilter: "input" },
+            { title: "Artist", field: "artist", headerFilter: "input" },
+            {
+                title: "Dauer",
+                field: "duration",
+                formatter: "datetime",
+                formatterParams: {
+                    inputFormat: "HH:mm:ss",
+                    outputFormat: "mm:ss",
+                    invalidPlaceholder: "",
+                }
+            },
+            { title: "Ordner", field: "folder", headerFilter: "input" },
+            { title: "Jahr", field: "year", headerFilter: "input" },
+            { title: "Stimmung", field: "mood", headerFilter: "input" },
+            { title: "Genre", field: "genre", headerFilter: "input" },
+            { title: "Tempo", field: "tempo", headerFilter: "input" }
+        ]
+    });
+    getaudiotabledata();
+    return false;
 }
 
-function loadtblcategory(){
+function getaudiotabledata() {
+
+    req.reqdata("POST", "db.cgi", { "db": parent.app + "/" + parent.app, "get": "music" }, loadaudiotbldata);
+    return false;
+}
+
+function loadaudiotbldata(data) {
+    console.log(data);
+    if (data && data.sqldata) {
+        tblaudio.setData(data.sqldata);
+    }
+    return false;
+}
 
+function edit() {
+    var udata = tblaudio.getSelectedData();
+    if (udata[0]) {
+        console.log(udata[0]);
+        cleanform();
+        fillformbydataclass('music', udata[0]);
+        document.getElementById("pnl_audiolist").style.display = 'none';
+        document.getElementById("tlb_audiolist").style.display = 'none';
+        document.getElementById("pnl_audiodata").style.display = 'block';
+        document.getElementById("tlb_audiodata").style.display = 'block';
+    }
+    return false;
 }
\ No newline at end of file
index ee26952..4907c68 100644 (file)
-<!DOCTYPE html>
-<html lang="en">
-  <head>
-    <meta charset="utf-8">
-    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
-    
-    <link rel="stylesheet" href="vendors/tabulator/css/tabulator_site.min.css">
-    <link rel="stylesheet" href="css/w3pro.css">
-  </head>
-  <body>
-      <div class="w3-display-container" >
-          <div class="w3-sidebar w3-bar-block w3-grey" style="width:200px;" id="mySidebar">
-              <select class="w3-bar-item w3-select" id="sel_category" onchange="changecategory();">
-                  
-              </select>
-              <div id="tbl_cat" class="w3-border">
-
-              </div>
-              
+[% PROCESS macro/fields.tt %]
+<div class="w3-top">
+    <div class="w3-bar w3-grey">
+        <a href="index.html" class="w3-bar-item w3-button">Audio-List</a>
+        <div id="tlb_audiolist">
+            <div class="w3-dropdown-hover">
+                <button class="w3-button">Import</button>
+                <div class="w3-dropdown-content w3-bar-block w3-card-4">
+                    <a href="#" class="w3-bar-item w3-button">From Folder</a>
+                    <a href="#" class="w3-bar-item w3-button">Files</a>
+                    <a href="#" class="w3-bar-item w3-button">Get WebInfo</a>
+                </div>
+            </div>
+            <div class="w3-dropdown-hover">
+                <button class="w3-button">Export</button>
+                <div class="w3-dropdown-content w3-bar-block w3-card-4">
+                    <a href="#" class="w3-bar-item w3-button">To Category</a>
+                    <a href="#" class="w3-bar-item w3-button">To Network</a>
+                    <a href="#" class="w3-bar-item w3-button">To Station</a>
+                </div>
             </div>
-          <div class="w3-bar w3-top w3-grey">
-              <a href="index.html" class="w3-bar-item w3-button w3-border">Home</a>
-              
-              <button class="w3-bar-item w3-button w3-boder" onclick="addfolder();">Add Folder</button>
-              <button class="w3-bar-item w3-button w3-boder" onclick="addfiles();">Add Files</button>
-              <button class="w3-bar-item w3-button w3-boder" onclick="getwebinfo();">Get Webinfo</button>
-              <button class="w3-bar-item w3-button w3-boder" onclick="convertaudio();">Convert Audio</button>
-              <button class="w3-bar-item w3-button w3-boder" onclick="AddToVFolder();">Add To Virtual Folder</button>
+            <div class="w3-dropdown-hover">
+                <button class="w3-button">Gruppieren Nach</button>
+                <div class="w3-dropdown-content w3-bar-block w3-card-4">
+                    <a href="#" class="w3-bar-item w3-button">Gruppierung aufheben</a>
+                    <a href="#" class="w3-bar-item w3-button">Ordner</a>
+                    <a href="#" class="w3-bar-item w3-button">Artist</a>
+                    <a href="#" class="w3-bar-item w3-button">Category</a>
+                    <a href="#" class="w3-bar-item w3-button">Stimmung</a>
+                    <a href="#" class="w3-bar-item w3-button">Tempo</a>
+                    <a href="#" class="w3-bar-item w3-button">Genre</a>
+                    <a href="#" class="w3-bar-item w3-button">Jahr</a>
+                    <a href="#" class="w3-bar-item w3-button">Jahrzehnt</a>
+                </div>
+            </div>
+            <a href="javascript:edit();" class="w3-bar-item w3-right w3-button">Bearbeiten</a>
+            <a href="javascript:remove();" class="w3-bar-item w3-right w3-button">Löschen</a>
+        </div>
+        <div id="tlb_audiodata" style="display: none;">
+            <button class="w3-bar-item w3-right w3-button" onclick="saveform('audio');">speichern</button>
+            <button class="w3-bar-item w3-right w3-button" onclick="replaceaudio();">ersetzen</button>
+            <button class="w3-bar-item w3-right w3-button" onclick="renamefile();">umbennen</button>
+            <button class="w3-bar-item w3-right w3-button" onclick="movefile();">verschieben</button>
+        </div>
+        <!--<button class="w3-bar-item w3-button w3-boder" onclick="convertaudio();">Convert Audio</button>
+        <button class="w3-bar-item w3-button w3-boder" onclick="AddToVFolder();">Add To Virtual Folder</button>-->
+
+    </div>
+</div>
+<div class="w3-display-container" id="pnl_audiolist">
 
-          </div>
+
+    <div class="w3-container" style="margin-top: 40px;">
+        <div id="tbl_audio"></div>
+    </div>
+</div>
+<div class="w3-display-container" id="pnl_audiodata" style="display: hidden;">
+    <!-- <div class="w3-top">
+        <div class="w3-bar w3-grey">
+            <a href="index.html" class="w3-bar-item w3-button">Audio-List</a>
           
-          <div class="w3-container" style="margin-left: 200px; margin-top: 40px;">
-            <div class="w3-row">
-                <div class="w3-light-grey" style="height: 50vh;">
-                    <div id="tbl_audio"></div>
-                </div>
-                <div class="w3-row" id="audiodata" style="height: 45vh;">
-                    <div id="frm_audio">
-                    <div class="w3-container">
-                        <label class="w3-label">Original File</label>
-                        <input type="text" class="w3-input" value="" id="music_filename" name="music_filename" />
-                        
-                      </div>
-                      <div class="w3-container">
-                          <label class="w3-label">Converted File</label>
-                          <input type="text" class="w3-input" value="" id="music_convertedfile" name="music_convertedfile" />
-                          
-                        </div>
-                    <div class="w3-container">
-                        <label class="w3-label">Title</label>
-                      <input type="text" class="w3-input" value="" id="music_title" name="music_title" />
-                      
-                    </div>
-                    <div class="w3-container">
-                        <label class="w3-label">Artist</label>
-                      <input type="text" class="w3-input" value="" id="music_artist" name="music_artist" />
-                      
+        </div>
+    </div> -->
+    <div class="w3-container" style="margin-top: 40px">
+        <div class="w3-row" id="audiodata">
+            <form id="frm_audio">
+                [% fieldhidden('id','music','ident','') %]
+                <div class="w3-row">
+                    <div class="w3-col w3-container m8">
+                        [% fieldeditbox('title','music','Title','','','','') %][% fieldeditbox('artist','music','Artist','','','','') %] [% fieldtagbox('vfolder','music','categories','','','') %][% fieldtagbox('genre','music','Genre','','','') %] [% fieldtagbox('tempo','music','Tempo','','','')
+                        %] [% fieldtagbox('mood','music','Stimmung','','','') %] [% fieldnumberbox('myear','music','Jahr','w3-third','','') %][% fieldtagbox('language','music','Sprache(n)','w3-twothird','','') %] [% fieldtextarea('comment','music','Kommentar','','','50px','')
+                        %]
                     </div>
-                    <div class="w3-cell-row">
-                          
-                          
-                          <div class="w3-container w3-cell">
-                              <label class="w3-label">Duration</label>
-                              <input type="text" class="w3-input" value="" id="music_duration" name="music_duration" />
-                              
-                          </div>
-                          <div class="w3-container w3-cell">
-                              <label class="w3-label">Bitrate</label>
-                              <input type="text" class="w3-input" value="" id="music_bitrate" name="music_bitrate" />
-                              
-                          </div>
-                          <div class="w3-container w3-cell">
-                              <label class="w3-label">Samplerate</label>
-                              <input type="text" class="w3-input" value="" id="music_samplerate" name="music_samplerate" />
-                              
-                          </div>
-                          
+                    <div class="w3-col w3-container m4">
+                        [% fieldeditbox('folder','music','Ordner','','readonly','','') %] [% fieldeditbox('filename','music','Datei-Name','','readonly','') %]
+                        <div class="w3-cell-row">
+                            [% fieldtimebox('duration','music','Dauer','w3-half','readonly','') %] [% fieldeditbox('filetype','music','Audio-Format','w3-half','readonly','') %]
+                        </div> [% fieldnumberbox('bitrate','music','Bitrate','w3-half','readonly','') %] [% fieldnumberbox('samplerate','music','Samplerate','w3-half','readonly','') %] [% fieldnumberbox('filesize','music','Größe','w3-half','readonly','')
+                        %] [% fielddatebox('modified','music','Datum','w3-half','readonly','') %]
                     </div>
-                    <div class="w3-cell-row">
-                        <div class="w3-container w3-cell">
-                            <label class="w3-label">Type</label>
-                            <input type="text" class="w3-input" value="" id="music_filetype" name="music_filetype" />
-                            
-                        </div>
-                        
-                        <div class="w3-container w3-cell">
-                            <label class="w3-label">Date</label>
-                            <input type="text" class="w3-input" value="" id="music_mdate" name="music_mdate" />
-                            
-                        </div>
-                        <div class="w3-container w3-cell">
-                            <label class="w3-label">Size</label>
-                            <input type="text" class="w3-input" value="" id="music_samplerate" name="music_filesize" />
-                            
-                        </div>
-                    </div>
-                    <div class="w3-cell-row">
-                        <div class="w3-container w3-cell">
-                            <label class="w3-label">Category</label>
-                            <input type="text" class="w3-input" value="" id="music_category" name="music_category" />
-                            
-                        </div>
-                        <div class="w3-container w3-cell">
-                            <label class="w3-label">Year</label>
-                            <input type="text" class="w3-input" value="" id="music_year" name="music_year" />
-                            
-                        </div>
-                        <div class="w3-container w3-cell">
-                            <label class="w3-label">Language</label>
-                            <input type="text" class="w3-input" value="" id="music_language" name="music_language" />
-                            
-                        </div>
-                    </div>
-                    <div class="w3-container">
-                        <label class="w3-label">Moods</label>
-                        <input type="text" class="w3-input multiinput" value="" id="mood_moodname" name="mood_moodname" />
-                        
-                      </div>
-                      <div class="w3-container">
-                          <label class="w3-label">Tempo</label>
-                          <input type="text" class="w3-input multiinput" value="" id="tempo_temponame" name="tempo_temponame" />
-                          
-                        </div>
-                        <div class="w3-container">
-                            <label class="w3-label">Genre</label>
-                          <input type="text" class="w3-input multiinput" value="" id="genre_genrename" name="genre_genrename" />
-                          
-                        </div>
-                        <div class="w3-container">
-                            <label class="w3-label">Comment</label>
-                            <textarea class="w3-input" id="music_comment" name="music_comment" /></textarea>
-                            
-                          </div>
                 </div>
-              </div>
-            </div>  
-            
-          </div>
-          
-      </div>
-  </body>
-<script src="vendors/tabulator/js/tabulator.min.js"></script>
-<script src="js/app.js"></script>
-<!-- <script src="vendors/choices/choices.min.js"></script> -->
-<script src="js/request.js"></script>
-<!-- <script src="renderer.js"></script> -->
-<script src="js/category_sql.js"></script>
-<script src="js/audio.js"></script>
-</body>
-</html>
\ No newline at end of file
+            </form>
+        </div>
+    </div>
+</div>
\ No newline at end of file
index e70b45c..2e22f47 100644 (file)
@@ -1,69 +1,54 @@
 <!DOCTYPE html>
 <html lang="en">
+
 <head>
-<meta charset="UTF-8">
-<meta name="viewport" content="width=device-width, initial-scale=1.0">
-<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
-  <meta http-equiv="Pragma" content="no-cache" />
-  <meta http-equiv="Expires" content="0" />
-<link rel="stylesheet" href="[% abspath %][% staticpath %]css/w3pro.css">
-<title>Invoice Journal</title>
+    <meta charset="UTF-8">
+    <meta content="width=device-width, initial-scale=1.0" name="viewport">
+    <meta content="no-cache, no-store, must-revalidate" http-equiv="Cache-Control" />
+    <meta content="no-cache" http-equiv="Pragma" />
+    <meta content="0" http-equiv="Expires" />
+    <link rel="stylesheet" href="[% abspath %][% staticpath %]css/w3pro.css">
+    <title>Invoice Journal</title>
 </head>
-<body>
-<!--begin sidebar-->
-<div class="w3-sidebar w3-card-4 w3-border-right w3-theme-light" id="sidebar" style="width: 210px; z-index: 3;"> 
-  <div class="w3-bar w3-blue-grey">
-<a href="index.html" class="w3-bar-item">
-[% module %]
-<img src="[% abspath %][% staticpath %]img/invoicejournal.png" style="width: 100px;"></a>
-<button onclick="closeSidebar();"
-class="w3-bar-item w3-button w3-right w3-padding-16" title="close Sidebar">&times;</button>
-</div>
-<div class="w3-bar-block">
-    <select class="w3-select" id="globaldatasets" onchange="admin.loaddataset();">
-      </select>
-      <a href="javascript:admin.loadpage('module/dashboard/index.html','Übersicht');" class="w3-bar-item w3-button">Übersicht</a>
-      <a href="javascript:admin.loadpage('module/invoicejournal/index.html','Journal');" class="w3-bar-item w3-button">Journal</a>
-      <a href="javascript:admin.loadpage('module/sales/index.html','Verkäufe');" class="w3-bar-item w3-button">Verkäufe</a>
-      <!-- <a href="javascript:admin.loadpage('module/invoices/index.html','Rechnungs-Erstellung');" class="w3-bar-item w3-button">Rechnungs-Erstellung</a> -->
-      <a href="javascript:admin.loadpage('module/accounts/index.html','Adressen');" class="w3-bar-item w3-button">Addressen</a>
-      <a href="javascript:admin.loadpage('module/bankaccount/index.html','Bankkonto');" class="w3-bar-item w3-button">Bankkonto</a>
-      <!-- <a href="javascript:admin.loadpage('module/documents/index.html','Dokumente');" class="w3-bar-item w3-button">Dokumente</a> -->
-      <a href="javascript:admin.loadpage('module/offers/index.html','Angebote');" class="w3-bar-item w3-button">Angebote</a>
-      <a href="javascript:admin.loadpage('module/products/index.html','Produkte');" class="w3-bar-item w3-button">Produkte</a>
-      <!-- <a href="javascript:admin.loadpage('module/templates/index.html','Vorlagen');" class="w3-bar-item w3-button">Vorlagen</a> -->
-      <a href="javascript:admin.loadpage('module/settings/index.html','Einstellungen');" class="w3-bar-item w3-button">Einstellungen</a></li>
 
-</div>
-  
-  
-</div>
-<!--end sidebar -->
-<!--start new  content -->
-<div class="w3-display-container" style="min-with: 320px;">
-      
-  <div class="w3-container"  style="margin: 0px;  padding: 0px;">
-      <header class="w3-top w3-bar w3-border-bottom w3-theme-light">
-          <button class="w3-bar-item w3-button w3-blue-grey" id="btnsidebar" onclick="openSidebar();"><img src="[% abspath %][% staticpath %]img/icons/menu_white.svg" style="height: 33px;" /></button>
-          <h5 class="w3-bar-item" id="modulename" style="margin-left: 150px; max-width: 300px; overflow: hidden;"></h5>
-          <!--<a class="w3-bar-item w3-button w3-right w3-border w3-blue-grey" href="javascript:admin.logout();"><img src="img/icons/logout_white.svg" style="height: 32px;" /></a>-->
-          
-        </header> 
-    <!-- <div class="main-panel"> -->
-      <div class="w3-display-container" id="main">
-       
-       <iframe id="moduleframe" src="" sandbox="allow-forms allow-pointer-lock allow-same-origin allow-scripts allow-top-navigation allow-modals allow-popups allow-popups-to-escape-sandbox" style="margin-top: 48px; bottom: 0px;border: 0px;height: 90vh;width: 100%; overflow-y: scroll;"></iframe>
-      </div>
-    <!-- </div> -->
-  </div>
-</div>
-<script>
-var app = "[% app %]";
-var basedb = "[% app %]/[% app %]";
-</script>
-<script src="[% abspath %][% staticpath %]js/request.js"></script>
-<script src="[% abspath %][% staticpath %]js/admin.js"></script>
-<!-- end new content -->
+<body>
+    <div class="w3-bar w3-top w3-theme-light w3-large" style="z-index:4">
+        <button class="w3-bar-item w3-button w3-hide-large w3-hover-none w3-hover-text-light-grey" onclick="w3_open();"><img src="[% abspath %][% staticpath %]img/icons/menu_white.svg" style="height: 33px;"/></button>
+        <span class="w3-bar-item">Invoice Journal</span>
+        <span class="w3-bar-item w3-right" id="modulename"></span>
+    </div>
+    <nav class="w3-sidebar w3-collapse w3-theme-light w3-animate-left" id="mySidebar" style="z-index:3;width:200px; padding-top: 35px;">
+        <div class="w3-bar-block">
+            <a class="w3-bar-item w3-button w3-padding-16 w3-hide-large w3-dark-grey w3-hover-black" href="#" onclick="w3_close()" title="close menu">Close Menu</a>
 
+            <select class="w3-select" id="globaldatasets" onchange="admin.loaddataset();"></select>
+            <a class="w3-bar-item w3-button w3-block" href="javascript:admin.loadpage('module/dashboard/index.html','Übersicht');">Übersicht</a>
+            <a class="w3-bar-item w3-button w3-padding" href="javascript:admin.loadpage('module/invoicejournal/index.html','Journal');">Journal</a>
+            <a class="w3-bar-item w3-button w3-padding" href="javascript:admin.loadpage('module/sales/index.html','Verkäufe');">Verkäufe</a>
+            <!-- <a href="javascript:admin.loadpage('module/invoices/index.html','Rechnungs-Erstellung');" class="w3-bar-item w3-button">Rechnungs-Erstellung</a> -->
+            <a class="w3-bar-item w3-button w3-padding" href="javascript:admin.loadpage('module/accounts/index.html','Adressen');">Addressen</a>
+            <a class="w3-bar-item w3-button w3-padding" href="javascript:admin.loadpage('module/bankaccount/index.html','Bankkonto');">Bankkonto</a>
+            <!-- <a href="javascript:admin.loadpage('module/documents/index.html','Dokumente');" class="w3-bar-item w3-button">Dokumente</a> -->
+            <a class="w3-bar-item w3-button w3-padding" href="javascript:admin.loadpage('module/offers/index.html','Angebote');">Angebote</a>
+            <a class="w3-bar-item w3-button w3-padding" href="javascript:admin.loadpage('module/products/index.html','Produkte');">Produkte</a>
+            <!-- <a href="javascript:admin.loadpage('module/templates/index.html','Vorlagen');" class="w3-bar-item w3-button">Vorlagen</a> -->
+            <a class="w3-bar-item w3-button w3-padding" href="javascript:admin.loadpage('module/settings/index.html','Einstellungen');">Einstellungen</a>
+        </div>
+    </nav>
+    <div class="w3-overlay w3-hide-large w3-animate-opacity" id="myOverlay" onclick="w3_close()" style="cursor:pointer" title="close side menu"></div>
+    </div>
+    <div class="w3-display-container w3-main" style="margin-left:200px;margin-top:13px;">
+        <div class="w3-display-container" id="main">
+            <iframe id="moduleframe" sandbox="allow-forms allow-pointer-lock allow-same-origin allow-scripts allow-top-navigation allow-modals allow-popups allow-popups-to-escape-sandbox" src="" style="margin-top: 30px; bottom: 0px;border: 0px;height: 92vh;width: 100%; overflow-y: scroll;"></iframe>
+        </div>
+    </div>
+    <script>
+        var app = "[% app %]";
+        var basedb = "[% app %]/[% app %]";
+    </script>
+    <script src="[% abspath %][% staticpath %]js/request.js"></script>
+    <script src="[% abspath %][% staticpath %]js/admin.js"></script>
+    <!-- end new content -->
 </body>
+
 </html>
\ No newline at end of file
index b1a8462..a457f39 100644 (file)
-var tbl=null;
-var statustypes = [{"value":"planned","label":"geplant"},
-{"value":"sended","label":"verschickt"},
-{"value":"received","label":"erhalten"},
-{"value":"payed","label":"bezahlt"},
-{"value":"overdue","label":"überfällig"}
+var tbl = null;
+var tblproducts = null;
+var tblfiles = null;
+var statustypes = [{ "value": "planned", "label": "geplant" },
+    { "value": "sended", "label": "verschickt" },
+    { "value": "received", "label": "erhalten" },
+    { "value": "payed", "label": "bezahlt" },
+    { "value": "overdue", "label": "überfällig" }
 ];
 
-var statuslang = {"planned":"geplant","payed":"bezahlt","received":"erhalten","overdue":"überfällig","sended":"verschickt"};
-var quarters =[{"value":"Q1","label":"Q1"},{"value":"Q2","label":"Q2"},{"value":"Q3","label":"Q3"},{"value":"Q4","label":"Q4"}];
-var invoicetypes = [{"value":"inv-out","label":"Ausgangs-Rechnung"},{"value":"inv-in","label":"Eingangs-Rechnung"},{"value":"crn-out","label":"Ausgangs-Gutschrift"},{"value":"crn-in","label":"Eingangs-Gutschrift"}];
+var statuslang = { "planned": "geplant", "payed": "bezahlt", "received": "erhalten", "overdue": "überfällig", "sended": "verschickt" };
+var quarters = [{ "value": "Q1", "label": "Q1" }, { "value": "Q2", "label": "Q2" }, { "value": "Q3", "label": "Q3" }, { "value": "Q4", "label": "Q4" }];
+var invoicetypes = [{ "value": "inv-out", "label": "Ausgangs-Rechnung" }, { "value": "inv-in", "label": "Eingangs-Rechnung" }, { "value": "crn-out", "label": "Ausgangs-Gutschrift" }, { "value": "crn-in", "label": "Eingangs-Gutschrift" }];
+
+var templates = [{ "value": "dks-deutsch", "label": "DKS - Deutsch" }, { "value": "dks-french", "label": "DKS  Französisch" }, { "value": "dks-english", "label": "DKS - english" }];
 
 var choice = {
-    "invoices":{
-      "status":null,
-      "id_receipient":null,
-      "id_sender":null,
-      "bquarter":null,
-      "byear": null,
-      "invoicetype":null
-  }};
+    "invoices": {
+        "status": null,
+        "id_receipient": null,
+        "id_sender": null,
+        "bquarter": null,
+        "byear": null,
+        "invoicetype": null,
+        "template": null
+    }
+};
 
 var choicedata = {
-    "invoices":{
-      "status":{"data":statustypes},
-      "id_receipient":{"view":"receipients"},
-      "id_sender":{"view":"receipients"},
-      "bquarter":{"data":quarters},
-      "byear": {"view":"businessyears"},
-      "invoicetype":{"data":invoicetypes}
-  }};
-
-function initpage(){
-  console.log(mpref.cfg);
-  console.log("APP:" + parent.app);
-  flatpickr(".datefield",{altInput: true,
-    altFormat: "d.m.Y",
-    dateFormat: "Y-m-d",
-    allowInput: true,
-    "locale": "de",
-  });
-
-  tbl = new Tabulator("#tbl_invoices", {
-    headerFilterPlaceholder:"filter...",
-    height: "92vh",
-    layout:"fitData",
-    selectable:1,
-    // responsiveLayout:"collapse",
-    columns:[
-    {title:"Quartal", field:"bquarter",headerFilter:"input"},  
-    {title:"Datum", field:"invoicedate",formatter:"datetime", formatterParams:{
-      inputFormat:"YYYY-MM-DD",
-      outputFormat:"DD.MM.YYYY",
-      invalidPlaceholder:""}},
-    {title:"Empfänger", field:"receipient",headerFilter:"input", width: 200}, 
-    {title:"Sender", field:"sender",headerFilter:"input"},
-    {title:"Referenz",field:"reference",headerFilter:"input"},
-    {title:"Status",field:"status",headerFilter:"input",formatter:function(cell, formatterParams){
-      var value = cell.getValue();
-      //console.log(value.indexOf("bez"));
-      if(value.indexOf("payed") >= 0){
-        return "<span style='color:green;'>" + statuslang[value] + "</span>";
-      }
-      else if (value.indexOf("overdue") >= 0) {
-        return "<span style='color:red; font-weight: bold;'>" + statuslang[value]  + "</span>";
-      } 
-      else if (value.indexOf("planned") >= 0) {
-        return "<span style='color:grey;'>" + statuslang[value]  + "</span>";
-      }
-      else{
-        return "<span style='color:orange;'>" + statuslang[value]  + "</span>";
-      }
-   }},
-    {title:"Netto",field:"netamount",align:"right",formatter:"money", formatterParams:{
-      decimal:",",
-      thousand:".",
-      symbol:"€",
-      symbolAfter:"p",
-      precision:2,
-  }},
-  {title:"MwSt",field:"vatamount",align:"right",formatter:"money", formatterParams:{
-    decimal:",",
-    thousand:".",
-    symbol:"€",
-    symbolAfter:"p",
-    precision:2,
-}},{title:"Brutto",field:"grossamount",align:"right",formatter:"money", formatterParams:{
-  decimal:",",
-  thousand:".",
-  symbol:"€",
-  symbolAfter:"p",
-  precision:2,
-}},{title:"Bezahlt",field:"payedamount",align:"right",formatter:"money", formatterParams:{
-  decimal:",",
-  thousand:".",
-  symbol:"€",
-  symbolAfter:"p",
-  precision:2,
-}}
-]
-  });
-  gettbldata();
-  fillchoices();
-  return false;
-}
-
-function gettbldata(){
-  req.reqdata("POST","db.cgi",{"db":parent.app + "/" + mpref.cfg.db, "get":"invoicelist"},loadtbldata);
-  return false;
-}
-
-function loadtbldata(data){
-  console.log(data);
-  if (data && data.sqldata){
-    tbl.setData(data.sqldata);
-  }
-  return false;
-}
-
-function edit(){
-  var udata = tbl.getSelectedData();
-  //cleanform("invoices");
-  if (udata[0]){
-    console.log(udata[0]);
-    req.reqdata("POST","db.cgi",{"db":parent.app + "/" + mpref.cfg.db, "get":"invoices","filter":"id=" + udata[0].id},fillinvoice);
-    viewinvoicepanel();
-  }
-  return false;
+    "invoices": {
+        "status": { "data": statustypes },
+        "id_receipient": { "view": "receipients" },
+        "id_sender": { "view": "receipients" },
+        "bquarter": { "view": "quarters" },
+        "byear": { "view": "businessyears" },
+        "invoicetype": { "data": invoicetypes },
+        "template": { "data": templates }
+    }
+};
+
+function initpage() {
+    console.log(mpref.cfg);
+    console.log("APP:" + parent.app);
+    flatpickr(".datefield", {
+        altInput: true,
+        altFormat: "d.m.Y",
+        dateFormat: "Y-m-d",
+        allowInput: true,
+        "locale": "de",
+    });
+
+    tbl = new Tabulator("#tbl_invoices", {
+        headerFilterPlaceholder: "filter...",
+        height: "92vh",
+        layout: "fitData",
+        selectable: 1,
+        // responsiveLayout:"collapse",
+        columns: [
+            { title: "Quartal", field: "bquarter", headerFilter: "input" },
+            {
+                title: "Datum",
+                field: "invoicedate",
+                formatter: "datetime",
+                formatterParams: {
+                    inputFormat: "YYYY-MM-DD",
+                    outputFormat: "DD.MM.YYYY",
+                    invalidPlaceholder: ""
+                }
+            },
+            { title: "Empfänger", field: "receipient", headerFilter: "input", width: 200 },
+            { title: "Sender", field: "sender", headerFilter: "input" },
+            { title: "Referenz", field: "reference", headerFilter: "input" },
+            {
+                title: "Status",
+                field: "status",
+                headerFilter: "input",
+                formatter: function(cell, formatterParams) {
+                    var value = cell.getValue();
+                    //console.log(value.indexOf("bez"));
+                    if (value.indexOf("payed") >= 0) {
+                        return "<span style='color:green;'>" + statuslang[value] + "</span>";
+                    } else if (value.indexOf("overdue") >= 0) {
+                        return "<span style='color:red; font-weight: bold;'>" + statuslang[value] + "</span>";
+                    } else if (value.indexOf("planned") >= 0) {
+                        return "<span style='color:grey;'>" + statuslang[value] + "</span>";
+                    } else {
+                        return "<span style='color:orange;'>" + statuslang[value] + "</span>";
+                    }
+                }
+            },
+            {
+                title: "Netto",
+                field: "netamount",
+                align: "right",
+                formatter: "money",
+                formatterParams: {
+                    decimal: ",",
+                    thousand: ".",
+                    symbol: "€",
+                    symbolAfter: "p",
+                    precision: 2,
+                }
+            },
+            {
+                title: "MwSt",
+                field: "vatamount",
+                align: "right",
+                formatter: "money",
+                formatterParams: {
+                    decimal: ",",
+                    thousand: ".",
+                    symbol: "€",
+                    symbolAfter: "p",
+                    precision: 2,
+                }
+            }, {
+                title: "Brutto",
+                field: "grossamount",
+                align: "right",
+                formatter: "money",
+                formatterParams: {
+                    decimal: ",",
+                    thousand: ".",
+                    symbol: "€",
+                    symbolAfter: "p",
+                    precision: 2,
+                }
+            }, {
+                title: "Bezahlt",
+                field: "payedamount",
+                align: "right",
+                formatter: "money",
+                formatterParams: {
+                    decimal: ",",
+                    thousand: ".",
+                    symbol: "€",
+                    symbolAfter: "p",
+                    precision: 2,
+                }
+            }
+        ]
+    });
+    gettbldata();
+    fillchoices();
+    inittblbookings();
+    inittblfiles();
+    return false;
+}
+
+function inittblfiles() {
+    tblfiles = new Tabulator("#tbl_files", {
+        height: "80vh",
+        layout: "fitData",
+        selectable: 1,
+        columns: [
+            { title: "Datei", field: "filename" },
+            { title: "Typ", field: "folder" }
+        ]
+    });
+    return false;
+}
+
+function gettblfilesdata() {
+    var udata = tbl.getSelectedData();
+    if (udata[0]) {
+        console.log(udata[0]);
+        req.reqdata("POST", "db.cgi", { "db": parent.app + "/" + mpref.cfg.db, "get": "fileslist", "filter": "id_invoice=" + udata[0].id }, loadtblfilesdata);
+    }
+    return false;
+}
+
+function loadtblfilesdata(data) {
+    console.log(data);
+    if (data && data.sqldata) {
+        tblfiles.setData(data.sqldata);
+    }
+    return false;
+}
+
+function inittblbookings() {
+    tblproducts = new Tabulator("#tbl_products", {
+        height: "80vh",
+        layout: "fitData",
+        selectable: 1,
+        columns: [
+            { title: "Beschreibung", field: "description" },
+            { title: "Anz.", field: "quantity" },
+            { title: "Einheit", field: "unit" },
+            { title: "Einzel-Preis", field: "unitamount" },
+            { title: "Netto", field: "netamount" },
+            { title: "MwSt.(%)", field: "vatpercent" },
+            { title: "MwSt.", field: "vatamount" }
+        ]
+    });
+    return false;
+}
+
+function gettblbookingdata() {
+    var udata = tbl.getSelectedData();
+    if (udata[0]) {
+        console.log(udata[0]);
+        req.reqdata("POST", "db.cgi", { "db": parent.app + "/" + mpref.cfg.db, "get": "bookings", "filter": "id_invoice=" + udata[0].id }, loadtblfilesdata);
+    }
+    return false;
+}
+
+function loadtblfilesdata(data) {
+    console.log(data);
+    if (data && data.sqldata) {
+        tblfiles.setData(data.sqldata);
+    }
+    return false;
+}
+
+function gettbldata() {
+    req.reqdata("POST", "db.cgi", { "db": parent.app + "/" + mpref.cfg.db, "get": "invoicelist" }, loadtbldata);
+    return false;
+}
+
+function loadtbldata(data) {
+    console.log(data);
+    if (data && data.sqldata) {
+        tbl.setData(data.sqldata);
+    }
+    return false;
 }
 
-function fillinvoice(data){
-  if (data && data.sqldata){
-    //console.log(data);
-    fillformbydataclass("invoices",data.sqldata[0],false);
-  }
-  return false;
+function edit() {
+    var udata = tbl.getSelectedData();
+    //cleanform("invoices");
+    if (udata[0]) {
+        console.log(udata[0]);
+        req.reqdata("POST", "db.cgi", { "db": parent.app + "/" + mpref.cfg.db, "get": "invoicelist", "filter": "id=" + udata[0].id }, fillinvoice);
+        viewinvoicepanel();
+    }
+    return false;
 }
 
-function add(){
-  //cleanform("invoices");
-  //TODO Clean form
-  viewinvoicepanel();
-  return false;
+function fillinvoice(data) {
+    if (data && data.sqldata) {
+        //console.log(data);
+        fillformbydataclass("invoices", data.sqldata[0], false);
+    }
+    return false;
+}
+
+function add() {
+    //cleanform("invoices");
+    //TODO Clean form
+    viewinvoicepanel();
+    return false;
 }
 
-function remove(){
+function remove() {
 
 }
 
-function viewinvoicepanel(){
-  document.getElementById('tbl_invoices').style.display='none';
-  document.getElementById('pnl_invoices').style.display='block';
-  return false;
+function viewinvoicepanel() {
+    document.getElementById('tbl_invoices').style.display = 'none';
+    document.getElementById('pnl_invoices').style.display = 'block';
+    return false;
 }
 
-function viewtable(){
-  gettbldata();
-  document.getElementById('pnl_invoices').style.display='none';
-  document.getElementById('tbl_invoices').style.display='block';
-  return false;
+function viewtable() {
+    gettbldata();
+    document.getElementById('pnl_invoices').style.display = 'none';
+    document.getElementById('tbl_invoices').style.display = 'block';
+    return false;
 }
 
-function getchoicedata(view){
-  req.reqdata("POST","db.cgi",{"db":parent.app + "/" + mpref.cfg.db, "get":view},setchoicesdata);
-  return false;
+function getchoicedata(view) {
+    req.reqdata("POST", "db.cgi", { "db": parent.app + "/" + mpref.cfg.db, "get": view }, setchoicesdata);
+    return false;
 }
 
-function setchoicesdata(data){
-  if (data && data.sqldata && data.view){
-    for (var f in choice){
-      for (var c in choice[f]){
-        if (choicedata[f][c]['view'] && choicedata[f][c]['view'] == data.view){
-          fillselectlist(choice[f][c],data.sqldata,"value","label");
+function setchoicesdata(data) {
+    if (data && data.sqldata && data.view) {
+        for (var f in choice) {
+            for (var c in choice[f]) {
+                if (choicedata[f][c]['view'] && choicedata[f][c]['view'] == data.view) {
+                    fillselectlist(choice[f][c], data.sqldata, "value", "label");
+                }
+            }
         }
-      }
     }
-  }
-  return false;
-}
-
-function fillchoices(){
-  for (var f in choice){
-    for (var c in choice[f]){
-      choice[f][c] = new Choices('#' + c,{
-        searchEnabled: false,
-        itemSelectText: '',
-        removeItemButton: true,
-        choices : ((choicedata[f][c]['data'])?choicedata[f][c]['data']:[]),
-        shouldSort: false
-      });
-      if (choicedata[f][c]['view']){
-        console.log("We have a view:"+ choicedata[f][c]['view']);
-        getchoicedata(choicedata[f][c]['view']);
-      }
+    return false;
+}
+
+function fillchoices() {
+    for (var f in choice) {
+        for (var c in choice[f]) {
+            choice[f][c] = new Choices('#' + c, {
+                searchEnabled: false,
+                itemSelectText: '',
+                removeItemButton: true,
+                choices: ((choicedata[f][c]['data']) ? choicedata[f][c]['data'] : []),
+                shouldSort: false
+            });
+            if (choicedata[f][c]['view']) {
+                console.log("We have a view:" + choicedata[f][c]['view']);
+                getchoicedata(choicedata[f][c]['view']);
+            }
+        }
     }
-  }
-  return false;
+    return false;
 }
 
+function loadtab(tabname) {
+    var i;
+    var x = document.getElementsByClassName("tabpanel");
+    for (i = 0; i < x.length; i++) {
+        x[i].style.display = "none";
+    }
+    document.getElementById("tab_" + tabname).style.display = "block";
+    return false;
+}
\ No newline at end of file
index 1fa6362..62657c4 100644 (file)
@@ -1,62 +1,44 @@
 [% PROCESS macro/fields.tt %]
 <div class="w3-top w3-border-bottom w3-white">
-<div class="w3-bar">
-    <button class="w3-bar-item w3-button w3-border w3-blue-grey" onclick="viewtable();"><img src="[% abspath%][% staticpath %]img/icons/list_white.svg" style="height: 24px;"/> Journal</button>
-    
-    
-    <button class="w3-bar-item w3-button w3-border w3-right w3-red" onclick="remove();"><img src="[% abspath%][% staticpath %]img/icons/remove_white.svg" style="height: 24px;"/></button>
-    <button class="w3-bar-item w3-button w3-border w3-right w3-blue-grey" onclick="edit();"><img src="[% abspath%][% staticpath %]img/icons/edit_white.svg" style="height: 24px;"/></button>
-    <button class="w3-bar-item w3-button w3-border w3-right w3-blue-grey" onclick="add();"><img src="[% abspath%][% staticpath %]img/icons/plus_white.svg" style="height: 24px;"/></button>
-</div>
+    <div class="w3-bar">
+        <button class="w3-bar-item w3-button w3-border w3-blue-grey" onclick="viewtable();"><img src="[% abspath%][% staticpath %]img/icons/list_white.svg" style="height: 24px;"/> Journal</button>
+
+
+        <button class="w3-bar-item w3-button w3-border w3-right w3-red" onclick="remove();"><img src="[% abspath%][% staticpath %]img/icons/remove_white.svg" style="height: 24px;"/></button>
+        <button class="w3-bar-item w3-button w3-border w3-right w3-blue-grey" onclick="edit();"><img src="[% abspath%][% staticpath %]img/icons/edit_white.svg" style="height: 24px;"/></button>
+        <button class="w3-bar-item w3-button w3-border w3-right w3-blue-grey" onclick="add();"><img src="[% abspath%][% staticpath %]img/icons/plus_white.svg" style="height: 24px;"/></button>
+    </div>
 </div>
 <div class="w3-display-container" id="tbl_invoices" style="margin-top: 50px;"></div>
 <div class="w3-display-container" id="pnl_invoices" style="display: none; margin-top: 50px;">
+    <div class="row">
+        <div class="w3-col m6">
+            [% fieldhidden('id','invoices','ident') %] [% fieldselectbox('invoicetype','invoices','Typ','w3-half','') %] [% fieldselectbox('template','invoices','Vorlage','w3-half','') %] [% fieldselectbox('status','invoices','Status','w3-half','') %] [% fielddatebox('statusdate','invoices','Status-Datum','w3-half','readonly')
+            %] [% fieldselectbox('id_receipient','invoices','Empfänger','w3-half','') %] [% fieldselectbox('id_sender','invoices','Sender','w3-half','') %] [% fieldeditbox('reference','invoices','Referenz','','') %] [% fielddatebox('invoicedate','invoices','Datum','w3-third','')
+            %] [% fielddatebox('deadlinedate','invoices','Fälligkeit','w3-third','') %] [% fieldselectbox('bquarter','invoices','G.Quartal','w3-third','') %] [% fieldmoneybox('netamount','invoices','Netto','w3-half','') %] [% fieldmoneybox('vatamount','invoices','MwSt','w3-half','')
+            %] [% fieldmoneybox('grossamount','invoices','Brutto','w3-half','') %] [% fieldmoneybox('payedamount','invoices','Bezahlt','w3-half','') %] [% fieldeditbox('statement','invoices','Kontoauszug','w3-quarter','') %] [% fieldtagbox('reminderdates','invoices','Mahnungs-Daten','w3-threequarter','')
+            %]
+        </div>
+        <div class="w3-col m6">
 
-    <!-- <div class="w3-container w3-col l6"> -->
-      <div class="w3-container">
-          <form id="frm_news">
-          [% fieldhidden('id','invoices','ident') %]
-          <div class="w3-container">
-              [% fieldselectbox('status','invoices','Status','w3-fifth','') %]
-              [% fieldselectbox('invoicetype','invoices','Typ','w3-twofifth','') %]
-              [% fielddatebox('statusdate','invoices','Status-Datum','w3-fifth','readonly') %]
-              [% fieldselectbox('bquarter','invoices','G.Quartal','w3-fifth','') %]
-          </div>
-          <div class="w3-container">
-              [% fieldselectbox('id_receipient','invoices','Empfänger','w3-half','') %]
-              [% fieldselectbox('id_sender','invoices','Sender','w3-half','') %]
-              
-          </div>
-          <div class="w3-container">
-              [% fieldeditbox('reference','invoices','Referenz','w3-threefifth','') %]
-              [% fielddatebox('invoicedate','invoices','Datum','w3-fifth','') %]
-              [% fielddatebox('deadlinedate','invoices','Fälligkeit','w3-fifth','') %]
-              
+            <div class="w3-bar w3-border-top w3-border-bottom">
+                <button class="w3-bar-item w3-button" onclick="loadtab('files');"><img src="[% abspath%][% staticpath %]img/icons/list.svg" style="height: 24px;"/> Dateien</button>
+                <button class="w3-bar-item w3-button" onclick="loadtab('products')"><img src="[% abspath%][% staticpath %]img/icons/list.svg" style="height: 24px;"/> Produkte</button>
             </div>
-            <div class="w3-container">
-              [% fieldmoneybox('netamount','invoices','Netto','w3-fifth','') %]
-              [% fieldmoneybox('vatamount','invoices','MwSt','w3-fifth','') %]
-              [% fieldmoneybox('grossamount','invoices','Brutto','w3-fifth','') %]
-              [% fieldmoneybox('payedamount','invoices','Bezahlt','w3-fifth','') %]
-              [% fieldeditbox('statement','invoices','Kontoauszug','w3-fifth','') %]
+            <div class="w3-container tabpanel" id="tab_products">
+                <div id="tbl_products"></div>
             </div>
-            <div class="w3-container"> 
-              [% fieldtagbox('reminderdates','invoices','Mahnungs-Daten','w3-threefifth','') %] 
+            <div class="w3-container tabpanel" id="tab_files" style="display: none;">
+                <div id="tbl_files"></div>
             </div>
-          </form>
         </div>
-        <div class="w3-container w3-margin-top">
-            <div class="w3-bar w3-border-top w3-border-bottom">
-                <button class="w3-bar-item w3-button w3-border w3-blue-grey" onclick="viewfiles();"><img src="[% abspath%][% staticpath %]img/icons/list_white.svg" style="height: 24px;"/> Dateien</button>
-                <button class="w3-bar-item w3-button w3-border w3-blue-grey" onclick="viewproducts();"><img src="[% abspath%][% staticpath %]img/icons/list_white.svg" style="height: 24px;"/> Produkte</button>
-            </div>
-            <div class="w3-container">
+    </div>
 
-            </div>
-        </div>   
-  </div>
-  <!-- <div class="w3-container w3-col l6"> -->
-      <!-- <div class="w3-container">
+
+
+</div>
+<!-- <div class="w3-container w3-col l6"> -->
+<!-- <div class="w3-container">
         <form id="frm_documents">
           [% fieldhidden('id','documents','ident') %]
           [% fieldhidden('id_invoice','documents','') %]
           [% forminlinesavebutton('documents','hinzufügen','w3-quarter','setinvoicefile') %]
         </form>
       </div> -->
-      <!-- <iframe id="moduleframe" src="[% abspath %][% staticpath%]vendor/pdfjs/web/viewer.html" sandbox="allow-forms allow-pointer-lock allow-same-origin allow-scripts allow-top-navigation allow-modals allow-popups allow-popups-to-escape-sandbox" style=" bottom: 0px;border: 0px;height: 80vh;width: 100%; overflow-y: scroll;"></iframe> -->
-  <!-- </div> -->
+<!-- <iframe id="moduleframe" src="[% abspath %][% staticpath%]vendor/pdfjs/web/viewer.html" sandbox="allow-forms allow-pointer-lock allow-same-origin allow-scripts allow-top-navigation allow-modals allow-popups allow-popups-to-escape-sandbox" style=" bottom: 0px;border: 0px;height: 80vh;width: 100%; overflow-y: scroll;"></iframe> -->
 <!-- </div> -->
-</div>   
-
-  
+<!-- </div> -->
+</div>
\ No newline at end of file
index 2199d65..9755545 100644 (file)
         
       </div>
 [% END -%]
+[% MACRO fieldnumberbox(column,table,title,size,state,value,plhold) BLOCK -%]
+  <div class="w3-container [% IF size %][% size %][% END %]" >
+        <label for="[% table %]_[% column %]" class="w3-label">[% title %]</label>
+        <input type="text" class="w3-input w3-text-align-right w3-border w3-right data_[% table %] [% IF state.length > 0 %]w3-[% state %][% END %] " id="[% column %]" name="[% table %]_[% column %]" value="[% value %]" [% IF plhold %]placeholder="[% plhold %]" [% END %] [% IF state.length > 0 %][% state %][% END %]/>
+      </div>
+[% END -%]
 [% MACRO fieldpasswordbox(column,table,title,size,state,value) BLOCK -%]
   <div class="w3-container [% IF size %][% size %][% END  %]" >
         <label for="[% table %]_[% column %]" class="w3-label">[% title %]</label>
                 <label>[% title %]</label>
               </div>
 [% END -%]
-
 [% MACRO fieldemailbox(column,table,title,size,state,value) BLOCK -%]
   <div class="w3-container [% IF size %][% size %][% END  %]" >
         <label for="[% table %]_[% column %]" class="w3-label">[% title %]</label>
         <input type="email" class="w3-input w3-border data_[% table %] [% IF state.length > 0 %]w3-[% state %][% END %] " id="[% column %]" name="[% table %]_[% column %]" value="" [% IF state.length > 0 %][% state %][% END %]/>
   </div>
 [% END -%]
-
 [% MACRO fieldselectbox(column,table,title,size,state,value) BLOCK -%]
   [% IF state.length > 0 %]
     [% fieldeditbox(column,table,title,size,state,value) %]
   </div>
   [% END %]
 [% END -%]
+[% MACRO fielddatetimebox(column,table,title,size,state,value) BLOCK -%]
+  <div class="w3-container [% IF size %][% size %][% END  %]">
+        <label for="[% table %]_[% column %]" class="w3-label">[% title %]</label>
+        <input type="date" class="w3-input w3-border data_[% table %] datetimefield [% IF state.length > 0 %]w3-[% state %][% END %]" id="[% column %]" name="[% table %]_[% column %]" value="[% value %]" [% IF state.length > 0 %][% state %][% END %]]/>
+        
+      </div>
+[% END -%]
 [% MACRO fielddatebox(column,table,title,size,state,value) BLOCK -%]
   <div class="w3-container [% IF size %][% size %][% END  %]">
         <label for="[% table %]_[% column %]" class="w3-label">[% title %]</label>
-        <input type="date" class="w3-input w3-border data_[% table %] datefield [% IF state.length > 0 %]w3-[% state %][% END %]" id="[% column %]" name="[% table %]_[% column %]" value="[% value %]" [% IF state.length > 0 %][% state %][% END %]/>
+        <input type="date" class="w3-input w3-border data_[% table %] datefield [% IF state.length > 0 %]w3-[% state %][% END %]" id="[% column %]" name="[% table %]_[% column %]" value="[% value %]" [% IF state.length > 0 %][% state %][% END %]]/>
+        
+      </div>
+[% END -%]
+[% MACRO fieldtimebox(column,table,title,size,state,value) BLOCK -%]
+  <div class="w3-container [% IF size %][% size %][% END  %]">
+        <label for="[% table %]_[% column %]" class="w3-label">[% title %]</label>
+        <input type="time" class="w3-input w3-border data_[% table %] timefield [% IF state.length > 0 %]w3-[% state %][% END %]" id="[% column %]" name="[% table %]_[% column %]" value="[% value %]" [% IF state.length > 0 %][% state %][% END %]]/>
         
       </div>
 [% END -%]
index 362287d..4043d71 100644 (file)
 /*===============================
 =            Choices            =
 ===============================*/
+
 .choices {
-  position: relative;
-  margin-bottom: 24px;
-  font-size: 16px;
+    position: relative;
+    margin-bottom: 24px;
+    font-size: 16px;
 }
 
 .choices:focus {
-  outline: none;
+    outline: none;
 }
 
 .choices:last-child {
-  margin-bottom: 0;
+    margin-bottom: 0;
 }
 
 .choices.is-disabled .choices__inner,
 .choices.is-disabled .choices__input {
-  background-color: #EAEAEA;
-  cursor: not-allowed;
-  user-select: none;
+    background-color: #EAEAEA;
+    cursor: not-allowed;
+    user-select: none;
 }
 
 .choices.is-disabled .choices__item {
-  cursor: not-allowed;
+    cursor: not-allowed;
 }
 
 .choices[data-type*="select-one"] {
-  cursor: pointer;
+    cursor: pointer;
 }
 
 .choices[data-type*="select-one"] .choices__inner {
-  padding-bottom: 0px;
-
+    padding-bottom: 0px;
 }
 
 .choices[data-type*="select-one"] .choices__input {
-  display: block;
-  width: 100%;
-  padding: 4px;
-  border-bottom: 1px solid #DDDDDD;
-  background-color: #FFFFFF;
-  margin: 0;
+    display: block;
+    width: 100%;
+    padding: 4px;
+    border-bottom: 1px solid #DDDDDD;
+    background-color: #FFFFFF;
+    margin: 0;
 }
 
 .choices[data-type*="select-one"] .choices__button {
-  background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjMDAwIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);
-  padding: 0;
-  background-size: 8px;
-  position: absolute;
-  top: 50%;
-  right: 0;
-  margin-top: -10px;
-  margin-right: 25px;
-  height: 20px;
-  width: 20px;
-  /* border-radius: 10em; */
-  opacity: .5;
+    background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjMDAwIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);
+    padding: 0;
+    background-size: 8px;
+    position: absolute;
+    top: 50%;
+    right: 0;
+    margin-top: -10px;
+    margin-right: 25px;
+    height: 20px;
+    width: 20px;
+    /* border-radius: 10em; */
+    opacity: .5;
 }
 
-.choices[data-type*="select-one"] .choices__button:hover, .choices[data-type*="select-one"] .choices__button:focus {
-  opacity: 1;
+.choices[data-type*="select-one"] .choices__button:hover,
+.choices[data-type*="select-one"] .choices__button:focus {
+    opacity: 1;
 }
 
 .choices[data-type*="select-one"] .choices__button:focus {
-  box-shadow: 0px 0px 0px 2px #00BCD4;
+    box-shadow: 0px 0px 0px 2px #00BCD4;
 }
 
 .choices[data-type*="select-one"]:after {
-  content: "";
-  height: 0;
-  width: 0;
-  border-style: solid;
-  border-color: #333333 transparent transparent transparent;
-  border-width: 5px;
-  position: absolute;
-  right: 11.5px;
-  top: 50%;
-  margin-top: -2.5px;
-  pointer-events: none;
+    content: "";
+    height: 0;
+    width: 0;
+    border-style: solid;
+    border-color: #333333 transparent transparent transparent;
+    border-width: 5px;
+    position: absolute;
+    right: 11.5px;
+    top: 50%;
+    margin-top: -2.5px;
+    pointer-events: none;
 }
 
 .choices[data-type*="select-one"].is-open:after {
-  border-color: transparent transparent #333333 transparent;
-  margin-top: -7.5px;
+    border-color: transparent transparent #333333 transparent;
+    margin-top: -7.5px;
 }
 
 .choices[data-type*="select-one"][dir="rtl"]:after {
-  left: 11.5px;
-  right: auto;
+    left: 11.5px;
+    right: auto;
 }
 
 .choices[data-type*="select-one"][dir="rtl"] .choices__button {
-  right: auto;
-  left: 0;
-  margin-left: 25px;
-  margin-right: 0;
+    right: auto;
+    left: 0;
+    margin-left: 25px;
+    margin-right: 0;
 }
 
 .choices[data-type*="select-multiple"] .choices__inner,
 .choices[data-type*="text"] .choices__inner {
-  cursor: text;
+    cursor: text;
 }
 
 .choices[data-type*="select-multiple"] .choices__button,
 .choices[data-type*="text"] .choices__button {
-  position: relative;
-  display: inline-block;
-  margin-top: 0;
-  margin-right: -4px;
-  margin-bottom: 0;
-  margin-left: 8px;
-  padding-left: 16px;
-  border-left: 1px solid #008fa1;
-  background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);
-  background-size: 8px;
-  width: 8px;
-  line-height: 1;
-  opacity: .75;
-  border-radius: 0;
-}
-
-.choices[data-type*="select-multiple"] .choices__button:hover, .choices[data-type*="select-multiple"] .choices__button:focus,
+    position: relative;
+    display: inline-block;
+    margin-top: 0;
+    margin-right: -4px;
+    margin-bottom: 0;
+    margin-left: 8px;
+    padding-left: 16px;
+    border-left: 1px solid #008fa1;
+    background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);
+    background-size: 8px;
+    width: 8px;
+    line-height: 1;
+    opacity: .75;
+    border-radius: 0;
+}
+
+.choices[data-type*="select-multiple"] .choices__button:hover,
+.choices[data-type*="select-multiple"] .choices__button:focus,
 .choices[data-type*="text"] .choices__button:hover,
 .choices[data-type*="text"] .choices__button:focus {
-  opacity: 1;
+    opacity: 1;
 }
 
 .choices__inner {
-  display: inline-block;
-  vertical-align: top;
-  width: 100%;
-  background-color: #e8f0fe;
-  padding: 0px 0px 0px;
-  border: 1px solid #ccc;
-  /* border-radius: 2.5px; */
-  /* font-size: 14px; */
-  min-height: 40px;
-  overflow: hidden;
-  /* font-weight: bold; */
+    display: inline-block;
+    vertical-align: top;
+    width: 100%;
+    background-color: #e8f0fe;
+    padding: 0px 0px 0px;
+    border: 1px solid #ccc;
+    /* border-radius: 2.5px; */
+    /* font-size: 14px; */
+    min-height: 32px;
+    overflow: hidden;
+    /* font-weight: bold; */
 }
 
 .is-focused .choices__inner,
 .is-open .choices__inner {
-  border-color: #b7b7b7;
+    border-color: #b7b7b7;
 }
 
 .is-open .choices__inner {
-  /* border-radius: 2.5px 2.5px 0 0; */
+    /* border-radius: 2.5px 2.5px 0 0; */
 }
 
 .is-flipped.is-open .choices__inner {
-  /* border-radius: 0 0 2.5px 2.5px; */
-} 
+    /* border-radius: 0 0 2.5px 2.5px; */
+}
 
 .choices__list {
-  margin: 0;
-  padding-left: 0;
-  list-style: none;
+    margin: 0;
+    padding-left: 0;
+    list-style: none;
 }
 
 .choices__list--single {
-  display: inline-block;
-  padding: 6px 2px 2px 2px;
-  width: 100%;
+    display: inline-block;
+    padding: 6px 2px 2px 2px;
+    width: 100%;
 }
 
 [dir="rtl"] .choices__list--single {
-  padding-right: 4px;
-  padding-left: 16px;
+    padding-right: 4px;
+    padding-left: 16px;
 }
 
 .choices__list--single .choices__item {
-  width: 100%;
+    width: 100%;
 }
 
 .choices__list--multiple {
-  display: inline;
+    display: inline;
 }
 
 .choices__list--multiple .choices__item {
-  display: inline-block;
-  vertical-align: middle;
-  /* border-radius: 20px; */
-  padding: 4px 6px;
-  font-size: 16px;
-  height: 40px;
-  /* font-size: 12px; */
-  /* font-weight: 500; */
-   margin-right: 3.75px; 
-  /* margin-bottom: 3.75px; */
-  background-color: #607d8b;
-  border: 1px solid #607d8b;
-  color: #FFFFFF;
-  /* font-weightfont-weight: bold; */
-  word-break: break-all;
+    display: inline-block;
+    vertical-align: middle;
+    /* border-radius: 20px; */
+    padding: 4px 6px;
+    font-size: 16px;
+    height: 40px;
+    /* font-size: 12px; */
+    /* font-weight: 500; */
+    margin-right: 3.75px;
+    /* margin-bottom: 3.75px; */
+    background-color: #607d8b;
+    border: 1px solid #607d8b;
+    color: #FFFFFF;
+    /* font-weightfont-weight: bold; */
+    word-break: break-all;
 }
 
 .choices__list--multiple .choices__item[data-deletable] {
-  padding-right: 5px;
+    padding-right: 5px;
 }
 
 [dir="rtl"] .choices__list--multiple .choices__item {
-  margin-right: 0;
-  margin-left: 3.75px;
+    margin-right: 0;
+    margin-left: 3.75px;
 }
 
 .choices__list--multiple .choices__item.is-highlighted {
-  background-color: #00a5bb;
-  border: 1px solid #008fa1;
+    background-color: #00a5bb;
+    border: 1px solid #008fa1;
 }
 
 .is-disabled .choices__list--multiple .choices__item {
-  background-color: #aaaaaa;
-  border: 1px solid #919191;
+    background-color: #aaaaaa;
+    border: 1px solid #919191;
 }
 
 .choices__list--dropdown {
-  display: none;
-  z-index: 1;
-  position: absolute;
-  width: 100%;
-  background-color: #FFFFFF;
-  border: 1px solid #DDDDDD;
-  top: 100%;
-  margin-top: -1px;
-  /* border-bottom-left-radius: 2.5px; */
-  /* border-bottom-right-radius: 2.5px; */
-  overflow: hidden;
-  word-break: break-word;
+    display: none;
+    z-index: 1;
+    position: absolute;
+    width: 100%;
+    background-color: #FFFFFF;
+    border: 1px solid #DDDDDD;
+    top: 100%;
+    margin-top: -1px;
+    /* border-bottom-left-radius: 2.5px; */
+    /* border-bottom-right-radius: 2.5px; */
+    overflow: hidden;
+    word-break: break-word;
 }
 
 .choices__list--dropdown.is-active {
-  display: block;
+    display: block;
 }
 
 .is-open .choices__list--dropdown {
-  border-color: #b7b7b7;
+    border-color: #b7b7b7;
 }
 
 .is-flipped .choices__list--dropdown {
-  top: auto;
-  bottom: 100%;
-  margin-top: 0;
-  margin-bottom: -1px;
-  /* border-radius: .25rem .25rem 0 0; */
+    top: auto;
+    bottom: 100%;
+    margin-top: 0;
+    margin-bottom: -1px;
+    /* border-radius: .25rem .25rem 0 0; */
 }
 
 .choices__list--dropdown .choices__list {
-  position: relative;
-  max-height: 300px;
-  overflow: auto;
-  -webkit-overflow-scrolling: touch;
-  will-change: scroll-position;
+    position: relative;
+    max-height: 300px;
+    overflow: auto;
+    -webkit-overflow-scrolling: touch;
+    will-change: scroll-position;
 }
 
 .choices__list--dropdown .choices__item {
-  position: relative;
-  padding: 10px;
-  font-size: 14px;
+    position: relative;
+    padding: 10px;
+    font-size: 14px;
 }
 
 [dir="rtl"] .choices__list--dropdown .choices__item {
-  text-align: right;
+    text-align: right;
 }
 
 @media (min-width: 640px) {
-  .choices__list--dropdown .choices__item--selectable {
-    padding-right: 10px;
-    word-wrap: none;
-    overflow: hidden;
-  }
-  .choices__list--dropdown .choices__item--selectable:after {
-    content: attr(data-select-text);
-    font-size: 12px;
-    opacity: 0;
-    position: absolute;
-    right: 10px;
-    top: 50%;
-    transform: translateY(-50%);
-    
-  }
-  [dir="rtl"] .choices__list--dropdown .choices__item--selectable {
-    text-align: right;
-    padding-left: 10px;
-    padding-right: 10px;
-  }
-  [dir="rtl"] .choices__list--dropdown .choices__item--selectable:after {
-    right: auto;
-    left: 10px;
-  }
+    .choices__list--dropdown .choices__item--selectable {
+        padding-right: 10px;
+        word-wrap: none;
+        overflow: hidden;
+    }
+    .choices__list--dropdown .choices__item--selectable:after {
+        content: attr(data-select-text);
+        font-size: 12px;
+        opacity: 0;
+        position: absolute;
+        right: 10px;
+        top: 50%;
+        transform: translateY(-50%);
+    }
+    [dir="rtl"] .choices__list--dropdown .choices__item--selectable {
+        text-align: right;
+        padding-left: 10px;
+        padding-right: 10px;
+    }
+    [dir="rtl"] .choices__list--dropdown .choices__item--selectable:after {
+        right: auto;
+        left: 10px;
+    }
 }
 
 .choices__list--dropdown .choices__item--selectable.is-highlighted {
-  background-color: #f2f2f2;
+    background-color: #f2f2f2;
 }
 
 .choices__list--dropdown .choices__item--selectable.is-highlighted:after {
-  opacity: .5;
+    opacity: .5;
 }
 
 .choices__item {
-  cursor: default;
+    cursor: default;
 }
 
 .choices__item--selectable {
-  cursor: pointer;
+    cursor: pointer;
 }
 
 .choices__item--disabled {
-  cursor: not-allowed;
-  user-select: none;
-  opacity: .5;
+    cursor: not-allowed;
+    user-select: none;
+    opacity: .5;
 }
 
 .choices__heading {
-  /* font-weight: 600; */
-  font-size: 12px;
-  padding: 10px;
-  border-bottom: 1px solid #f7f7f7;
-  color: gray;
+    /* font-weight: 600; */
+    font-size: 12px;
+    padding: 10px;
+    border-bottom: 1px solid #f7f7f7;
+    color: gray;
 }
 
 .choices__button {
-  text-indent: -9999px;
-  -webkit-appearance: none;
-  appearance: none;
-  border: 0;
-  background-color: transparent;
-  background-repeat: no-repeat;
-  background-position: center;
-  cursor: pointer;
+    text-indent: -9999px;
+    -webkit-appearance: none;
+    appearance: none;
+    border: 0;
+    background-color: transparent;
+    background-repeat: no-repeat;
+    background-position: center;
+    cursor: pointer;
 }
 
 .choices__button:focus {
-  outline: none;
+    outline: none;
 }
 
 .choices__input {
-  display: inline-block;
-  vertical-align: baseline;
-  background-color: #f9f9f9;
-  font-size: 14px;
-  margin-bottom: 5px;
-  border: 0;
-  border-radius: 0;
-  max-width: 100%;
-  padding: 4px 0 4px 2px;
+    display: inline-block;
+    vertical-align: baseline;
+    background-color: #f9f9f9;
+    font-size: 14px;
+    margin-bottom: 5px;
+    border: 0;
+    border-radius: 0;
+    max-width: 100%;
+    padding: 4px 0 4px 2px;
 }
 
 .choices__input:focus {
-  outline: 0;
+    outline: 0;
 }
 
 [dir="rtl"] .choices__input {
-  padding-right: 2px;
-  padding-left: 0;
+    padding-right: 2px;
+    padding-left: 0;
 }
 
 .choices__placeholder {
-  opacity: .5;
+    opacity: .5;
 }
 
 .choices__input.is-hidden,
 .choices[data-type*="select-one"] .choices__input.is-hidden,
 .choices[data-type*="select-multiple"] .choices__input.is-hidden {
-  display: none;
+    display: none;
 }
 
-/*=====  End of Choices  ======*/
+
+/*=====  End of Choices  ======*/
\ No newline at end of file