1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- var Unibase;
- (function (Unibase) {
- let Themes;
- (function (Themes) {
- let Providers;
- (function (Providers) {
- class Logoff {
- constructor() {
- this._filecheHelper = Unibase.Platform.Helpers.FileCacheHelper.Instance();
- }
- static SetInstance(callback, data) {
- if (this._instance === undefined)
- this._setInstance(callback, data);
- }
- static Instance() {
- return this._instance;
- }
- static _setInstance(callback, data) {
- if (data != null && data != "" && data.length > 0) {
- let logoffIndex = data.findIndex(x => x.settingtypeName.toLowerCase() == "logoff");
- if (logoffIndex != -1) {
- var _filecache = Unibase.Platform.Helpers.FileCacheHelper.Instance();
- _filecache.loadJsFile(data[logoffIndex].settingValue1, function () {
- try {
- Unibase.Themes.Providers.Logoff._instance = eval(data[logoffIndex].settingValue2);
- if (callback) {
- callback();
- }
- }
- catch (e) {
- Unibase.Themes.Providers.Logoff._setDefaultProvider(callback, data);
- bootbox.alert("Logoff: " + e.message);
- }
- });
- }
- else {
- Unibase.Themes.Providers.Logoff._setDefaultProvider(callback, data);
- }
- }
- else {
- Unibase.Themes.Providers.Logoff._setDefaultProvider(callback, data);
- }
- }
- static _setDefaultProvider(callback, data) {
- if (callback) {
- callback();
- }
- }
- static isFileExists(path) {
- return false;
- }
- }
- Providers.Logoff = Logoff;
- })(Providers = Themes.Providers || (Themes.Providers = {}));
- })(Themes = Unibase.Themes || (Unibase.Themes = {}));
- })(Unibase || (Unibase = {}));
|