Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0002 web UI bootstrap #1511

Merged
merged 31 commits into from
Jan 18, 2023
Merged

Conversation

ptweety
Copy link
Contributor

@ptweety ptweety commented Nov 7, 2021

Description

In 0057-WebUI-ImprovedDutyCycleDisplay we introduced bootstrap into RasperryMatic and included bootstrap v3.4. I would like to have an update to v5.1.3 and separate bootstrap into it's own patch. I think there are the following steps required:

Related Issue

See #1509

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Alternate Designs

One could also update bootstrap within 0057-WebUI-ImprovedDutyCycleDisplay, but there are benefits of this refactoring. We can now better make use of all the features of bootstrap and continue to improve the WebUI.

Possible Drawbacks

All the carefully handcrafted styles in the WebUI may break. Heavy testing is therefore recommended.

Verification Process

  • I tested against the latest (aka 3.61.4.20211106) nightly build in my test environment.
  • I have tested the build process of RasperryMatic
  • I have tested on my production system

Release Notes

We moved Bootstrap into it's own WebUI patch, updated it to the latest version 5.1.3 and reworked the original 0057-WebUI-ImprovedDutyCycleDisplay to make use of this refactoring.

Contributing checklist

  • My code follows the code style of this project.
  • I have read the CONTRIBUTING and LICENSE document.
  • I fully agree to distribute my changes under Apache 2.0 license.

Use the latest Bootstrap version 5.1.3
- minified styles
- minified and bundled javascript (incl. popper)
Adding box-sizing: content-box;to #menubar since bootstrap introduces a lot of resets like a default

*, ::after, ::before {
    box-sizing: border-box;
}

which breaks the menubar a bit
The adoption of certain bootstrap css classes is still in hmBootstrap.css, but heavily reduced to the required bits.
- progress-bar-success -> bg-success
- progress-bar-info -> bg-info
- progress-bar-warning -> bg-warning
- progress-bar-danger -> bg-danger
- deleted index.hmt & index.htm.orig from the patch
@@ -2293,6 +2293,14 @@ table.center {
font-weight: bold;
}

