| @@ -77,30 +77,20 @@ | ||
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | public function getColorValue($fieldname) |
| 80 | 80 | { |
| 81 | - $value = self::getValue($fieldname); | |
| 82 | - if ($this->isrgba($value)) | |
| 83 | - return $value; | |
| 84 | - | |
| 81 | + $value = $this->getValue($fieldname); | |
| 85 | 82 | if (! $value ) |
| 86 | 83 | return false; |
| 84 | + | |
| 87 | 85 | if (substr($value,0,1) !== '#') |
| 88 | 86 | { |
| 89 | 87 | $value = '#' . $value; |
| 90 | 88 | } |
| 89 | + | |
| 91 | 90 | return $value; |
| 92 | -} | |
| 93 | 91 | |
| 94 | -private function isrgba($value) | |
| 95 | -{ | |
| 96 | - if (strpos($value, 'rgb') >= 0 ) | |
| 97 | - return true; | |
| 98 | - else { | |
| 99 | - return false; | |
| 100 | - } | |
| 101 | 92 | } |
| 102 | - | |
| 103 | 93 | |
| 104 | 94 | |
| 105 | 95 | public function setPreview($preview = true) |
| 106 | 96 | { |