Revert "Merge branch 'feature/organize-headings-7976'"

This reverts commit ea2a17a76c, reversing
changes made to e72de8dfe1.

refs #7976
fixes #8647
This commit is contained in:
Eric Lippmann 2015-03-12 12:12:34 +01:00
parent 8295d6d9b0
commit 90971f2caf
34 changed files with 116 additions and 250 deletions

View File

@ -72,7 +72,6 @@ class ConfigController extends ActionController
$allowedActions[] = 'roles';
}
$this->firstAllowedAction = array_shift($allowedActions);
$this->getTabs()->setTitle($this->translate('Config Navigation'));
}
public function devtoolsAction()

View File

@ -51,7 +51,6 @@ class RolesController extends ActionController
'label' => $this->translate('Roles'),
'url' => 'roles'
));
$this->getTabs()->setTitle($this->translate('Role Configuration'));
}
/**

View File

@ -2,20 +2,9 @@
<?= $tabs; ?>
</div>
<div class="content" data-base-target="_next">
<h1 tabindex="-1" id="authentication-configuration">
<?= $this->translate('Authentication Configuration'); ?>
</h1>
<h2 tabindex="-1" id="authentication-new-backend" class="sr-only">
<?= t('New Authentication Backend'); ?>
</h2>
<p>
<a href="<?= $this->href('/config/createAuthenticationBackend'); ?>">
<?= $this->icon('plus'); ?><?= $this->translate('Create A New Authentication Backend'); ?>
</a>
</p>
<h2 tabindex="-1" id="authentication-reorder" class="sr-only">
<?= t('Reorder Authentication Backends'); ?>
</h2>
<a href="<?= $this->href('/config/createAuthenticationBackend'); ?>">
<?= $this->icon('plus'); ?><?= $this->translate('Create A New Authentication Backend'); ?>
</a>
<div id="authentication-reorder-form">
<?= $form; ?>
</div>

View File

@ -11,9 +11,6 @@
$permissions = $module->getProvidedPermissions();
$state = $moduleData->enabled ? ($moduleData->loaded ? 'enabled' : 'failed') : 'disabled'
?>
<h1 tabindex="-1">
<?= $this->escape($module->getTitle()) ?>
</h1>
<table class="avp">
<tr>
<th><?= $this->escape($this->translate('Name')) ?></th>

View File

@ -4,7 +4,6 @@
</div>
<div class="content">
<h1 tabindex="-1"><?= $this->translate('Installed Modules') ?></h1>
<table class="action" data-base-target="_next">
<tbody>
<?php foreach ($modules as $module): ?>

View File

@ -2,20 +2,9 @@
<?= $tabs; ?>
</div>
<div class="content" data-base-target="_next">
<h1 tabindex="-1" id="resource-index">
<?= t('Resource Configuration'); ?>
</h1>
<h2 tabindex="-1" id="resource-new-resource" class="sr-only">
<?= t('Create New Resource'); ?>
</h2>
<p>
<a href="<?= $this->href('/config/createresource'); ?>">
<?= $this->icon('plus'); ?> <?= $this->translate('Create A New Resource'); ?>
</a>
</p>
<h2 tabindex="-1" id="resource-edit-resource" class="sr-only">
<?= t('Edit Existing Resources'); ?>
</h2>
<a href="<?= $this->href('/config/createresource'); ?>">
<?= $this->icon('plus'); ?> <?= $this->translate('Create A New Resource'); ?>
</a>
<table class="action" id="resource-edit-table">
<thead>
<th><?= $this->translate('Resource'); ?></th>

View File

@ -2,9 +2,6 @@
<?= $tabs ?>
</div>
<div class="content">
<h1 tabindex="-1" id="roles-index">
<?= $this->translate('Roles') ?>
</h1>
<div>
<?php /** @var \Icinga\Application\Config $roles */ if ($roles->isEmpty()): ?>
<?= $this->translate('No roles found.') ?>
@ -70,9 +67,6 @@
</tbody>
</table>
<?php endif ?>
<h2 tabindex="-1" id="roles-index-new" class="sr-only">
<?= $this->translate('Create New Role'); ?>
</h2>
<a data-base-target="_next" href="<?= $this->href('roles/new') ?>">
<?= $this->translate('Create a New Role') ?>
</a>

