Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Utorok, 24. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Zoznam chýb  »  Chyba #157

Rozšírené detaily chyby [ Preskočiť na poznámky k chybám ] [ História chýb ] [ Vytlačiť ]
ID Kategória Dôležitosť Reprodukovateľnosť Dátum vloženia Posledná zmena
0000157 core / general vlastnosť vždy 2004-01-02 09:06 2009-12-22 12:42
 
Autor hbernard Zobraziť status verejný  
Priradené
Priorita normálna Riešenie otvorený Platforma PC
Stav reakcia Duplicitné ID OS (Server) Linux Mandrake 9.1
Projection žiadny Verzia Builtin
ETA žiadny Verzia produktu
  Build produktu
  Hlasy 1
 
Zhrnutie conditionnal row and cell css handling
Popis What if we want a special css for specifics line, depending of the row values ?

A good example is the bug tracker, which display records differently, depending of the state of the bug.
Kroky k vyvolaniu
Dalšie informácie There was a draft implementation in the #121 uploaded patches, but this need more thought, especially about API.
 
Popis systému
Pripojené súbory

Poznámky k chybe
hbernard
2004-01-02 09:24

Nepto, you say you have some idea about this.
It would be nice if we could set css style via sql AND/OR php functions.

NB: post 5.4 issue, I think

edited on: 2004-01-02 10:37
 
michal
2004-01-16 16:26

the easiest way is see it is that 'php' would return either $value or array('value' => $value, 'cell_css' => $cell_css, 'row_css' => $row_css);

that would mean also new $css_row.
emulation via sql. 'sql' = 'CONCAT...some sql'; function for 'php' $ret[cell_css] = $value; return $ret; plus U/H/.. flag.
or some new option to use a built in 'php'.

what do you think ?
 
hbernard
2004-01-16 23:21

well, as said elsewhere, I don't wish to add another $row_* ;-)

I was thinking :
1- idealy allowing to set
$opts['css']['cond-row']['sql'] = (...)
or
$opts['css']['cond-row']['php'] = (...)

where (...) is processed for each row and must return either
- the class name
- null, which means pme must use the default class name

2- another API was proposed in the 'sqlw' thread
see the #121 for more.

the idea is to have a pure virtual field feature (field that don't exist in the table model), use 'php' or 'sql' option to compute its value and to set :
$opts['css']['cond-row'] = "mycustomvirtualfield";

edited on: 2004-01-16 23:22
 
michal
2004-02-18 17:51

current css names are as follows
{prefix}-{class name}-{even/odd}-{fdd_postfix}
where prefix is currently pme
class name is cell/key/value/(row)
even/odd is 0 or 1 (or 2,..)
fdd_postfix is defined in $opts (not dynamic)

we want to add two postfixes:
row_postfix is applied to every cell in that row (eg bug tracker)
cell_postfix is applied just to mentioned cell (eg red if negative)

what the order should be ?
is it possible to make row_postfix a substitute of even/odd ? (use row_postfix if set, use even/odd otherwise)

so i would vote for:
{prefix}-{class name}-{even/odd/row_postfix}-{fdd_postfix}-{cell_postfix}

another question is whether to set whole class or just postfix(es). i vote for postfixes.

and the least important question is how this css should be set, sql or php or both (preferably).
 
hbernard
2004-02-23 18:14

0. Ok for order

1. I certainly vote for whole class setting.

2. of course both. (sql and php). But again, my question is, which API.

Nepto, you seemed to have some thought, can you tell us the right way ?
 
hsicard
2005-01-09 00:02

The trick mentionned in http://platon.sk/forum/projects/viewtopic.php?t=383
combining $opts['css']['divider'] = 10000; with some hidden 'sql' css look kind of complicated...
Finally did someone came up with something applying to a whole row depending on on of its values?
 
pilavdzic
2005-01-19 22:49

I am also encountering the need to set some rows colored depending on if a certain field (that I would like to be hidden and not show up) contains a 0 or 1. Bug 211 pointed me here, here pointed me to the topic 383 that shows the trick of using the SQL option to conditionally apply style to a cell. That looks good to me, I will try it out now. Is there anyhting else I should try if that doesn't work? I don't understand the divider=10000 trick at all...
 
amvarani
2009-12-22 12:42

Hi!
Now is almost 2010, and, does anybody have the solution ?
 

História chýb
Dátum poslednej úpravy Používateľské meno Pole Zmeniť
2004-01-02 09:06 hbernard Nová chyba
2004-01-02 09:24 hbernard Poznámka k chybe pridaná: 0000525
2004-01-02 09:24 hbernard Chyba monitorovaná: hbernard
2004-01-02 10:37 hbernard Poznámka k chybe upravená: 525
2004-01-16 16:26 michal Poznámka k chybe pridaná: 0000625
2004-01-16 23:21 hbernard Poznámka k chybe pridaná: 0000632
2004-01-16 23:22 hbernard Poznámka k chybe upravená: 632
2004-01-16 23:23 hbernard status nový => reakcia
2004-02-18 17:51 michal Poznámka k chybe pridaná: 0000722
2004-02-23 18:14 hbernard Poznámka k chybe pridaná: 0000738
2004-04-05 10:00 amoushou Chyba monitorovaná: amoushou
2005-01-09 00:02 hsicard Poznámka k chybe pridaná: 0001439
2005-01-19 22:49 pilavdzic Poznámka k chybe pridaná: 0001449
2006-08-03 09:27 paolodp Chyba monitorovaná: paolodp
2006-08-03 09:28 paolodp Ukončiť monitorovanie chyby: paolodp
2009-12-22 12:42 amvarani Poznámka k chybe pridaná: 0001922
2014-01-09 23:01 leonardo.g Chyba monitorovaná: leonardo.g

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov