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.

46 lines
1.5 KiB

3 years ago
  1. 'use strict';
  2. var fnPageInit = function () {
  3. var canDo = new CanDo({
  4. /**
  5. * 當前程式所有ID名稱集合
  6. */
  7. idKeys: ['OrgID', 'EmailID'],
  8. /**
  9. * 當前程式所有參數名稱集合
  10. */
  11. paramKeys: ['EmailID'],
  12. /**
  13. * 須初始化的UEEditer 的物件ID集合
  14. */
  15. ueEditorIds: ['BodyHtml'],
  16. /**
  17. * 頁面初始化
  18. * @param {Object} pargs CanDo 對象
  19. */
  20. pageInit: function (pargs) {
  21. if (pargs.action === 'upd') {
  22. $('#EmailID').prop('disabled', true);
  23. if(getUrlParam('EmailID') == "Appoint_TE"){
  24. $('.AppointSite').show();
  25. }
  26. pargs._getOne().done(function () {
  27. setTimeout(function () {
  28. $("#site1").val($("#ueditor_0").contents().find(".Appointa1").attr("href"));
  29. $("#site2").val($("#ueditor_0").contents().find(".Appointa2").attr("href"));
  30. $("#site3").val($("#ueditor_0").contents().find(".Appointa3").attr("href"));
  31. }, 1000);
  32. });
  33. $('#changeSitehref').click(function () {
  34. $("#ueditor_0").contents().find(".Appointa1").attr("href",$("#site1").val());
  35. $("#ueditor_0").contents().find(".Appointa2").attr("href",$("#site2").val());
  36. $("#ueditor_0").contents().find(".Appointa3").attr("href",$("#site3").val());
  37. showMsg("已更新所有展會網址", 'success');
  38. });
  39. }
  40. }
  41. });
  42. };
  43. require(['base', 'cando'], fnPageInit);