From 5f217d75bba9d1fb8246d11ae2d5a22bf45d0588 Mon Sep 17 00:00:00 2001 From: acognet Date: Fri, 5 Mar 2021 14:57:25 +0100 Subject: [PATCH] =?UTF-8?q?N=C2=B03746=20-=20Migrate=20modal=20to=20new=20?= =?UTF-8?q?UIBlock=20system?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/dashboard.class.inc.php | 64 ++++++++----------- css/backoffice/vendors/_datatables.scss | 50 +++++++++++++++ .../DataTable/DataTableUIBlockFactory.php | 24 ++++--- .../datatable/config/layout.html.twig | 4 +- webservices/export-v2.php | 4 +- 5 files changed, 98 insertions(+), 48 deletions(-) diff --git a/application/dashboard.class.inc.php b/application/dashboard.class.inc.php index b7b76ba71..1d9fa9f0b 100644 --- a/application/dashboard.class.inc.php +++ b/application/dashboard.class.inc.php @@ -1,20 +1,7 @@ add_ready_script( -<<"; - } else{ + $aColumnDefinition["title"] = ""; + } else { $aColumnDefinition["title"] = ""; } $aColumnDefinition["type"] = "html"; @@ -749,7 +755,7 @@ class DataTableUIBlockFactory extends AbstractUIBlockFactory ]); - $aOptions =array_merge ($aOptions, [ + $aOptions = array_merge($aOptions, [ "language" => [ "processing" => Dict::Format('UI:Datatables:Language:Processing'), @@ -764,17 +770,19 @@ class DataTableUIBlockFactory extends AbstractUIBlockFactory "first" => "<<", "previous" => "<", "next" => ">", - "last" => ">>" + "last" => ">>", ], "aria" => [ "sortAscending" => Dict::Format('UI:Datatables:Language:Sort:Ascending'), - "sortDescending" => Dict::Format('UI:Datatables:Language:Sort:Descending') + "sortDescending" => Dict::Format('UI:Datatables:Language:Sort:Descending'), ], ], "lengthMenu" => Dict::Format('Portal:Datatables:Language:DisplayLength:All'), "dom" => "<'ibo-datatable-toolbar'pil>t<'ibo-datatable-toolbar'pil>", - "ordering"=>true, - "order" => [], + "scrollX" => true, + "scrollCollapse" => true, + "ordering" => true, + "order" => $sOrder, "filter" => false, "processing" => true, "serverSide" => true, diff --git a/templates/base/components/datatable/config/layout.html.twig b/templates/base/components/datatable/config/layout.html.twig index 3aafabc1d..4833c43f4 100644 --- a/templates/base/components/datatable/config/layout.html.twig +++ b/templates/base/components/datatable/config/layout.html.twig @@ -41,8 +41,8 @@
- - + +
diff --git a/webservices/export-v2.php b/webservices/export-v2.php index e22a72517..f00826e71 100644 --- a/webservices/export-v2.php +++ b/webservices/export-v2.php @@ -371,10 +371,10 @@ EOF function InteractiveShell($sExpression, $sQueryId, $sFormat, $sFileName, $sMode) { if ($sMode == 'dialog') { - $oP = new AjaxPage(); - $oP->add('
'); $sExportBtnLabel = json_encode(Dict::S('UI:Button:Export')); $sJSTitle = json_encode(htmlentities(utils::ReadParam('dialog_title', '', false, 'raw_data'), ENT_QUOTES, 'UTF-8')); + $oP = new AjaxPage($sJSTitle); + $oP->add('
'); $oP->add_ready_script( <<