From 792494533274351a4b24f649076287fe94d29ada Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Fri, 10 Jul 2015 11:18:44 +0100 Subject: [PATCH] css,div --- lib/css/db.css | 23 +++++++++++++++-------- lib/php/db/table.php | 11 +++++------ lib/php/page.php | 20 ++++++++++---------- 3 files changed, 30 insertions(+), 24 deletions(-) diff --git a/lib/css/db.css b/lib/css/db.css index 814be6d8..6b8b9061 100644 --- a/lib/css/db.css +++ b/lib/css/db.css @@ -1,13 +1,26 @@ /* All .rows { margin: 0 auto; } +border: solid 1px red !important; */ +.rows ul { + margin: 0 0 0.5em 0; + padding: 0.2em; + /* + margin: 0 0.5em 0.5em 0; + float: left; + width: 45em; + overflow: scroll; + */ +} + +.rows ul .edit { float: right; } + /* Edit */ -form.Zdb.edit -,form.db.edit label +form.db.edit label ,form.db.edit input { float: left; @@ -38,12 +51,6 @@ form.db.edit .buttons input { float: none; } -/* - List - border: solid 1px red; -*/ -.sel:before { content: ">"; } - div.db.menu label { margin-right: 0.1em; } diff --git a/lib/php/db/table.php b/lib/php/db/table.php index aa19e14f..5edecba8 100644 --- a/lib/php/db/table.php +++ b/lib/php/db/table.php @@ -502,9 +502,9 @@ FROM pg_catalog.pg_attribute a WHERE a.attrelid = (SELECT c.oid FROM pg_catalog. $st = $this->db->conn->prepare($sql); $st->execute(); - $format = (!empty($opt['format']) ? $opt['format'] : 'table'); + $format = ( $this->db->p('format') ? $this->db->p('format') : 'table' ); - if (!@$opt['is_html']) $opt['is_html'] = preg_match('/^(table)$/',$format) ? true : false; + if (!isset($opt['is_html'])) $opt['is_html'] = preg_match('/^(table|div)$/',$format) ? true : false; $escape = preg_match('/^(table|row|xml)$/',$format) ? true : false; if (preg_match('/^(1)?$/',$this->db->p('header'))) echo $this->{"rows_begin_$format"}($opt); @@ -640,7 +640,7 @@ FROM pg_catalog.pg_attribute a WHERE a.attrelid = (SELECT c.oid FROM pg_catalog. function rows_begin_table() { $html = ''; - $html .= ''.PHP_EOL; + $html .= '
'.PHP_EOL; if (DB_HTML_NAV_TOP) $html .= '' . '' @@ -688,7 +688,7 @@ FROM pg_catalog.pg_attribute a WHERE a.attrelid = (SELECT c.oid FROM pg_catalog. Html Div -----------------------------------------------------------------*/ function rows_begin_div() { - return '
'.DB_HTML_NAV_TOP.PHP_EOL; + return '
'.DB_HTML_NAV_TOP.PHP_EOL; } function rows_rec_div($row) { @@ -698,8 +698,7 @@ FROM pg_catalog.pg_attribute a WHERE a.attrelid = (SELECT c.oid FROM pg_catalog. foreach ($row as $k => $v) { $html .= '
  • ' - .''.$k.'' - .': ' + .( $k == '0' ? '' : ''.$k.': ') .''.$v.'' .'
  • '; } diff --git a/lib/php/page.php b/lib/php/page.php index c3e9e46b..4d897598 100644 --- a/lib/php/page.php +++ b/lib/php/page.php @@ -18,19 +18,19 @@ $Page = new Page(array( class Page { - var $call = array(); - var $output = ''; + public $call = array(); + public $output = ''; - var $charset = 'utf-8'; - var $content_type = 'text/html'; - var $title = ''; + public $charset = 'utf-8'; + public $content_type = 'text/html'; + public $title = ''; - var $css = array(); - var $head = array(); - var $css_code = ''; + public $css = array(); + public $head = array(); + public $css_code = ''; - var $js = array(); - var $js_code = ''; + public $js = array(); + public $js_code = ''; /* Create -- 2.47.3
    ' . DB_HTML_NAV_TOP . '