summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJehan-Guillaume de Rorthais2014-01-02 12:21:09 +0000
committerJehan-Guillaume de Rorthais2014-01-02 12:21:09 +0000
commit3e1604e7bf337911bc7646724a9a82b9effc61c7 (patch)
treee5744a7ace2bd784bfd1e0cda7794657a207b8b3
parent67c331f1acb2b2131be516480514fb0b3d78683a (diff)
parenta95052482c56e365348c73b33945b80986588695 (diff)
Merge branch 'master' into dyn_themes
-rw-r--r--classes/Misc.php17
-rw-r--r--display.php16
-rw-r--r--tblproperties.php3
-rw-r--r--themes/cappuccino/global.css2
-rw-r--r--themes/gotar/global.css10
5 files changed, 38 insertions, 10 deletions
diff --git a/classes/Misc.php b/classes/Misc.php
index b40d02c0..b0b5a74c 100644
--- a/classes/Misc.php
+++ b/classes/Misc.php
@@ -1847,6 +1847,7 @@
* $columns = array(
* column_id => array(
* 'title' => Column heading,
+ * 'class' => The class to apply on the column cells,
* 'field' => Field name for $tabledata->fields[...],
* 'help' => Help page for this column,
* ), ...
@@ -1928,7 +1929,7 @@
if (sizeof($actions) > 0) echo "<th class=\"data\" colspan=\"", count($actions), "\">{$column['title']}</th>\n";
break;
default:
- echo "<th class=\"data\">";
+ echo "<th class=\"data {$column['class']}\">";
if (isset($column['help']))
$this->printHelp($column['title'], $column['help']);
else
@@ -1959,6 +1960,8 @@
foreach ($columns as $column_id => $column) {
+ $class = $column['class'] !== '' ? " class=\"{$column['class']}\"":'';
+
// Apply default values for missing parameters
if (isset($column['url']) && !isset($column['vars'])) $column['vars'] = array();
@@ -1968,15 +1971,23 @@
if (isset($action['disable']) && $action['disable'] === true) {
echo "<td></td>\n";
} else {
- echo "<td class=\"opbutton{$id}\">";
+ echo "<td class=\"opbutton{$id} {$column['class']}\">";
$action['fields'] = $tabledata->fields;
$this->printLink($action);
echo "</td>\n";
}
}
break;
+ case 'comment':
+ echo "<td class='comment_cell'>";
+ $val = value($column['field'], $tabledata->fields);
+ if (!is_null($val)) {
+ echo $val;
+ }
+ echo "</td>";
+ break;
default:
- echo "<td>";
+ echo "<td{$class}>";
$val = value($column['field'], $tabledata->fields);
if (!is_null($val)) {
if (isset($column['url'])) {
diff --git a/display.php b/display.php
index 1a76d822..89bf92ac 100644
--- a/display.php
+++ b/display.php
@@ -815,8 +815,20 @@
$scripts .= "</script>\n";
// If a table is specified, then set the title differently
- if (isset($_REQUEST['subject']) && isset($_REQUEST[$_REQUEST['subject']]))
- $misc->printHeader($lang['strtables'], $scripts);
+ if (isset($_REQUEST['subject']) && isset($_REQUEST[$_REQUEST['subject']])) {
+ if ($_REQUEST['subject'] == 'table') {
+ $misc->printHeader(
+ $lang['strtables'].': '.$_REQUEST[$_REQUEST['subject']],
+ $scripts
+ );
+ }
+ else if ($_REQUEST['subject'] == 'view') {
+ $misc->printHeader(
+ $lang['strviews'].': '.$_REQUEST[$_REQUEST['subject']],
+ $scripts
+ );
+ }
+ }
else
$misc->printHeader($lang['strqueryresults']);
diff --git a/tblproperties.php b/tblproperties.php
index e2a5d2e2..f73ce8b6 100644
--- a/tblproperties.php
+++ b/tblproperties.php
@@ -491,6 +491,7 @@
),
'keyprop' => array(
'title' => $lang['strconstraints'],
+ 'class' => 'constraint_cell',
'field' => field('attname'),
'type' => 'callback',
'params'=> array(
@@ -503,7 +504,7 @@
),
'comment' => array(
'title' => $lang['strcomment'],
- 'field' => field('comment'),
+ 'field' => field('comment')
),
);
diff --git a/themes/cappuccino/global.css b/themes/cappuccino/global.css
index 575a8600..5d1a3aa7 100644
--- a/themes/cappuccino/global.css
+++ b/themes/cappuccino/global.css
@@ -53,7 +53,7 @@ input[type=checkbox], input[type=password], input[type=text], input[type=radio]
background: #ded4b3;
border: 1px solid #887f5c;
}
-input[type=submit], input[type=button], select {
+input[type=submit], input[type=reset], input[type=button], select {
background: #c4ba95 url('../../images/themes/cappuccino/inputbckg.png') repeat-x top left;
border: 1px solid #887f5c;
}
diff --git a/themes/gotar/global.css b/themes/gotar/global.css
index ec853269..5b693189 100644
--- a/themes/gotar/global.css
+++ b/themes/gotar/global.css
@@ -16,6 +16,9 @@ body {
p {
color: #fff;
}
+p.comment, td.comment_cell {
+ color: #aff;
+}
table {
border:1px gray solid;
}
@@ -56,6 +59,7 @@ th.data {
}
th.data a:active, th.data a:link, th.data a:visited, th.data a:hover {
font-weight: bold;
+ display:block;
}
td.dat {
color: #ff0;
@@ -85,7 +89,7 @@ tr.data1:hover, tr.data2:hover, tr.data3:hover {
background-color: #39663e;
}
.row1, .data1 {
- background-color: #1a3f1e;
+ background-color: #2b482e;
text-align: left;
}
input, textarea, select {
@@ -115,7 +119,7 @@ p input:focus, .data input:focus, .data1 input:focus, .data2 input:focus, textar
color:#000;
}
.row2, .data2 {
- background-color: #2b482e;
+ background-color: #1a3f1e;
text-align: left;
}
td.opbutton1 {
@@ -161,7 +165,7 @@ table.tabs {
.tabs .active {background-color: #449}
.tab .icon {display: block}
tr,td { height:100% }
-td a:not(.help), th a { display:inline-block; height:100% } /* vertical-align:middle doesn't work for block elements, CSS sux */
+td:not(.constraint_cell) a:not(.help), th a { display:inline-block; height:100% } /* vertical-align:middle doesn't work for block elements, CSS sux */
td.crumb a, td.tab a { width:90% }
tr.data1 a, tr.data2 a { width:100% }
td.opbutton1 a, td.opbutton2 a { width:inherit }