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.

32 lines
1.2 KiB

2 years ago
  1. var outlook = {
  2. Test: "Test",
  3. SynChronous: "SynChronous",
  4. GetUserEmail: "GetUserEmail",
  5. ContactFolders: "ContactFolders",
  6. Contacts: "Contacts",
  7. Inbox_Qry: "InboxQry",
  8. Inbox_Add: "InboxAdd",
  9. Inbox_Upd: "InboxUpd",
  10. Inbox_Del: "InboxDel",
  11. Calendar_Qry: "CalendarQry",
  12. Calendar_Add: "CalendarAdd",
  13. Calendar_Upd: "CalendarUpd",
  14. Calendar_Del: "CalendarDel",
  15. CalendarInfo: "CalendarInfo"
  16. },
  17. outlookAPI = function (action, param, calllback, isasync) {
  18. if (parent.top.SysSet.OutlookRun !== 'Y' && 'CalendarAdd,CalendarUpd,CalendarDel'.indexOf(action) > -1) {
  19. showMsg(i18next.t("message.CheckToOpenOutlookRun")); //╠message.CheckToOpenOutlookRun⇒同步更新Outlook失敗<br/>請聯絡管理員開啟同步Outlook設定項╣
  20. return false;
  21. }
  22. $.ajax({
  23. type: 'POST',
  24. url: '/Login/' + action + (!isasync ? 'Async' : ''),
  25. data: { data: JSON.stringify(param || {}) },
  26. success: function (res) {
  27. if (typeof calllback === 'function') { calllback(res); }
  28. },
  29. error: function (xhr, status, error) {
  30. }
  31. });
  32. };