clock.js 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. clock_parameter = {};
  2. function clock_listTimer() {
  3. $('#content').html('');
  4. $('#result').html('');
  5. $.ajax({
  6. type : 'get',
  7. dataType : 'json',
  8. contentType : 'application/json; charset=utf-8',
  9. url : '../jaxrs/clock/list/timer',
  10. xhrFields : {
  11. 'withCredentials' : true
  12. },
  13. crossDomain : true
  14. }).done(function(json) {
  15. $('#result').html(JSON.stringify(json, null, 4));
  16. });
  17. }
  18. function clock_listTimerLog_init() {
  19. $('#context').html('');
  20. $('#result').html('');
  21. var str = '<table border="1" width="100%">';
  22. str += '<thead><tr><td colspan="2"><a href="#" id="get">get</a></td></tr></thead>';
  23. str += '<tbody>';
  24. str += '<tr><td>application</td><td><input type="text" id="application" style="width:95%"/></td></tr>';
  25. str += '</tbody>';
  26. str += '</table>';
  27. $('#content').html(str);
  28. $('#get').click(function() {
  29. clock_listTimerLog($('#application').val());
  30. });
  31. }
  32. function clock_listTimerLog(application) {
  33. $('#content').html('');
  34. $('#result').html('');
  35. $.ajax({
  36. type : 'get',
  37. dataType : 'json',
  38. contentType : 'application/json; charset=utf-8',
  39. url : '../jaxrs/clock/list/timerlog/application/' + application,
  40. xhrFields : {
  41. 'withCredentials' : true
  42. },
  43. crossDomain : true
  44. }).done(function(json) {
  45. $('#result').html(JSON.stringify(json, null, 4));
  46. });
  47. }
  48. function clock_listSchedule() {
  49. $('#content').html('');
  50. $('#result').html('');
  51. $.ajax({
  52. type : 'get',
  53. dataType : 'json',
  54. contentType : 'application/json; charset=utf-8',
  55. url : '../jaxrs/clock/list/schedule',
  56. xhrFields : {
  57. 'withCredentials' : true
  58. },
  59. crossDomain : true
  60. }).done(function(json) {
  61. $('#result').html(JSON.stringify(json, null, 4));
  62. });
  63. }
  64. function clock_listScheduleLog_init() {
  65. $('#context').html('');
  66. $('#result').html('');
  67. var str = '<table border="1" width="100%">';
  68. str += '<thead><tr><td colspan="2"><a href="#" id="get">get</a></td></tr></thead>';
  69. str += '<tbody>';
  70. str += '<tr><td>application</td><td><input type="text" id="application" style="width:95%"/></td></tr>';
  71. str += '</tbody>';
  72. str += '</table>';
  73. $('#content').html(str);
  74. $('#get').click(function() {
  75. clock_listScheduleLog($('#application').val());
  76. });
  77. }
  78. function clock_listScheduleLog(application) {
  79. $('#content').html('');
  80. $('#result').html('');
  81. $.ajax({
  82. type : 'get',
  83. dataType : 'json',
  84. contentType : 'application/json; charset=utf-8',
  85. url : '../jaxrs/clock/list/schedulelog/application/' + application,
  86. xhrFields : {
  87. 'withCredentials' : true
  88. },
  89. crossDomain : true
  90. }).done(function(json) {
  91. $('#result').html(JSON.stringify(json, null, 4));
  92. });
  93. }