1
function AthAdmin() {
2
3
};
4
5
AthAdmin.canCreateElements = function () {
6
var retval = false;
7
$.ajax({ type: "GET", url: AthPaths.getRootUrl() + "athCms/ajax/AthCms.asmx/CanCreateElements", async: false, dataType: "json", contentType: "application/json; charset=utf-8", data: '{}',
8
success: function (data) {
9
if (data.d == true) {
10
retval = true;
11
}
12
}
13
});
14
if (retval == true) {
15
$.ajax({ url: AthPaths.getRootUrl() + "athCms/js/selectCmsType.js", async: false, dataType: "script", cache: true });
16
};
17
return retval;
18
};
19
20
AthAdmin.isAdmin = function () {
21
var retval = false;
22
$.ajax({ type: "GET", url: AthPaths.getRootUrl() + 'athCms/ajax/AthCms.asmx/IsAdmin', async: false, dataType: "json", cache: false, contentType: "application/json; charset=utf-8;", data: '{}',
23
success: function (data) {
24
if (data !== null && data.d != null && data.d == true) {
25
retval = true;
26
}
27
}
28
});
29
return retval;
30
};
31
32
AthAdmin.heartbeat = function () {
33
$.ajax({ type: "GET", url: AthPaths.getRootUrl() + 'athCms/ajax/AthCms.asmx/IsAdmin', async: false, dataType: "json", cache: false, contentType: "application/json; charset=utf-8;", data: '{}',
34
success: function () {
35
}
36
});
37
};
38
39
AthAdmin.startHeartbeat = function () {
40
AthAdmin.hb = setInterval(AthAdmin.heartbeat, 30000);
...
</html>