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

Revert "Remove duplicated code as it is already part of utils.stateLoadCallback" #1975

Merged
merged 1 commit into from
Nov 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions scripts/pi-hole/js/groups-adlists.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,11 @@ function initTable() {
stateLoadCallback: function () {
var data = utils.stateLoadCallback("groups-adlists-table");

// Return if not available
if (data === null) {
return null;
}

// Reset visibility of ID column
data.columns[0].visible = false;
// Apply loaded state to table
Expand Down
5 changes: 5 additions & 0 deletions scripts/pi-hole/js/groups-clients.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,11 @@ function initTable() {
stateLoadCallback: function () {
var data = utils.stateLoadCallback("groups-clients-table");

// Return if not available
if (data === null) {
return null;
}

// Reset visibility of ID column
data.columns[0].visible = false;
// Apply loaded state to table
Expand Down
5 changes: 5 additions & 0 deletions scripts/pi-hole/js/groups-domains.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,11 @@ function initTable() {
stateLoadCallback: function () {
var data = utils.stateLoadCallback("groups-domains-table");

// Return if not available
if (data === null) {
return null;
}

// Reset visibility of ID column
data.columns[0].visible = false;
// Show group assignment column only on full page
Expand Down
5 changes: 5 additions & 0 deletions scripts/pi-hole/js/groups.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ $(function () {
stateLoadCallback: function () {
var data = utils.stateLoadCallback("groups-table");

// Return if not available
if (data === null) {
return null;
}

// Reset visibility of ID column
data.columns[0].visible = false;
// Apply loaded state to table
Expand Down
4 changes: 4 additions & 0 deletions scripts/pi-hole/js/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ $(function () {
},
stateLoadCallback: function () {
var data = utils.stateLoadCallback("messages-table");
// Return if not available
if (data === null) {
return null;
}

// Reset visibility of ID and blob columns
var hiddenCols = [0, 4, 5, 6, 7, 8];
Expand Down