]> git.nbdom.net Git - nb.git/commitdiff
lib/php/db/table.php
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Sun, 30 Sep 2018 01:57:50 +0000 (02:57 +0100)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Sun, 30 Sep 2018 01:57:50 +0000 (02:57 +0100)
lib/css/db.css [deleted file]
lib/css/db.css.bak [new file with mode: 0644]
lib/php/db/table.php
lib/php/out/div.php
www/dbq/html/default.css

diff --git a/lib/css/db.css b/lib/css/db.css
deleted file mode 100644 (file)
index a7f8f05..0000000
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
-  All
-*/
-.db label:after {
-  content: ": ";
-}
-
-.db form .button,
-.db form input,
-.db form textarea,
-.db form select,
-.db form label
-{
-  margin: 0.3em 0.3em 0.3em 0;
-}
-
-/*
-  List Div
-*/
-
-.db div.db-rows .db-row {
-  text-align: left;
-  vertical-align: top;
-  /*
-  margin: 0 0 0.5em 0;
-  width: 21em;
-  */
-  margin-bottom: 0.5em;
-  padding: 0.2em;
-}
-.Zdb div.db-rows .db-row li {
-}
-
-@media screen and (min-width: 400px) {
-  .db div.db-rows .db-row {
-    width: 24%;
-    display: inline-block;
-    overflow: auto;
-    min-width: 190px;
-  }
-}
-
-.nav {
-  text-align: center;
-}
-
-table.db-rows th .name { padding: 0 0.2em; }
-#table.db-rows th.key .name:before { content: "["; }
-table.db-rows th.key .name:after { content: "!"; }
-
-table.db-rows tr { vertical-align: top; }
-
-.db div.db-rows .db-row *:not([class~=buttons]):hover {
-  opacity: 0.7;
-}
-
-.db div.db-rows .db-row .buttons {
-  padding-bottom: 0.5em;
-}
-
-.db div.db-rows .db-row label {
-  width: 25%;
-  display: inline-block;
-  margin: 0 0.5em 0.1em 0;
-  vertical-align: top;
-}
-
-.db div.db-rows label {
-  width: 70%;
-  display: inline-block;
-  white-space: normal;
-  text-align: right;
-}
-
-/*
-  Menu
-*/
-.db .menu {
-  padding: 0.5em 0.8em;
-}
-
-.db ul.menu {
-  max-width: 7em;
-}
-
-.db li.tables {
-  float: left;
-}
-
-.db li.tables ul {
-  text-transform: capitalize;
-}
-
-.db li.tables li {
-  font-size: 0.8em;
-}
-
-/*
-.db .sort {
-  font-size: 80%;
-}
-.db .sort {
-  display: inline-block;
-  font-size: 110%;
-}
-.db .sort.asc {
-  height: 0.7em;
-  border:solid 1px red;
-  vertical-align: top;
-  overflow: hidden;
-}
-*/
-
-/*
-  Edit
-*/
-
-@media screen and (max-width: 400px) {
-  .db form.edit {
-    max-width: 40em;
-    margin: 0 auto;
-  }
-}
-.db .edit .fields label {
-  width: 25%;
-  text-align: right;
-  display: inline-block;
-  margin-right: 1em;
-  vertical-align: top;
-}
-.db .edit .fields .label span {
-  width: 54%;
-  display: inline-block;
-  text-align: left;
-}
-
-.db form.edit .fields input, .db form.edit .fields textarea, .db form.edit .fields select {
-  width: 65%;
-}
-
-.buttons {
-  margin: 0.5em auto 0 auto;
-  text-align: center;
-  clear: both;
-}
-.buttons .button { margin-left: 0.5em; }
-
-/*
-*/
-.db .buttons input {
-  width: auto;
-  float: none;
-}
diff --git a/lib/css/db.css.bak b/lib/css/db.css.bak
new file mode 100644 (file)
index 0000000..a7f8f05
--- /dev/null
@@ -0,0 +1,153 @@
+/*
+  All
+*/
+.db label:after {
+  content: ": ";
+}
+
+.db form .button,
+.db form input,
+.db form textarea,
+.db form select,
+.db form label
+{
+  margin: 0.3em 0.3em 0.3em 0;
+}
+
+/*
+  List Div
+*/
+
+.db div.db-rows .db-row {
+  text-align: left;
+  vertical-align: top;
+  /*
+  margin: 0 0 0.5em 0;
+  width: 21em;
+  */
+  margin-bottom: 0.5em;
+  padding: 0.2em;
+}
+.Zdb div.db-rows .db-row li {
+}
+
+@media screen and (min-width: 400px) {
+  .db div.db-rows .db-row {
+    width: 24%;
+    display: inline-block;
+    overflow: auto;
+    min-width: 190px;
+  }
+}
+
+.nav {
+  text-align: center;
+}
+
+table.db-rows th .name { padding: 0 0.2em; }
+#table.db-rows th.key .name:before { content: "["; }
+table.db-rows th.key .name:after { content: "!"; }
+
+table.db-rows tr { vertical-align: top; }
+
+.db div.db-rows .db-row *:not([class~=buttons]):hover {
+  opacity: 0.7;
+}
+
+.db div.db-rows .db-row .buttons {
+  padding-bottom: 0.5em;
+}
+
+.db div.db-rows .db-row label {
+  width: 25%;
+  display: inline-block;
+  margin: 0 0.5em 0.1em 0;
+  vertical-align: top;
+}
+
+.db div.db-rows label {
+  width: 70%;
+  display: inline-block;
+  white-space: normal;
+  text-align: right;
+}
+
+/*
+  Menu
+*/
+.db .menu {
+  padding: 0.5em 0.8em;
+}
+
+.db ul.menu {
+  max-width: 7em;
+}
+
+.db li.tables {
+  float: left;
+}
+
+.db li.tables ul {
+  text-transform: capitalize;
+}
+
+.db li.tables li {
+  font-size: 0.8em;
+}
+
+/*
+.db .sort {
+  font-size: 80%;
+}
+.db .sort {
+  display: inline-block;
+  font-size: 110%;
+}
+.db .sort.asc {
+  height: 0.7em;
+  border:solid 1px red;
+  vertical-align: top;
+  overflow: hidden;
+}
+*/
+
+/*
+  Edit
+*/
+
+@media screen and (max-width: 400px) {
+  .db form.edit {
+    max-width: 40em;
+    margin: 0 auto;
+  }
+}
+.db .edit .fields label {
+  width: 25%;
+  text-align: right;
+  display: inline-block;
+  margin-right: 1em;
+  vertical-align: top;
+}
+.db .edit .fields .label span {
+  width: 54%;
+  display: inline-block;
+  text-align: left;
+}
+
+.db form.edit .fields input, .db form.edit .fields textarea, .db form.edit .fields select {
+  width: 65%;
+}
+
+.buttons {
+  margin: 0.5em auto 0 auto;
+  text-align: center;
+  clear: both;
+}
+.buttons .button { margin-left: 0.5em; }
+
+/*
+*/
+.db .buttons input {
+  width: auto;
+  float: none;
+}
index 6c3576961b8e842d071099f76165a5008bf57fe6..22b3d67e59f0e33723538e2d67afe08cdc3535ba 100644 (file)
@@ -2160,7 +2160,7 @@ Class Table extends nb {
        public function html_menu($opt=[]) {
                if (isset($opt['html_menu']) and !$opt['html_menu']) return '';
 
-               $buttons = '<div class="btn-group btn-group-sm"><input type="submit" class="button button-small btn btn-primary" value="Go"/></div>';
+               $buttons = '<span class="btn-group btn-group-sm"><input type="submit" class="button button-small btn btn-primary" value="Go"/></span>';
                if (!empty($opt['buttons'])) $buttons = $opt['buttons'];
 
                $r = '<form class="menu db-menu card d-table list-group-item form-inline" id="db-table-html-menu-form" method="get" action="'.$this->request_uri().'">'.NB_EOL;
index 38d3e73cbb576991f842bf7ca32f3261f64c1061..fd50ff6aa1605fc8d83c578c35551474cf826185 100644 (file)
@@ -6,7 +6,7 @@ return [
   'tag' => 'div class="row"',
   'row' => 'out_tag',
   'tag_key' => 'label class="col col-lg-1"',
-  'tag_val' => 'div   class="col col-lg-11"',
+  'tag_val' => 'div   class="col col-lg-11 value"',
   #'tag_val' => 'span',
 ];
 ?>
index 328f3fcb3bef264b0da96e379832f241f9788763..22a3444c927b53911187a722d182af3178bf5349 100644 (file)
@@ -1,307 +1,3 @@
-/*
-html {
-       font: 90% 'Trebuchet MS', sans-serif;
-       background-color: #EEEEEE;
-}
-
-body {
-       display: table;
-       margin-left: auto;
-       margin-right: auto;
-       padding-left: 1em;
-       padding-right: 1em;
-       color: #444444;
-}
-
-h1 select {
-       padding: 0;
-       border: none;
-       background: inherit;
-       font: inherit;
-}
-
-a {
-       color: inherit;
-}
-
-p a, div > a, li a, td a {
-       color: #3572B0;
-}
-
-a, a:visited {
-       text-decoration: none;
-}
-
-a:hover,
-.button:hover {
-       opacity: 0.8;
-}
-
-ul {
-       padding: 0;
-       margin: 0;
-}
-
-li {
-       list-style:none;
-       padding: 0 0 0 0.3em;
-}
-
-table { border-collapse: collapse; }
-td, th { padding: 0.2em 0.7em; }
-th a.sort { float: left; margin-right: 0.1em; }
-
-textarea,
-select,
-input:not([type]),
-input[type='text'],
-input[type='password'],
-input[type='date'],
-input[type='email'],
-input[type='url'],
-input[type=''] {
-       border-radius: 3px;
-       border: solid 1px #DDDDDD;
-       padding: 0.3em 0.4em;
-       box-shadow: 0px 1px 1px #EEEEEE;
-}
-
-input[size] {
-       max-width: 70%;
-}
-
-form label,
-form input,
-form select {
-       vertical-align: middle;
-       margin: 0.2em 0.4em 0.2em 0;
-}
-
-.db-rows { padding: 0; }
-.db-rows form { display: inline-block; }
-
-table.db-rows,
-div.db-row,
-ul.db-row,
-form.edit,
-.menu,
-.block,
-pre
-{
-       border-radius: 4px;
-       border-spacing: 0;
-
-       padding: 0.5em 0.2em;
-       margin-bottom: 0.5em;
-       border: solid 1px #DDDDDD;
-       background-color: #FAFAFA;
-       box-shadow: 0px 1px 2px #EEEEEE;
-
-}
-
-table.db-rows {
-       border-style: hidden;
-       border-collapse: collapse;
-       box-shadow: 0 0 0 1px #DDDDDD;
-       table-layout: fixed;
-}
-
-table.db-rows tr:nth-child(even) td {
-       background-color: #FEFEFE;
-}
-
-ul.db-row li, div.db-row div, table.db-rows th, table.db-rows td {
-       border-bottom: solid 1px #DDDDDD;
-}
-
-ul.db-row li, div.db-row div, table.db-rows tr:last-child td { border-bottom: none; }
-
-table.db-rows th, table.db-rows td {
-       border-right: dashed 1px #DDDDDD;
-}
-
-.db-rows .count {
-       text-align: right;
-}
-
-table.db-rows th { text-align: left; }
-
-table.db-rows td {
-       padding: 0.3em 0.3em;
-}
-
-table.db-rows.fixed { width: 100%; }
-
-table.db-rows.fixed th,
-table.db-rows.fixed td,
-div.db-row div label
-{
-       white-space: nowrap;
-       text-overflow: ellipsis;
-       overflow: hidden;
-}
-
-table.db-rows.fixed th { white-space: normal; }
-
-table.db-rows td.view,
-table.db-rows td.delete {
-       width: 1%;
-       white-space: nowrap;
-}
-
-table.db-rows.fixed th.view { width: 2em; }
-table.db-rows.fixed th.delete { width: 2.7em; }
-
-div.db-rows { clear: both; }
-div.db-row { float: left; margin-right: 4px; min-width: 24%; }
-.nofloat { float: none; }
-
-div.db-row div {
-       margin: 0;
-       padding: 0.1em 0.2em;
-       border-bottom: solid 1px #fff;
-}
-
-.db-rows .db-row img {
-       max-height: 4.8em;
-}
-.db-rows .db-row iframe.video {
-       height: 150px;
-       width: 250px;
-}
-
-div.db-row div.view .button { margin-bottom: 5px; }
-div.db-row div.delete .button { margin-top: 5px; }
-div.db-row div:last-child { border-bottom: none; padding-bottom: 0; }
-div.db-row div.view label, div.db-row div.delete label { display: none; }
-div.db-row div.view, div.db-row div.delete { text-align: center; }
-
-div.db-row div label,
-ul.db-row li label
-{
-       padding: 0.1em 0.5em 0.1em 0;
-       min-width: 20%;
-       display: inline-block;
-}
-
-.button {
-       font: inherit;
-       display: inline-block;
-       text-decoration: none;
-       line-height: 1.6em;
-       cursor: pointer;
-       white-space: nowrap;
-       box-sizing: border-box;
-       margin: 0 0.1em 0 0;
-       padding: 0 0.3em;
-       border-radius: 4px;
-       border: none;
-
-       color: #3572B0;
-       background-color: #EEEEEE;
-       background: linear-gradient(to bottom right, #EEEEEE, #DDDDDD);
-
-       box-shadow: 0px 1px 1px #BBBBBB;
-
-}
-
-div.buttons {
-       text-align: center;
-       margin-top: 0.5em;
-}
-
-form.menu {
-       padding: 0.5em;
-       background-color: #FAFAFA;
-       max-width: 1024px;
-}
-
-form.menu .button.add {
-       float: right;
-       margin-top: 0.2em;
-}
-
-form.menu .criterias {
-       border-top: dashed 1px #DDDDDD;
-       margin-top: 0.3em;
-       padding-top: 0.3em;
-       clear: both;
-}
-
-form.menu .criterias span.label {
-       border-right: solid 1px #fff;
-       border-radius: 3px;
-       margin: 0 0.2em;
-       white-space: nowrap;
-       float: left;
-}
-
-form.menu .criterias span.label:last-child {
-       border-right: none;
-}
-
-
-form.menu .criterias input[type=text] { width: 4em; }
-form.menu .criterias input[type=text]:focus { width: auto; }
-
-div.db-row label,
-form.edit .fields label {
-       width: 25%;
-       text-align: right;
-       display: inline-block;
-       margin-right: 1em;
-       vertical-align: top;
-}
-
-div.db-row .label span,
-form.edit .fields .label span {
-       display: inline-block;
-       text-align: left;
-       vertical-align: middle;
-       margin-top: 0.2em;
-}
-
-form.edit .fields .field {
-       width: 54%;
-}
-
-form.edit .fields input[size],
-form.edit .fields textarea, form.edit .fields select {
-       width: 65%;
-}
-form.edit .fields .field a {
-       display: block;
-}
-
-form.edit .fields img {
-       max-height: 90px;
-}
-iframe.video {
-       float: left;
-}
-
-.menu,
-.pagination,
-.db-rows,
-.bottom,
-.center {
-       clear: both;
-       display: table;
-}
-
-.menu,
-.pagination,
-.db-rows,
-.bottom,
-.buttons,
-td.button,
-.center {
-       margin-left: auto;
-       margin-right: auto;
-}
-
-*/
-
 @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }