N°3648 - FIx click on link in datatable and display of buttons in search form

This commit is contained in:
acognet
2021-03-04 11:37:03 +01:00
parent 45981c1941
commit 72f6305320
3 changed files with 23 additions and 16 deletions

View File

@@ -1,19 +1,7 @@
/*!
* Copyright (C) 2013-2020 Combodo SARL
*
* This file is part of iTop.
*
* iTop is free software; you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* iTop is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* @copyright Copyright (C) 2010-2021 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
@import "block-csv";
@import "block-csv";
@import "block-indirect-links";

View File

@@ -0,0 +1,12 @@
.ibo-block-indirect-links--edit--dialog{
overflow:hidden !important;
> form{
overflow: auto;
}
}
.ibo-block-indirect-links--edit--dialog .ibo-datatable--selection-validation-buttons-toolbar{
position:absolute;
bottom: 5px;
background-color:white;
}

View File

@@ -47,6 +47,7 @@ else
maxHeight{{ sListId }} = maxHeight{{ sListId }} -50;
}
var oTable{{ sListId }} = $('#{{ oUIBlock.GetId() }}').DataTable({
language: {
processing: "{{ 'UI:Datatables:Language:Processing'|dict_s }}",
@@ -108,6 +109,11 @@ var oTable{{ sListId }} = $('#{{ oUIBlock.GetId() }}').DataTable({
{
$(this).closest('.dataTables_wrapper').find('.dataTables_paginate, .dataTables_info').show();
}
$("#{{ oUIBlock.GetId() }} a").on('click', function (e) {
//disable select action when there is a link
e.stopPropagation();
});
},
{% endif %}
rowId: "id",
@@ -188,6 +194,7 @@ var oTable{{ sListId }} = $('#{{ oUIBlock.GetId() }}').DataTable({
$('#{{ oUIBlock.GetId() }}').closest(".dataTables_scrollBody").css('max-height', maxHeight{{ sListId }}-100);
{% if oUIBlock.GetOption("select_mode") is not empty %}
{% if oUIBlock.GetOption("select_mode") != "single" %}
oTable{{ sListId }}.off('select').on('select', function (oEvent, dt, type, indexes) {