Built files from Bizgaze WebServer
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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. var Unibase;
  2. (function (Unibase) {
  3. let Themes;
  4. (function (Themes) {
  5. let Providers;
  6. (function (Providers) {
  7. class Login {
  8. constructor() {
  9. this._filecheHelper = Unibase.Platform.Helpers.FileCacheHelper.Instance();
  10. }
  11. static SetInstance(callback, data) {
  12. if (this._instance === undefined)
  13. this._setInstance(callback, data);
  14. }
  15. static Instance() {
  16. return this._instance;
  17. }
  18. static _getJsPath() {
  19. var _domainName = "";
  20. return 'domainsettings/' + _domainName + '/login.js';
  21. }
  22. static isProviderConfigured() {
  23. return false;
  24. }
  25. static _setInstance(callback, data) {
  26. if (data != null && data != "" && data.length > 0) {
  27. let index = data.findIndex(x => x.settingtypeName.toLowerCase() == "login");
  28. if (index != -1) {
  29. var _filecache = Unibase.Platform.Helpers.FileCacheHelper.Instance();
  30. _filecache.loadJsFile(data[index].settingValue1, function () {
  31. try {
  32. Unibase.Themes.Providers.Login._instance = eval(data[index].settingValue2);
  33. Unibase.Themes.Providers.Login._imageUrl(data);
  34. Unibase.Themes.Providers.Register.SetInstance(callback, data);
  35. }
  36. catch (e) {
  37. Unibase.Themes.Providers.Login._setDefaultProvider(callback, data);
  38. bootbox.alert("Login: " + e.message);
  39. }
  40. });
  41. }
  42. else {
  43. Unibase.Themes.Providers.Login._setDefaultProvider(callback, data);
  44. }
  45. }
  46. else {
  47. Unibase.Themes.Providers.Login._setDefaultProvider(callback, data);
  48. }
  49. }
  50. static _imageUrl(data) {
  51. let imageurlIndex = data.findIndex(x => x.settingtypeName.toLowerCase() == "imageurl");
  52. if (imageurlIndex != -1) {
  53. Unibase.Themes.Providers.Login.Instance().loadDomainLogo(data[imageurlIndex].settingValue);
  54. }
  55. else {
  56. Unibase.Themes.Providers.Login.Instance().loadDomainLogo("");
  57. }
  58. }
  59. static _setDefaultProvider(callback, data) {
  60. var _filecache = Unibase.Platform.Helpers.FileCacheHelper.Instance();
  61. Unibase.Themes.Providers.Login._instance = Unibase.Themes.Compact.Components.Login.Instance();
  62. Unibase.Themes.Providers.Login._imageUrl(data);
  63. Unibase.Themes.Providers.Register.SetInstance(callback, data);
  64. }
  65. static isFileExists(path) {
  66. return false;
  67. }
  68. }
  69. Providers.Login = Login;
  70. })(Providers = Themes.Providers || (Themes.Providers = {}));
  71. })(Themes = Unibase.Themes || (Unibase.Themes = {}));
  72. })(Unibase || (Unibase = {}));