commit a5be5ed5170a830117840f4790eaeeb89cb5db6f
parent d207fe009283a9a72205311459b6e1af8a6ae2ee
Author: Jan Dankert <devnull@localhost>
Date: Sat, 8 Dec 2018 01:16:11 +0100
Aufklappen von Seitenelementen funktioniert jetzt endlich wieder. Man, ey.
Diffstat:
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/modules/cms-core/action/TreeAction.class.php b/modules/cms-core/action/TreeAction.class.php
@@ -60,8 +60,8 @@ class TreeAction extends Action
{
$tree = new Tree();
- if ( intval($this->getRequestVar('id')) != 0 )
- $tree->$type( $this->getRequestId() );
+ if ( $this->hasRequestVar('id'))
+ $tree->$type( $this->getRequestVar('id') );
else
$tree->$type();
diff --git a/modules/cms-ui/themes/default/html/views/file/edit.php b/modules/cms-ui/themes/default/html/views/file/edit.php
@@ -9,7 +9,7 @@
<div class="input">
<br/>
- <input size="40" id="req1544226406423830540_file" type="file" name="file" class="upload" />
+ <input size="40" id="req15442280991882256107_file" type="file" name="file" class="upload" />
<br/>
diff --git a/modules/util/Tree.class.php b/modules/util/Tree.class.php
@@ -342,6 +342,7 @@ class Tree
$treeElement->internalId = $id . '_' . $elementid;
$treeElement->text = $element->name;
$treeElement->action = 'pageelement';
+ $treeElement->type = 'pageelement';
$treeElement->icon = 'el_' . $element->getTypeName();
$treeElement->extraId = array('elementid' => $elementid, REQ_PARAM_LANGUAGE_ID => $page->languageid, REQ_PARAM_MODEL_ID => $page->modelid);
@@ -384,8 +385,10 @@ class Tree
if ( BaseObject::available($value->linkToObjectId) )
{
$o = new BaseObject( $value->linkToObjectId );
+ $o->load();
$treeElement = new TreeElement();
$treeElement->type = $o->getType();
+ $treeElement->action = $o->getType();
$treeElement->id = $o->objectid;
$treeElement->internalId = $o->objectid;
$treeElement->extraId = array(REQ_PARAM_LANGUAGE_ID => $page->languageid, REQ_PARAM_MODEL_ID => $page->modelid);