95611b57c8343528402afbc17237e2ef50dc4e29.svn-base 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. shr.defineClass("shr.ats.HolidayLimitListExt", shr.ats.HolidayLimitList, {
  2. initalizeDOM: function () {
  3. shr.ats.HolidayLimitListExt.superClass.initalizeDOM.call(this);
  4. },
  5. annualLeaveAction:function(){
  6. var _self = this;
  7. shr.showConfirm('Are you sure you want to re-create the annual leave carryforward amount ?', function() {
  8. _self.remoteCall({
  9. method : 'annualLeave',
  10. type:"post",
  11. success:function(res){
  12. if(res==true){
  13. shr.showInfo({
  14. message: "The annual leave allowance has been regenerated!",
  15. });
  16. document.location.reload();
  17. }else{
  18. shr.showWarning({
  19. message: "The annual leave quota fails to be generated. Contact the administrator!",
  20. });
  21. }
  22. }
  23. });
  24. });
  25. },
  26. generateAnnualLeaveAction: function () {
  27. var _self = this;
  28. _self.remoteCall({
  29. method: "generateAnnualLeave",
  30. async: false,
  31. param: {},
  32. success: function (data) {
  33. _self.reloadGrid();
  34. },
  35. error: function (err) {
  36. shr.showError({message: err});
  37. },
  38. });
  39. }
  40. });