.controlHeader150px {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What purpose does this change serve here? Can't see controlHeader150px be used anywhere?!?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ptweety
Copy link
Contributor Author

ptweety commented Nov 7, 2021

Uh, I have some doubt regarding the correct baseline of rega/pages/index.htm. I took the most recent one from occu (what was obviously wrong), But the diff between upstream and the one in 0001-RaspberryMatic shows some interesting changes.

$ diff -Naur 0002-WebUI-Bootstrap/occu/WebUI/www/rega/pages/index.htm.orig 0001-RaspberryMatic/occu/WebUI/www/rega/pages/index.htm.orig 
--- 0002-WebUI-Bootstrap/occu/WebUI/www/rega/pages/index.htm.orig       2021-11-07 14:59:06.000000000 +0100
+++ 0001-RaspberryMatic/occu/WebUI/www/rega/pages/index.htm.orig        2021-10-31 20:58:21.000000000 +0100
@@ -41,10 +41,8 @@
     <script type="text/javascript" src="/webui/js/extern/jqplot.categoryAxisRenderer.min.js"></script>
     <script type="text/javascript" src="/webui/js/extern/jqplot.canvasAxisTickRenderer.min.js"></script>
     <script type="text/javascript" src="/webui/js/extern/jqplot.canvasTextRenderer.min.js"></script>
-    <script type="text/javascript" src="/webui/js/extern/jqplot.cursor.js"></script>
+    <script type="text/javascript" src="/webui/js/extern/jqplot.cursor.min.js"></script>
     <script type="text/javascript" src="/webui/js/extern/jqplot.enhancedLegendRenderer.min.js"></script>
-    <script type="text/javascript" src="/webui/js/extern/jqplot.highlighter.min.js"></script>
-    <script type="text/javascript" src="/webui/js/extern/jqplot.markerRenderer.js"></script>
     <script type="text/javascript" src="/webui/js/lang/loadTextResource.js"></script>
     <script type="text/javascript" src="/webui/js/lang/translate.js"></script>
     <script type="text/javascript" src="/webui/js/extern/knockout.js"></script>
@@ -107,14 +105,12 @@
 
       isHTTPS = window.location.protocol.startsWith("https:");
       forceUpdate = false;
-      preventInterfaceCheck = (jQuery.url().param('preventInterfaceCheck') == "true") ? true : false;
+      preventInterfaceCheck = false;
       urlParamInterfaces = jQuery.url().param('showInterfaces');
       urlDebug = jQuery.url().param('debug');
       showDummyLicense = jQuery.url().param('showDummyLicense');
       createNewProgram = false;
       showAPITools = jQuery.url().param('showAPITools');
-      showRFAddress = (jQuery.url().param('showRFAddress') == "true") ? true : false;
-
 
       /**
        * jg_250

0057-WebUI-ImprovedDutyCycleDisplay and retired the changes in
0039-WebUI-Fix-Style-Glitches as they don't have any impact so far.
Thus, now 0002-WebUI-Bootstrap can be cleanly applied at least.
@jens-maus
Copy link
Owner

Ok, I have now slightly reworked your patchset to allow to apply it cleanly. However, after using it in my test environment the WebUI looks slightly different in certain areas. See:

Bildschirmfoto 2021-11-07 um 20 36 51

Note the bigger/taller buttons on the start page and the slightly offset on the "Startseite" text, etc.

Furthermore have a look at that thing here:

Bildschirmfoto 2021-11-07 um 20 37 09

So it looks like border css style settings are modified by the introduction of the updated bootstrap or the way you include it now slightly different with your 0002-WebUI-Bootstrap patch. Any explaination or perhaps fix for it? Because I think before introducing changes based on bootstrap we should try to get the default WebUI style restored as much as possible.

@jens-maus
Copy link
Owner

Uh, I have some doubt regarding the correct baseline of rega/pages/index.htm. I took the most recent one from occu (what was obviously wrong), But the diff between upstream and the one in 0001-RaspberryMatic shows some interesting changes.

Don't worry, the 0001-RaspberryMatic/occu/WebUI/www/rega/pages/index.htm.orig file is based on an old version of index.htm from a previous OCCU version, yes. However, this is not relevant because the changes between the *.orig and non-orig file in this directory is not related to the lines you are showing. And the patch tool is smart enough to identify the right position of the change in the newer file when the patch is applied during build. Thus, I am not always updating all *.orig files in all RaspberryMatic WebUI patchsets when a new OCCU version is released, but only update the ones where conflicts are appearing after the OCCU update. Hope you get the point.

@ptweety
Copy link
Contributor Author

ptweety commented Nov 7, 2021

Ok, I have now slightly reworked your patchset to allow to apply it cleanly.

Thanks!

Note the bigger/taller buttons on the start page and the slightly offset on the "Startseite" text, etc.

I'll have a look into it as soon as I compiled the firmware by myself.

So it looks like border css style settings are modified by the introduction of the updated bootstrap or the way you include it now slightly different with your 0002-WebUI-Bootstrap patch. Any explaination or perhaps fix for it? Because I think before introducing changes based on bootstrap we should try to get the default WebUI style restored as much as possible.

This is again a side effect of the bootstrap resets. This time it's for tables:

table {
    caption-side: bottom;
    border-collapse: collapse;
}

It can be fixed with a style fix for popupTable:

.popupTable {
    ...
    border-collapse: separate;
}

I also saw that the footer buttons are broken and need a fix like this:

.FooterButton {
    ...
    box-sizing: content-box;
}

@jens-maus
Copy link
Owner

This is again a side effect of the bootstrap resets. This time it's for tables:

Isn't it possible that you switch the priority of the bootstrap css vs webui css around and make sure that the webui css gets priority under all corcumstances so that the bootstrap css is not able to reset certain existing css statements from the webui css?

@ptweety
Copy link
Contributor Author

ptweety commented Nov 9, 2021

Well, I tried with no great success. I think, the best approach may be to bundle all generic style fixes in the anyway existing hmBootstrap.css file. This way we are all aware of these generic fixes and can step by step fix the relevant parts of the WebUI.

These would by (in order)

  • fix #header area
  • fix #menubar area
  • fix #footer area
  • fix dialogs
  • fix #content area

@ptweety
Copy link
Contributor Author

ptweety commented Nov 9, 2021

Uhm, locally 50ab606 builds just fine. What have I done wrong?

@jens-maus
Copy link
Owner

Uhm, locally 50ab606 builds just fine. What have I done wrong?

See here:
https://github.com/jens-maus/RaspberryMatic/runs/4157322979?check_suite_focus=true#step:8:367

You can also execute make check locally in your build environment and it should show the same problem/error.

This error seems to be related to uncommitted changes of the 0057-WebUI-ImprovedDutyCycleDisplay.patch which you forgot to commit+push.

@ptweety
Copy link
Contributor Author

ptweety commented Nov 9, 2021

Yes, I see. But I haven't even touched this code which shows up in the diff. :(

@ptweety
Copy link
Contributor Author

ptweety commented Nov 9, 2021

If I create a test branch from d8ede91 and execute make check I get all sorts of errors. Now I'm lost again ...

$ make check
[checking: raspmatic_intelnuc]
[checking status: buildroot-external]
buildroot-2021.08.1/utils/check-package --exclude PackageHeader --br2-external buildroot-external/package/*/*
2215 lines processed
0 warnings generated
[checking clean patch status: OCCU 3.61.4]
(cd buildroot-external/patches/occu ; ./create_patches.sh)
0001-RaspberryMatic
0002-WebUI-Bootstrap
0003-rftypes-Fix
0004-LocalSSLCert
0005-WebUI-Fix-LoggingRestart
0007-WebUI-Enhanced-FirmwareUpdate
0008-WebUI-Disable-ReGa
0010-WebUI-Disable-TimeModuleWarn
0012-WebUI-RecoveryButton
0013-WebUI-SecKeyChangesDisplay
0014-WebUI-Fix-ControlPanelSorting
0019-WebUI-EqualThanCondition
0021-WebUI-Remove-Logo
0024-WebUI-Filter-Operations
0026-WebUI-Fix-CacheControl
0027-WebUI-Fix-EmptyTableCUxDDevices
0029-WebUI-Fix-Variable-selection-and-filter
0031-WebUI-Fix-FileUpload
0032-WebUI-Show-Gateway-DC
0033-WebUI-Fix-DeviceParameters
0034-WebUI-Addon-Config
0035-WebUI-Fix-SysVarPopups
0036-WebUI-ImprovedFavIcons
0037-WebUI-DevConfig-RSSI
0038-WebUI-DeviceOverview-StatusColumn
0039-WebUI-Fix-Style-Glitches
0040-WebUI-AddonInstallNoReboot
0041-WebUI-CUxD-DeviceOverview-Sorting
0042-WebUI-HeatingControl-BatteryValveState
0043-WebUI-SysVarFavorites-SortByName
0044-WebUI-DisableDeviceServiceMsg
0045-WebUI-GlobalSysVarUsage
0046-WebUI-ImprovedScriptEditor
0054-WebUI-AddTimeZones
0055-WebUI-Fix-UserAckInstallWizard
0056-WebUI-Sticky-Filters
0057-WebUI-ImprovedDutyCycleDisplay
0059-WebUI-Fix-KeepProgramActiveState
0060-WebUI-Fix-SessionLogoutSave
0061-WebUI-MenuSortedIcons
0062-WebUI-FavoriteSorting
0063-WebUI-DownloadAddonsInNewTab
0064-WebUI-Fix-URLPlugin
0065-WebUI-Fix-CountUsageStalling
0066-WebUI-Fix-ListSorting
0067-WebUI-Fix-BrokenLinkPeerList
0068-WebUI-Fix-isDutyCycleOK4DevUpdate
0069-WebUI-Fix-MinDelayValueLabel
0070-WebUI-ProgramList-InactiveProgramsMod
0071-WebUI-ProgramList-DeleteProgramHint
0072-WebUI-Fix-hm_autoconf
0073-WebUI-AstroDelays
0074-WebUI-Fix-KeyReturn
0075-WebUI-Fix-HTMLinUserFavorites
0076-WebUI-Fix-SuperCharScriptUse
0077-WebUI-NegateCondition
0078-WebUI-Fix-SetDeviceProfile
0082-WebUI-Fix-SetVisibilityScriptError
0083-WebUI-Fix-DeviceTestScriptError
0084-WebUI-Fix-InvalidObjectCrashes
0085-WebUI-AddonPopupScrollable
0086-WebUI-Fix-500Errors
0087-WebUI-Fix-DoubleSIDs
0088-WebUI-Fix-MissingJSONMethods
0089-WebUI-UnavailableRoutingWarning
0090-WebUI-Add-ReGaSaveButton
0091-WebUI-Add-HM-OU-LED16-LedStatus
0092-WebUI-Fix-DeviceReplacement
0093-WebUI-AllowAdminUserChanges
0094-WebUI-userSysVarTblValuesWordWrap
0095-WebUI-userSysVarTblMoveUpDown
0096-WebUI-AdditionalSoftwareSortedList
0097-WebUI-SetSysvarValueByUser
0099-WebUI-Add-DeviceRenameAllChannels
0100-WebUI-Fix-CreateDirectLink-GroupDescription-Translation
0101-WebUI-Fix-JSON-describe
0102-WebUI-Fix-TrailingNewLineInFirewallIPTextarea
0104-WebUI-Add-AssignFunctionAndRoomToHmRFChan0
0105-WebUI-Fix-DeviceInBoxHmIPOnly
0106-WebUI-Improvement-TreatOPERATOR_NONEasOPERATOR_OR
0107-WebUI-Fix-rgbw.fn-CheckMetaDataIsNotNULL
0108-WebUI-ShowInvisibleHmIPChannelsInPrograms
0109-WebUI-Fix-SystemLanguageDefaultNames
0110-WebUI-Fix-cp_software-Typo
0111-WebUI-Fix-Translation-Performance
0112-WebUI-Fix-Typo-hmipChannelConfigDialogs
0114-WebUI-Keyboard-Scroll-Control-After-Page-Change
0115-WebUI-GatewayConfiguration-DevicesListSortByName
0116-WebUI-Chrome-88-Sort-Header-Cell
0117-WebUI-Fix-Rounding-within-Temperatur-Comfort-Lowering
0118-WebUI-Fix-ISO8601-DateUses
0119-WebUI-Fix-ProofAndSetValue
0120-WebUI-ImprovedPasswordFields
0122-WebUI-ProgramExecutionWithConditionCheck
0123-WebUI-Fix-ChannelActionDuration
0124-WebUI-Fix-ShowMultipleSpacesInSysVar
0125-WebUI-ChannelHighlights
0127-WebUI-SortFirmwareOverview
0128-WebUI-Fix-UpdateAccessPointButton
0129-WebUI-Fix-RemoveHeatGroupDebug
0130-WebUI-Fix-ChannelSysVarPrefix
0131-WebUI-ShowAddonUpdatesOnStartpage
0132-WebUI-Fix-UnitDisplay
0133-WebUI-Fix-InternalIDExposure
0134-WebUI-Add-ShowInternalSysvars
0135-WebUI-Add-ControlPanel-AdvancedSettings
0136-WebUI-Add-Tailscale-VPN
0137-WebUI-Add-NoInterfaceWarning
0138-WebUI-Add-SettingsAccessInStatusAndControl
0139-WebUI-Fix-ScriptErrorOnUnknownDatapoint
0140-WebUI-Add-ChannelPicsInControl
0141-WebUI-Add-LoggedOnUserInformation
0142-WebUI-Fix-StartpageGuestTranslate
0143-WebUI-Fix-Translation
0144-WebUI-ControlForMaintenanceChannel
0145-WebUI-NaturalSorting
0146-WebUI-ImprovedStartpageLayout
0147-WebUI-Fix-AddonUninstallFailureHandling
0148-WebUI-Fix-RebootInBackground
0149-WebUI-ImprovedErrorPages
git diff --exit-code buildroot-external/patches/occu/*.patch
diff --git a/buildroot-external/patches/occu/0019-WebUI-EqualThanCondition.patch b/buildroot-external/patches/occu/0019-WebUI-EqualThanCondition.patch
index 3e41ea74..c44aaed8 100644
--- a/buildroot-external/patches/occu/0019-WebUI-EqualThanCondition.patch
+++ b/buildroot-external/patches/occu/0019-WebUI-EqualThanCondition.patch
@@ -94,13 +94,10 @@
    }
    SaveValueRange = function()
    {
-@@ -204,6 +230,30 @@
-         } else {
-           if ( ( (rv1/1) < (min/1) ) || ( (rv1/1) > (max/1) ) ) {
-             go = 6;
-+          }
-+        }
-+        break;
+@@ -207,6 +233,30 @@
+           }
+         }
+         break;
 +      case 5:
 +        rv1 = $("Text7").value;
 +        if( vu == "100%" ) rv1 = rv1/100;
@@ -122,9 +119,12 @@
 +        } else {
 +          if ( ( (rv1/1) < (min/1) ) || ( (rv1/1) > (max/1) ) ) {
 +            go = 6;
-           }
-         }
++          }
++        }
++        break;
+       default:
          break;
+     }
 --- occu/WebUI/www/webui/js/lang/de/translate.lang.js.orig
 +++ occu/WebUI/www/webui/js/lang/de/translate.lang.js
 @@ -774,13 +774,15 @@
diff --git a/buildroot-external/patches/occu/0039-WebUI-Fix-Style-Glitches.patch b/buildroot-external/patches/occu/0039-WebUI-Fix-Style-Glitches.patch
index bf602a6a..0899c96d 100644
--- a/buildroot-external/patches/occu/0039-WebUI-Fix-Style-Glitches.patch
+++ b/buildroot-external/patches/occu/0039-WebUI-Fix-Style-Glitches.patch
@@ -2157,17 +2157,17 @@
  
  .CLASS02606 {
 -      width: 240px;
-       background-color: $_(activeBackground);
-       border: solid 1px $_(black); /* black */
-       color: $_(textColorB); /* black */
+-      background-color: $_(activeBackground);
+-      border: solid 1px $_(black); /* black */
+-      color: $_(textColorB); /* black */
 -      padding: 4px;
 -}
 -
 -.CLASS02607 {
 -      width:55px;
--      background-color: $_(activeBackground);
--      border: solid 1px $_(black); /* black */
--      color: $_(textColorB); /* black */
+       background-color: $_(activeBackground);
+       border: solid 1px $_(black); /* black */
+       color: $_(textColorB); /* black */
 -      padding: 4px;
 -}
 -