View File

@ -678,28 +678,20 @@ class FilterEditor extends AbstractWidget
public function render()
{
if (! $this->preservedUrl()->getParam('modifyFilter')) {
$filterEditor = $this->renderSearch() . $this->shorten($this->filter, 50);
} else {
$filterEditor = $this->renderSearch()
. '<form action="'
. Url::fromRequest()
. '" class="filterEditor" method="POST">'
. '<ul class="tree widgetFilter"><li>'
. $this->renderFilter($this->filter)
. '</li></ul>'
. '<div style="float: right">'
. '<input type="submit" name="submit" value="Apply" />'
. '<input type="submit" name="cancel" value="Cancel" />'
. '</div>'
. '</form>';
return $this->renderSearch() . $this->shorten($this->filter, 50);
}
return sprintf(
'<div class="filter-editor dontprint">'
. '<h2 tabindex="-1" class="sr-only">%s</h2>%s</div>',
t('Filters'),
$filterEditor
);
return $this->renderSearch()
. '<form action="'
. Url::fromRequest()
. '" class="filterEditor" method="POST">'
. '<ul class="tree widgetFilter"><li>'
. $this->renderFilter($this->filter)
. '</li></ul>'
. '<div style="float: right">'
. '<input type="submit" name="submit" value="Apply" />'
. '<input type="submit" name="cancel" value="Cancel" />'
. '</div>'
. '</form>';
}
protected function shorten($string, $length)

View File

@ -133,13 +133,6 @@ class SortBox extends AbstractWidget
if ($this->request) {
$form->populate($this->request->getParams());
}
return sprintf(
'<div class="sort-box dontprint">'
. '<h2 tabindex="-1" class="sr-only">%s</h2>%s%s</div>',
t('Sort Criteria'),
t('Sort by'),
(string) $form
);
return $form;
}
}

View File

@ -20,7 +20,6 @@ class Tabs extends AbstractWidget implements Countable
* @var string
*/
private $baseTpl = <<< 'EOT'
{HEADER}
<ul class="tabs">
{TABS}
{DROPDOWN}
@ -29,13 +28,6 @@ class Tabs extends AbstractWidget implements Countable
</ul>
EOT;
/**
* Template used for the header
*
* @type string
*/
private $headerTpl = '<h2 class="sr-only">{TITLE}</h2>';
/**
* Template used for the tabs dropdown
*
@ -109,13 +101,6 @@ EOT;
*/
private $closeTab = true;
/**
* Title of the tab navigation
*
* @type string
*/
private $title;
/**
* Set whether the current tab is closable
*/
@ -381,15 +366,13 @@ EOT;
'{TABS}',
'{DROPDOWN}',
'{REFRESH}',
'{CLOSE}',
'{HEADER}'
'{CLOSE}'
),
array(
$tabs,
$drop,
$close,
$refresh,
$this->renderHeader()
$refresh
),
$this->baseTpl
);
@ -451,30 +434,4 @@ EOT;
$tabextension->apply($this);
return $this;
}
/**
* Set the title of the tab navigation
*
* @param string $title
* @return self
*/
public function setTitle($title)
{
$this->title = $title;
return $this;
}
/**
* Render the title into the header template
*
* @return string
*/
public function renderHeader()
{
if (! $this->title) {
return '';
}
return str_replace('{TITLE}', $this->title, $this->headerTpl);
}
}

View File

