From d285f7c8de648b20c7a2dce47f1648acae754e26 Mon Sep 17 00:00:00 2001
From: jp112sdl <>
Date: Wed, 6 Nov 2024 17:32:23 +0100
Subject: [PATCH] solution for #2897
---
...UI-Add-NaturalSortOrderInControlTabs.patch | 31 ++
.../rega/pages/tabs/control/hdevichannels.htm | 316 ++++++++++++++++++
.../pages/tabs/control/hdevichannels.htm.orig | 315 +++++++++++++++++
.../rega/pages/tabs/control/hfuncchannels.htm | 270 +++++++++++++++
.../pages/tabs/control/hfuncchannels.htm.orig | 270 +++++++++++++++
.../rega/pages/tabs/control/hroomchannels.htm | 271 +++++++++++++++
.../pages/tabs/control/hroomchannels.htm.orig | 270 +++++++++++++++
7 files changed, 1743 insertions(+)
create mode 100644 buildroot-external/patches/occu/0191-WebUI-Add-NaturalSortOrderInControlTabs.patch
create mode 100755 buildroot-external/patches/occu/0191-WebUI-Add-NaturalSortOrderInControlTabs/occu/WebUI/www/rega/pages/tabs/control/hdevichannels.htm
create mode 100755 buildroot-external/patches/occu/0191-WebUI-Add-NaturalSortOrderInControlTabs/occu/WebUI/www/rega/pages/tabs/control/hdevichannels.htm.orig
create mode 100755 buildroot-external/patches/occu/0191-WebUI-Add-NaturalSortOrderInControlTabs/occu/WebUI/www/rega/pages/tabs/control/hfuncchannels.htm
create mode 100755 buildroot-external/patches/occu/0191-WebUI-Add-NaturalSortOrderInControlTabs/occu/WebUI/www/rega/pages/tabs/control/hfuncchannels.htm.orig
create mode 100755 buildroot-external/patches/occu/0191-WebUI-Add-NaturalSortOrderInControlTabs/occu/WebUI/www/rega/pages/tabs/control/hroomchannels.htm
create mode 100755 buildroot-external/patches/occu/0191-WebUI-Add-NaturalSortOrderInControlTabs/occu/WebUI/www/rega/pages/tabs/control/hroomchannels.htm.orig
diff --git a/buildroot-external/patches/occu/0191-WebUI-Add-NaturalSortOrderInControlTabs.patch b/buildroot-external/patches/occu/0191-WebUI-Add-NaturalSortOrderInControlTabs.patch
new file mode 100644
index 0000000000..6622eeb1fb
--- /dev/null
+++ b/buildroot-external/patches/occu/0191-WebUI-Add-NaturalSortOrderInControlTabs.patch
@@ -0,0 +1,31 @@
+--- occu/WebUI/www/rega/pages/tabs/control/hdevichannels.htm.orig
++++ occu/WebUI/www/rega/pages/tabs/control/hdevichannels.htm
+@@ -28,6 +28,7 @@
+ }
+ }
+ }
++ oUser.UserTempViewIDs().SortByName(soAsc,stNatural);
+ firstSort = true;
+ }
+ system.SetSessionVar("sessionTAB1", system.GetVar("id") );
+--- occu/WebUI/www/rega/pages/tabs/control/hfuncchannels.htm.orig
++++ occu/WebUI/www/rega/pages/tabs/control/hfuncchannels.htm
+@@ -16,7 +16,7 @@
+ object oTmpArray = dom.GetObject(system.GetVar("id"));
+ if( oTmpArray )
+ {
+- oTmpArray.SortByName();
++ oTmpArray.SortByName(soAsc,stNatural);
+ string sTmp;
+ foreach(sTmp,oTmpArray.EnumIDs())
+ {
+--- occu/WebUI/www/rega/pages/tabs/control/hroomchannels.htm.orig
++++ occu/WebUI/www/rega/pages/tabs/control/hroomchannels.htm
+@@ -40,6 +40,7 @@
+ }
+ }
+ }
++ oUser.UserTempViewIDs().SortByName(soAsc,stNatural);
+ firstSort = true;
+ }
+ system.SetSessionVar("sessionTAB1", system.GetVar("id") );
diff --git a/buildroot-external/patches/occu/0191-WebUI-Add-NaturalSortOrderInControlTabs/occu/WebUI/www/rega/pages/tabs/control/hdevichannels.htm b/buildroot-external/patches/occu/0191-WebUI-Add-NaturalSortOrderInControlTabs/occu/WebUI/www/rega/pages/tabs/control/hdevichannels.htm
new file mode 100755
index 0000000000..45d3693705
--- /dev/null
+++ b/buildroot-external/patches/occu/0191-WebUI-Add-NaturalSortOrderInControlTabs/occu/WebUI/www/rega/pages/tabs/control/hdevichannels.htm
@@ -0,0 +1,316 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%string sCssName="Sort"; if(system.GetSessionVar("sessionLS")=="name"){sCssName="SortSelected";} %>
+ ${thChannel} |
+ <%string sCssName="Sort"; if(system.GetSessionVar("sessionLS")=="room"){sCssName="SortSelected";} %>
+ ${thRoom} |
+ <%string sCssName="Sort"; if(system.GetSessionVar("sessionLS")=="func"){sCssName="SortSelected";} %>
+ ${thFunc} |
+ ${thLastChange} |
+ ${thControl} |
+
+ <%
+ Write("");
+ %>
+
+
+ ${thFilter}
+
+ |
+
+ ${thFilter}
+
+ |
+
+ ${thFilter}
+
+ |
+
+ |
+
+ |
+
+ <%
+
+ object oUser = dom.GetObject( system.GetSessionVar('sessionUserID'));
+ integer userID = oUser.ID();
+ object user = dom.GetObject(userID);
+ integer virtChnCounter = 0;
+
+ object device = dom.GetObject(system.GetVar("id"));
+ if (device) {
+ if (device.Visible()) {
+ string sEnumUserIDs = oUser.UserTempViewIDs().EnumIDs();
+ string sEnumUserInternalIDs = "";
+ if( system.IsSessionVar("sessionSIDC") ) {
+ if( system.GetSessionVar("sessionSIDC") == "1" ) {
+ sEnumUserInternalIDs = oUser.UserTempViewIDs().EnumEnabledInternalIDs();
+ }
+ }
+ if( sEnumUserInternalIDs != "" ) {
+ if( sEnumUserIDs != "" ) {
+ sEnumUserIDs = sEnumUserIDs # "\t" # sEnumUserInternalIDs;
+ } else {
+ sEnumUserIDs = sEnumUserInternalIDs;
+ }
+ }
+ string tmp;
+ foreach(tmp, sEnumUserIDs) {
+ object chn = dom.GetObject(tmp);
+ object oDev = dom.GetObject(chn.Device());
+ string oDevHssType = oDev.HssType();
+
+ integer chNumber = chn.ChnNumber();
+
+ ! Determine the name of the interface
+ integer iFaceID = chn.Interface();
+ object oIface = dom.GetObject(iFaceID);
+ string sInterface = oIface.Name();
+
+ boolean bShow = false;
+ if (chn.Visible() && (chn.UserAccessRights(iulOtherThanAdmin) == iarFullAccess)) {
+ bShow = true;
+ }
+
+ boolean bShowChannel = false;
+ if (user.UserEasyLinkMode() != true) {
+ ! User is expert
+ bShowChannel = true;
+ } else {
+ if (chn.HssType().Find("VIRTUAL_") == -1) {
+ ! not a virtual channel
+ bShowChannel = true;
+ } else {
+ if (chn.HssType().Find("VIRTUAL_KEY") != -1) {
+ ! virtual key of the ccu
+ bShowChannel = true;
+ }
+ }
+ }
+
+ if ((sInterface != "HmIP-RF") && (sInterface != "VirtualDevices")) {
+ Call("/esp/functions.fn::showHideRFChannel()");
+ } else {
+ Call("/esp/functions.fn::showHideHmIPChannel()");
+ }
+ if( bShow && oDev.ReadyConfig() && bShowChannel )
+ {
+ string trId = device.ID()#tmp;
+ boolean showExtDesc = false;
+ Write("");
+ if( oUser && oUser.UserLevel() == iulAdmin ) {
+ Write("");
+ } else {
+ Write(" | ");
+ }
+
+ Call("/pages/tabs/control/function.fn::ShowExtDesc()");
+
+ if (showExtDesc == false) {
+ Write(chn.Name()#"
${chType_"#chn.HssType()#"}");
+ }
+
+ Write(" | ");
+ Write("");
+ string rooms = "";
+ string roomTmp = "";
+ string roomIDs = "";
+ foreach(roomTmp, chn.ChnRoom()) {
+ object objTmp = dom.GetObject(roomTmp);
+ rooms = rooms # objTmp.Name() # " ";
+ roomIDs = roomIDs # objTmp.ID() # '\t';
+ }
+ Write(rooms);
+ Write(" | ");
+ Write("");
+ string functions = "";
+ string funcTmp = "";
+ string funcIDs = "";
+ foreach(funcTmp, chn.ChnFunction()) {
+ object objTmp = dom.GetObject(funcTmp);
+ functions = functions # objTmp.Name() # " ";
+ funcIDs = funcIDs # objTmp.ID() # '\t';
+ }
+ Write(functions);
+ Write(" | ");
+ Write("");
+
+ Write("");
+ Write("");
+
+ integer cId = chn.ID();
+ string sLastTime = "";
+ Call("/esp/system.fn::getLastTime()");
+ Write(sLastTime);
+
+ Write(" | ");
+ Write( '' );
+ string sDisplay = 'none';
+ if( chn.WorkingDPState() ) { sDisplay = "inline"; }
+ Write( '' );
+ sDisplay = 'none';
+ if( chn.ExistServiceMsg() ) { sDisplay = "inline"; }
+ Write( '' );
+ Write( ' | ' );
+
+ Write(" | ");
+ Write("");
+
+ integer cId = chn.ID();
+ string sCtrlId = "";
+ integer iStatusOnly = 0;
+ boolean bSliderFlag = true;
+ Call("/esp/datapointconfigurator.fn::dcCreate()");
+
+ Write(" | ");
+ Write("
");
+
+ Write("");
+ }
+ }
+ }
+ }
+
+ %>
+
+
+
diff --git a/buildroot-external/patches/occu/0191-WebUI-Add-NaturalSortOrderInControlTabs/occu/WebUI/www/rega/pages/tabs/control/hdevichannels.htm.orig b/buildroot-external/patches/occu/0191-WebUI-Add-NaturalSortOrderInControlTabs/occu/WebUI/www/rega/pages/tabs/control/hdevichannels.htm.orig
new file mode 100755
index 0000000000..104f63b314
--- /dev/null
+++ b/buildroot-external/patches/occu/0191-WebUI-Add-NaturalSortOrderInControlTabs/occu/WebUI/www/rega/pages/tabs/control/hdevichannels.htm.orig
@@ -0,0 +1,315 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%string sCssName="Sort"; if(system.GetSessionVar("sessionLS")=="name"){sCssName="SortSelected";} %>
+ ${thChannel} |
+ <%string sCssName="Sort"; if(system.GetSessionVar("sessionLS")=="room"){sCssName="SortSelected";} %>
+ ${thRoom} |
+ <%string sCssName="Sort"; if(system.GetSessionVar("sessionLS")=="func"){sCssName="SortSelected";} %>
+ ${thFunc} |
+ ${thLastChange} |
+ ${thControl} |
+
+ <%
+ Write("");
+ %>
+
+
+ ${thFilter}
+
+ |
+
+ ${thFilter}
+
+ |
+
+ ${thFilter}
+
+ |
+
+ |
+
+ |
+
+ <%
+
+ object oUser = dom.GetObject( system.GetSessionVar('sessionUserID'));
+ integer userID = oUser.ID();
+ object user = dom.GetObject(userID);
+ integer virtChnCounter = 0;
+
+ object device = dom.GetObject(system.GetVar("id"));
+ if (device) {
+ if (device.Visible()) {
+ string sEnumUserIDs = oUser.UserTempViewIDs().EnumIDs();
+ string sEnumUserInternalIDs = "";
+ if( system.IsSessionVar("sessionSIDC") ) {
+ if( system.GetSessionVar("sessionSIDC") == "1" ) {
+ sEnumUserInternalIDs = oUser.UserTempViewIDs().EnumEnabledInternalIDs();
+ }
+ }
+ if( sEnumUserInternalIDs != "" ) {
+ if( sEnumUserIDs != "" ) {
+ sEnumUserIDs = sEnumUserIDs # "\t" # sEnumUserInternalIDs;
+ } else {
+ sEnumUserIDs = sEnumUserInternalIDs;
+ }
+ }
+ string tmp;
+ foreach(tmp, sEnumUserIDs) {
+ object chn = dom.GetObject(tmp);
+ object oDev = dom.GetObject(chn.Device());
+ string oDevHssType = oDev.HssType();
+
+ integer chNumber = chn.ChnNumber();
+
+ ! Determine the name of the interface
+ integer iFaceID = chn.Interface();
+ object oIface = dom.GetObject(iFaceID);
+ string sInterface = oIface.Name();
+
+ boolean bShow = false;
+ if (chn.Visible() && (chn.UserAccessRights(iulOtherThanAdmin) == iarFullAccess)) {
+ bShow = true;
+ }
+
+ boolean bShowChannel = false;
+ if (user.UserEasyLinkMode() != true) {
+ ! User is expert
+ bShowChannel = true;
+ } else {
+ if (chn.HssType().Find("VIRTUAL_") == -1) {
+ ! not a virtual channel
+ bShowChannel = true;
+ } else {
+ if (chn.HssType().Find("VIRTUAL_KEY") != -1) {
+ ! virtual key of the ccu
+ bShowChannel = true;
+ }
+ }
+ }
+
+ if ((sInterface != "HmIP-RF") && (sInterface != "VirtualDevices")) {
+ Call("/esp/functions.fn::showHideRFChannel()");
+ } else {
+ Call("/esp/functions.fn::showHideHmIPChannel()");
+ }
+ if( bShow && oDev.ReadyConfig() && bShowChannel )
+ {
+ string trId = device.ID()#tmp;
+ boolean showExtDesc = false;
+ Write("");
+ if( oUser && oUser.UserLevel() == iulAdmin ) {
+ Write("");
+ } else {
+ Write(" | ");
+ }
+
+ Call("/pages/tabs/control/function.fn::ShowExtDesc()");
+
+ if (showExtDesc == false) {
+ Write(chn.Name()#"
${chType_"#chn.HssType()#"}");
+ }
+
+ Write(" | ");
+ Write("");
+ string rooms = "";
+ string roomTmp = "";
+ string roomIDs = "";
+ foreach(roomTmp, chn.ChnRoom()) {
+ object objTmp = dom.GetObject(roomTmp);
+ rooms = rooms # objTmp.Name() # " ";
+ roomIDs = roomIDs # objTmp.ID() # '\t';
+ }
+ Write(rooms);
+ Write(" | ");
+ Write("");
+ string functions = "";
+ string funcTmp = "";
+ string funcIDs = "";
+ foreach(funcTmp, chn.ChnFunction()) {
+ object objTmp = dom.GetObject(funcTmp);
+ functions = functions # objTmp.Name() # " ";
+ funcIDs = funcIDs # objTmp.ID() # '\t';
+ }
+ Write(functions);
+ Write(" | ");
+ Write("");
+
+ Write("");
+ Write("");
+
+ integer cId = chn.ID();
+ string sLastTime = "";
+ Call("/esp/system.fn::getLastTime()");
+ Write(sLastTime);
+
+ Write(" | ");
+ Write( '' );
+ string sDisplay = 'none';
+ if( chn.WorkingDPState() ) { sDisplay = "inline"; }
+ Write( '' );
+ sDisplay = 'none';
+ if( chn.ExistServiceMsg() ) { sDisplay = "inline"; }
+ Write( '' );
+ Write( ' | ' );
+
+ Write(" | ");
+ Write("");
+
+ integer cId = chn.ID();
+ string sCtrlId = "";
+ integer iStatusOnly = 0;
+ boolean bSliderFlag = true;
+ Call("/esp/datapointconfigurator.fn::dcCreate()");
+
+ Write(" | ");
+ Write("
");
+
+ Write("");
+ }
+ }
+ }
+ }
+
+ %>
+
+
+
diff --git a/buildroot-external/patches/occu/0191-WebUI-Add-NaturalSortOrderInControlTabs/occu/WebUI/www/rega/pages/tabs/control/hfuncchannels.htm b/buildroot-external/patches/occu/0191-WebUI-Add-NaturalSortOrderInControlTabs/occu/WebUI/www/rega/pages/tabs/control/hfuncchannels.htm
new file mode 100755
index 0000000000..69725cde11
--- /dev/null
+++ b/buildroot-external/patches/occu/0191-WebUI-Add-NaturalSortOrderInControlTabs/occu/WebUI/www/rega/pages/tabs/control/hfuncchannels.htm
@@ -0,0 +1,270 @@
+
+
+
+
+
+
+
+
+
+
+
+ <%string sCssName="Sort"; if(system.GetSessionVar("sessionLS")=="name"){sCssName="SortSelected";} %>
+ ${thName} |
+ <%string sCssName="Sort"; if(system.GetSessionVar("sessionLS")=="room"){sCssName="SortSelected";} %>
+ ${thRoom} |
+ ${thLastChange} |
+ ${thControl} |
+
+
+
+
+ ${thFilter}
+
+ |
+
+ ${thFilter}
+
+ |
+
+ |
+
+ |
+
+
+ <%
+
+ object oUser = dom.GetObject( system.GetSessionVar('sessionUserID'));
+ integer userID = oUser.ID();
+ object user = dom.GetObject(userID);
+
+
+ object func = dom.GetObject(system.GetVar("id"));
+ if (func) {
+ if (func.Visible()) {
+ string sEnumUserIDs = oUser.UserTempViewIDs().EnumIDs();
+ string sEnumUserInternalIDs = oUser.UserTempViewIDs().EnumEnabledInternalIDs();
+ if( sEnumUserInternalIDs != "" ) {
+ if( sEnumUserIDs != "" ) {
+ sEnumUserIDs = sEnumUserIDs # "\t" # sEnumUserInternalIDs;
+ } else {
+ sEnumUserIDs = sEnumUserInternalIDs;
+ }
+ }
+ string tmp;
+ foreach(tmp, sEnumUserIDs) {
+ string trId = func.ID()#tmp;
+ Write("");
+ object chn = dom.GetObject(tmp);
+ object oDev = dom.GetObject(chn.Device());
+
+ string oDevHssType = oDev.HssType();
+ integer chNumber = chn.ChnNumber();
+
+ ! Determine the name of the interface
+ integer iFaceID = chn.Interface();
+ object oIface = dom.GetObject(iFaceID);
+ string sInterface = oIface.Name();
+
+
+ boolean bShow = false;
+ if (chn.Visible() && (chn.UserAccessRights(iulOtherThanAdmin) == iarFullAccess)) {
+ bShow = true;
+ }
+
+ if( bShow && chn.ReadyConfig() && oDev.ReadyConfig())
+ {
+ boolean showExtDesc = false;
+ if( oUser && oUser.UserLevel() == iulAdmin ) {
+ Write("");
+ } else {
+ Write(" | ");
+ }
+
+ Call("/pages/tabs/control/function.fn::ShowExtDesc()");
+
+ if (showExtDesc == false) {
+ Write(chn.Name()#"
${chType_"#chn.HssType()#"}");
+ }
+
+ Write(" | ");
+ Write("");
+ string rooms = "";
+ string roomTmp = "";
+ string roomIDs = "";
+ foreach(roomTmp, chn.ChnRoom()) {
+ object objTmp = dom.GetObject(roomTmp);
+ rooms = rooms # objTmp.Name() # " ";
+ roomIDs = roomIDs # objTmp.ID() # '\t';
+ }
+ Write(rooms);
+ Write(" | ");
+ Write("");
+
+ Write("");
+ Write("
");
+
+ integer cId = chn.ID();
+ string sLastTime = "";
+ Call("/esp/system.fn::getLastTime()");
+ if (sLastTime == "") { Write(" "); }
+ else {Write(sLastTime);}
+
+ Write(" | ");
+ Write( '' );
+ string sDisplay = 'none';
+ if( chn.WorkingDPState() ) { sDisplay = "inline"; }
+ Write( '' );
+ sDisplay = 'none';
+ if( chn.ExistServiceMsg() ) { sDisplay = "inline"; }
+ Write( '' );
+ Write( ' | ' );
+
+ Write(" | ");
+ Write("");
+
+ integer cId = chn.ID();
+ string sCtrlId = "";
+ integer iStatusOnly = 0;
+ boolean bSliderFlag = true;
+ Call("/esp/datapointconfigurator.fn::dcCreate()");
+
+ Write(" | ");
+ Write("
");
+
+ Write("");
+ }
+ }
+ }
+ }
+
+ %>
+
+
+
+
+
\ No newline at end of file
diff --git a/buildroot-external/patches/occu/0191-WebUI-Add-NaturalSortOrderInControlTabs/occu/WebUI/www/rega/pages/tabs/control/hfuncchannels.htm.orig b/buildroot-external/patches/occu/0191-WebUI-Add-NaturalSortOrderInControlTabs/occu/WebUI/www/rega/pages/tabs/control/hfuncchannels.htm.orig
new file mode 100755
index 0000000000..bcb5df96c9
--- /dev/null
+++ b/buildroot-external/patches/occu/0191-WebUI-Add-NaturalSortOrderInControlTabs/occu/WebUI/www/rega/pages/tabs/control/hfuncchannels.htm.orig
@@ -0,0 +1,270 @@
+
+
+
+
+
+
+
+
+
+
+
+ <%string sCssName="Sort"; if(system.GetSessionVar("sessionLS")=="name"){sCssName="SortSelected";} %>
+ ${thName} |
+ <%string sCssName="Sort"; if(system.GetSessionVar("sessionLS")=="room"){sCssName="SortSelected";} %>
+ ${thRoom} |
+ ${thLastChange} |
+ ${thControl} |
+
+
+
+
+ ${thFilter}
+
+ |
+
+ ${thFilter}
+
+ |
+
+ |
+
+ |
+
+
+ <%
+
+ object oUser = dom.GetObject( system.GetSessionVar('sessionUserID'));
+ integer userID = oUser.ID();
+ object user = dom.GetObject(userID);
+
+
+ object func = dom.GetObject(system.GetVar("id"));
+ if (func) {
+ if (func.Visible()) {
+ string sEnumUserIDs = oUser.UserTempViewIDs().EnumIDs();
+ string sEnumUserInternalIDs = oUser.UserTempViewIDs().EnumEnabledInternalIDs();
+ if( sEnumUserInternalIDs != "" ) {
+ if( sEnumUserIDs != "" ) {
+ sEnumUserIDs = sEnumUserIDs # "\t" # sEnumUserInternalIDs;
+ } else {
+ sEnumUserIDs = sEnumUserInternalIDs;
+ }
+ }
+ string tmp;
+ foreach(tmp, sEnumUserIDs) {
+ string trId = func.ID()#tmp;
+ Write("");
+ object chn = dom.GetObject(tmp);
+ object oDev = dom.GetObject(chn.Device());
+
+ string oDevHssType = oDev.HssType();
+ integer chNumber = chn.ChnNumber();
+
+ ! Determine the name of the interface
+ integer iFaceID = chn.Interface();
+ object oIface = dom.GetObject(iFaceID);
+ string sInterface = oIface.Name();
+
+
+ boolean bShow = false;
+ if (chn.Visible() && (chn.UserAccessRights(iulOtherThanAdmin) == iarFullAccess)) {
+ bShow = true;
+ }
+
+ if( bShow && chn.ReadyConfig() && oDev.ReadyConfig())
+ {
+ boolean showExtDesc = false;
+ if( oUser && oUser.UserLevel() == iulAdmin ) {
+ Write("");
+ } else {
+ Write(" | ");
+ }
+
+ Call("/pages/tabs/control/function.fn::ShowExtDesc()");
+
+ if (showExtDesc == false) {
+ Write(chn.Name()#"
${chType_"#chn.HssType()#"}");
+ }
+
+ Write(" | ");
+ Write("");
+ string rooms = "";
+ string roomTmp = "";
+ string roomIDs = "";
+ foreach(roomTmp, chn.ChnRoom()) {
+ object objTmp = dom.GetObject(roomTmp);
+ rooms = rooms # objTmp.Name() # " ";
+ roomIDs = roomIDs # objTmp.ID() # '\t';
+ }
+ Write(rooms);
+ Write(" | ");
+ Write("");
+
+ Write("");
+ Write("
");
+
+ integer cId = chn.ID();
+ string sLastTime = "";
+ Call("/esp/system.fn::getLastTime()");
+ if (sLastTime == "") { Write(" "); }
+ else {Write(sLastTime);}
+
+ Write(" | ");
+ Write( '' );
+ string sDisplay = 'none';
+ if( chn.WorkingDPState() ) { sDisplay = "inline"; }
+ Write( '' );
+ sDisplay = 'none';
+ if( chn.ExistServiceMsg() ) { sDisplay = "inline"; }
+ Write( '' );
+ Write( ' | ' );
+
+ Write(" | ");
+ Write("");
+
+ integer cId = chn.ID();
+ string sCtrlId = "";
+ integer iStatusOnly = 0;
+ boolean bSliderFlag = true;
+ Call("/esp/datapointconfigurator.fn::dcCreate()");
+
+ Write(" | ");
+ Write("
");
+
+ Write("");
+ }
+ }
+ }
+ }
+
+ %>
+
+
+
+
+
\ No newline at end of file
diff --git a/buildroot-external/patches/occu/0191-WebUI-Add-NaturalSortOrderInControlTabs/occu/WebUI/www/rega/pages/tabs/control/hroomchannels.htm b/buildroot-external/patches/occu/0191-WebUI-Add-NaturalSortOrderInControlTabs/occu/WebUI/www/rega/pages/tabs/control/hroomchannels.htm
new file mode 100755
index 0000000000..5974cba187
--- /dev/null
+++ b/buildroot-external/patches/occu/0191-WebUI-Add-NaturalSortOrderInControlTabs/occu/WebUI/www/rega/pages/tabs/control/hroomchannels.htm
@@ -0,0 +1,271 @@
+
+
+
+
+
+
+
+
+
+
+ <%string sCssName="Sort"; if(system.GetSessionVar("sessionLS")=="name"){sCssName="SortSelected";} %>
+ ${thName} |
+ <%string sCssName="Sort"; if(system.GetSessionVar("sessionLS")=="func"){sCssName="SortSelected";} %>
+ ${thFunc} |
+ ${thLastChange} |
+ ${thControl} |
+
+
+
+
+ Filter
+
+ |
+
+ ${thFilter}
+
+ |
+
+ |
+
+ |
+
+
+
+ <%
+
+ object oUser = dom.GetObject( system.GetSessionVar('sessionUserID'));
+ integer userID = oUser.ID();
+ object user = dom.GetObject(userID);
+
+ object room = dom.GetObject(system.GetVar("id"));
+ if (room)
+ {
+ if (room.Visible())
+ {
+ string sEnumUserIDs = oUser.UserTempViewIDs().EnumIDs();
+ string sEnumUserInternalIDs = oUser.UserTempViewIDs().EnumEnabledInternalIDs();
+ if( sEnumUserInternalIDs != "" ) {
+ if( sEnumUserIDs != "" ) {
+ sEnumUserIDs = sEnumUserIDs # "\t" # sEnumUserInternalIDs;
+ } else {
+ sEnumUserIDs = sEnumUserInternalIDs;
+ }
+ }
+ string tmp;
+ foreach(tmp, sEnumUserIDs)
+ {
+ object chn = dom.GetObject(tmp);
+ object oDev = dom.GetObject(chn.Device());
+
+ string oDevHssType = oDev.HssType();
+ integer chNumber = chn.ChnNumber();
+
+ ! Determine the name of the interface
+ integer iFaceID = chn.Interface();
+ object oIface = dom.GetObject(iFaceID);
+ string sInterface = oIface.Name();
+
+ boolean bShow = false;
+ if (chn.Visible() && (chn.UserAccessRights(iulOtherThanAdmin) == iarFullAccess)) {
+ bShow = true;
+ }
+
+ if( bShow && chn.ReadyConfig() && oDev.ReadyConfig())
+ {
+ string trId = room.ID()#tmp;
+ boolean showExtDesc = false;
+ Write("");
+ if( oUser && oUser.UserLevel() == iulAdmin ) {
+ Write("");
+ } else {
+ Write(" | ");
+ }
+
+ Call("/pages/tabs/control/function.fn::ShowExtDesc()");
+
+ if (showExtDesc == false) {
+ Write(chn.Name()#"
${chType_"#chn.HssType()#"}");
+ }
+
+
+ Write(" | ");
+ Write("");
+ string functions = "";
+ string funcTmp = "";
+ string funcIDs = "";
+ foreach(funcTmp, chn.ChnFunction()) {
+ object objTmp = dom.GetObject(funcTmp);
+ functions = functions # objTmp.Name() # " ";
+ funcIDs = funcIDs # objTmp.ID() #'\t';
+ }
+ Write(functions);
+ Write(" | ");
+ Write("");
+
+ Write("");
+ Write("
");
+
+ integer cId = chn.ID();
+ string sLastTime = "";
+ integer iStatusOnly = 0;
+ Call("/esp/system.fn::getLastTime()");
+ Write(sLastTime);
+
+ Write("
| ");
+ Write( '' );
+ string sDisplay = 'none';
+ if( chn.WorkingDPState() ) { sDisplay = "inline"; }
+ Write( '' );
+ sDisplay = 'none';
+ if( chn.ExistServiceMsg() ) { sDisplay = "inline"; }
+ Write( '' );
+ Write( ' | ' );
+
+ Write(" | ");
+ Write("");
+
+ integer cId = chn.ID();
+ string sCtrlId = "";
+ boolean bSliderFlag = true;
+ Call("/esp/datapointconfigurator.fn::dcCreate()");
+
+ Write(" | ");
+ Write("
");
+
+ Write("");
+ }
+ }
+ }
+ }
+ %>
+
+
+
+
diff --git a/buildroot-external/patches/occu/0191-WebUI-Add-NaturalSortOrderInControlTabs/occu/WebUI/www/rega/pages/tabs/control/hroomchannels.htm.orig b/buildroot-external/patches/occu/0191-WebUI-Add-NaturalSortOrderInControlTabs/occu/WebUI/www/rega/pages/tabs/control/hroomchannels.htm.orig
new file mode 100755
index 0000000000..a7fab963a9
--- /dev/null
+++ b/buildroot-external/patches/occu/0191-WebUI-Add-NaturalSortOrderInControlTabs/occu/WebUI/www/rega/pages/tabs/control/hroomchannels.htm.orig
@@ -0,0 +1,270 @@
+
+
+
+
+
+
+
+
+
+
+ <%string sCssName="Sort"; if(system.GetSessionVar("sessionLS")=="name"){sCssName="SortSelected";} %>
+ ${thName} |
+ <%string sCssName="Sort"; if(system.GetSessionVar("sessionLS")=="func"){sCssName="SortSelected";} %>
+ ${thFunc} |
+ ${thLastChange} |
+ ${thControl} |
+
+
+
+
+ Filter
+
+ |
+
+ ${thFilter}
+
+ |
+
+ |
+
+ |
+
+
+
+ <%
+
+ object oUser = dom.GetObject( system.GetSessionVar('sessionUserID'));
+ integer userID = oUser.ID();
+ object user = dom.GetObject(userID);
+
+ object room = dom.GetObject(system.GetVar("id"));
+ if (room)
+ {
+ if (room.Visible())
+ {
+ string sEnumUserIDs = oUser.UserTempViewIDs().EnumIDs();
+ string sEnumUserInternalIDs = oUser.UserTempViewIDs().EnumEnabledInternalIDs();
+ if( sEnumUserInternalIDs != "" ) {
+ if( sEnumUserIDs != "" ) {
+ sEnumUserIDs = sEnumUserIDs # "\t" # sEnumUserInternalIDs;
+ } else {
+ sEnumUserIDs = sEnumUserInternalIDs;
+ }
+ }
+ string tmp;
+ foreach(tmp, sEnumUserIDs)
+ {
+ object chn = dom.GetObject(tmp);
+ object oDev = dom.GetObject(chn.Device());
+
+ string oDevHssType = oDev.HssType();
+ integer chNumber = chn.ChnNumber();
+
+ ! Determine the name of the interface
+ integer iFaceID = chn.Interface();
+ object oIface = dom.GetObject(iFaceID);
+ string sInterface = oIface.Name();
+
+ boolean bShow = false;
+ if (chn.Visible() && (chn.UserAccessRights(iulOtherThanAdmin) == iarFullAccess)) {
+ bShow = true;
+ }
+
+ if( bShow && chn.ReadyConfig() && oDev.ReadyConfig())
+ {
+ string trId = room.ID()#tmp;
+ boolean showExtDesc = false;
+ Write("");
+ if( oUser && oUser.UserLevel() == iulAdmin ) {
+ Write("");
+ } else {
+ Write(" | ");
+ }
+
+ Call("/pages/tabs/control/function.fn::ShowExtDesc()");
+
+ if (showExtDesc == false) {
+ Write(chn.Name()#"
${chType_"#chn.HssType()#"}");
+ }
+
+
+ Write(" | ");
+ Write("");
+ string functions = "";
+ string funcTmp = "";
+ string funcIDs = "";
+ foreach(funcTmp, chn.ChnFunction()) {
+ object objTmp = dom.GetObject(funcTmp);
+ functions = functions # objTmp.Name() # " ";
+ funcIDs = funcIDs # objTmp.ID() #'\t';
+ }
+ Write(functions);
+ Write(" | ");
+ Write("");
+
+ Write("");
+ Write("
");
+
+ integer cId = chn.ID();
+ string sLastTime = "";
+ integer iStatusOnly = 0;
+ Call("/esp/system.fn::getLastTime()");
+ Write(sLastTime);
+
+ Write("
| ");
+ Write( '' );
+ string sDisplay = 'none';
+ if( chn.WorkingDPState() ) { sDisplay = "inline"; }
+ Write( '' );
+ sDisplay = 'none';
+ if( chn.ExistServiceMsg() ) { sDisplay = "inline"; }
+ Write( '' );
+ Write( ' | ' );
+
+ Write(" | ");
+ Write("");
+
+ integer cId = chn.ID();
+ string sCtrlId = "";
+ boolean bSliderFlag = true;
+ Call("/esp/datapointconfigurator.fn::dcCreate()");
+
+ Write(" | ");
+ Write("
");
+
+ Write("");
+ }
+ }
+ }
+ }
+ %>
+
+
+
+