marcel
Založený: 28.07.2007
Príspevky: 5
Zaslal: 2007-10-31 09:26
Návrat hore
Odpovedať s citátom
|
Using PME for a while now with succes (Thanks !!),
I try now to get specific values in a column highlighted. Looking into the CSS-possibilities, I caanot find a way to get specific values a different collor.
Example:
if a value is less than zero, it should become red, number greater or equal zero, it should be blue)
Anyone any idea??
|
michal
Založený: 17.06.2003
Príspevky: 537
Bydlisko: Slovakia
Zaslal: 2007-11-05 09:12
Návrat hore
Odpovedať s citátom
|
it's not easily possible.
only something like
'sql|LF' = 'if(column_name >0,'concat(\'<div class="red">\',column_name,\'</div>\',column_name)';
|
marcel
Založený: 28.07.2007
Príspevky: 5
Zaslal: 2007-11-05 09:43
Návrat hore
Odpovedať s citátom
|
Hello,
Thanks for your reply !
Meanwhile I tried it, using the PHP-option.
With this option, and a piece of PHP-code, I have got it to work.
Like triggers, in the PHP-option, you can do many extra things, like adding a css-class.
|
Topshed
Založený: 04.11.2007
Príspevky: 20
Zaslal: 2007-11-26 16:35
Návrat hore
Odpovedať s citátom
|
Well done Marcel,
Would be nice to look at your code please
|
marcel
Založený: 28.07.2007
Príspevky: 5
Zaslal: 2007-11-26 17:47
Návrat hore
Odpovedať s citátom
|
In your table-source-php-file add an item 'php' in the $opts-array:
$opts['fdd']['ID_renner'] = array(
'name' => 'Naam renner',
'select' => 'D',
'size' => 30,
'maxlen' => 30,
'sort' => true,
'php' => 'color.php'
);
And then create a file called color.php, like:
<?php
if ($original_value=="Colored text") $css="pme-cell-x";
if ($this->col_has_URL($k)) {
if (isset ($row['qf'.$k.'_idx'])) $key_rec=$row['qf'.$k.'_idx'];
return $this->urlDisplay($k, $original_value, $value, $css, $key_rec);
}
return $original_value;
?>
======================
(works only for fields with an URL !!)
Then define the color in your used CSS-file for "pme-cell-x"
|
Topshed
Založený: 04.11.2007
Príspevky: 20
Zaslal: 2007-11-27 00:47
Návrat hore
Odpovedať s citátom
|
Thank you Marcel, I am sure others will find it as useful as I do
Regards
Roy...
|
amvarani
Založený: 22.12.2009
Príspevky: 5
Zaslal: 2009-12-23 19:50
Návrat hore
Odpovedať s citátom
|
I would like to know how to pick another table field value inside this color.php
for example:
$original_value will be "ID_renner"
How to pick another field value in my mysql table?
like:
$myfieldx = ID_second
|
amvarani
Založený: 22.12.2009
Príspevky: 5
Zaslal: 2010-02-11 21:45
Návrat hore
Odpovedať s citátom
|
This php file works for URL fields, what about the other fields ???
Could you guy have any solution to display it in "normal" fields ??
At the moment I very close to a definitive solution for this issue ....
|
amvarani
Založený: 22.12.2009
Príspevky: 5
Zaslal: 2010-02-11 22:22
Návrat hore
Odpovedať s citátom
|
Almost working!
I have 1 last bug to solve
When I try to change and update some field
using the operation
$this->labels['Change']
All my data disapear!!!
In fact in the source code the
<input class="pme-input-0" type="text" name="_data_ .....
Disapear!
|
jc8458
Založený: 23.09.2010
Príspevky: 2
Zaslal: 2010-09-23 21:44
Návrat hore
Odpovedať s citátom
|
Has anyone found a solution to this problem?
|
|
Odoslať novú tému
Odpovedať na tému
|