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:
26
frontend/js/dashboard-export.js
Normal file
26
frontend/js/dashboard-export.js
Normal 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));
|
Reference in New Issue
Block a user