mirror of
https://gitlab.com/commento/commento.git
synced 2025-06-29 22:56:37 -04:00
frontend: check in html, css, js
This commit is contained in:
41
frontend/js/dashboard-danger.js
Normal file
41
frontend/js/dashboard-danger.js
Normal file
@ -0,0 +1,41 @@
|
||||
(function (global, document) {
|
||||
|
||||
// Opens the danger zone.
|
||||
global.dangerOpen = function() {
|
||||
$(".view").hide();
|
||||
$("#danger-view").show();
|
||||
};
|
||||
|
||||
|
||||
// Deletes a domain.
|
||||
global.domainDeleteHandler = function() {
|
||||
var data = global.dashboard.$data;
|
||||
|
||||
domainDelete(data.domains[data.cd].domain, function(success) {
|
||||
if (success)
|
||||
document.location = '/dashboard';
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// Freezes a domain.
|
||||
global.domainFreezeHandler = function() {
|
||||
var data = global.dashboard.$data;
|
||||
|
||||
data.domains[data.cd].state = "frozen"
|
||||
domainUpdate(data.domains[data.cd])
|
||||
document.location.hash = "#modal-close";
|
||||
}
|
||||
|
||||
|
||||
// Unfreezes a domain.
|
||||
global.domainUnfreezeHandler = function() {
|
||||
var data = global.dashboard.$data;
|
||||
|
||||
data.domains[data.cd].state = "unfrozen"
|
||||
domainUpdate(data.domains[data.cd])
|
||||
document.location.hash = "#modal-close";
|
||||
}
|
||||
|
||||
|
||||
} (window, document));
|
Reference in New Issue
Block a user