From 4fbc0fca27e3f87ddd4949c69ff4eee85e1b2fb5 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Tue, 20 Dec 2016 11:33:51 +0000 Subject: [PATCH] dbq --- lib/php/db/table.php | 3 +++ www/dbq/html/default.css | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/lib/php/db/table.php b/lib/php/db/table.php index fa79c590..ede96045 100644 --- a/lib/php/db/table.php +++ b/lib/php/db/table.php @@ -646,13 +646,16 @@ Class Table extends nb { if (preg_match("/(LIKE|$regexp) ..$/","$equal$v") and $field->null) { # NB 20.12.16 $k = "COALESCE($k,".$this->db()->quote('').")"; $k = 'COALESCE('.$field->sql_name().','.$this->db()->quote('').")"; + } elseif ($field->extras) { $k = $this->extras[$k]->sql_name(); } elseif ($number and $field->null) { $k = 'COALESCE('.$field->sql_name().",0)"; + } elseif (!$number and $field->null) { $k = 'COALESCE('.$field->sql_name().",'')"; + } else { $k = $field->sql_name(); diff --git a/www/dbq/html/default.css b/www/dbq/html/default.css index c573deec..372c744d 100644 --- a/www/dbq/html/default.css +++ b/www/dbq/html/default.css @@ -114,6 +114,22 @@ a:hover, opacity: 0.8; } +form.menu .criterias span.label { + width: 23%; + display: inline-block; + border: solid 1px #fff; + padding: 0.1em 0.3em; + margin: 0.2em 0.2em 0 0; + border-radius: 3px; +} +form.menu .criterias label { + width: 60%; + display: inline-block; +} +form.menu .criterias input { + width: 30%; + display: inline-block; +} /* form a.button:visited, form a.button { display: inline-block; @@ -121,6 +137,9 @@ form a.button:visited, form a.button { top: -1px; } */ + +/* +EDIT PAGE form.edit .fields label { width: 25%; text-align: right; @@ -137,3 +156,21 @@ form.edit .fields .label span { form.edit .fields input, form.edit .fields textarea, form.edit .fields select { width: 65%; } + +form.edit .fields label { + width: 25%; + text-align: right; + display: inline-block; + margin-right: 1em; + vertical-align: top; +} +form.edit .fields .label span { + width: 54%; + display: inline-block; + text-align: left; +} + +form.edit .fields input, form.edit .fields textarea, form.edit .fields select { + width: 65%; +} +*/ -- 2.47.3