From 4688c147c96090b449936a148a855481592afa90 Mon Sep 17 00:00:00 2001 From: vargenau Date: Tue, 18 Jun 2013 16:31:53 +0000 Subject: [PATCH] Use CSS git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@8818 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- lib/plugin/AnalyseAccessLogSql.php | 2 +- lib/plugin/DebugAuthInfo.php | 20 +++++++++----------- lib/plugin/DebugBackendInfo.php | 23 +++++++++++------------ lib/plugin/EditMetaData.php | 2 +- lib/plugin/LdapSearch.php | 2 +- lib/plugin/ModeratedPage.php | 2 +- lib/plugin/PreferenceApp.php | 18 +++++++++--------- lib/plugin/SemanticSearch.php | 3 +-- lib/plugin/WikiForum.php | 2 +- 9 files changed, 35 insertions(+), 39 deletions(-) diff --git a/lib/plugin/AnalyseAccessLogSql.php b/lib/plugin/AnalyseAccessLogSql.php index 14c3ff59a..b18d87db0 100644 --- a/lib/plugin/AnalyseAccessLogSql.php +++ b/lib/plugin/AnalyseAccessLogSql.php @@ -291,7 +291,7 @@ class WikiPlugin_AnalyseAccessLogSql // otherwise the headers will not be ready $tbody = $this->getQueryResults($query, $dbi); - return HTML::table(array('border' => 1), + return HTML::table(array('class' => 'bordered'), HTML::caption($this->getCaption($args)), HTML::thead($this->_theadrow), $tbody); diff --git a/lib/plugin/DebugAuthInfo.php b/lib/plugin/DebugAuthInfo.php index baa2d0477..dc51ce869 100644 --- a/lib/plugin/DebugAuthInfo.php +++ b/lib/plugin/DebugAuthInfo.php @@ -57,7 +57,7 @@ class WikiPlugin_DebugAuthInfo } $html = HTML(HTML::h3(fmt("General Auth Settings"))); - $table = HTML::table(array('border' => 1)); + $table = HTML::table(array('class' => 'bordered')); $table->pushContent($this->show_hash("AUTH DEFINES", $this->buildConstHash( array("ENABLE_USER_NEW", "ALLOW_ANON_USER", @@ -93,7 +93,7 @@ class WikiPlugin_DebugAuthInfo if (!$user) { $html->pushContent(HTML::p(fmt("No userid"))); } else { - $table = HTML::table(array('border' => 1)); + $table = HTML::table(array('class' => 'bordered')); //$table->pushContent(HTML::tr(HTML::td(array('colspan' => 2)))); $userdata = obj2hash($user, array('_dbi', '_request', 'password', 'passwd')); if (isa($user, "_FilePassUser")) { @@ -130,10 +130,10 @@ class WikiPlugin_DebugAuthInfo if ($max_depth > 35) return $heading; if ($heading) - $rows[] = HTML::tr(array('bgcolor' => '#ffcccc', - 'style' => 'color:#000000'), + $rows[] = HTML::tr(array( + 'style' => 'color:#000;background-color:#ffcccc'), HTML::td(array('colspan' => 2, - 'style' => 'color:#000000'), + 'style' => 'color:#000'), $heading)); if (is_object($hash)) $hash = obj2hash($hash); @@ -145,7 +145,7 @@ class WikiPlugin_DebugAuthInfo if ($depth > 3) $val = $heading; elseif ($heading == "Object of wikidb_sql") $val = $heading; elseif (substr($heading, 0, 13) == "Object of db_") $val = $heading; elseif (!isset($seen[$heading])) { //if (empty($seen[$heading])) $seen[$heading] = 1; - $val = HTML::table(array('border' => 1), + $val = HTML::table(array('class' => 'bordered'), $this->show_hash($heading, obj2hash($val), $depth + 1)); } else { $val = $heading; @@ -155,20 +155,18 @@ class WikiPlugin_DebugAuthInfo if ($depth > 3) $val = $heading; elseif (!isset($seen[$heading])) { //if (empty($seen[$heading])) $seen[$heading] = 1; - $val = HTML::table(array('border' => 1, - 'cellpadding' => 2, - 'cellspacing' => 0), + $val = HTML::table(array('class' => 'bordered'), $this->show_hash($heading, $val, $depth + 1)); } else { $val = $heading; } } $rows[] = HTML::tr(HTML::td(array('align' => 'right', - 'bgcolor' => '#cccccc', + 'bgcolor' => '#ccc', 'style' => 'color:#000000'), HTML(HTML::raw(' '), $key, HTML::raw(' '))), - HTML::td(array('bgcolor' => '#ffffff', + HTML::td(array('bgcolor' => '#fff', 'style' => 'color:#000000'), $val ? $val : HTML::raw(' ')) ); diff --git a/lib/plugin/DebugBackendInfo.php b/lib/plugin/DebugBackendInfo.php index bab09790b..63bc4b7d3 100644 --- a/lib/plugin/DebugBackendInfo.php +++ b/lib/plugin/DebugBackendInfo.php @@ -52,7 +52,7 @@ class WikiPlugin_DebugBackendInfo $html = HTML(HTML::h3(fmt("Querying backend directly for “%s”", $page))); - $table = HTML::table(array('border' => 1)); + $table = HTML::table(array('class' => 'bordered')); $pagedata = $backend->get_pagedata($page); if (!$pagedata) { // FIXME: invalid HTML @@ -127,12 +127,12 @@ class WikiPlugin_DebugBackendInfo // how to indent this table? $val = unserialize($val); $this->_fixupData($val, $fullkey); - $data[$key] = HTML::table(array('border' => 1), + $data[$key] = HTML::table(array('class' => 'bordered'), $this->_showhash(false, $val, $fullkey)); } elseif (is_array($val)) { // how to indent this table? $this->_fixupData($val, $fullkey); - $data[$key] = HTML::table(array('border' => 1), + $data[$key] = HTML::table(array('class' => 'bordered'), $this->_showhash(false, $val, $fullkey)); } elseif (is_object($val)) { // how to indent this table? @@ -140,7 +140,7 @@ class WikiPlugin_DebugBackendInfo print_r($val); $val = HTML::pre(ob_get_contents()); ob_end_clean(); - $data[$key] = HTML::table(array('border' => 1), + $data[$key] = HTML::table(array('class' => 'bordered'), $this->_showhash(false, $val, $fullkey)); } elseif ($key and $key == '%content') { if ($val === true) @@ -158,22 +158,21 @@ class WikiPlugin_DebugBackendInfo { $rows = array(); if ($heading) - $rows[] = HTML::tr(array('bgcolor' => '#ffcccc', - 'style' => 'color:#000000'), + $rows[] = HTML::tr(array( + 'style' => 'color:#000;background-color:#ffcccc'), HTML::td(array('colspan' => 2, - 'style' => 'color:#000000'), + 'style' => 'color:#000'), $heading)); if (!is_array($hash)) return array(); ksort($hash); foreach ($hash as $key => $val) { if ($this->chunk_split and is_string($val)) $val = chunk_split($val); - $rows[] = HTML::tr(HTML::td(array('align' => 'right', - 'bgcolor' => '#cccccc', - 'style' => 'color:#000000'), + $rows[] = HTML::tr(HTML::td(array('class' => 'align-right', + 'style' => 'color:#000;background-color:#ccc'), HTML(HTML::raw(' '), $key, HTML::raw(' '))), - HTML::td(array('bgcolor' => '#ffffff', - 'style' => 'color:#000000'), + HTML::td(array( + 'style' => 'color:#000;background-color:#fff'), $this->_showvalue($key, $val, $prefix)) ); } diff --git a/lib/plugin/EditMetaData.php b/lib/plugin/EditMetaData.php index 576899c4d..d2aac8594 100644 --- a/lib/plugin/EditMetaData.php +++ b/lib/plugin/EditMetaData.php @@ -125,7 +125,7 @@ class WikiPlugin_EditMetaData $html->pushContent(HTML::p(fmt("No metadata for %s", $page))); $table = HTML(); } else { - $table = HTML::table(array('border' => 1)); + $table = HTML::table(array('class' => 'bordered')); $this->_fixupData($pagemeta); $table->pushContent($this->_showhash("MetaData('$page')", $pagemeta)); } diff --git a/lib/plugin/LdapSearch.php b/lib/plugin/LdapSearch.php index 29ddef89f..366c57d85 100644 --- a/lib/plugin/LdapSearch.php +++ b/lib/plugin/LdapSearch.php @@ -196,7 +196,7 @@ class WikiPlugin_LdapSearch } $html->pushContent($row); } - return HTML::table(array('border' => 1), $html); + return HTML::table(array('class' => 'bordered'), $html); } } diff --git a/lib/plugin/ModeratedPage.php b/lib/plugin/ModeratedPage.php index 0efb7975f..6ceb077b6 100644 --- a/lib/plugin/ModeratedPage.php +++ b/lib/plugin/ModeratedPage.php @@ -374,7 +374,7 @@ class WikiPlugin_ModeratedPage $loader = new WikiPluginLoader(); $BackendInfo = $loader->getPlugin("DebugBackendInfo"); - $table = HTML::table(array('border' => 1)); + $table = HTML::table(array('class' => 'bordered')); $content = $table; $diff = ''; if ($moderation['args']['action'] == 'edit') { diff --git a/lib/plugin/PreferenceApp.php b/lib/plugin/PreferenceApp.php index f2f847b28..917f1e1cd 100644 --- a/lib/plugin/PreferenceApp.php +++ b/lib/plugin/PreferenceApp.php @@ -179,12 +179,12 @@ class WikiPlugin_PreferenceApp $table = HTML::table(); $tr = HTML::tr(); - $td = HTML::td(array('bgcolor' => '#FFFFFF')); + $td = HTML::td(array('style' => 'background-color:#fff')); $td->pushContent(" "); $tr->pushContent($td); foreach ($people as $person) { - $td = HTML::td(array('bgcolor' => '#FFFFFF')); + $td = HTML::td(array('style' => 'background-color:#fff')); $td->pushContent(HTML::a(array('href' => WikiURL($person), 'class' => 'wiki' ), @@ -192,10 +192,10 @@ class WikiPlugin_PreferenceApp //$td->pushContent(WikiLink(" $person ")); $tr->pushContent($td); } - $td = HTML::td(array('bgcolor' => '#FFFFFF')); + $td = HTML::td(array('style' => 'background-color:#fff')); $td->pushContent(_("Total Units")); $tr->pushContent($td); - $td = HTML::td(array('bgcolor' => '#FFFFFF')); + $td = HTML::td(array('style' => 'background-color:#fff')); $td->pushContent(_("Total Voters")); $tr->pushContent($td); $table->pushContent($tr); @@ -229,7 +229,7 @@ class WikiPlugin_PreferenceApp } for ($i = 0; $i < count($pageids); $i++) { $tr = HTML::tr(); - $td = HTML::td(array('align' => 'left', 'bgcolor' => '#f7f7f7')); + $td = HTML::td(array('style' => 'text-align:left;background-color:#f7f7f7')); $td->pushContent(HTML::a(array('href' => WikiURL($pageids[$i]), 'class' => 'wiki' ), @@ -238,7 +238,7 @@ class WikiPlugin_PreferenceApp $total_cans = 0; $total_voters = 0; for ($j = 0; $j < count($people); $j++) { - $td = HTML::td(array('align' => 'right', 'bgcolor' => '#f7f7f7')); + $td = HTML::td(array('style' => 'text-align:right;background-color:#f7f7f7')); $output = $outputArray[$people[$j]][$pageids[$i]]; $total_cans = $total_cans + $output; if ($output == "") { @@ -286,15 +286,15 @@ class WikiPlugin_PreferenceApp $td->pushContent(HTML::strong($cans)); $tr->pushContent($td); } - $td = HTML::td(array('align' => 'right')); + $td = HTML::td(array('class' => 'align-right')); $td->pushContent(HTML::strong($cans_total)); $tr->pushContent($td); - $td = HTML::td(array('align' => 'right')); + $td = HTML::td(array('class' => 'align-right')); $td->pushContent(HTML::strong($total_voters)); $tr->pushContent($td); $table->pushContent($tr); - $table2 = HTML::table(array('bgcolor' => '#dedfdf')); + $table2 = HTML::table(array('style' => 'background-color:#dedfdf')); $table2->pushContent(HTML::tr(HTML::td($table))); $html->pushContent($table2); diff --git a/lib/plugin/SemanticSearch.php b/lib/plugin/SemanticSearch.php index ae731e6cc..c3b733ddd 100644 --- a/lib/plugin/SemanticSearch.php +++ b/lib/plugin/SemanticSearch.php @@ -141,8 +141,7 @@ class WikiPlugin_SemanticSearch $reldef, $hiddenfield, HiddenInputs(array('attribute' => '')), $instructions, HTML::br(), - HTML::table - (array('border' => 0, 'cellspacing' => 2), + HTML::table( HTML::colgroup(array('span' => 6)), HTML::thead (HTML::tr( diff --git a/lib/plugin/WikiForum.php b/lib/plugin/WikiForum.php index a541cda39..4ce14ec93 100644 --- a/lib/plugin/WikiForum.php +++ b/lib/plugin/WikiForum.php @@ -112,7 +112,7 @@ class WikiPlugin_WikiForum $dbi = $request->getDbh(); $topics = $this->findBlogs($dbi, $args['pagename'], 'wikiforum'); - $html = HTML::table(array('border' => 0)); + $html = HTML::table(); $row = HTML::tr(HTML::th('title'), HTML::th('last post'), HTML::th('author')); -- 2.42.0