@ -44,7 +44,7 @@ class Monitoring_AlertsummaryController extends Controller
'label' => $this->translate('Alert Summary'),
'url' => Url::fromRequest()
)
)->activate('alertsummary')->setTitle($this->translate('Alertsummary Navigation'));
)->activate('alertsummary');
$this->view->title = $this->translate('Alert Summary');
$this->view->intervalBox = $this->createIntervalBox();

View File

@ -727,7 +727,6 @@ class Monitoring_ListController extends Controller
private function createTabs()
{
$tabs = $this->getTabs();
$tabs->setTitle($this->translate('Monitoring Navigation'));
if (in_array($this->_request->getActionName(), array(
'hosts',
'services',

View File

@ -29,7 +29,7 @@ class Monitoring_ProcessController extends Controller
'label' => $this->translate('Monitoring Health'),
'url' =>'monitoring/process/info'
)
)->setTitle($this->translate('Process Information'));
);
}
/**

View File

@ -1,9 +1,6 @@
<div class="controls">
<?= $this->tabs ?>
<div style="margin: 1em;" class="dontprint">
<h2 tabindex="-1" class="sr-only">
<?= $this->translate('Filters'); ?>
</h2>
<?= $intervalBox; ?>
</div>
<?= $this->widget('limiter') ?>
@ -11,33 +8,25 @@
</div>
<div class="content alertsummary">
<h1 tabindex="-1">
<?= $this->translate('Alert summary'); ?>
</h1>
<!-- <h1><?= $this->translate('Alert summary'); ?></h1> -->
<div class="hbox">
<div class="hbox-item">
<h2 tabindex="-1" id="alertsummary-notifications">
<?= $this->translate('Notifications and Problems'); ?>
</h2>
<h2><?= $this->translate('Notifications and Problems'); ?></h2>
<div style="width: 400px; height: 400px;">
<?= $defectChart->render(); ?>
</div>
</div>
<div class="hbox-item">
<h2 tabindex="-1" id="alertsummary-reaction-time">
<?= $this->translate('Time to Reaction (Ack, Recover)'); ?>
</h2>
<h2><?= $this->translate('Time to Reaction (Ack, Recover)'); ?></h2>
<div style="width: 400px; height: 400px;">
<?= $healingChart->render(); ?>
</div>
</div>
</div>
<h2 tabindex="-1" id="alertsummary-trend">
<?= $this->translate('Trend'); ?>
</h2>
<h2><?= $this->translate('Trend'); ?></h2>
<div class="alertsummary-flex-container">
<div class="alertsummary-flex">
@ -64,9 +53,7 @@
</div>
<?php if ($this->recentAlerts): ?>
<h2 tabindex="-1" id="alertsummary-top5">
<?= $this->translate('Top 5 Recent Alerts'); ?>
</h2>
<h1><?= $this->translate('Top 5 Recent Alerts'); ?></h1>
<div class="alertsummary-flex-container">
<div class="alertsummary-flex">
@ -79,9 +66,7 @@
</div>
<?php endif; ?>
<h2 tabindex="-1" id="alertsummary-history">
<?= $this->translate('History'); ?>
</h2>
<h1><?= $this->translate('History'); ?></h1>
<div class="alertsummary-flex-container">
<div class="alertsummary-flex">
<?= $this->partial('list/notifications.phtml', array(

View File

@ -3,7 +3,6 @@
<?= $this->render('partials/host/servicesummary.phtml') ?>
</div>
<div class="content" data-base-target="_next">
<h1 tabindex="-1"><?= $this->translate('Host Detail Information') ?></h1>
<?= $this->render('show/components/output.phtml') ?>
<?= $this->render('show/components/grapher.phtml') ?>

View File

@ -1,14 +1,15 @@
<?php if (false === $this->compact): ?>
<div class="controls">
<?= $this->tabs ?>
<?= $this->sortControl ?>
<?= $this->widget('limiter', array('url' => $this->url, 'max' => $comments->count())); ?>
<?= $this->paginationControl($comments, null, null, array('preserve' => $this->preserve)); ?>
</div>
<div class="controls">
<?= $this->tabs->render($this); ?>
<div style="margin: 1em" class="dontprint">
<?= $this->translate('Sort by'); ?> <?= $this->sortControl->render($this); ?>
</div>
<?= $this->widget('limiter', array('url' => $this->url, 'max' => $comments->count())); ?>
<?= $this->paginationControl($comments, null, null, array('preserve' => $this->preserve)); ?>
</div>
<?php endif ?>
<div class="content">
<h1 tabindex="-1"><?= $this->translate('Comments') ?></h1>
<?php if (count($comments) === 0): ?>
<?= $this->translate('No comments matching the filter'); ?>
</div>

View File

@ -4,9 +4,6 @@
</div>
<?php endif ?>
<div class="content">
<h1 tabindex="-1">
<?= $this->translate('Contact Groups'); ?>
</h1>
<div class="boxview" data-base-target="_next">
<?php

View File

@ -1,14 +1,12 @@
<?php if (false === $this->compact): ?>
<div class="controls">
<?= $this->tabs ?>
<?= $this->sortControl ?>
<?= $this->widget('limiter', array('url' => $this->url, 'max' => $contacts->count())); ?>
<?= $this->paginationControl($contacts, null, null, array('preserve' => $this->preserve)); ?>
<div class="controls">
<?= $this->tabs ?>
<div style="margin: 1em">
<?= $this->sortControl->render($this); ?>
</div>
<?php endif ?>
<?= $this->paginationControl($contacts, null, null, array('preserve' => $this->preserve)); ?>
</div>
<div data-base-target="_next" class="content contacts">
<h1 tabindex="-1"><?= $this->translate('Contacts') ?></h1>
<?php
if (count($contacts) === 0) {
echo $this->translate('No contacts matching the filter');

View File

@ -4,17 +4,23 @@ use Icinga\Module\Monitoring\Object\Host;
use Icinga\Module\Monitoring\Object\Service;
?>
<?php if (false === $this->compact): ?>
<div class="controls">
<?= $this->tabs ?>
<?= $this->sortControl ?>
<?= $this->widget('limiter', array('url' => $this->url, 'max' => $downtimes->count())); ?>
<?= $this->paginationControl($downtimes, null, null, array('preserve' => $this->preserve)); ?>
</div>
<div class="controls">
<?= $this->tabs->render($this); ?>
<div style="margin: 1em" class="dontprint">
<?= $this->translate('Sort by'); ?> <?= $this->sortControl->render($this); ?>
<?php if (! $this->filterEditor): ?>
<?= $this->filterPreview ?>
<?php endif; ?>
</div>
<?= $this->widget('limiter', array('url' => $this->url, 'max' => $downtimes->count())); ?>
<?= $this->paginationControl($downtimes, null, null, array('preserve' => $this->preserve)); ?>
</div>
<?php endif ?>
<div class="content">
<?= $this->filterEditor ?>
<h1 tabindex="-1"><?= $this->translate('Downtimes'); ?></h1>
<?php if (count($downtimes) === 0): ?>
<?= $this->translate('No active downtimes'); ?>
</div>

View File

@ -2,21 +2,18 @@
use Icinga\Data\Filter\Filter;
use Icinga\Web\Widget\Chart\HistoryColorGrid;
?>
<?php if (! $compact): ?>
<? if (! $compact): ?>
<div class="controls">
<?= $this->tabs->render($this); ?>
<div class="fake-controls">
<h2 tabindex="-1" class="sr-only">
<?= $this->translate('Filters'); ?>
</h2>
<?= $form ?>
</div>
</div>
<div class="content" data-base-target="_next">
<h1 tabindex="-1"><?= $this->translate('Event Grid'); ?></h1>
<?php else: ?>
<div class="content" data-base-target="_next">
<?php endif; ?>
<? endif; ?>
<div class="content" data-base-target="_next">
<?php
$settings = array(

View File

@ -4,21 +4,24 @@ use Icinga\Module\Monitoring\Object\Host;
use Icinga\Module\Monitoring\Object\Service;
?>
<?php if (false === $this->compact): ?>
<div class="controls">
<?= $this->tabs ?>
<?= $this->sortControl ?>
<div style="margin: 1em" class="dontprint">
<div style="float: right">
<?= $this->translate('Sort by') ?> <?= $this->sortControl ?>
</div>
</div>
<?= $this->widget('limiter', array('url' => $this->url, 'max' => $this->history->count())); ?>
<?= $this->paginationControl($history, null, null, array('preserve' => $this->preserve)); ?>
</div>
<?php endif ?>
<div class="content">
<?= $this->filterEditor ?>
<h1 tabindex="-1"><?= $this->translate('Event History') ?></h1>
<?php else: ?>
<div class="content">
<?php endif; ?>
<?= $this->filterEditor ?>
<?php if (empty($history)): ?>
<?= $this->translate('No history events matching the filter') ?>
</div>

View File

@ -3,13 +3,14 @@
<?php else: ?>
<div class="controls">
<?= $this->tabs ?>
<?= $this->sortControl->render($this); ?>
<div style="margin: 1em;" class="dontprint">
<?= $this->translate('Sort by'); ?> <?= $this->sortControl->render($this); ?>
</div>
<?= $this->widget('limiter')->setMaxLimit(count($hostgroups)); ?>
<?= $this->paginationControl($hostgroups, null, null, array('preserve' => $this->preserve)); ?>
</div>
<div class="content">
<?= $this->filterEditor; ?>
<h1 tabindex="-1"><?= $this->translate('Host Groups') ?></h1>
<?php endif ?>
<?php
if (count($hostgroups) === 0) {

View File

@ -9,8 +9,9 @@ if ($this->compact): ?>
<div style="margin: 1em;" class="dontprint">
<?= $this->render('list/components/selectioninfo.phtml') ?>
<?= $this->render('list/components/hostssummary.phtml') ?>
<?= $this->translate('Sort by') ?> <?= $this->sortControl->render($this) ?>
</div>
<?= $this->sortControl->render($this) ?>
<?= $this->widget('limiter')->setMaxLimit($this->hosts->count()) ?>
<?= $this->paginationControl($hosts, null, null, array('preserve' => $this->preserve)) ?>
<?= $this->selectionToolbar('multi', $this->href('monitoring/hosts/show?' . $this->filter->toQueryString())) ?>
@ -18,7 +19,6 @@ if ($this->compact): ?>
<div class="content">
<?= $this->filterEditor ?>
<h1 tabindex="-1"><?= $this->translate('Hosts') ?></h1>
<?php
endif;
@ -31,6 +31,7 @@ if ($hosts->count() === 0) {
return;
}
?>
<table
data-base-target="_next"
class="action multiselect"

View File

@ -4,18 +4,19 @@ use Icinga\Module\Monitoring\Object\Host;
use Icinga\Module\Monitoring\Object\Service;
?>
<?php if (! $this->compact): ?>
<div class="controls">
<?= $this->tabs ?>
<?= $this->sortControl->render($this) ?>
<div class="dontprint" style="margin: 1em;">
<?= $this->translate('Sort by') ?> <?= $this->sortControl->render($this) ?>
</div>
<?= $this->widget('limiter') ?>
<?= $this->paginationControl($notifications, null, null, array('preserve' => $this->preserve)) ?>
</div>
<div class="content">
<h1 tabindex="-1"><?= $this->translate('Notifications'); ?></h1>
<?php else: ?>
<div class="content">
<?php endif ?>
<div class="content">
<?php if (count($notifications) === 0): ?>
<?= $this->translate('No notifications matching the filter') ?>
<?php return; endif ?>

View File

@ -6,11 +6,12 @@ use Icinga\Module\Monitoring\Object\Service;
<?php if (!$this->compact): ?>
<div class="controls">
<?= $this->tabs; ?>
<?= $this->sortControl; ?>
<div style="margin: 1em;" class="dontprint">
<?= $this->translate('Sort by'); ?> <?= $this->sortControl; ?>
</div>
</div>
<?php endif ?>
<div class="content" data-base-target="_next">
<h1 tabindex="-1"><?= $this->translate('Service Grid') ?></h1>
<table class="pivot servicestates">
<?php
$hasHeader = false;

View File

@ -3,13 +3,14 @@
<?php else: ?>
<div class="controls">
<?= $this->tabs ?>
<?= $this->sortControl->render($this); ?>
<div style="margin: 1em;" class="dontprint">
<?= $this->translate('Sort by'); ?> <?= $this->sortControl->render($this); ?>
</div>
<?= $this->widget('limiter')->setMaxLimit(count($servicegroups)); ?>
<?= $this->paginationControl($servicegroups, null, null, array('preserve' => $this->preserve)); ?>
</div>
<div class="content">
<?= $this->filterEditor; ?>
<h1 tabindex="-1"><?= $this->translate('Service Groups') ?></h1>
<?php endif ?>
<?php
if (count($servicegroups) === 0) {

View File

@ -10,8 +10,10 @@ if (!$this->compact): ?>
<div style="margin: 1em;" class="dontprint">
<?= $this->render('list/components/selectioninfo.phtml') ?>
<?= $this->render('list/components/servicesummary.phtml') ?>
<div style="float: right">
<?= $this->translate('Sort by') ?> <?= $this->sortControl ?>
</div>
</div>
<?= $this->sortControl ?>
<?php if ($this->limit === 0): ?>
<?= $this->widget('limiter') ?>
<?php else: ?>
@ -22,7 +24,6 @@ if (!$this->compact): ?>
<div class="content">
<?= $this->filterEditor ?>
<h1 tabindex="-1"><?= $this->translate('Services') ?></h1>
<?php else: ?>
<div class="content">

View File

@ -3,9 +3,7 @@
<?php endif ?>
<?php if (($hostCount = count($objects)) > 0): ?>
<div class="hbox-item">
<h1 tabindex="-1">
<?= sprintf($this->translatePlural('Host (%u)', 'Hosts (%u)', $hostCount), $hostCount); ?>
</h1>
<strong><?= sprintf($this->translatePlural('Host (%u)', 'Hosts (%u)', $hostCount), $hostCount); ?></strong>
</div>
<div class="hbox-item">
&nbsp;<?= $hostStatesPieChart; ?>

View File

@ -4,9 +4,7 @@
<?php if (($serviceCount = count($objects)) > 0): ?>
<div class="hbox">
<div class="hbox-item" style="width: 6em;">
<h1 tabindex="-1">
<?= sprintf($this->translatePlural('Service (%u)', 'Services (%u)', $serviceCount), $serviceCount); ?>
</h1>
<strong><?= sprintf($this->translatePlural('Service (%u)', 'Services (%u)', $serviceCount), $serviceCount); ?></strong>
</div>
<div class="hbox-item">
&nbsp;<?= $serviceStatesPieChart; ?>

View File

@ -9,10 +9,6 @@ $cp = $this->checkPerformance()->create($this->checkperformance);
</div>
<div class="content processinfo">
<h1 tabindex="-1">
<?= $this->translate('Monitoring Health'); ?>
</h1>
<div class="boxview">
<div class="box left">
@ -20,9 +16,7 @@ $cp = $this->checkPerformance()->create($this->checkperformance);
</div>
<div class="box left">
<h2 tabindex="-1" id="process-process-info">
<?= $this->translate('Process Info') ?>
</h2>
<h2><?= $this->translate('Process Info') ?></h2>
<table class="avp">
<tbody>
<tr>
@ -73,13 +67,9 @@ $cp = $this->checkPerformance()->create($this->checkperformance);
</div>
<div class="box left">
<h2 tabindex="-1" id="process-performance-info">
<?= $this->translate('Performance Info') ?>
</h2>
<h2><?= $this->translate('Performance Info') ?></h2>
<h3 tabindex="-1" id="process-object-summaries">
<?= $this->translate('Object summaries') ?>
</h3>
<h3><?= $this->translate('Object summaries') ?></h3>
<table class="avp">
<thead>
<tr>
@ -127,9 +117,7 @@ $cp = $this->checkPerformance()->create($this->checkperformance);
</tbody>
</table>
<h3 tabindex="-1" id="process-active-checks">
<?= $this->translate('Active checks') ?>
</h3>
<h3><?= $this->translate('Active checks') ?></h3>
<table class="avp">
<thead>
<tr>
@ -159,9 +147,7 @@ $cp = $this->checkPerformance()->create($this->checkperformance);
</tbody>
</table>
<h3 tabindex="-1" id="process-passive-checks">
<?= $this->translate('Passive checks') ?>
</h3>
<h3><?= $this->translate('Passive checks') ?></h3>
<table class="avp">
<tbody>
<tr>

View File

@ -4,7 +4,6 @@
</div>
<?php endif ?>
<div class="content tactical">
<h1 tabindex="-1"><?= $this->translate('Tactical Overview') ?></h1>
<div class="boxview" data-base-target="_next">
<?php if ($this->statusSummary->hosts_down || $this->statusSummary->hosts_unreachable): ?>
<?= $this->render('tactical/components/problem_hosts.phtml'); ?>

View File

@ -10,9 +10,6 @@ $firstRow = !$beingExtended;
<div class="controls">
<?= $this->tabs ?>
<div style="margin: 1em;" class="dontprint">
<h2 tabindex="-1" class="sr-only">
<?= $this->translate('Filters') ?>
</h2>
<?= $intervalBox; ?>
</div>
<div style="margin: 1em;" class="timeline-legend">
@ -25,7 +22,6 @@ $firstRow = !$beingExtended;
</div>
</div>
<div class="content" data-base-target="_next">
<h1 tabindex="-1"><?= $this->translate('Timeline'); ?></h1>
<div class="timeline">
<?php endif ?>
<?php if ($switchedContext): ?>

View File

@ -270,7 +270,7 @@ a:focus {
/* Accessibility Skip Links */
.skip-links {
position: relative;
position: absolute;
opacity: 1;
ul {
list-style-type: none;
@ -286,6 +286,7 @@ a:focus {
left: -999em;
box-sizing: content-box;
width: 10.4em !important;
top: 0em;
text-align: left !important;
padding: 0.8em;
background-color: white;
@ -300,8 +301,5 @@ a:focus {
}
}
.skip-links-inline {
ul > li > a {
width: 14em !important;
top: -3em;
}
margin-top: -3.5em;
}

View File

@ -359,29 +359,21 @@
handleAnchor: function(query) {
var $element = $(query);
if ($element.length > 0) {
// TODO(mh): Some elements are missing to place the right focus
// This is a fixed workarround until all header took place
var $item = $element.find(':header:first').nextUntil(':header:first').next();
if ($item.length > 0) {
$element = $item;
}
/*
var focusQueries = ['h1:first', ':header:first', ':input:first'];
$.each(focusQueries, function(index,q) {
var $item = $element.find(q);
if ($item.length > 0) {
$element = $item;
return false;
// Try to find the first header. It is more pleasant to users
// to select the header instead a container
var $header = $element.find(':header:first');
if ($header.length > 0) {
$element = $header;
} else {
var $input = $element.find(':header:first');
if ($input.length > 0) {
$element = $input
}
});
*/
}
// If we want to focus an element which has no tabindex
// add one that we can focus is
if ($element.prop('tabindex') < 0) {
$element.prop('tabindex', '-1');
$element.prop('tabindex', 0);
}
$element.focus();
}