BUGFIX: updated select options classes to work with the dataobjectset returned by selectoptions rather than the array previously (from r105872)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112504 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-10-15 02:51:33 +00:00
parent 092a3c1c26
commit 91700a3dac
2 changed files with 6 additions and 6 deletions

View File

@ -1478,12 +1478,13 @@ class TableListField_Item extends ViewableData {
*/
function SelectOptionClasses(){
$tagArray = array('markingcheckbox');
$options = $this->parent->SelectOptions();
if(!empty($options)){
foreach($options as $optionKey => $optionTitle){
if($optionKey !== 'all' && $optionKey !== 'none'){
if($this->$optionKey) {
$tagArray[] = $optionKey;
if($options && $options->exists()){
foreach($options as $option){
if($option->Key !== 'all' && $option->Key !== 'none'){
if($this->{$option->Key}) {
$tagArray[] = $option->Key;
}
}
}

View File

@ -150,7 +150,6 @@ class TableListFieldTest extends SapphireTest {
$table->addSelectOptions(array("F"=>"FieldF"));
$tableHTML = $table->FieldHolder();
$p = new CSSContentParser($tableHTML);
$this->assertContains('rel="F"', $tableHTML);
$tbody = $p->getByXpath('//tbody');