Email.js 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. $(function()
  2. {
  3. // 邮件发送测试
  4. $('.test-email-submit').on('click', function()
  5. {
  6. // ajax请求
  7. $.ajax({
  8. url:$(this).data('url'),
  9. type:'POST',
  10. dataType:"json",
  11. timeout:10000,
  12. data:{"email":$('.test-email-value').val()},
  13. success:function(result)
  14. {
  15. if(result.code == 0)
  16. {
  17. Prompt(result.msg, 'success');
  18. } else {
  19. Prompt(result.msg);
  20. }
  21. },
  22. error:function()
  23. {
  24. Prompt('网络异常错误');
  25. }
  26. });
  27. });
  28. // 邮箱编辑器初始化
  29. if($('.table-nav .am-active').data('type') == 'message')
  30. {
  31. // 配置信息
  32. var toolbars = [[
  33. 'fullscreen', 'source', '|', 'undo', 'redo', '|',
  34. 'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|',
  35. 'rowspacingtop', 'rowspacingbottom', 'lineheight', '|',
  36. 'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
  37. 'directionalityltr', 'directionalityrtl', 'indent', '|',
  38. 'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|', 'link', 'unlink', 'anchor', '|',
  39. 'horizontal', 'date', 'time', 'spechars', 'snapscreen', 'wordimage', '|',
  40. 'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols', 'charts', '|',
  41. 'print', 'preview', 'searchreplace', 'drafts', 'help'
  42. ]];
  43. var config = {
  44. toolbars: toolbars,
  45. initialFrameHeight : 150
  46. }
  47. UE.getEditor('email_user_reg', config);
  48. UE.getEditor('email_user_forget_pwd', config);
  49. UE.getEditor('email_user_student_binding', config);
  50. UE.getEditor('email_user_email_binding', config);
  51. }
  52. });