From 766a97318aceb6e69ad827416877a5e350783b9e Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Mon, 1 Oct 2018 03:59:39 +0100 Subject: [PATCH] www/dbq/html/default.css --- lib/php/db/field.php | 5 +++++ lib/php/db/table.php | 8 +++++--- lib/php/out/div.php | 4 ++-- www/dbq/html/default.css | 13 ++++++++++++- www/dbq/html/default.min.css | 2 +- 5 files changed, 25 insertions(+), 7 deletions(-) diff --git a/lib/php/db/field.php b/lib/php/db/field.php index c12a6b7e..ce3ceb3f 100644 --- a/lib/php/db/field.php +++ b/lib/php/db/field.php @@ -115,6 +115,11 @@ class field extends nb { } + private function _html_textarea() { + $size = ($this->size() and is_scalar($this->size())) ? $this->size() : 0; + return ( ($size>500) or preg_match('/^(\w*text|binary|blob|varchar)/i',$this->type) ) ? 'textarea' : 'input'; + } + public function html_edit($values,$type=null) { $size = ($this->size() and is_scalar($this->size())) ? $this->size() : 0; diff --git a/lib/php/db/table.php b/lib/php/db/table.php index 5b4c50d4..65e60209 100644 --- a/lib/php/db/table.php +++ b/lib/php/db/table.php @@ -741,13 +741,15 @@ Class Table extends nb { } # NB 01.10.18: TODO - $page = ''; - /* + #$page = ' '.$x; $pages = $count ? floor($tot / $count) : 0; - #$page = $x == 0 ? '' : ' - '.floor($tot / $x); + $page = $count ? (floor($x / $y)+1) : ''; + #$page = $pages == 0 ? '' : ' - '.floor($tot / $x); + /* */ $num_start = $tot ? ($x+1) : 0; $num_end = $tot<($x+$y) ? $tot : ($x+$y); +# NB 01.10.18 $html .= ''.$page.' / '.$pages.''; $html .= ''.$num_start.' - '.$num_end.' / '.$tot.$page.''; if ($next<$tot) { diff --git a/lib/php/out/div.php b/lib/php/out/div.php index fd50ff6a..5a83f25d 100644 --- a/lib/php/out/div.php +++ b/lib/php/out/div.php @@ -5,8 +5,8 @@ return [ 'tag_enclose' => 'div class="db-row border rounded p-2 my-2"', 'tag' => 'div class="row"', 'row' => 'out_tag', - 'tag_key' => 'label class="col col-lg-1"', - 'tag_val' => 'div class="col col-lg-11 value"', + 'tag_key' => 'label class="col col-lg-2"', + 'tag_val' => 'div class="col col-lg-10 value"', #'tag_val' => 'span', ]; ?> diff --git a/www/dbq/html/default.css b/www/dbq/html/default.css index f832f314..5cc300e9 100644 --- a/www/dbq/html/default.css +++ b/www/dbq/html/default.css @@ -42,6 +42,7 @@ h1 { h1, h1 a, h1 a:hover { color: var(--light); + font-weight: normal !important;; } .menu * { @@ -84,5 +85,15 @@ h1, h1 a, h1 a:hover { /* Fix centered */ .pagination * { - display: inline-block + display: inline-block; +} + +.db-rows th.view, +div._db-rows div.db-row:first-of-type label, +div._db-rows label:first-of-type, +.HIDE{ + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; } diff --git a/www/dbq/html/default.min.css b/www/dbq/html/default.min.css index a59fb67d..3bbb3b57 100644 --- a/www/dbq/html/default.min.css +++ b/www/dbq/html/default.min.css @@ -1 +1 @@ -@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.loader{border:16px solid #fff;border-radius:50%;border-top:16px solid #000;padding:0;margin:0 auto 0 auto;width:8em;height:8em;animation:spin 2s linear infinite;display:block}body.loader{margin-top:8em}.loader *{display:none!important}h1{margin:0 0 .2em 0;font-size:140%;padding-bottom:.3em;margin-bottom:.5em;padding:.3em;background-color:var(--dark)}h1,h1 a,h1 a:hover{color:var(--light)}.menu *{font-size:95%}.menu .form-control{max-width:5rem;height:1.5rem;padding:0 .3rem;margin-top:.4rem;margin-left:.2rem}.menu .btn-group{margin-left:.4rem;max-height:2.5rem}.edit .form-control+.media{margin-top:.25rem}#db-menu-form,#page-bottom,.CENTER,.db-results,.db-rows,.pagination{margin-left:auto;margin-right:auto;width:auto;display:table}.pagination *{display:inline-block} +@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.loader{border:16px solid #fff;border-radius:50%;border-top:16px solid #000;padding:0;margin:0 auto 0 auto;width:8em;height:8em;animation:spin 2s linear infinite;display:block}body.loader{margin-top:8em}.loader *{display:none!important}h1{margin:0 0 .2em 0;font-size:140%;padding-bottom:.3em;margin-bottom:.5em;padding:.3em;background-color:var(--dark)}h1,h1 a,h1 a:hover{color:var(--light);font-weight:400!important}.menu *{font-size:95%}.menu .form-control{max-width:5rem;height:1.5rem;padding:0 .3rem;margin-top:.4rem;margin-left:.2rem}.menu .btn-group{margin-left:.4rem;max-height:2.5rem}.edit .form-control+.media{margin-top:.25rem}#db-menu-form,#page-bottom,.CENTER,.db-results,.db-rows,.pagination{margin-left:auto;margin-right:auto;width:auto;display:table}.pagination *{display:inline-block}.HIDE,.db-rows th.view,div._db-rows div.db-row:first-of-type label,div._db-rows label:first-of-type{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent} -- 2.47.3