diff --git a/buildroot-external/patches/occu/0057-WebUI-ImprovedDutyCycleDisplay.patch b/buildroot-external/patches/occu/0057-WebUI-ImprovedDutyCycleDisplay.patch
index 116b6881..f192d377 100644
--- a/buildroot-external/patches/occu/0057-WebUI-ImprovedDutyCycleDisplay.patch
+++ b/buildroot-external/patches/occu/0057-WebUI-ImprovedDutyCycleDisplay.patch
@@ -369,7 +369,8 @@
 +                dutyCycleBar.addClass("bg-danger");
 +              } else if (arInterfaceDutyCycle[ifaceBidCosRF] > dcWarn) {
 +                dutyCycleBar.addClass("bg-warning");
-+              } else {
+               } else {
+-                trDutyCycle.removeClass("attention");
 +                dutyCycleBar.addClass("bg-success");
 +              }
 +              
@@ -388,8 +389,7 @@
 +                } else {
 +                  carrierSenseBar.addClass("bg-info");
 +                }
-               } else {
--                trDutyCycle.removeClass("attention");
++              } else {
 +                carrierSenseValElm.text("n/a");
 +                carrierSenseBar.css("width", "0%");
                }
diff --git a/buildroot-external/patches/occu/0072-WebUI-Fix-hm_autoconf.patch b/buildroot-external/patches/occu/0072-WebUI-Fix-hm_autoconf.patch
index 712511ac..1711fbf4 100644
--- a/buildroot-external/patches/occu/0072-WebUI-Fix-hm_autoconf.patch
+++ b/buildroot-external/patches/occu/0072-WebUI-Fix-hm_autoconf.patch
@@ -72,9 +72,8 @@
      
      proc conf_value_DISPLAY.ALARM_COUNT { url ch_id ch_desc_var value_desc_var} {
 -        create_sysvar_to_value_prg $ch_id ALARM_COUNT 40 "Alarmmeldungen anzeigen"
-+        create_sysvar_to_value_prg $ch_id ALARM_COUNT ID_GW_SYSALARM "Alarmmeldungen anzeigen"
-     }
-     
+-    }
+-    
 -    proc create_objects {collection enum_type names} {
 -        set ids [rega "dom.GetObject($collection).EnumIDs()"]
 -        set i 0
@@ -156,8 +155,9 @@
 -            sv.Internal(0);
 -            
 -        }
