Get rid of hardcoded target for action-tables

This commit is contained in:
Thomas Gelf 2014-03-21 10:27:46 +00:00
parent 4378282e9f
commit 8a7ac587d9
9 changed files with 9 additions and 17 deletions

View File

@ -7,7 +7,7 @@
</div>
<div class="content">
<table class="action comments">
<table data-base-target="_next" class="action comments">
<tbody>
<?php

View File

@ -10,7 +10,7 @@ $helper = $this->getHelper('CommandForm');
</div>
<div class="content downtimes">
<table class="action">
<table data-base-target="_next" class="action">
<tbody>
<?php foreach ($this->downtimes as $downtime): ?>
<tr>

View File

@ -14,7 +14,7 @@ No entries found
</div>
<?php return; endif ?>
<table class="action">
<table data-base-target="_next" class="action">
<tbody>
<?php foreach ($history as $event): ?>
<?php

View File

@ -5,7 +5,7 @@ if ($hosts->count() === 0) {
return;
}
?><table class="action">
?><table data-base-target="_next" class="action">
<tbody>
<?php

View File

@ -19,7 +19,7 @@ if ($hosts->count() === 0) {
}
?>
<table class="action multiselect">
<table data-base-target="_next" class="action multiselect">
<tbody>
<?php foreach($hosts as $host):

View File

@ -16,7 +16,7 @@ if (empty($this->notifications)) {
}
?>
<table class="action">
<table data-base-target="_next" class="action">
<tbody>
<?php

View File

@ -13,7 +13,7 @@ Sort by <?= $this->sortControl ?>
<div class="content">
<?php endif ?>
<table class="action multiselect<?php if ($this->compact): ?> compact<?php endif ?>" style="table-layout: auto;">
<table data-base-target="_next" class="action multiselect<?php if ($this->compact): ?> compact<?php endif ?>" style="table-layout: auto;">
<tbody>
<?php

View File

@ -43,7 +43,7 @@ No History Available For This Object
<?php return; endif ?>
<div class="content">
<table class="action">
<table data-base-target="_next" class="action">
<tbody>
<?php foreach ($this->history as $event):

View File

@ -257,15 +257,7 @@
$target = $container;
}
// ...the only exception are class="action" tables...
if ($el.closest('table.action').length) {
if ($el.closest('#col2').length) {
this.icinga.ui.moveToLeft();
}
$target = $('#col2');
}
// ...and you can of course override the default behaviour:
// You can of course override the default behaviour:
if ($el.closest('[data-base-target]').length) {
targetId = $el.closest('[data-base-target]').data('baseTarget');