1- /* global jQuery3, luxon, tableDataProxy */
1+ /* global jQuery3, luxon, tableDataProxy, bootstrap5 */
22jQuery3 ( document ) . ready ( function ( ) {
33 /**
44 * Binds all tables that have the class 'data-table' to a new JQuery DataTables instance.
@@ -32,7 +32,7 @@ jQuery3(document).ready(function () {
3232 return '-' ;
3333 }
3434 var dateTime = luxon . DateTime . fromMillis ( data * 1000 ) ;
35- return '<span data-toggle="tooltip" data-placement="bottom" title="'
35+ return '<span data-bs- toggle="tooltip" data-bs -placement="bottom" title="'
3636 + dateTime . toLocaleString ( luxon . DateTime . DATETIME_SHORT ) + '">'
3737 + dateTime . toRelative ( { locale : 'en' } ) + '</span>' ;
3838 }
@@ -53,7 +53,6 @@ jQuery3(document).ready(function () {
5353 const tableConfiguration = JSON . parse ( table . attr ( 'data-table-configuration' ) ) ;
5454 // overwrite/merge the default configuration with values from the provided table configuration
5555 const dataTable = table . DataTable ( Object . assign ( defaultConfiguration , tableConfiguration ) ) ;
56-
5756 // add the buttons to the top of the table
5857 if ( tableConfiguration . buttons ) {
5958 dataTable
@@ -76,7 +75,10 @@ jQuery3(document).ready(function () {
7675 ( function ( ) {
7776 const model = JSON . parse ( t . responseObject ( ) ) ;
7877 dataTable . rows . add ( model ) . draw ( ) ;
79- jQuery3 ( '[data-toggle="tooltip"]' ) . tooltip ( ) ;
78+ jQuery3 ( '[data-bs-toggle="tooltip"]' ) . each ( function ( ) {
79+ const tooltip = new bootstrap5 . Tooltip ( jQuery3 ( this ) [ 0 ] ) ;
80+ tooltip . enable ( ) ;
81+ } ) ;
8082 } ) ( ) ;
8183 } ) ;
8284 }
0 commit comments