1
mirror of https://gitlab.com/commento/commento.git synced 2025-06-29 22:56:37 -04:00

everywhere: add option to export data

This commit is contained in:
Adhityaa Chandrasekar
2019-01-31 02:06:11 -05:00
parent f1ece27c99
commit fff5e5c0e1
16 changed files with 361 additions and 30 deletions

View File

@ -0,0 +1,26 @@
(function (global, document) {
"use strict";
(document);
global.domainExportBegin = function() {
var data = global.dashboard.$data;
var json = {
"ownerToken": global.cookieGet("commentoOwnerToken"),
"domain": data.domains[data.cd].domain,
}
global.buttonDisable("#domain-export-button");
global.post(global.origin + "/api/domain/export/begin", json, function(resp) {
global.buttonEnable("#domain-export-button");
if (!resp.success) {
global.globalErrorShow(resp.message);
return;
}
global.globalOKShow("Data export operation has been successfully queued. You will receive an email.");
});
};
} (window.commento, document));

View File

@ -30,8 +30,8 @@
},
{
"id": "general",
"text": "General Settings",
"meaning": "Names, emails, and general settings",
"text": "General",
"meaning": "Email settings, data export",
"selected": false,
"open": global.generalOpen,
},