Skip to Content

JavaScript File

URL: https://www.hereward.ac.uk/athCms/js/athAdmin.js
HTTP Status: 200 OK
MIME Type: text/javascript
Last Modified: Mon, 01 Jan 1601 00:00:00 GMT
Download Time: Less than a second
Cookies: None
Size: 2 KB
HTTP Headers:  5 headers
Links In:  1 pages
Links Out:  0 links
Images:  0 images
CSS:  0 files
JavaScript:  0 files
OK Issues: No issues found

1function AthAdmin() {

2

3};

4

5AthAdmin.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

20AthAdmin.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

32AthAdmin.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

39AthAdmin.startHeartbeat = function () {

40 AthAdmin.hb = setInterval(AthAdmin.heartbeat, 30000);

...

</html>