Skip to content

Commit

Permalink
Tables: rename action-table to table-row-selectable
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas-Gelf committed Nov 4, 2015
1 parent 7db36e8 commit ed69bd5
Show file tree
Hide file tree
Showing 24 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion application/views/scripts/about/index.phtml
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion application/views/scripts/config/modules.phtml
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion application/views/scripts/config/resource.phtml
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion application/views/scripts/form/reorder-authbackend.phtml
@@ -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>
Expand Down
2 changes: 1 addition & 1 deletion application/views/scripts/group/list.phtml
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion application/views/scripts/group/show.phtml
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion application/views/scripts/navigation/index.phtml
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion application/views/scripts/navigation/shared.phtml
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion application/views/scripts/role/list.phtml
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion application/views/scripts/user/list.phtml
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion application/views/scripts/user/show.phtml
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion application/views/scripts/usergroupbackend/list.phtml
Expand Up @@ -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>
Expand Down
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
Expand Up @@ -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">
Expand Down
Expand Up @@ -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>
Expand Down
Expand Up @@ -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>
Expand Down
Expand Up @@ -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">
Expand Down
Expand Up @@ -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')
) ?>

Expand Up @@ -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>
Expand Down
Expand Up @@ -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">
Expand Down
Expand Up @@ -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)) {
Expand Down
Expand Up @@ -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>
Expand Down
Expand Up @@ -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">
Expand Down
12 changes: 6 additions & 6 deletions public/js/icinga/behavior/actiontable.js
Expand Up @@ -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();

Expand All @@ -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');
};

/**
Expand All @@ -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 &&
Expand Down Expand Up @@ -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
Expand All @@ -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);
});

Expand Down

0 comments on commit ed69bd5

Please sign in to comment.