Skip to content
Code-Schnipsel Gruppen Projekte
Commit 651e60c1 erstellt von Michael Danielczok's avatar Michael Danielczok
Dateien durchsuchen

fix: Correct way to set javascript attribute.

Übergeordneter 08046106
No related branches found
No related tags found
Keine zugehörigen Merge Requests gefunden
......@@ -41,7 +41,7 @@ public function __construct($attributes = [])
parent::__construct($attributes);
$this->addCSSClass('quiqqer-menu-megaMenu');
$this->addCSSFile(dirname(__FILE__).'/MegaMenu.css');
$this->addCSSFile(dirname(__FILE__) . '/MegaMenu.css');
if (!$this->getAttribute('enableMobile')) {
return;
......@@ -68,10 +68,10 @@ public function __construct($attributes = [])
*/
public function getBody()
{
$cache = EventHandler::menuCacheName().'/megaMenu/';
$cache = EventHandler::menuCacheName() . '/megaMenu/';
$cache .= \md5(
$this->getSite()->getCachePath().
$this->getSite()->getCachePath() .
\serialize($this->getAttributes())
);
......@@ -104,7 +104,7 @@ public function getBody()
$this->Mobile->setAttribute('data-qui-options-buttonids', 'mobileMenu');
}
$this->setAttribute('data-qui-options-enablemobile', $this->getAttribute('enableMobile'));
$this->setAttribute('data-qui-options-enablemobile', $this->getAttribute('enableMobile') ? 1 : 0);
$Engine->assign([
'this' => $this,
......@@ -126,7 +126,7 @@ public function getBody()
}
$result = [
'html' => $Engine->fetch(dirname(__FILE__).'/MegaMenu.html'),
'html' => $Engine->fetch(dirname(__FILE__) . '/MegaMenu.html'),
'subMenus' => \array_unique($this->subMenus)
];
......
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren