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.

109 lines
3.8 KiB

1 year ago
2 months ago
1 year ago
2 months ago
1 year ago
2 months ago
1 year ago
2 months ago
  1. /*
  2. *宝塔面板去除各种计算题与延时等待
  3. */
  4. if("undefined" != typeof bt && bt.hasOwnProperty("show_confirm")){
  5. bt.show_confirm = function(title, msg, callback, error) {
  6. layer.open({
  7. type: 1,
  8. title: title,
  9. area: "365px",
  10. closeBtn: 2,
  11. shadeClose: true,
  12. btn: [lan['public'].ok, lan['public'].cancel],
  13. content: "<div class='bt-form webDelete pd20'>\
  14. <p style='font-size:13px;word-break: break-all;margin-bottom: 5px;'>" + msg + "</p>" + (error || '') + "\
  15. </div>",
  16. yes: function (index, layero) {
  17. layer.close(index);
  18. if (callback) callback();
  19. }
  20. });
  21. }
  22. }
  23. if("undefined" != typeof bt && bt.hasOwnProperty("prompt_confirm")){
  24. bt.prompt_confirm = function (title, msg, callback) {
  25. layer.open({
  26. type: 1,
  27. title: title,
  28. area: "350px",
  29. closeBtn: 2,
  30. btn: ['确认', '取消'],
  31. content: "<div class='bt-form promptDelete pd20'>\
  32. <p>" + msg + "</p>\
  33. </div>",
  34. yes: function (layers, index) {
  35. layer.close(layers)
  36. if (callback) callback()
  37. }
  38. });
  39. }
  40. }
  41. if("undefined" != typeof bt && bt.hasOwnProperty("compute_confirm")){
  42. bt.compute_confirm = function (config, callback) {
  43. layer.open({
  44. type: 1,
  45. title: config.title,
  46. area: '430px',
  47. closeBtn: 2,
  48. shadeClose: true,
  49. btn: [lan['public'].ok, lan['public'].cancel],
  50. content:
  51. '<div class="bt-form hint_confirm pd30">\
  52. <div class="hint_title">\
  53. <i class="hint-confirm-icon"></i>\
  54. <div class="hint_con">' +
  55. config.msg +
  56. '</div>\
  57. </div>\
  58. </div>',
  59. yes: function (layers, index) {
  60. layer.close(layers)
  61. if (callback) callback()
  62. }
  63. });
  64. }
  65. }
  66. if("undefined" != typeof bt && bt.hasOwnProperty("input_confirm")){
  67. bt.input_confirm = function (config, callback) {
  68. layer.open({
  69. type: 1,
  70. title: config.title,
  71. area: '430px',
  72. closeBtn: 2,
  73. shadeClose: true,
  74. btn: [lan['public'].ok, lan['public'].cancel],
  75. content:
  76. '<div class="bt-form hint_confirm pd30">\
  77. <div class="hint_title">\
  78. <i class="hint-confirm-icon"></i>\
  79. <div class="hint_con">' +
  80. config.msg +
  81. '</div>\
  82. </div>\
  83. </div>',
  84. yes: function (layers, index) {
  85. layer.close(layers);
  86. if (callback) callback();
  87. },
  88. });
  89. }
  90. }
  91. if(window.hasOwnProperty("SafeMessage")){
  92. window.SafeMessage = function(j, h, g, f) {
  93. if (f == undefined) f = '';
  94. var mess = layer.open({
  95. type: 1,
  96. title: j,
  97. area: "350px",
  98. closeBtn: 2,
  99. shadeClose: true,
  100. content: "<div class='bt-form webDelete pd20 pb70'><p>" + h + "</p>" + f + "<div class='bt-form-submit-btn'><button type='button' class='btn btn-danger btn-sm bt-cancel'>"+lan.public.cancel+"</button> <button type='button' id='toSubmit' class='btn btn-success btn-sm' >"+lan.public.ok+"</button></div></div>"
  101. });
  102. $(".bt-cancel").click(function(){
  103. layer.close(mess);
  104. });
  105. $("#toSubmit").click(function() {
  106. layer.close(mess);
  107. g();
  108. })
  109. }
  110. }