/** * Get the html node for this element * * @param \DOMElement $node * @param \AppShed\Remote\XML\DOMDocument $xml * @param \AppShed\Remote\HTML\Settings $settings */ protected function getHTMLNodeInner($node, $xml, $settings) { $css = new CSSDocument(); if ($this->customCSS) { $idSelector = $css->getIdSelector($this->getIdType() . $settings->getPrefix() . $this->getId()); $css->addCSSText($this->customCSS, $idSelector); } $javascripts = []; $this->getHTMLNodeBase($node, $xml, $settings, $css, $javascripts); if ($this->secure) { $node->setAttribute('data-secured', 'secure'); } $settings->addScreen($this->getId(), $xml->saveXML($node), $css, $this->updated === true ? new \DateTime() : $this->updated, $this->secure, $javascripts); }
/** * Get the html node for this element * * @param \DOMElement $node * @param \AppShed\Remote\XML\DOMDocument $xml * @param \AppShed\Remote\HTML\Settings $settings */ protected function getHTMLNodeInner($node, $xml, $settings) { $css = new CSSDocument(); $idSelector = $css->getIdSelector($this->getIdType() . $settings->getPrefix() . $this->getId()); if ($this->customCSS) { $css->addCSSText($this->customCSS, $idSelector); } $this->getCSS($css, $settings); if ($this->splash) { $this->splash->toCSS($css, $idSelector . $css->getClassSelector('splash')); } if ($this->name) { $node->setAttribute('data-name', $this->name); } if ($this->description) { $node->setAttribute('data-description', $this->description); } if ($this->flag) { $node->setAttribute('data-flag', $this->flag); } if ($this->previewUrl) { $node->setAttribute('data-preview-url', $this->previewUrl); } if ($this->webviewUrl) { $node->setAttribute('data-webview-url', $this->webviewUrl); } if ($this->disableIos7) { $node->setAttribute('data-disable-ios7', 'data-disable-ios7'); } if ($this->disableMasking) { $node->setAttribute('data-disable-masking', 'data-disable-masking'); } if ($this->icon) { $node->setAttribute('data-icon', $this->icon->getUrl()); $idSelector = $css->getIdSelector($this->getIdType() . $settings->getPrefix() . $this->getId()); $css->addRule([".android .phone-navigator {$idSelector}.app .app-navigator .screen .header .back"], 'background-image', $css->getURLValue($this->icon->getUrl())); $css->addRule([".blackberry .phone-navigator {$idSelector}.app .app-navigator .screen .header"], 'background-image', $css->getURLValue($this->icon->getUrl())); } if ($settings->getFetchUrl()) { $node->setAttribute('data-fetch-url', $settings->getFetchUrl()); } $node->appendChild($navigator = $xml->createElement('div', 'app-navigator')); $navigator->appendChild($navinner = $xml->createElement('div', 'app-navigator-inner')); $navinner->appendChild($xml->createElement('div', 'app-navigator-inner-sides')); $navinner->appendChild($xml->createElement('div', 'app-navigator-inner-sides')); if ($this->ads) { $xml->addClass($navigator, 'ads'); $node->appendChild($xml->createElement('div', 'ad-holder')); } $node->appendChild($tabbarOuter = $xml->createElement('div', 'tab-bar')); $tabbarOuter->appendChild($tabbar = $xml->createElement('table')); $tabbar->appendChild($tabbarinner = $xml->createElement('tr', 'tar-bar-inner')); foreach ($this->children as $tab) { $tabbarinner->appendChild($tab->getHTMLNode($xml, $settings)); $tab->getCSS($css, $settings); } $settings->addApp($this->getId(), $xml->saveXML($node), $css, $this->splash ? "<style scoped>" . $css->toSplashString() . "</style><div class=\"splash\" id=\"app" . $this->getId() . "\"></div>" : null, $this->updated === true ? new \DateTime() : $this->updated, ['login' => null, 'register' => null], $this->js); }