g.js 882 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. function err_message_quietly(msg, f) {
  2. $.layer({
  3. title: false,
  4. closeBtn: false,
  5. time: 2,
  6. dialog: {
  7. msg: msg
  8. },
  9. end: f
  10. });
  11. }
  12. function ok_message_quietly(msg, f) {
  13. $.layer({
  14. title: false,
  15. closeBtn: false,
  16. time: 1,
  17. dialog: {
  18. msg: msg,
  19. type: 1
  20. },
  21. end: f
  22. });
  23. }
  24. function my_confirm(msg, btns, yes_func, no_func) {
  25. $.layer({
  26. shade: [ 0 ],
  27. area: [ 'auto', 'auto' ],
  28. dialog: {
  29. msg: msg,
  30. btns: 2,
  31. type: 4,
  32. btn: btns,
  33. yes: yes_func,
  34. no: no_func
  35. }
  36. });
  37. }
  38. function handle_quietly(json, f) {
  39. if (json.msg.length > 0) {
  40. err_message_quietly(json.msg);
  41. } else {
  42. ok_message_quietly("successfully:-)", f);
  43. }
  44. }