Skip to content
Browse files

use new 'expand' parameter as array in tree subclass as well

  • Loading branch information...
1 parent 7ee2223 commit 9c94affcbdc6c7a7f2fa586283ce1b7e956b6616 @ssp ssp committed
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/class.tx_nkwgok_menu.php
View
6 lib/class.tx_nkwgok_menu.php
@@ -206,7 +206,7 @@ private function appendGOKMenuChildren($parentPPN, $container, $autoExpandLevel
$select = $this->doc->createElement('select');
$container->appendChild($select);
$select->setAttribute('id', 'select-' . $this->objectID . '-' . $parentPPN);
- $select->setAttribute('name', 'tx_' . NKWGOKExtKey . '[expand-' . $level . ']');
+ $select->setAttribute('name', 'tx_' . NKWGOKExtKey . '[expand][' . $level . ']');
$select->setAttribute('onchange', 'GOKMenuSelectionChanged' . $this->objectID . '(this);');
$select->setAttribute('title', $this->localise('Fachgebiet auswählen') . ' ('
. $this->localise('Ebene') . ' ' . ($level + 1) . ')');
@@ -237,7 +237,7 @@ private function appendGOKMenuChildren($parentPPN, $container, $autoExpandLevel
}
$option->appendChild($this->doc->createTextNode($this->localise($label)));
$option->setAttribute('value', 'withchildren');
- if (!$this->arguments['expand-' . $level]) {
+ if (count($this->arguments['expand']) < $level) {
$option->setAttribute('selected', 'selected');
}
@@ -267,7 +267,7 @@ private function appendGOKMenuChildren($parentPPN, $container, $autoExpandLevel
$this->appendGOKMenuChildren($PPN, $select, $autoExpandLevel, $level, $autoExpandStep + 1);
}
- if ( $PPN == $this->arguments['expand-' . $level] ) {
+ if ( $PPN === $this->arguments['expand'][$level] ) {
// this item should be selected and the next menu should be added
$option->setAttribute('selected', 'selected');
$this->appendGOKMenuChildren($PPN, $container, $autoExpandLevel, $level + 1);

0 comments on commit 9c94aff

Please sign in to comment.
Something went wrong with that request. Please try again.