-
+
= t('Resource Configuration'); ?>
-
-
+
= t('Create New Resource'); ?>
@@ -24,7 +13,7 @@
= $this->icon('plus'); ?> = $this->translate('Create A New Resource'); ?>
-
+
= t('Edit Existing Resources'); ?>
diff --git a/application/views/scripts/config/resource/create.phtml b/application/views/scripts/config/resource/create.phtml
index c70bd4779..71d8c946e 100644
--- a/application/views/scripts/config/resource/create.phtml
+++ b/application/views/scripts/config/resource/create.phtml
@@ -2,7 +2,7 @@
= $this->tabs->showOnlyCloseButton() ?>
-
+
= $this->translate('Create A New Resource'); ?>
= $this->translate('Resources are entities that provide data to Icinga Web 2.'); ?>
diff --git a/application/views/scripts/config/resource/modify.phtml b/application/views/scripts/config/resource/modify.phtml
index 48255261b..b7bd0a2f7 100644
--- a/application/views/scripts/config/resource/modify.phtml
+++ b/application/views/scripts/config/resource/modify.phtml
@@ -2,7 +2,7 @@
= $this->tabs->showOnlyCloseButton() ?>
-
+
= $this->translate('Edit Existing Resource'); ?>
diff --git a/application/views/scripts/config/resource/remove.phtml b/application/views/scripts/config/resource/remove.phtml
index ad5ed59cb..010f2d5d2 100644
--- a/application/views/scripts/config/resource/remove.phtml
+++ b/application/views/scripts/config/resource/remove.phtml
@@ -2,7 +2,7 @@
= $this->tabs->showOnlyCloseButton() ?>
-
+
= $this->translate('Remove Existing Resource'); ?>
diff --git a/application/views/scripts/preference/index.phtml b/application/views/scripts/preference/index.phtml
index 163381531..fc19a1e10 100644
--- a/application/views/scripts/preference/index.phtml
+++ b/application/views/scripts/preference/index.phtml
@@ -1,7 +1,7 @@
= $tabs; ?>
-
+
= $this->translate('Preferences'); ?>
= $form; ?>
\ No newline at end of file
diff --git a/application/views/scripts/roles/index.phtml b/application/views/scripts/roles/index.phtml
index ea70bbe3f..d4f5ad2aa 100644
--- a/application/views/scripts/roles/index.phtml
+++ b/application/views/scripts/roles/index.phtml
@@ -1,8 +1,10 @@
= $tabs ?>
-
= $this->translate('Roles') ?>
+
+ = $this->translate('Roles') ?>
+
isEmpty()): ?>
= $this->translate('No roles found.') ?>
@@ -64,6 +66,9 @@
+
+ = $this->translate('Create New Role'); ?>
+
= $this->translate('New Role') ?>
diff --git a/application/views/scripts/roles/new.phtml b/application/views/scripts/roles/new.phtml
index 4c21c6f6b..d18ada1a5 100644
--- a/application/views/scripts/roles/new.phtml
+++ b/application/views/scripts/roles/new.phtml
@@ -1,7 +1,9 @@
= $tabs->showOnlyCloseButton() ?>
-
= $this->translate('New Role') ?>
+
+ = $this->translate('New Role') ?>
+
= $form ?>
diff --git a/application/views/scripts/roles/remove.phtml b/application/views/scripts/roles/remove.phtml
index 4abff566a..432c3602d 100644
--- a/application/views/scripts/roles/remove.phtml
+++ b/application/views/scripts/roles/remove.phtml
@@ -1,7 +1,9 @@
= $tabs->showOnlyCloseButton() ?>
-
= sprintf($this->translate('Remove Role %s'), $name) ?>
+
+ = sprintf($this->translate('Remove Role %s'), $name) ?>
+
= $form ?>
diff --git a/application/views/scripts/roles/update.phtml b/application/views/scripts/roles/update.phtml
index f48f1ca69..32ab7d018 100644
--- a/application/views/scripts/roles/update.phtml
+++ b/application/views/scripts/roles/update.phtml
@@ -1,7 +1,9 @@
= $tabs->showOnlyCloseButton() ?>
-
= sprintf($this->translate('Update Role %s'), $name) ?>
+
+ = sprintf($this->translate('Update Role %s'), $name) ?>
+
= $form ?>
diff --git a/library/Icinga/Web/Widget/FilterEditor.php b/library/Icinga/Web/Widget/FilterEditor.php
index 999a825ac..eefc2d739 100644
--- a/library/Icinga/Web/Widget/FilterEditor.php
+++ b/library/Icinga/Web/Widget/FilterEditor.php
@@ -676,20 +676,28 @@ class FilterEditor extends AbstractWidget
public function render()
{
if (! $this->preservedUrl()->getParam('modifyFilter')) {
- return $this->renderSearch() . $this->shorten($this->filter, 50);
+ $filterEditor = $this->renderSearch() . $this->shorten($this->filter, 50);
+ } else {
+ $filterEditor = $this->renderSearch()
+ . '
';
}
- return $this->renderSearch()
- . '
';
+
+ return sprintf(
+ '
'
+ . '
%s
%s',
+ t('Filters'),
+ $filterEditor
+ );
}
protected function shorten($string, $length)
diff --git a/library/Icinga/Web/Widget/SortBox.php b/library/Icinga/Web/Widget/SortBox.php
index 18ed95b86..a1728db4f 100644
--- a/library/Icinga/Web/Widget/SortBox.php
+++ b/library/Icinga/Web/Widget/SortBox.php
@@ -133,6 +133,13 @@ class SortBox extends AbstractWidget
if ($this->request) {
$form->populate($this->request->getParams());
}
- return $form;
+
+ return sprintf(
+ '
'
+ . '
%s
%s%s',
+ t('Sort Criteria'),
+ t('Sort by'),
+ (string) $form
+ );
}
}
diff --git a/library/Icinga/Web/Widget/Tabs.php b/library/Icinga/Web/Widget/Tabs.php
index 56bd3404c..202771237 100644
--- a/library/Icinga/Web/Widget/Tabs.php
+++ b/library/Icinga/Web/Widget/Tabs.php
@@ -19,6 +19,7 @@ class Tabs extends AbstractWidget implements Countable
* @var string
*/
private $baseTpl = <<< 'EOT'
+{HEADER}
{TABS}
{DROPDOWN}
@@ -26,6 +27,13 @@ class Tabs extends AbstractWidget implements Countable
EOT;
+ /**
+ * Template used for the header
+ *
+ * @type string
+ */
+ private $headerTpl = '
{TITLE}
';
+
/**
* Template used for the tabs dropdown
*
@@ -87,6 +95,13 @@ EOT;
*/
private $closeTab = true;
+ /**
+ * Title of the tab navigation
+ *
+ * @type string
+ */
+ private $title;
+
/**
* Set whether the current tab is closable
*/
@@ -309,11 +324,21 @@ EOT;
}
$close = $this->closeTab ? $this->renderCloseTab() : '';
- $html = $this->baseTpl;
- $html = str_replace('{TABS}', $tabs, $html);
- $html = str_replace('{DROPDOWN}', $drop, $html);
- $html = str_replace('{CLOSE}', $close, $html);
- return $html;
+ return str_replace(
+ array(
+ '{TABS}',
+ '{DROPDOWN}',
+ '{CLOSE}',
+ '{HEADER}'
+ ),
+ array(
+ $tabs,
+ $drop,
+ $close,
+ $this->renderHeader()
+ ),
+ $this->baseTpl
+ );
}
public function __toString()
@@ -372,4 +397,30 @@ 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);
+ }
}
diff --git a/modules/monitoring/application/controllers/AlertsummaryController.php b/modules/monitoring/application/controllers/AlertsummaryController.php
index cd2626472..2c884e60f 100644
--- a/modules/monitoring/application/controllers/AlertsummaryController.php
+++ b/modules/monitoring/application/controllers/AlertsummaryController.php
@@ -39,6 +39,8 @@ class Monitoring_AlertsummaryController extends Controller
$this->notificationData = $this->createNotificationData();
$this->problemData = $this->createProblemData();
+
+ $tabs->setTitle($this->translate('Alertsummary Navigation'));
}
/**
diff --git a/modules/monitoring/application/controllers/ListController.php b/modules/monitoring/application/controllers/ListController.php
index d7fbe177f..9504917a3 100644
--- a/modules/monitoring/application/controllers/ListController.php
+++ b/modules/monitoring/application/controllers/ListController.php
@@ -717,6 +717,7 @@ 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',
diff --git a/modules/monitoring/application/controllers/ProcessController.php b/modules/monitoring/application/controllers/ProcessController.php
index 875f4094c..2209a8e0b 100644
--- a/modules/monitoring/application/controllers/ProcessController.php
+++ b/modules/monitoring/application/controllers/ProcessController.php
@@ -25,7 +25,7 @@ class Monitoring_ProcessController extends Controller
'title' => $this->translate('Monitoring Health'),
'url' =>'monitoring/process/info'
)
- );
+ )->setTitle($this->translate('Process Information'));
}
/**
diff --git a/modules/monitoring/application/controllers/TimelineController.php b/modules/monitoring/application/controllers/TimelineController.php
index a13973e1d..b4b4eafbb 100644
--- a/modules/monitoring/application/controllers/TimelineController.php
+++ b/modules/monitoring/application/controllers/TimelineController.php
@@ -19,7 +19,8 @@ class Monitoring_TimelineController extends Controller
$this->getTabs()->add($action, array(
'title' => $title,
'url' => Url::fromRequest()
- ))->activate($action);
+ ))->activate($action)
+ ->setTitle($this->translate('Timeline Navigation'));
$this->view->title = $title;
}
diff --git a/modules/monitoring/application/views/scripts/alertsummary/index.phtml b/modules/monitoring/application/views/scripts/alertsummary/index.phtml
index dbfff6433..3281f3ec8 100644
--- a/modules/monitoring/application/views/scripts/alertsummary/index.phtml
+++ b/modules/monitoring/application/views/scripts/alertsummary/index.phtml
@@ -1,6 +1,9 @@
= $this->tabs ?>
+
+ = $this->translate('Filters'); ?>
+
= $intervalBox; ?>
= $this->widget('limiter') ?>
@@ -8,25 +11,33 @@
-
+
+ = $this->translate('Alert summary'); ?>
+
-
= $this->translate('Notifications and Problems'); ?>
+
+ = $this->translate('Notifications and Problems'); ?>
+
= $defectChart->render(); ?>
-
= $this->translate('Time to Reaction (Ack, Recover)'); ?>
+
+ = $this->translate('Time to Reaction (Ack, Recover)'); ?>
+
= $healingChart->render(); ?>
-
= $this->translate('Trend'); ?>
+
+ = $this->translate('Trend'); ?>
+
@@ -53,7 +64,9 @@
recentAlerts): ?>
-
= $this->translate('Top 5 Recent Alerts'); ?>
+
+ = $this->translate('Top 5 Recent Alerts'); ?>
+
@@ -66,7 +79,9 @@
-
= $this->translate('History'); ?>
+
+ = $this->translate('History'); ?>
+
= $this->partial('list/notifications.phtml', array(
diff --git a/modules/monitoring/application/views/scripts/host/show.phtml b/modules/monitoring/application/views/scripts/host/show.phtml
index 867692301..f490c25f9 100644
--- a/modules/monitoring/application/views/scripts/host/show.phtml
+++ b/modules/monitoring/application/views/scripts/host/show.phtml
@@ -3,6 +3,7 @@
= $this->render('partials/host/servicesummary.phtml') ?>
+
= $this->translate('Host Detail Information') ?>
= $this->render('show/components/output.phtml') ?>
= $this->render('show/components/grapher.phtml') ?>
diff --git a/modules/monitoring/application/views/scripts/list/comments.phtml b/modules/monitoring/application/views/scripts/list/comments.phtml
index 6f49bf4a8..d41399984 100644
--- a/modules/monitoring/application/views/scripts/list/comments.phtml
+++ b/modules/monitoring/application/views/scripts/list/comments.phtml
@@ -1,15 +1,14 @@
compact): ?>
-
- = $this->tabs->render($this); ?>
-
- = $this->translate('Sort by'); ?> = $this->sortControl->render($this); ?>
-
- = $this->widget('limiter', array('url' => $this->url, 'max' => $comments->count())); ?>
- = $this->paginationControl($comments, null, null, array('preserve' => $this->preserve)); ?>
-
+
+ = $this->tabs ?>
+ = $this->sortControl ?>
+ = $this->widget('limiter', array('url' => $this->url, 'max' => $comments->count())); ?>
+ = $this->paginationControl($comments, null, null, array('preserve' => $this->preserve)); ?>
+
+
= $this->translate('Comments') ?>
= $this->translate('No comments matching the filter'); ?>
diff --git a/modules/monitoring/application/views/scripts/list/contactgroups.phtml b/modules/monitoring/application/views/scripts/list/contactgroups.phtml
index f32a22815..797e0b299 100644
--- a/modules/monitoring/application/views/scripts/list/contactgroups.phtml
+++ b/modules/monitoring/application/views/scripts/list/contactgroups.phtml
@@ -4,6 +4,9 @@
+
+ = $this->translate('Contact Groups'); ?>
+
- = $this->tabs ?>
-
- = $this->sortControl->render($this); ?>
+compact): ?>
+
+ = $this->tabs ?>
+ = $this->sortControl ?>
+ = $this->widget('limiter', array('url' => $this->url, 'max' => $contacts->count())); ?>
+ = $this->paginationControl($contacts, null, null, array('preserve' => $this->preserve)); ?>
- = $this->paginationControl($contacts, null, null, array('preserve' => $this->preserve)); ?>
-
+
+
= $this->translate('Contacts') ?>
-
compact): ?>
-
- = $this->tabs->render($this); ?>
-
- = $this->translate('Sort by'); ?> = $this->sortControl->render($this); ?>
- filterEditor): ?>
- = $this->filterPreview ?>
-
-
- = $this->widget('limiter', array('url' => $this->url, 'max' => $downtimes->count())); ?>
- = $this->paginationControl($downtimes, null, null, array('preserve' => $this->preserve)); ?>
-
+
+ = $this->tabs ?>
+ = $this->sortControl ?>
+ = $this->widget('limiter', array('url' => $this->url, 'max' => $downtimes->count())); ?>
+ = $this->paginationControl($downtimes, null, null, array('preserve' => $this->preserve)); ?>
+
-
= $this->filterEditor ?>
+
= $this->translate('Downtimes'); ?>
= $this->translate('No active downtimes'); ?>
diff --git a/modules/monitoring/application/views/scripts/list/eventgrid.phtml b/modules/monitoring/application/views/scripts/list/eventgrid.phtml
index 53056daac..168bac9d1 100644
--- a/modules/monitoring/application/views/scripts/list/eventgrid.phtml
+++ b/modules/monitoring/application/views/scripts/list/eventgrid.phtml
@@ -2,18 +2,21 @@
use Icinga\Data\Filter\Filter;
use Icinga\Web\Widget\Chart\HistoryColorGrid;
?>
-
-
- if (! $compact): ?>
+
= $this->tabs->render($this); ?>
+
+ = $this->translate('Filters'); ?>
+
= $form ?>
- endif; ?>
-
-
+
+
= $this->translate('Event Grid'); ?>
+
+
+
-
compact): ?>
= $this->tabs ?>
-
-
- = $this->translate('Sort by') ?> = $this->sortControl ?>
-
-
-
+ = $this->sortControl ?>
= $this->widget('limiter', array('url' => $this->url, 'max' => $this->history->count())); ?>
= $this->paginationControl($history, null, null, array('preserve' => $this->preserve)); ?>
-
-
-
-= $this->filterEditor ?>
+ = $this->filterEditor ?>
+
= $this->translate('Event History') ?>
+
+
+
+
+
= $this->translate('No history events matching the filter') ?>
diff --git a/modules/monitoring/application/views/scripts/list/hostgroups.phtml b/modules/monitoring/application/views/scripts/list/hostgroups.phtml
index 0c5989bff..671ccb467 100644
--- a/modules/monitoring/application/views/scripts/list/hostgroups.phtml
+++ b/modules/monitoring/application/views/scripts/list/hostgroups.phtml
@@ -3,14 +3,13 @@
= $this->tabs ?>
-
- = $this->translate('Sort by'); ?> = $this->sortControl->render($this); ?>
-
+ = $this->sortControl->render($this); ?>
= $this->widget('limiter')->setMaxLimit(count($hostgroups)); ?>
= $this->paginationControl($hostgroups, null, null, array('preserve' => $this->preserve)); ?>
= $this->filterEditor; ?>
+
= $this->translate('Host Groups') ?>
compact): ?>
= $this->render('list/components/selectioninfo.phtml') ?>
= $this->render('list/components/hostssummary.phtml') ?>
- = $this->translate('Sort by') ?> = $this->sortControl->render($this) ?>
-
+= $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())) ?>
@@ -19,6 +18,7 @@ if ($this->compact): ?>
= $this->filterEditor ?>
+
= $this->translate('Hosts') ?>
count() === 0) {
return;
}
?>
-
-
compact): ?>
= $this->tabs ?>
-
- = $this->translate('Sort by') ?> = $this->sortControl->render($this) ?>
-
+ = $this->sortControl->render($this) ?>
= $this->widget('limiter') ?>
= $this->paginationControl($notifications, null, null, array('preserve' => $this->preserve)) ?>
-
-
+
= $this->translate('Notifications'); ?>
+
+
+
= $this->translate('No notifications matching the filter') ?>
diff --git a/modules/monitoring/application/views/scripts/list/servicegrid.phtml b/modules/monitoring/application/views/scripts/list/servicegrid.phtml
index dd9be0394..8af02c3a9 100644
--- a/modules/monitoring/application/views/scripts/list/servicegrid.phtml
+++ b/modules/monitoring/application/views/scripts/list/servicegrid.phtml
@@ -6,12 +6,11 @@ use Icinga\Module\Monitoring\Object\Service;
compact): ?>
= $this->tabs; ?>
-
- = $this->translate('Sort by'); ?> = $this->sortControl; ?>
-
+ = $this->sortControl; ?>
+
= $this->translate('Service Grid') ?>
= $this->tabs ?>
-
- = $this->translate('Sort by'); ?> = $this->sortControl->render($this); ?>
-
+ = $this->sortControl->render($this); ?>
= $this->widget('limiter')->setMaxLimit(count($servicegroups)); ?>
= $this->paginationControl($servicegroups, null, null, array('preserve' => $this->preserve)); ?>
= $this->filterEditor; ?>
+
= $this->translate('Service Groups') ?>
compact): ?>
= $this->render('list/components/selectioninfo.phtml') ?>
= $this->render('list/components/servicesummary.phtml') ?>
-
-= $this->translate('Sort by') ?> = $this->sortControl ?>
-
+= $this->sortControl ?>
limit === 0): ?>
= $this->widget('limiter') ?>
@@ -24,6 +22,7 @@ if (!$this->compact): ?>
= $this->filterEditor ?>
+
= $this->translate('Services') ?>
diff --git a/modules/monitoring/application/views/scripts/partials/host/objects-header.phtml b/modules/monitoring/application/views/scripts/partials/host/objects-header.phtml
index f5edd0213..f892df6f4 100644
--- a/modules/monitoring/application/views/scripts/partials/host/objects-header.phtml
+++ b/modules/monitoring/application/views/scripts/partials/host/objects-header.phtml
@@ -3,7 +3,9 @@
0): ?>
- = sprintf($this->translatePlural('Host (%u)', 'Hosts (%u)', $hostCount), $hostCount); ?>
+
+ = sprintf($this->translatePlural('Host (%u)', 'Hosts (%u)', $hostCount), $hostCount); ?>
+
= $hostStatesPieChart; ?>
diff --git a/modules/monitoring/application/views/scripts/partials/service/objects-header.phtml b/modules/monitoring/application/views/scripts/partials/service/objects-header.phtml
index 1ac27b934..6389d992f 100644
--- a/modules/monitoring/application/views/scripts/partials/service/objects-header.phtml
+++ b/modules/monitoring/application/views/scripts/partials/service/objects-header.phtml
@@ -4,7 +4,9 @@
0): ?>
- = sprintf($this->translatePlural('Service (%u)', 'Services (%u)', $serviceCount), $serviceCount); ?>
+
+ = sprintf($this->translatePlural('Service (%u)', 'Services (%u)', $serviceCount), $serviceCount); ?>
+
= $serviceStatesPieChart; ?>
diff --git a/modules/monitoring/application/views/scripts/process/info.phtml b/modules/monitoring/application/views/scripts/process/info.phtml
index 92bb6cb63..639b5ebc0 100644
--- a/modules/monitoring/application/views/scripts/process/info.phtml
+++ b/modules/monitoring/application/views/scripts/process/info.phtml
@@ -9,15 +9,23 @@ $cp = $this->checkPerformance()->create($this->checkperformance);
+
+ = $this->translate('Monitoring Health'); ?>
+
+
-
= $this->translate('Feature Commands') ?>
+
+ = $this->translate('Feature Commands') ?>
+
= $this->toggleFeaturesForm ?>
-
= $this->translate('Process Info') ?>
+
+ = $this->translate('Process Info') ?>
+
@@ -68,9 +76,13 @@ $cp = $this->checkPerformance()->create($this->checkperformance);
-
= $this->translate('Performance Info') ?>
+
-
= $this->translate('Object summaries') ?>
+
+ = $this->translate('Object summaries') ?>
+
@@ -118,7 +130,9 @@ $cp = $this->checkPerformance()->create($this->checkperformance);
-
= $this->translate('Active checks') ?>
+
+ = $this->translate('Active checks') ?>
+
@@ -148,7 +162,9 @@ $cp = $this->checkPerformance()->create($this->checkperformance);
-
= $this->translate('Passive checks') ?>
+
+ = $this->translate('Passive checks') ?>
+
diff --git a/modules/monitoring/application/views/scripts/tactical/index.phtml b/modules/monitoring/application/views/scripts/tactical/index.phtml
index 3882b27b3..897ef9776 100644
--- a/modules/monitoring/application/views/scripts/tactical/index.phtml
+++ b/modules/monitoring/application/views/scripts/tactical/index.phtml
@@ -4,6 +4,7 @@
+
= $this->translate('Tactical Overview') ?>
statusSummary->hosts_down || $this->statusSummary->hosts_unreachable): ?>
= $this->render('tactical/components/problem_hosts.phtml'); ?>
diff --git a/modules/monitoring/application/views/scripts/timeline/index.phtml b/modules/monitoring/application/views/scripts/timeline/index.phtml
index a6e32ac08..11a228566 100644
--- a/modules/monitoring/application/views/scripts/timeline/index.phtml
+++ b/modules/monitoring/application/views/scripts/timeline/index.phtml
@@ -10,6 +10,9 @@ $firstRow = !$beingExtended;
= $this->tabs ?>
+
+ = $this->translate('Filters') ?>
+
= $intervalBox; ?>
@@ -22,6 +25,7 @@ $firstRow = !$beingExtended;
+
= $this->translate('Timeline'); ?>
diff --git a/modules/monitoring/public/css/module.less b/modules/monitoring/public/css/module.less
index 387df892b..26cd5bc38 100644
--- a/modules/monitoring/public/css/module.less
+++ b/modules/monitoring/public/css/module.less
@@ -198,3 +198,8 @@ hr.command-separator {
border: none;
border-bottom: 2px solid @colorPetrol;
}
+
+.sort-box {
+ float: right;
+ margin-right: 1em;
+}
\ No newline at end of file
diff --git a/public/css/icinga/menu.less b/public/css/icinga/menu.less
index c33c6670c..3c733db6e 100644
--- a/public/css/icinga/menu.less
+++ b/public/css/icinga/menu.less
@@ -270,7 +270,7 @@ a:focus {
/* Accessibility Skip Links */
.skip-links {
- position: absolute;
+ position: relative;
opacity: 1;
ul {
list-style-type: none;
@@ -286,7 +286,6 @@ a:focus {
left: -999em;
box-sizing: content-box;
width: 10.4em !important;
- top: 0em;
text-align: left !important;
padding: 0.8em;
background-color: white;
@@ -301,5 +300,8 @@ a:focus {
}
}
.skip-links-inline {
- margin-top: -3.5em;
+ ul > li > a {
+ width: 14em !important;
+ top: -3em;
+ }
}
diff --git a/public/js/icinga/events.js b/public/js/icinga/events.js
index 098aaa88f..39a2a3de4 100644
--- a/public/js/icinga/events.js
+++ b/public/js/icinga/events.js
@@ -337,21 +337,29 @@
handleAnchor: function(query) {
var $element = $(query);
if ($element.length > 0) {
- // 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
- }
+ // 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;
+ }
+ });
+ */
+
// 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', 0);
+ $element.prop('tabindex', '-1');
}
$element.focus();
}