Commit 3d49f836 authored by Michael Herold's avatar Michael Herold
Browse files

Adds test for headerbar menus

parent 3a1ef9ab
......@@ -48,10 +48,9 @@ button.headerbar_menu::before {
.popover + *.popover {
display: none;
position: absolute;
//min-width: 14em;
}
.popover_window a {
.popover_window a, .popover_window span {
display: block;
text-align: left;
line-height: 2.2em;
......
......@@ -30,6 +30,7 @@ class GuiAllTest extends \Helpers {
public function test_ensemble() {
$num = 3;
$req = new edentata\Request();
$doc = new html\Document(new html\Str('Test'));
$doc->getHtml()->getHead()->addCssFile('design/style.css');
......@@ -37,13 +38,21 @@ class GuiAllTest extends \Helpers {
$topbar = new gui\TopBar();
$doc->getHtml()->getBody()->addChild($topbar);
for ($i = 1; $i <= 6; $i++)
$topbar->getNavUl()->addLine(new gui\Link(new edentata\Request(), _('Link Text '.$i)));
$topbar->getNavUl()->addLine(new gui\Link($req, _('Link Text ' . $i)));
$form = new form\FormPost('test');
$doc->getHtml()->getBody()->addChild($form);
$window = new \hemio\edentata\gui\Window('Abc', 'Subtitle');
$form->addChild($window);
$menu = $window->addHeaderbarMenu();
$spanEntry = new html\Span();
$spanEntry->addChild(new html\Str('Span Above'));
$menu->addEntry()->addChild($spanEntry);
for ($i = 1; $i <= 6; $i++)
$menu->addEntry($req, _('Menu Entry ' . $i));
$window->addButtonRight(new form\FieldSubmit('submit', _('Submit')));
$window->setCssProperty('max-width', '40em');
......
......@@ -15,6 +15,9 @@
<input type="hidden" name="form_test___form_identifier" id="form_test___form_identifier" /><article style="max-width: 40em;">
<header>
<div>
<button type="button" class="popover headerbar_menu "></button><ul class="popover popover_window ">
<li><span>Span Above</span></li><li><a href="service/">Menu Entry 1</a></li><li><a href="service/">Menu Entry 2</a></li><li><a href="service/">Menu Entry 3</a></li><li><a href="service/">Menu Entry 4</a></li><li><a href="service/">Menu Entry 5</a></li><li><a href="service/">Menu Entry 6</a></li>
</ul>
<button accesskey="S" title="Submit" name="form_test_submit" id="form_test_submit"><u>S</u>ubmit</button>
</div>
<div>
......
......@@ -15,6 +15,9 @@
<input type="hidden" name="form_test___form_identifier" id="form_test___form_identifier" /><article style="max-width: 40em;">
<header>
<div>
<button type="button" class="popover headerbar_menu "></button><ul class="popover popover_window ">
<li><span>Span Above</span></li><li><a href="service/">Menu Entry 1</a></li><li><a href="service/">Menu Entry 2</a></li><li><a href="service/">Menu Entry 3</a></li><li><a href="service/">Menu Entry 4</a></li><li><a href="service/">Menu Entry 5</a></li><li><a href="service/">Menu Entry 6</a></li>
</ul>
<button accesskey="S" title="Submit" name="form_test_submit" id="form_test_submit"><u>S</u>ubmit</button>
</div>
<div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment