]> git.nbdom.net Git - nb.git/commitdiff
www/dbq/html/default.css
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 8 Jan 2018 04:56:01 +0000 (04:56 +0000)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 8 Jan 2018 04:56:01 +0000 (04:56 +0000)
www/dbq/html/default.css
www/dbq/html/default.js

index 5d35fe941c576abea93aa348b04f8dec9be2c0f0..844abd7a35222f60646e409d36b8b24a3e04d309 100644 (file)
@@ -74,7 +74,10 @@ li {
 
 table { border-collapse: collapse; }
 td, th { padding: 0.2em 0.7em; }
+/*
 th a.sort { padding: 0 0.3em; }
+*/
+th a.sort { float: left; margin-right: 0.1em; }
 
 textarea,
 select,
@@ -134,10 +137,6 @@ table.rows {
        table-layout: fixed;
 }
 
-table.rows.fixed {
-       width: 100%;
-}
-
 table.rows tr:nth-child(even) td {
        background-color: #FEFEFE;
 }
@@ -156,14 +155,14 @@ table.rows th, table.rows td {
        text-align: right;
 }
 
-table.rows th {
-       text-align: left;
-}
+table.rows th { text-align: left; }
 
 table.rows td {
        padding: 0.3em 0.3em;
 }
 
+table.rows.fixed { width: 100%; }
+
 table.rows.fixed th,
 table.rows.fixed td,
 div.row div label
@@ -173,16 +172,18 @@ div.row div label
        overflow: hidden;
 }
 
-table.rows.fixed th {
-       white-space: normal;
-}
+table.rows.fixed th { white-space: normal; }
 
 /*
 table.rows.fixed th:hover,
 table.rows.fixed td:hover {
        overflow: inherit;
        text-overflow: inherit;
+       white-space: normal;
        z-index: 9;
+       border: solid 1px #ccc;
+       display: inline-block;
+       background-color: #ccc;
 }
 */
 
@@ -204,6 +205,7 @@ div.row { float: left; margin-right: 12px; min-width: 31%; }
 */
 div.rows { clear: both; }
 div.row { float: left; margin-right: 4px; min-width: 24%; }
+.nofloat { float: none; }
 
 div.row div {
        margin: 0;
@@ -274,6 +276,7 @@ div.buttons {
 form.menu {
        padding: 0.5em;
        background-color: #FAFAFA;
+       max-width: 1024px;
 }
 
 form.menu .button.add {
index 65c357a7861cc11eac3483f6819e793c1415366b..ee78981573a585a07902ab5fe1d4aa8d7466c5bb 100644 (file)
@@ -43,6 +43,8 @@ document.addEventListener("DOMContentLoaded", function() {
 
   //console.log('LOADED');
   NodeList.prototype.forEach = Array.prototype.forEach;
+  var ext = ( window._dbq['param.format'] ? '.'+window._dbq['param.format'] : '');
+  if ( ext == '.'+window._dbq['default.format'] ) ext='';
 
   /* Clean when submit */
   document.querySelectorAll("form").forEach(function(e) {
@@ -74,9 +76,12 @@ document.addEventListener("DOMContentLoaded", function() {
     form.querySelectorAll("form.menu select.tables").forEach(function(e) {
       e.removeAttribute('name');
       e.onchange = function() {
-        this.form.setAttribute('action',window._dbq['db.base']+'/'+this.value
-          + ( window._dbq['param.format'] ? '.'+window._dbq['param.format'] : '')
-        );
+        this.form.setAttribute('action',window._dbq['db.base']+'/'+this.value+ext);
+        /*
+        window.location = this.form.getAttribute('action')+'?table='+e.value;
+        return false;
+        */
+        form_clean(this.form);
         return this.form.onsubmit();
       }
     });