From: Nicolas Boisselier Date: Tue, 19 Jul 2016 01:30:26 +0000 (+0100) Subject: Bed X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=15294a849fe188aaad0b9e48df429295ebd0b68f;p=nb.git Bed --- diff --git a/lib/php/db/table.php b/lib/php/db/table.php index 951c7a7d..5396f566 100644 --- a/lib/php/db/table.php +++ b/lib/php/db/table.php @@ -246,6 +246,8 @@ Class Table extends nb { return $this->sql; } + public function field($name) { return $this->fields($name); } + /* * Function db.fields * diff --git a/lib/php/db/wp.php b/lib/php/db/wp.php index 3557bbd0..5caef81b 100644 --- a/lib/php/db/wp.php +++ b/lib/php/db/wp.php @@ -15,8 +15,10 @@ class html_table extends WP_List_Table { #$fields = $this->get_columns(); #debug($sort); $this->_column_headers = array($this->get_columns(), array(), $this->get_sortable_columns()); + #$this->items = ['zaza']; - $this->search_box(); + $this->search_box('Search','search'); + #echo 'zaza;'.(int)$this->has_items(); return; } @@ -72,10 +74,19 @@ class html_table extends WP_List_Table { foreach ($this->get_columns() as $k =>$v) { #echo '
'; + #$this->_table->debug( $this->_table->field($k) ); + #echo $this->_table->field($k)->html_edit(isset($_REQUEST[$k]) ? esc_attr( $_REQUEST[$k] ) : ''); + #continue; + $size = 0; + if ($field = $this->_table->field($k)) { + $size = ($field->size() and is_scalar($field->size())) ? $field->size() : 0; + } echo ''; echo ''; - echo ''; + echo ''; echo ''; #echo '
'; }