[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Phpgroupware-developers] displaying items - backgroud color
From: |
Dave Hall |
Subject: |
Re: [Phpgroupware-developers] displaying items - backgroud color |
Date: |
Mon, 25 Aug 2003 09:03:23 +0000 (GMT) |
Pascal Vilarem <address@hidden> wrote:
> i'm always scared when people grunt like you did.
Sorry for grunting, but HTML generally does not generate quality replies
from me :)
>
> i'll try to send text-only mails from now on...
appreciated :) Also looking forward to seeing the patch :)
>
> thanks,
> Pascal.
>
> Dave Hall wrote:
>
> >Hey Pascal,
> >
> >Time for me to whinge about a couple of my pet peeves:
> >
> >HTML mail - rrrrrr - please set this (and all other phpgw lists) to
> >plain text only ... HTML mail really annoys me.
> >
> >Patches should be submitted to our patch manager on savannah -
> >https://savannah.gnu.org/patch/?group=phpgroupware
> >
> >Your contribution to the project is valued, but proper submissions
> will>increase the likelyhood of them being properly appreciated :)
> >
> >Cheers
> >
> >Dave
> >Content-Type: multipar> boundary="------------
> 000907020503020407060608">
> >
> >--------------000907020503020407060608
> >Content-Type: text/plain; charset=us-ascii; format=flowed
> >Content-Transfer-Encoding: 7bit
> >
> >Chris Weiss wrote:
> >
> >
> >
> >>Pascal Vilarem (address@hidden) wrote:
> >>
> >>
> >>
> >>
> >>>Hi, all
> >>>
> >>>This is my first writing to this list...
> >>>
> >>>I currenty need to display a list of items with a background
> color that
> >>>shows the status of
> >>>the item ("ok"... "not ok"... "late"... "corrected"... and
> things like
> >>>that).
> >>>
> >>>Is there a "classic" way to do that in phpGW ? the
> alternate_row_color>>>of the "netxtmatchs" class seems only
> >>>to allow to swich between two colors... and i need something a
> little>>>bit more "flexible"...
> >>>
> >>>
> >>>
> >>>
> >>>
> >>not really, just set the color in td tags or use css and set the
> style according to
> >>your status.
> >>
> >>
> >>
> >>
> >I'd prefer to use the templates and theme...
> >
> >what about the following idea ?
> >
> >in nextmatchs class : change alternate_row_color and
> >template_alternate_row_color :
> >-------------------------------------------------------------------
> --------------------------------------------
> >
>
>/*********************************************************************************************/
> > function alternate_row_color($tr_color = '', $rowstatus='')
> > {
> >
> > global $tr_color; /* useless
> now but
> >important to avoid changing existing calls to the method */
> > global $row_light;
> > global $row_status;
> >
> > if ( !$rowlight )
> > {
> > $rowlight = $row_light;
> > }
> >
> > if ( $rowstatus )
> > {
> > $rowstatus.='_';
> > }
> > elseif ( $row_status != '')
> > {
> > $rowstatus=$row_status.'_';
> > }
> >
> > if ( $rowlight == 'row_on' )
> > {
> > $rowlight = 'row_off';
> > }
> > else
> > {
> > $rowlight = 'row_on';
> > }
> >
> > $row_light=$rowlight;
> >
> > $tr_color =
> >$GLOBALS['phpgw_info']['theme'][$rowstatus.$rowlight];
> >
> > return $tr_color;
> > }
> >
> > function template_alternate_row_color(&$tpl, $rowstatus='')
> > {
> > if ( $rowstatus )
> > {
> > global $row_status;
> > $row_status = $rowstatus;
> > }
> >
> > $tpl->set_var('tr_color',$this->alternate_row_color());
> > }
>
>/*********************************************************************************************/
> >
> >in theme files add lines like this :
> >--------------------------------------------
> >
> > $phpgw_info['theme']['status1_row_on'] = '#color1light';
> > $phpgw_info['theme']['status1_row_off'] = '#color1dark';
> >
> >and in ui class :
> >--------------------
> >
> >write $tr_color = $this->nextmatchs-
> >alternate_row_color($tr_color,
> >$status );
> >instead of $tr_color = $this->nextmatchs-
> >alternate_row_color($tr_color);>
> >
> >and $this->nextmatchs->template_alternate_row_color(&$this->t,
> $status);>instead of $this->nextmatchs-
> >template_alternate_row_color(&$this->t);
> >
> >the result :
> >--------------
> >
> >nothing is gonna change is status isn't given...
> >and if it is given, the background color is set up accordingly...
> >the highlighting of the background is now independant of the color
> itself>
> >Nota : i should check that the right line exists in theme file...
> >
> >good idea ? or stupid one ? plz feel right to give comments.
> >
> >
> >
>
>
>
> _______________________________________________
> Phpgroupware-developers mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/phpgroupware-developers
>
dave.hall.vcf
Description: Card for <dave.hall@mbox.com.au>