Advertisement
reenadak

Change background color of some rows

Mar 27th, 2018
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.48 KB | None | 0 0
  1. Change background color in MATE
  2.  
  3.         $this->Editor->setConfig('modifyRowSets',array(&$this,'changeBgColor')); and
  4.  
  5.     function changeBgColor($rowSets,$rowInfo,$rowNum)
  6.     {
  7.         $day_diff = strtotime($rowInfo['expiry']) - strtotime(date('Y-m-d'));
  8.         $day_diff = $day_diff / (24*60*60); // difference in days.
  9.  
  10.         if( $day_diff < 90 )
  11.         {
  12.          // $rowSets['bgcolor'] = '#ffffff';
  13.             $rowSets['bgcolor'] = 'pink';
  14.             $rowSets['class'] = 'clickable';
  15.         }
  16.         return $rowSets;
  17.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement