Built files from Bizgaze WebServer
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

w_authtokenupdate.js 2.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. var Unibase;
  2. (function (Unibase) {
  3. let Apps;
  4. (function (Apps) {
  5. let Communications;
  6. (function (Communications) {
  7. let Component;
  8. (function (Component) {
  9. class AuthTokenUpdate extends Unibase.Platform.Core.BaseComponent {
  10. cssFiles() {
  11. return [];
  12. }
  13. jsFiles() {
  14. return ["apps/communications/components/w_authtokenupdate.js", "apps/communications/managers/authtokenmanager.js"];
  15. }
  16. html(id, containerid) {
  17. let html = ``;
  18. return html;
  19. }
  20. load(id, containerid, callback) {
  21. }
  22. init() {
  23. this.render();
  24. $("#BtnUpdateAuthtoken").click(function () {
  25. Unibase.Apps.Communications.Component.AuthTokenUpdate.Instance().updateAuthtoken();
  26. });
  27. }
  28. render() {
  29. var portletwidgetid = Number($("#hf_PortletWidgetId").val());
  30. $(".div_portletwidget_" + portletwidgetid).empty();
  31. let html = `<div class="card shadow-hover">
  32. <div class="card-header card-header-action bg-light bg-gradient-light"><strong>Update Auth Token</strong></div>
  33. <div class="card-body">
  34. <div id="divUpdateAuthToken" class="wrapper text-center bg-success card-header">
  35. <a id="BtnUpdateAuthtoken" href="javascript:;"><span class="h4">Update Authentication Token</span></a>
  36. </div>
  37. </div>
  38. </div>`;
  39. $(".div_portletwidget_" + portletwidgetid).append(html);
  40. }
  41. updateAuthtoken() {
  42. var instance = this;
  43. instance.fileCacheHelper.loadJsFile('apps/communications/managers/authtokenmanager.js', function () {
  44. Unibase.Apps.Communications.Managers.AuthTokenManager.Instance().updateAuthToken().then(function (response) {
  45. MessageHelper.Instance().showSuccess(response.message, "Unibase_ValidationSummary");
  46. });
  47. });
  48. }
  49. static Instance() {
  50. if (this.instance === undefined) {
  51. this.instance = new AuthTokenUpdate();
  52. }
  53. return this.instance;
  54. }
  55. }
  56. Component.AuthTokenUpdate = AuthTokenUpdate;
  57. })(Component = Communications.Component || (Communications.Component = {}));
  58. })(Communications = Apps.Communications || (Apps.Communications = {}));
  59. })(Apps = Unibase.Apps || (Unibase.Apps = {}));
  60. })(Unibase || (Unibase = {}));