summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/PrefHelpers.js42
-rw-r--r--js/PrefUsers.js2
2 files changed, 30 insertions, 14 deletions
diff --git a/js/PrefHelpers.js b/js/PrefHelpers.js
index 0780fb708..57dff2333 100644
--- a/js/PrefHelpers.js
+++ b/js/PrefHelpers.js
@@ -50,21 +50,37 @@ const Helpers = {
return false;
},
- updateEventLog: function() {
- xhrPost("backend.php", { op: "pref-system", severity: dijit.byId("severity").attr('value') }, (transport) => {
- dijit.byId('systemConfigTab').attr('content', transport.responseText);
- Notify.close();
- });
- },
- clearEventLog: function() {
- if (confirm(__("Clear event log?"))) {
+ EventLog: {
+ log_page: 0,
+ refresh: function() {
+ this.log_page = 0;
+ this.update();
+ },
+ update: function() {
+ xhrPost("backend.php", { op: "pref-system", severity: dijit.byId("severity").attr('value'), page: Helpers.EventLog.log_page }, (transport) => {
+ dijit.byId('systemConfigTab').attr('content', transport.responseText);
+ Notify.close();
+ });
+ },
+ nextPage: function() {
+ this.log_page += 1;
+ this.update();
+ },
+ prevPage: function() {
+ if (this.log_page > 0) this.log_page -= 1;
- Notify.progress("Loading, please wait...");
+ this.update();
+ },
+ clear: function() {
+ if (confirm(__("Clear event log?"))) {
- xhrPost("backend.php", {op: "pref-system", method: "clearLog"}, () => {
- this.updateEventLog();
- });
- }
+ Notify.progress("Loading, please wait...");
+
+ xhrPost("backend.php", {op: "pref-system", method: "clearLog"}, () => {
+ Helpers.EventLog.refresh();
+ });
+ }
+ },
},
editProfiles: function() {
diff --git a/js/PrefUsers.js b/js/PrefUsers.js
index 8136e9c65..f09c73805 100644
--- a/js/PrefUsers.js
+++ b/js/PrefUsers.js
@@ -114,7 +114,7 @@ const Users = {
this.edit(rows[0]);
},
getSelection :function() {
- return Tables.getSelected("prefUserList");
+ return Tables.getSelected("users-list");
}
}