--    }
--    
++        create_sysvar_to_value_prg $ch_id ALARM_COUNT ID_GW_SYSALARM "Alarmmeldungen anzeigen"
+     }
+     
 -    
      proc create_sysvar_to_value_prg {ch_id value sv_id prg_name} {
          set script "string ch_id=\"$ch_id\";\nstring value_name=\"$value\";\nstring sv_id=$sv_id;\nstring prg_name=\"$prg_name\";\n"
diff --git a/buildroot-external/patches/occu/0099-WebUI-Add-DeviceRenameAllChannels.patch b/buildroot-external/patches/occu/0099-WebUI-Add-DeviceRenameAllChannels.patch
index dd77eae3..21bf67cb 100644
--- a/buildroot-external/patches/occu/0099-WebUI-Add-DeviceRenameAllChannels.patch
+++ b/buildroot-external/patches/occu/0099-WebUI-Add-DeviceRenameAllChannels.patch
@@ -86,8 +86,11 @@
 +\n
 +                      <td width=\"40%\"><div id=\"DeviceConfigDialogTestHint\"><img id=\"DeviceConfigDialogTestHintImg\" src=\"/ise/img/help.png\" style=\"cursor: pointer; width:18px; height:18px; position:relative; top:2px\" onclick=\"showParamHelp('generalDeviceConfigHint', '400', '200')\"><\/div><\/td>\n
 +\n
-+          <\/tr>\n
-+        <\/table>\n
+           <\/tr>\n
+         <\/table>\n
+-        <div class=\"CLASS10805\" name=\"generalDeviceConfigHint\">\n
+-          Im Rahmen des Funktionstests wird gepr�ft, ob die Kommunikation mit dem Ger�t fehlerfrei funktioniert. Der Test gilt als bestanden, sobald die erste R�ckmeldung von dem Ger�t empfangen wurde. <br \/> Dazu werden an alle Aktoren des Ger�ts Schaltbefehle gesendet, die deren Zustand �ndern. Sensoren, wie z.B. Fernbedienungen, melden sich im Allgemeinen erst dann, wenn sie durch ein entsprechendes Ereignis ausgel�st wurden.\n
+-        <\/div>\n
 +      <\/div>\n
 +    <\/div>\n
 +      \n
@@ -107,7 +110,7 @@
 +\n
 +                <tr>                  \n
 +                  <td width=\"80%\" name=\"generalDeviceChannelConfigLblSeparator\">Trennzeichen:<\/td><td width=\"20%\"><input id=\"DeviceConfigDialog_DeviceChannelsRenameSeparator\" size=\"2\" type=\"text\" value=\":\"\/><\/td>\n
-           <\/tr>\n
++          <\/tr>\n
 +\n
 +                <tr>\n
 +\n
@@ -117,10 +120,7 @@
 +\n
 +                <\/tr>\n
 +\n
-         <\/table>\n
--        <div class=\"CLASS10805\" name=\"generalDeviceConfigHint\">\n
--          Im Rahmen des Funktionstests wird gepr�ft, ob die Kommunikation mit dem Ger�t fehlerfrei funktioniert. Der Test gilt als bestanden, sobald die erste R�ckmeldung von dem Ger�t empfangen wurde. <br \/> Dazu werden an alle Aktoren des Ger�ts Schaltbefehle gesendet, die deren Zustand �ndern. Sensoren, wie z.B. Fernbedienungen, melden sich im Allgemeinen erst dann, wenn sie durch ein entsprechendes Ereignis ausgel�st wurden.\n
--        <\/div>\n
++        <\/table>\n
        <\/div>\n
      <\/div>\n
  \n
diff --git a/buildroot-external/patches/occu/0111-WebUI-Fix-Translation-Performance.patch b/buildroot-external/patches/occu/0111-WebUI-Fix-Translation-Performance.patch
index a2783cfa..421ad391 100644
--- a/buildroot-external/patches/occu/0111-WebUI-Fix-Translation-Performance.patch
+++ b/buildroot-external/patches/occu/0111-WebUI-Fix-Translation-Performance.patch
@@ -38,6 +38,8 @@
 -  //if (HMIdentifier[getLang()] == {} || langJSON[getLang()] == {}) {
 -  if (Object.keys(HMIdentifier[getLang()]).length === 0 || Object.keys(langJSON[getLang()]).length === 0) {
 -    loadTextResource();
+-  }
+-  return unescape((langJSON[getLang()][key] != undefined) ? langJSON[getLang()][key] : key);
 +function translateKey(key, lang) {
 +  if(null == lang) lang = getLang();
 +  // This check is more performant then always processing all Keys.
@@ -51,8 +53,7 @@
 +    var text = langJSON[lang][key];
 +    if(text === undefined) text = key;
 +    return unescape(text);
-   }
--  return unescape((langJSON[getLang()][key] != undefined) ? langJSON[getLang()][key] : key);
++  }
 +  
 +  // Check if we already have an escaped variant of the ressource
 +  if(EscapedLangDict[lang][key] !== undefined) {
diff --git a/buildroot-external/patches/occu/0119-WebUI-Fix-ProofAndSetValue.patch b/buildroot-external/patches/occu/0119-WebUI-Fix-ProofAndSetValue.patch
index 8d8f3162..072e57db 100644
--- a/buildroot-external/patches/occu/0119-WebUI-Fix-ProofAndSetValue.patch
+++ b/buildroot-external/patches/occu/0119-WebUI-Fix-ProofAndSetValue.patch
@@ -480,11 +480,11 @@
 +  var parsedValue;
 +  var parsedMin = parseFloat(min);
 +  var parsedMax = parseFloat(max);
- 
++
 +  var minSplit = min.toString().split(".");
 +  var maxSplit = max.toString().split(".");
 +  var digits = 0;
-+
+ 
 +  if(minSplit.length === 2) {
 +    digits = Math.max(digits, minSplit[1].length);
 +  }
make: *** [check] Error 1

@ptweety
Copy link
Contributor Author

ptweety commented Nov 30, 2021

@jens-maus: what has changed with f61834b? I don't get it ...

@jens-maus
Copy link
Owner

@jens-maus: what has changed with f61834b? I don't get it ...

Nothing really. I just recreated main.min.css using scss and and I guess due to a somewhat different development environment or other scss version the main.min.css was generated differently.

Repository owner deleted a comment from dermorpher Apr 11, 2022
Repository owner deleted a comment from dermorpher Apr 11, 2022
@jens-maus jens-maus added 💡 enhancement-ideas New feature or change request 🏷️ WebUI This refs the WebUI component labels Jan 18, 2023
@jens-maus jens-maus added this to the next release milestone Jan 18, 2023
@jens-maus jens-maus linked an issue Jan 18, 2023 that may be closed by this pull request
@jens-maus jens-maus merged commit 5034169 into jens-maus:master Jan 18, 2023
@MichaelN0815
Copy link
Contributor

I'm not sure if the design change in the "Zeitmodul" is related to this PR, but I see in Version RaspberryMatic-3.67.10.20230211 some differences to 3.67.10.20230114:

alt:
alt

neu:
neu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💡 enhancement-ideas New feature or change request 🏷️ WebUI This refs the WebUI component
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update bootstrap v3.4 to v4.6 in 0057-WebUI-ImprovedDutyCycleDisplay
3 participants