Skip to content

Commit

Permalink
add additional getElement check.
Browse files Browse the repository at this point in the history
  • Loading branch information
jens-maus committed Jan 12, 2025
1 parent d49aa4d commit 2aeb772
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
}
}
}
@@ -175,8 +178,30 @@
@@ -175,8 +178,29 @@
{
system.SetSessionVar("sessionTAB1",sFirstId);
}
Expand All @@ -49,22 +49,21 @@
%>
- loadChannels( <% Write( system.GetSessionVar("sessionTAB1") ); %> );
+ // to avoid a double channelload, perform only initial load if no room-filter is set
+ var filterItem = localStorage.getItem('iseSFilters_fltDL');
+ if(!filterItem || JSON.parse(filterItem).ftDevName == "") {
+ if(document.getElementById("ftDevName") && document.getElementById("ftDevName").value == "") {
+ loadChannels( <% Write( system.GetSessionVar("sessionTAB1") ); %> );
+ }

filterOptions = new iseFilter();
</script>
@@ -260,6 +285,7 @@
@@ -260,6 +284,7 @@

updateDevTable = function()
{
+ var sFirstId = "";
colorFilterBtns(fltDL);
for (var i = 0; i < arItems.length; i++)
{
@@ -270,8 +296,13 @@
@@ -270,8 +295,13 @@
else
{
show(arItems[i]['trid']);
Expand Down Expand Up @@ -124,11 +123,11 @@
+ {
+ system.SetSessionVar("sessionTAB1", sLoadId);
+ }
+ }
%>
- loadChannels( <% Write( system.GetSessionVar("sessionTAB1") ); %> );
+ // to avoid a double channelload, perform only initial load if no room-filter is set
+ var filterItem = localStorage.getItem('iseSFilters_fltFN');
+ if(!filterItem || JSON.parse(filterItem).ftFunc == "") {
+ if(document.getElementById("ftFunc") && document.getElementById("ftFunc").value == "") {
+ loadChannels( <% Write( system.GetSessionVar("sessionTAB1") ); %> );
+ }

Expand Down Expand Up @@ -166,7 +165,7 @@
Write("tmp['name'] = '"#room.Name()#"';");
Write("tmp['trid'] = '"#trId#"';");
Write("arItems[arItems.length] = tmp;");
@@ -131,29 +132,35 @@
@@ -131,29 +132,34 @@
}

// Beim laden der Seite ersten Raum anzeigen
Expand Down Expand Up @@ -203,22 +202,21 @@
%>
- loadChannels( <% Write( system.GetSessionVar("sessionTAB1") ); %> );
+ // to avoid a double channelload, perform only initial load if no room-filter is set
+ var filterItem = localStorage.getItem('iseSFilters_fltRM');
+ if(!filterItem || JSON.parse(filterItem).ftRoom == "") {
+ if(document.getElementById("ftRoom") && document.getElementById("ftRoom").value == "") {
+ loadChannels( <% Write( system.GetSessionVar("sessionTAB1") ); %> );
+ }

filterOptions = new iseFilter();
translatePage("#tblRoomNames");
@@ -202,6 +209,7 @@
@@ -202,6 +208,7 @@

updateRoomTable = function()
{
+ var sFirstId = "";
colorFilterBtns(fltRM);
for (var i = 0; i < arItems.length; i++)
{
@@ -212,8 +220,13 @@
@@ -212,8 +219,13 @@
else
{
show(arItems[i]['trid']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
}
%>
// to avoid a double channelload, perform only initial load if no room-filter is set
if(document.getElementById("ftDevName").value == "") {
if(document.getElementById("ftDevName") && document.getElementById("ftDevName").value == "") {
loadChannels( <% Write( system.GetSessionVar("sessionTAB1") ); %> );
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
}
%>
// to avoid a double channelload, perform only initial load if no room-filter is set
if(document.getElementById("ftFunc").value == "") {
if(document.getElementById("ftFunc") && document.getElementById("ftFunc").value == "") {
loadChannels( <% Write( system.GetSessionVar("sessionTAB1") ); %> );
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
}
%>
// to avoid a double channelload, perform only initial load if no room-filter is set
if(document.getElementById("ftRoom").value == "") {
if(document.getElementById("ftRoom") && document.getElementById("ftRoom").value == "") {
loadChannels( <% Write( system.GetSessionVar("sessionTAB1") ); %> );
}

Expand Down

0 comments on commit 2aeb772

Please sign in to comment.