Skip to content

Commit

Permalink
Add Toggle all user attributes to export users
Browse files Browse the repository at this point in the history
  • Loading branch information
pro4tlzz authored Jun 13, 2023
1 parent ae1315b commit 0f04664
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions rockstar/rockstar.js
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@

function addCheckbox(value, text) {
const checked = exportColumns.includes(value) ? "checked" : "";
checkboxDiv.html(checkboxDiv.html() + `<label><input type=checkbox value='${e(value)}' ${checked}>${e(text)}</label><br>`);
checkboxDiv.html(checkboxDiv.html() + `<label><input type=checkbox value='${e(value)}' class='userProfileAttributeCheckboxes' ${checked}>${e(text)}</label><br>`);
}
const user = {
id: "User Id",
Expand Down Expand Up @@ -643,7 +643,10 @@
for (const p in profile) addCheckbox("profile." + p, profile[p]);
errorBox.html('Unable to fetch custom attributes. Use an account with more privileges.<br>Only base attributes shown below.');
});

exportPopup.append('<label><input type=checkbox value="selectAll" id="selectAll"</label>Toggle All');
$("#selectAll").click(function () {
$("input.userProfileAttributeCheckboxes").not(this).prop('checked', this.checked);
});
if (filter) {
var exportArgs = localStorage.rockstarExportUserArgs || "";
exportPopup.append(
Expand Down

0 comments on commit 0f04664

Please sign in to comment.