Small template fixes for new css

This commit is contained in:
Dennis Eichhorn 2019-05-17 20:48:59 +02:00
parent b430c3d5f4
commit 20cbce7cdc
3 changed files with 28 additions and 11 deletions

View File

@ -30,11 +30,13 @@ use phpOMS\Views\View;
*/
class TextView extends View
{
private $id = '';
private $name = '';
private $form = '';
private $plain = '';
private $preview = '';
private $id = '';
private $name = '';
private $form = '';
private $plain = '';
private $preview = '';
private $tplText = '';
private $tplValue = '';
/**
* {@inheritdoc}
@ -70,16 +72,28 @@ class TextView extends View
return $this->plain;
}
public function getTplText() : string
{
return $this->tplText;
}
public function getTplValue() : string
{
return $this->tplValue;
}
/**
* {@inheritdoc}
*/
public function render(...$data) : string
{
$this->id = $data[0] ?? '';
$this->name = $data[1] ?? '';
$this->form = $data[2] ?? '';
$this->plain = $data[3] ?? '';
$this->preview = $data[4] ?? '';
$this->id = $data[0] ?? '';
$this->name = $data[1] ?? '';
$this->form = $data[2] ?? '';
$this->plain = $data[3] ?? '';
$this->preview = $data[4] ?? '';
$this->tplText = $data[5] ?? '';
$this->tplValue = $data[6] ?? '';
return parent::render();
}

View File

@ -1,3 +1,4 @@
<!-- todo: here is a bug! Somehow this causes the main flex to not work properly (example tasks and click edit and make windows smaller to see the nav side bar freak out) somehow the overflow-x is messing something up. -->
<div id="<?= $this->printHtml($this->getId()); ?>" class="slider click">
<ul class="h-list">
<li><i data-editor-button="a" class="btn editor-button fa fa-lg fa-undo"></i>

View File

@ -10,7 +10,9 @@
style="height: 300px"
placeholder="&#xf040;"
name="<?= $this->printHtml($this->getName()); ?>"
form="<?= $this->printHtml($this->getForm()); ?>">
form="<?= $this->printHtml($this->getForm()); ?>"
data-tpl-text="<?= $this->printHtml($this->getTplText()); ?>"
data-tpl-value="<?= $this->printHtml($this->getTplValue()); ?>">
<?= $this->printHtml($this->getPlain()); ?>
</textarea><input type="hidden" id="<?= $this->printHtml($this->getId()); ?>-parsed">
</div>