You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

site.js 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. // Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
  2. // for details on configuring this project to bundle and minify static web assets.
  3. // Write your JavaScript code.
  4. // unblock when ajax activity stops
  5. $.blockUI.defaults.message = '<span class="loaderSpan">Please wait...</span>'//'<img class="loaderImg" src="loaderV3.gif" runat="server" />';
  6. $.blockUI.defaults.overlayCSS.backgroundColor = "#000";
  7. $.blockUI.defaults.overlayCSS.opacity = 0.5;
  8. $(document).ajaxStop($.unblockUI);
  9. alertify.set('notifier', 'position', 'top-right');
  10. //Custom Alerts
  11. function AlertSuccess(shouldReload) {
  12. $.confirm({
  13. title: 'Alert',
  14. content: 'Action completed successfully.',
  15. type: 'green',
  16. buttons: {
  17. Ok: {
  18. action: function () {
  19. if (shouldReload) {
  20. location.reload();
  21. }
  22. }
  23. }
  24. }
  25. });
  26. }
  27. function AlertError() {
  28. $.confirm({
  29. title: 'Alert',
  30. content: 'There was an unexpected error. Please try again.',
  31. type: 'red',
  32. typeAnimated: true,
  33. buttons: {
  34. Ok: {
  35. action: function () {
  36. }
  37. }
  38. }
  39. });
  40. }
  41. function AlertInfo(message) {
  42. $.confirm({
  43. title: 'Alert',
  44. content: message,
  45. type: 'blue',
  46. buttons: {
  47. Ok: {
  48. action: function () {
  49. }
  50. }
  51. }
  52. });
  53. }