frontend: use camelCase instead of snake_case

This commit is contained in:
Adhityaa 2018-06-16 18:55:27 +05:30
parent 91c2d047d5
commit ef21599109
12 changed files with 18 additions and 18 deletions

View File

@ -49,8 +49,8 @@ func initStaticRouter(router *mux.Router) error {
prefix := ""
if dir == "/js" {
prefix = "window.commento_origin='" + os.Getenv("ORIGIN") + "';\n"
prefix += "window.commento_cdn='" + os.Getenv("CDN_PREFIX") + "';\n"
prefix = "window.commentoOrigin='" + os.Getenv("ORIGIN") + "';\n"
prefix += "window.commentoCdn='" + os.Getenv("CDN_PREFIX") + "';\n"
}
gzip := (os.Getenv("GZIP_STATIC") == "true")

View File

@ -50,8 +50,8 @@
var ID_FOOTER = "commento-footer";
var origin = global.commento_origin;
var cdn = global.commento_cdn;
var origin = global.commentoOrigin;
var cdn = global.commentoCdn;
var root = null;
var cssOverride = undefined;
var isAuthenticated = false;

View File

@ -42,7 +42,7 @@
}
global.buttonDisable("#add-site-button");
global.post(global.commento_origin + "/api/domain/new", json, function(resp) {
global.post(global.commentoOrigin + "/api/domain/new", json, function(resp) {
global.buttonEnable("#add-site-button");
$("#new-domain-name").val("");
@ -69,7 +69,7 @@
session: global.cookieGet("session"),
};
global.post(global.commento_origin + "/api/domain/list", json, function(resp) {
global.post(global.commentoOrigin + "/api/domain/list", json, function(resp) {
if (!resp.success) {
global.globalErrorShow(resp.message);
return;
@ -111,7 +111,7 @@
domain: domain,
};
global.post(global.commento_origin + "/api/domain/update", json, function(resp) {
global.post(global.commentoOrigin + "/api/domain/update", json, function(resp) {
if (callback !== undefined)
callback(resp.success);
@ -130,7 +130,7 @@
domain: domain,
};
global.post(global.commento_origin + "/api/domain/delete", json, function(resp) {
global.post(global.commentoOrigin + "/api/domain/delete", json, function(resp) {
if (!resp.success) {
global.globalErrorShow(resp.message);
return;

View File

@ -18,7 +18,7 @@
}
global.buttonDisable("#disqus-import-button");
global.post(global.commento_origin + "/api/domain/import/disqus", json, function(resp) {
global.post(global.commentoOrigin + "/api/domain/import/disqus", json, function(resp) {
global.buttonEnable("#disqus-import-button");
if (!resp.success) {

View File

@ -6,7 +6,7 @@
var html = '' +
'<div id="commento"></div>\n' +
'<script src="' + window.commento_cdn + '/js/commento.js"><\/script>\n' +
'<script src="' + window.commentoCdn + '/js/commento.js"><\/script>\n' +
'';
$("#code-div").text(html);

View File

@ -29,7 +29,7 @@
if (idx == -1) {
data.domains[data.cd].moderators.push({"email": email, "timeAgo": "just now"});
global.buttonDisable("#new-mod-button");
global.post(global.commento_origin + "/api/domain/moderator/new", json, function(resp) {
global.post(global.commentoOrigin + "/api/domain/moderator/new", json, function(resp) {
global.buttonEnable("#new-mod-button");
if (!resp.success) {
@ -68,7 +68,7 @@
if (idx != -1) {
data.domains[data.cd].moderators.splice(idx, 1);
global.post(global.commento_origin + "/api/domain/moderator/delete", json, function(resp) {
global.post(global.commentoOrigin + "/api/domain/moderator/delete", json, function(resp) {
if (!resp.success) {
global.globalErrorShow(resp.message);
return

View File

@ -43,7 +43,7 @@
}
$(".view").hide();
post(global.commento_origin + "/api/domain/statistics", json, function(resp) {
post(global.commentoOrigin + "/api/domain/statistics", json, function(resp) {
$("#statistics-view").show();
if (!resp.success) {

View File

@ -16,7 +16,7 @@
};
global.buttonDisable("#reset-button");
global.post(global.commento_origin + "/api/owner/send-reset-hex", json, function(resp) {
global.post(global.commentoOrigin + "/api/owner/send-reset-hex", json, function(resp) {
global.buttonEnable("#reset-button");
global.textSet("#err", "");

View File

@ -57,7 +57,7 @@
};
global.buttonDisable("#login-button");
global.post(global.commento_origin + "/api/owner/login", json, function(resp) {
global.post(global.commentoOrigin + "/api/owner/login", json, function(resp) {
global.buttonEnable("#login-button");
if (!resp.success) {

View File

@ -21,7 +21,7 @@
};
global.buttonDisable("#reset-button");
global.post(global.commento_origin + "/api/owner/reset-password", json, function(resp) {
global.post(global.commentoOrigin + "/api/owner/reset-password", json, function(resp) {
global.buttonEnable("#reset-button");
global.textSet("#err", "");

View File

@ -6,7 +6,7 @@
"session": global.cookieGet("session"),
};
global.post(global.commento_origin + "/api/owner/self", json, function(resp) {
global.post(global.commentoOrigin + "/api/owner/self", json, function(resp) {
if (!resp.success || !resp.loggedIn) {
document.location = "/login";
return;

View File

@ -25,7 +25,7 @@
};
global.buttonDisable("#signup-button");
post(global.commento_origin + "/api/owner/new", json, function(resp) {
post(global.commentoOrigin + "/api/owner/new", json, function(resp) {
global.buttonEnable("#signup-button")
if (!resp.success) {