Tables: rename action-table to table-row-selectable
This commit is contained in:
parent
7db36e8f29
commit
ed69bd5d99
|
@ -101,7 +101,7 @@
|
|||
) ?>
|
||||
</div>
|
||||
<h2><?= $this->translate('Loaded modules') ?></h2>
|
||||
<table class="action-table common-table" data-base-target="_next">
|
||||
<table class="table-row-selectable common-table" data-base-target="_next">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= $this->translate('Name') ?></th>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</div>
|
||||
<?php endif ?>
|
||||
<div class="content">
|
||||
<table class="action-table common-table" data-base-target="_next">
|
||||
<table class="table-row-selectable common-table" data-base-target="_next">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= $this->translate('Module') ?></th>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
'title' => $this->translate('Create a new resource')
|
||||
)
|
||||
) ?>
|
||||
<table class="action-table common-table" data-base-target="_next">
|
||||
<table class="table-row-selectable common-table" data-base-target="_next">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= $this->translate('Resource') ?></th>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<form id="<?= $form->getId() ?>" name="<?= $form->getName() ?>" enctype="<?= $form->getEncType() ?>" method="<?= $form->getMethod() ?>" action="<?= $form->getAction() ?>">
|
||||
<table class="action-table common-table" data-base-target="_next">
|
||||
<table class="table-row-selectable common-table" data-base-target="_next">
|
||||
<thead>
|
||||
<th><?= $this->translate('Backend') ?></th>
|
||||
<th></th>
|
||||
|
|
|
@ -49,7 +49,7 @@ $firstRow = true;
|
|||
foreach ($groups as $group): ?>
|
||||
<?php if ($firstRow): ?>
|
||||
<?php $firstRow = false; ?>
|
||||
<table data-base-target="_next" class="action-table common-table">
|
||||
<table data-base-target="_next" class="table-row-selectable common-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="group-name"><?= $this->translate('Group'); ?></th>
|
||||
|
|
|
@ -70,7 +70,7 @@ $firstRow = true;
|
|||
foreach ($members as $member): ?>
|
||||
<?php if ($firstRow): ?>
|
||||
<?php $firstRow = false; ?>
|
||||
<table data-base-target="_next" class="action-table common-table">
|
||||
<table data-base-target="_next" class="table-row-selectable common-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="member-name"><?= $this->translate('Username'); ?></th>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<p><?= $this->translate('You did not create any navigation item yet.') ?></p>
|
||||
</div>
|
||||
<?php return; endif ?>
|
||||
<table class="action-table common-table" data-base-target="_next">
|
||||
<table class="table-row-selectable common-table" data-base-target="_next">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= $this->translate('Navigation') ?></th>
|
||||
|
|
|
@ -14,7 +14,7 @@ if (! $this->compact): ?>
|
|||
<?php if (count($items) === 0): ?>
|
||||
<p><?= $this->translate('There are currently no navigation items being shared'); ?></p>
|
||||
<?php else: ?>
|
||||
<table class="action-table common-table">
|
||||
<table class="table-row-selectable common-table">
|
||||
<thead>
|
||||
<th><?= $this->translate('Shared Navigation'); ?></th>
|
||||
<th style="width: 10em"><?= $this->translate('Type'); ?></th>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<?php /** @var \Icinga\Application\Config $roles */ if ($roles->isEmpty()): ?>
|
||||
<p><?= $this->translate('No roles found.') ?></p>
|
||||
<?php return; endif ?>
|
||||
<table class="action-table common-table" data-base-target="_next">
|
||||
<table class="table-row-selectable common-table" data-base-target="_next">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= $this->translate('Name') ?></th>
|
||||
|
|
|
@ -43,7 +43,7 @@ $reducible = $this->hasPermission('config/authentication/users/remove') && $back
|
|||
)
|
||||
) ?>
|
||||
<?php endif ?>
|
||||
<table class="action-table common-table" data-base-target="_next">
|
||||
<table class="table-row-selectable common-table" data-base-target="_next">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= $this->translate('Username') ?></th>
|
||||
|
|
|
@ -71,7 +71,7 @@ $firstRow = true;
|
|||
foreach ($memberships as $membership): ?>
|
||||
<?php if ($firstRow): ?>
|
||||
<?php $firstRow = false; ?>
|
||||
<table data-base-target="_next" class="action-table common-table">
|
||||
<table data-base-target="_next" class="table-row-selectable common-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="membership-group"><?= $this->translate('Group'); ?></th>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
)
|
||||
) ?>
|
||||
<?php if (! count($backendNames)) { return; } ?>
|
||||
<table class="action-table common-table" data-base-target="_next">
|
||||
<table class="table-row-selectable common-table" data-base-target="_next">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= $this->translate('Backend') ?></th>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
'title' => $this->translate('Create a new monitoring backend')
|
||||
)
|
||||
) ?>
|
||||
<table class="action-table common-table">
|
||||
<table class="table-row-selectable common-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= $this->translate('Monitoring Backend') ?></th>
|
||||
|
@ -70,7 +70,7 @@
|
|||
'title' => $this->translate('Create a new command transport')
|
||||
)
|
||||
) ?>
|
||||
<table class="action-table common-table">
|
||||
<table class="table-row-selectable common-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= $this->translate('Transport') ?></th>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<?php endif ?>
|
||||
<div class="content">
|
||||
<table data-base-target="_next"
|
||||
class="action-table multiselect"
|
||||
class="table-row-selectable multiselect"
|
||||
data-icinga-multiselect-url="<?= $this->href('monitoring/comments/show'); ?>"
|
||||
data-icinga-multiselect-related="<?= $this->href("monitoring/comments") ?>"
|
||||
data-icinga-multiselect-data="comment_id">
|
||||
|
|
|
@ -18,7 +18,7 @@ if (count($groupData) === 0) {
|
|||
return;
|
||||
}
|
||||
?>
|
||||
<table class="action action-table common-table" data-base-target="_next">
|
||||
<table class="action table-row-selectable common-table" data-base-target="_next">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<?php endif ?>
|
||||
<div class="content">
|
||||
<?php if ($contacts->hasResult()): ?>
|
||||
<table class="action action-table common-table" data-base-target="_next">
|
||||
<table class="action table-row-selectable common-table" data-base-target="_next">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= $this->translate('Name') ?></th>
|
||||
|
|
|
@ -16,7 +16,7 @@ if (! $this->compact): ?>
|
|||
<?php endif ?>
|
||||
<div class="content">
|
||||
<table data-base-target="_next"
|
||||
class="action-table multiselect"
|
||||
class="table-row-selectable multiselect"
|
||||
data-icinga-multiselect-url="<?= $this->href('monitoring/downtimes/show'); ?>"
|
||||
data-icinga-multiselect-controllers="<?= $this->href("monitoring/downtimes") ?>"
|
||||
data-icinga-multiselect-data="downtime_id">
|
||||
|
|
|
@ -12,6 +12,6 @@ if (! $this->compact): ?>
|
|||
<?php endif ?>
|
||||
<?= $this->partial(
|
||||
'partials/event-history.phtml',
|
||||
array('compact' => $this->compact, 'history' => $history, 'isOverview' => true, 'tableCssClass' => 'action-table')
|
||||
array('compact' => $this->compact, 'history' => $history, 'isOverview' => true, 'tableCssClass' => 'table-row-selectable')
|
||||
) ?>
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ if (! $this->compact): ?>
|
|||
<p><?= $this->translate('No host groups found matching the filter.') ?></p>
|
||||
</div>
|
||||
<?php return; endif ?>
|
||||
<table class="action-table common-table" data-base-target="_next">
|
||||
<table class="table-row-selectable common-table" data-base-target="_next">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
|
|
|
@ -22,7 +22,7 @@ if (! $this->compact): ?>
|
|||
</div>
|
||||
<?php return; endif ?>
|
||||
<table data-base-target="_next"
|
||||
class="action-table multiselect"
|
||||
class="table-row-selectable multiselect"
|
||||
data-icinga-multiselect-url="<?= $this->href('monitoring/hosts/show') ?>"
|
||||
data-icinga-multiselect-controllers="<?= $this->href("monitoring/hosts") ?>"
|
||||
data-icinga-multiselect-data="host">
|
||||
|
|
|
@ -18,7 +18,7 @@ if (! $this->compact): ?>
|
|||
<p><?= $this->translate('No notifications found matching the filter.') ?></p>
|
||||
</div>
|
||||
<?php return; endif ?>
|
||||
<table data-base-target="_next" class="action-table">
|
||||
<table data-base-target="_next" class="table-row-selectable">
|
||||
<tbody>
|
||||
<?php foreach ($notifications->peekAhead($this->compact) as $notification):
|
||||
if (isset($notification->service_description)) {
|
||||
|
|
|
@ -16,7 +16,7 @@ if (! $this->compact): ?>
|
|||
<p><?= $this->translate('No service groups found matching the filter.') ?></p>
|
||||
</div>
|
||||
<?php return; endif ?>
|
||||
<table class="action-table common-table" data-base-target="_next">
|
||||
<table class="table-row-selectable common-table" data-base-target="_next">
|
||||
<thead>
|
||||
<th></th>
|
||||
<th><?= $this->translate('Service Group') ?></th>
|
||||
|
|
|
@ -23,7 +23,7 @@ if (! $this->compact): ?>
|
|||
</div>
|
||||
<?php return; endif ?>
|
||||
<table data-base-target="_next"
|
||||
class="action-table multiselect<?php if ($this->compact): ?> compact<?php endif ?>"
|
||||
class="table-row-selectable multiselect<?php if ($this->compact): ?> compact<?php endif ?>"
|
||||
data-icinga-multiselect-url="<?= $this->href('monitoring/services/show') ?>"
|
||||
data-icinga-multiselect-controllers="<?= $this->href('monitoring/services') ?>"
|
||||
data-icinga-multiselect-data="service,host">
|
||||
|
|
|
@ -330,7 +330,7 @@
|
|||
this.loading = false;
|
||||
|
||||
this.on('rendered', this.onRendered, this);
|
||||
this.on('click', 'table.action tr[href], table.action-table tr[href]', this.onRowClicked, this);
|
||||
this.on('click', 'table.action tr[href], table.table-row-selectable tr[href]', this.onRowClicked, this);
|
||||
};
|
||||
ActionTable.prototype = new Icinga.EventListener();
|
||||
|
||||
|
@ -342,9 +342,9 @@
|
|||
*/
|
||||
ActionTable.prototype.tables = function(context) {
|
||||
if (context) {
|
||||
return $(context).find('table.action, table.action-table');
|
||||
return $(context).find('table.action, table.table-row-selectable');
|
||||
}
|
||||
return $('table.action, table.action-table');
|
||||
return $('table.action, table.table-row-selectable');
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -354,7 +354,7 @@
|
|||
var self = event.data.self;
|
||||
var $target = $(event.target);
|
||||
var $tr = $target.closest('tr');
|
||||
var table = new Selection($tr.closest('table.action, table.action-table')[0], self.icinga);
|
||||
var table = new Selection($tr.closest('table.action, table.table-row-selectable')[0], self.icinga);
|
||||
|
||||
// some rows may contain form actions that trigger a different action, pass those through
|
||||
if (!$target.hasClass('rowaction') && $target.closest('form').length &&
|
||||
|
@ -417,7 +417,7 @@
|
|||
var self = evt.data.self;
|
||||
|
||||
// initialize all rows with the correct row action
|
||||
$('table.action tr, table.action-table tr', container).each(function(idx, el) {
|
||||
$('table.action tr, table.table-row-selectable tr', container).each(function(idx, el) {
|
||||
|
||||
// decide which row action to use: links declared with the class rowaction take
|
||||
// the highest precedence before hrefs defined in the tr itself and regular links
|
||||
|
@ -437,7 +437,7 @@
|
|||
});
|
||||
|
||||
// IE will not ignore user-select unless we cancel selectstart
|
||||
$('table.action.multiselect tr, table.action-table.multiselect tr', container).each(function(idx, el) {
|
||||
$('table.action.multiselect tr, table.table-row-selectable.multiselect tr', container).each(function(idx, el) {
|
||||
$(el).on('selectstart', false);
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue