Datatables огромный край вершины - PullRequest
0 голосов
/ 14 февраля 2019

У меня есть представление с несколькими таблицами dataTable,

первое из них получит огромный запас, не затрагивая ничего из css из библиотеки.

Я перепробовал много вещей.

единственный способ поставить таблицу наверх - перезаписать очистку

: оба

на

clear: none

в классе

.dataTables_wrapper

, но после этого между первой таблицей и второй также имеется классбольшой разрыв между двумя элементами.

Вот предварительный просмотр проблемы:

enter image description here

Здесь мой пользовательский CSS (это никак не влияет на эффект поля ошибок)):

.dataTables_wrapper {
    position: relative;
    width: 99% !important;
    margin-bottom: 3em;
}

/*table#evaluations{*/
    /*clear: none;*/
/*}*/
/**/
table.dataTable {
    width: 99% !important;
    top : 0;
    margin: 0px;
    clear: both;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

Вот часть моего html:

<div class="table_evaluateur">
        <!-- evaluations -->
        <h1><?php echo __('Liste de mes évaluations en cours', array(), 'messages') ?></h1>
        <form action="<?php echo url_for($url_redirection, array('action' => 'batch')) ?>" method="post">
            <?php echo '<input type="hidden" name="evaluation_mode" id="evaluation_mode" value="'.$evaluation_mode.'">' ?>
            <ul class="sf_admin_actions">
            </ul>
            <div class="sf_admin_list">
                <table id="evaluations" class="evaluations display" cellpadding="0">
                    <thead>
                    <tr>
                        <th class="select-filter"><?php echo __('Appel à projet'); ?></th>
                        <th class="input-filter"><?php echo __('Candidat'); ?></th>
                        <th class="input-filter"><?php echo __('Titre long'); ?></th>
                        <th class="input-filter"><?php echo __('Titre court'); ?></th>
                        <th class="input-filter"><?php echo __('Unité'); ?></th>
                        <th class="select-filter"><?php echo __('Institut'); ?></th>
                        <th class="select-filter"><?php echo __('Type de demandes'); ?></th>
                        <th class="select-filter"><?php echo __('Statut'); ?></th>
                        <th class="sf_admin_foreignkey sf_admin_list_th_date_cloture_evaluation_ap"><?php echo __('Date fin de l\'évaluation'); ?></th>
                        <th id="sf_admin_list_th_actions" class="no-sort"><?php echo __('Actions') ?></th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php foreach ($evaluations as $i => $evaluation_candidature): $odd = fmod(++$i, 2) ? 'odd' : 'even' ?>
                        <?php
                        $evaluation_en_cours = false;
                        $criteres = $evaluation_candidature->getEvaluationCandidatureCritere();
                        if (count($criteres) || $evaluation_candidature->getNoteGlobale() != null || $evaluation_candidature->getAppreciation() != null) {
                            $evaluation_en_cours = true;
                        }
                        ?>
                        <tr <?php echo $odd ?>">
                            <?php include_partial('accueil/list_td_tabular_evaluateur', array('evaluation_candidature' => $evaluation_candidature, 'evaluation_mode' => $evaluation_mode, 'evaluation_en_cours' => $evaluation_en_cours))?>
                            <?php include_partial('accueil/list_td_actions', array('evaluation_candidature' => $evaluation_candidature, 'evaluation_mode' => $evaluation_mode, 'evaluation_en_cours' => $evaluation_en_cours)) ?>
                        </tr>
                    <?php endforeach; ?>
                    </tbody>
                </table>
            </div>
        </form><!-- evaluations-->
    </div>

    <div class="table_rapporteur">
        <!-- rapport -->
        <h1><?php echo __('Liste de mes rapports en cours', array(), 'messages') ?></h1>
        <form action="<?php echo url_for($url_redirection, array('action' => 'batch')) ?>" method="post">
            <?php echo '<input type="hidden" name="evaluation_mode" id="evaluation_mode" value="'.$evaluation_mode.'">' ?>
            <ul class="sf_admin_actions">
            </ul>
            <div class="sf_admin_list">
                <table id="rapports" class="display" cellspacing="0" width="100%">
                    <thead>
                    <tr>
                        <?php include_partial('accueil/list_th_tabular')?>
                        <th id="sf_admin_list_th_actions" class="no-sort"><?php echo __('Actions') ?></th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php foreach ($rapports as $i => $evaluation_candidature): $odd = fmod(++$i, 2) ? 'odd' : 'even' ?>
                        <?php
                        $evaluation_en_cours = false;
                        $criteres = $evaluation_candidature->getEvaluationCandidatureCritere();
                        if (count($criteres) || $evaluation_candidature->getNoteGlobale() != null || $evaluation_candidature->getAppreciation() != null) {
                            $evaluation_en_cours = true;
                        }
                        ?>
                        <tr <?php echo $odd ?>">
                        <?php include_partial('accueil/list_td_tabular_rapporteur', array('evaluation_candidature' => $evaluation_candidature, 'evaluation_mode' => $evaluation_mode, 'evaluation_en_cours' => $evaluation_en_cours))?>
                        <?php include_partial('accueil/list_td_actions', array('evaluation_candidature' => $evaluation_candidature, 'evaluation_mode' => $evaluation_mode, 'evaluation_en_cours' => $evaluation_en_cours)) ?>
                        </tr>
                    <?php endforeach; ?>
                    </tbody>
                </table>
            </div>
        </form><!-- rapports-->
    </div>
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...