@@ -413,17 +413,17 @@ jeedomUtils.setJeedomTheme = function() {
413413 }
414414
415415 jeedomUtils . switchTheme = function ( ) {
416- var theme = 'core/themes/' + jeedom . theme . jeedom_theme_alternate + '/desktop/' + jeedom . theme . jeedom_theme_alternate + '.css'
417- var themeShadows = 'core/themes/' + jeedom . theme . jeedom_theme_alternate + '/desktop/shadows.css'
416+ var theme = 'core/themes/' + jeedom . theme . jeedom_theme_alternate + '/desktop/' + jeedom . theme . jeedom_theme_alternate + '.css?v=' + jeeFrontEnd . jeedomVersion
417+ var themeShadows = 'core/themes/' + jeedom . theme . jeedom_theme_alternate + '/desktop/shadows.css?v=' + jeeFrontEnd . jeedomVersion
418418 var themeCook = 'alternate'
419419 var themeButton = '<i class="fas fa-adjust"></i> {{Thème principal}}'
420420 var cssTag = document . getElementById ( 'jeedom_theme_currentcss' )
421421 cssTag . setAttribute ( 'data-nochange' , 1 )
422422
423- if ( cssTag . attributes . href . value . split ( '?md5' ) [ 0 ] == theme ) {
423+ if ( cssTag . attributes . href . value == theme ) {
424424 document . body . setAttribute ( 'data-theme' , jeedom . theme . jeedom_theme_main )
425- theme = 'core/themes/' + jeedom . theme . jeedom_theme_main + '/desktop/' + jeedom . theme . jeedom_theme_main + '.css'
426- themeShadows = 'core/themes/' + jeedom . theme . jeedom_theme_main + '/desktop/shadows.css'
425+ theme = 'core/themes/' + jeedom . theme . jeedom_theme_main + '/desktop/' + jeedom . theme . jeedom_theme_main + '.css?v=' + jeeFrontEnd . jeedomVersion
426+ themeShadows = 'core/themes/' + jeedom . theme . jeedom_theme_main + '/desktop/shadows.css?v=' + jeeFrontEnd . jeedomVersion
427427 themeCook = 'default'
428428 themeButton = '<i class="fas fa-adjust"></i> {{Thème alternatif}}'
429429 } else {
@@ -476,7 +476,7 @@ jeedomUtils.checkThemechange = function() {
476476
477477 //Should have themeCss, check currentTheme:
478478 var theme = jeedom . theme . jeedom_theme_alternate
479- var themeCss = 'core/themes/' + jeedom . theme . jeedom_theme_alternate + '/desktop/' + jeedom . theme . jeedom_theme_alternate + '.css'
479+ var themeCss = 'core/themes/' + jeedom . theme . jeedom_theme_alternate + '/desktop/' + jeedom . theme . jeedom_theme_alternate + '.css?v=' + jeeFrontEnd . jeedomVersion
480480 var currentTime = parseInt ( ( new Date ( ) ) . getHours ( ) * 100 + ( new Date ( ) ) . getMinutes ( ) )
481481
482482 //if (parseInt(jeedom.theme.theme_start_day_hour.replace(':', '')) < currentTime && parseInt(jeedom.theme.theme_end_day_hour.replace(':', '')) > currentTime) {
@@ -487,17 +487,14 @@ jeedomUtils.checkThemechange = function() {
487487 || jeedom . theme . theme_changeAccordingTime == 0
488488 ) {
489489 theme = jeedom . theme . jeedom_theme_main
490- themeCss = 'core/themes/' + jeedom . theme . jeedom_theme_main + '/desktop/' + jeedom . theme . jeedom_theme_main + '.css'
490+ themeCss = 'core/themes/' + jeedom . theme . jeedom_theme_main + '/desktop/' + jeedom . theme . jeedom_theme_main + '.css?v=' + jeeFrontEnd . jeedomVersion
491491 }
492492
493493 var currentTheme = document . getElementById ( 'jeedom_theme_currentcss' ) . getAttribute ( 'href' )
494- if ( currentTheme . indexOf ( '?md5' ) != - 1 ) {
495- currentTheme = currentTheme . substring ( 0 , currentTheme . indexOf ( '?md5' ) )
496- }
497494 if ( currentTheme != themeCss ) {
498495 document . body . setAttribute ( 'data-theme' , theme )
499496 document . getElementById ( 'jeedom_theme_currentcss' ) . setAttribute ( 'href' , themeCss )
500- document . getElementById ( 'shadows_theme_css' ) ?. setAttribute ( 'href' , 'core/themes/' + theme + '/desktop/shadows.css' )
497+ document . getElementById ( 'shadows_theme_css' ) ?. setAttribute ( 'href' , 'core/themes/' + theme + '/desktop/shadows.css?v=' + jeeFrontEnd . jeedomVersion )
501498 jeedomUtils . setBackgroundImage ( '' )
502499 jeedomUtils . triggerThemechange ( )
503500 }
@@ -1140,7 +1137,7 @@ jeedomUtils.initDataTables = function(_selector, _paging, _searching,_init) {
11401137 document . querySelector ( _selector ) . querySelectorAll ( 'table.dataTable' ) . forEach ( _table => {
11411138 if ( _table . _dataTable ) {
11421139 _table . _dataTable . destroy ( )
1143- }
1140+ }
11441141 new DataTable ( _table , {
11451142 columns : _init || [ { select : 0 , sort : "asc" } ] ,
11461143 paging : _paging ,
@@ -1166,7 +1163,7 @@ jeedomUtils.resizableTable = function(table) {
11661163 div . addEventListener ( 'mousedown' , function ( e ) {
11671164 curCol = e . target . parentElement ;
11681165 nxtCol = curCol . nextElementSibling ;
1169- pageX = e . pageX ;
1166+ pageX = e . pageX ;
11701167 var padding = paddingDiff ( curCol ) ;
11711168 curColWidth = curCol . offsetWidth - padding ;
11721169 if ( nxtCol )
@@ -1186,7 +1183,7 @@ jeedomUtils.resizableTable = function(table) {
11861183 curCol . style . width = ( curColWidth + diffX ) + 'px' ;
11871184 }
11881185 } ) ;
1189- document . addEventListener ( 'mouseup' , function ( e ) {
1186+ document . addEventListener ( 'mouseup' , function ( e ) {
11901187 curCol = undefined ;
11911188 nxtCol = undefined ;
11921189 pageX = undefined ;
0 commit comments