<div id='stage-member-lists-container-inner'> <?php $modelTypes = array_flip(X2Model::$associationModels); $recordNames = X2Model::getAllRecordNames(); ?> <div id='stage-member-prototype' style='display: none;'> <?php // render a dummy item view so that it can be cloned on the client $this->renderpartial('_dragAndDropItemView', array('data' => array('id' => null, 'name' => null), 'recordNames' => $recordNames, 'dummyPartial' => true, 'recordType' => 'contacts', 'workflow' => $model)); ?> </div> <?php $colorGradients = array(); for ($i = 0; $i < sizeof($colors); $i++) { list($r, $g, $b) = X2Color::hex2rgb2($colors[$i][0]); list($r2, $g2, $b2) = X2Color::hex2rgb2($colors[$i][1]); $colorStr1 = "rgba({$r}, {$g}, {$b}, 0.65)"; $colorStr2 = "rgba({$r2}, {$g2}, {$b2}, 0.65)"; $colorGradients[] = 'background: ' . $colors[$i][0] . '; background: -moz-linear-gradient(top, ' . $colorStr1 . ' 0%, ' . $colorStr2 . ' 100%); background: -webkit-linear-gradient(top, ' . $colorStr1 . ' 0%, ' . $colorStr2 . ' 100%); background: -o-linear-gradient(top, ' . $colorStr1 . ' 0%, ' . $colorStr2 . ' 100%); background: -ms-linear-gradient(top, ' . $colorStr1 . ' 0%, ' . $colorStr2 . ' 100%); background: linear-gradient(to bottom, ' . $colorStr1 . ' 0%, ' . $colorStr2 . ' 100%);'; } for ($i = 0; $i < count($stages); ++$i) { $stage = $stages[$i]; ?> <div class='stage-members'> <div class='stage-member-staging-area'></div> <?php
/** * @param array $colors an array of color hex values, 1 for each stage * @return array css color strings to be used for pipeline list item backgrounds */ public static function getPipelineListItemColors($colors) { $listItemColors = array(); for ($i = 1; $i <= count($colors); ++$i) { list($r, $g, $b) = X2Color::hex2rgb2($colors[$i - 1][0]); $listItemColors[$i - 1][] = "rgba({$r}, {$g}, {$b}, 0.20)"; $listItemColors[$i - 1][] = "rgba({$r}, {$g}, {$b}, 0.12)"; } return $listItemColors; }