-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2e2a4e6
commit 3bb9bc2
Showing
3 changed files
with
2,991 additions
and
2,712 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,47 @@ | ||
require(["tslib"], function (tslib) { | ||
require(["@outsystems/runtime-core-js", "PartnersHub.appDefinition", "@outsystems/runtime-core-js/debugger"], function (OSRuntimeCore, PartnersHubAppDefinition, NullDebugger) { | ||
var OS = OSRuntimeCore; | ||
if(OS.Navigation.ensureRequestSecurity()) { | ||
return; | ||
} | ||
require(["tslib"], function(tslib) { | ||
require(["@outsystems/runtime-core-js", "PartnersHub.appDefinition", "@outsystems/runtime-core-js/debugger"], function(OSRuntimeCore, PartnersHubAppDefinition, NullDebugger) { | ||
var OS = OSRuntimeCore; | ||
if (OS.Navigation.ensureRequestSecurity()) { | ||
return; | ||
} | ||
|
||
Promise.all([OS.Application.default.initialize(PartnersHubAppDefinition, OS.Interfaces.Application.InitializationType.Full, new OS.Format.DateTimeFormatInfo("yyyy-MM-dd", "HH:mm:ss"), new OS.Format.NumberFormatInfo(".", ""), function () { | ||
return Promise.all(["scripts/PartnersHub.yupumd.js"].map(function (script) { | ||
return OS.SystemActions.requireScript(script); | ||
})); | ||
}).then(function (success) { | ||
if(success) { | ||
function initGlobalExceptionHandler() { | ||
return new Promise(function (resolve) { | ||
require(["PartnersHub.Common.controller"], function (exceptionModule) { | ||
OS.Application.default.registerDefaultErrorHandler(function () { | ||
return function (error, callContext) { | ||
return exceptionModule.default.handleError(error, callContext); | ||
}; | ||
}); | ||
resolve(); | ||
}); | ||
}); | ||
} | ||
function initView() { | ||
return OS.Flow.promise(function (resolve, reject) { | ||
require(["@outsystems/runtime-view-js"], function (OSView) { | ||
try {OSView.Router.load(OS.Application.default); | ||
resolve(); | ||
} catch (error) { | ||
reject(error); | ||
} | ||
Promise.all([OS.Application.default.initialize(PartnersHubAppDefinition, OS.Interfaces.Application.InitializationType.Full, new OS.Format.DateTimeFormatInfo("yyyy-MM-dd", "HH:mm:ss"), new OS.Format.NumberFormatInfo(".", ""), function() { | ||
return Promise.all(["scripts/PartnersHub.yupumd.js"].map(function(script) { | ||
return OS.SystemActions.requireScript(script); | ||
})); | ||
}).then(function(success) { | ||
if (success) { | ||
function initGlobalExceptionHandler() { | ||
return new Promise(function(resolve) { | ||
require(["PartnersHub.Common.controller"], function(exceptionModule) { | ||
OS.Application.default.registerDefaultErrorHandler(function() { | ||
return function(error, callContext) { | ||
return exceptionModule.default.handleError(error, callContext); | ||
}; | ||
}); | ||
resolve(); | ||
}); | ||
}); | ||
} | ||
|
||
}); | ||
}); | ||
} | ||
return initGlobalExceptionHandler().then(initView); | ||
} | ||
function initView() { | ||
return OS.Flow.promise(function(resolve, reject) { | ||
require(["@outsystems/runtime-view-js"], function(OSView) { | ||
try { | ||
OSView.Router.load(OS.Application.default); | ||
resolve(); | ||
} catch (error) { | ||
reject(error); | ||
} | ||
|
||
})]).catch(function (error) { | ||
OS.ErrorHandling.handleError(error); | ||
}); | ||
}); | ||
}); | ||
}); | ||
}); | ||
} | ||
return initGlobalExceptionHandler().then(initView); | ||
} | ||
|
||
})]).catch(function(error) { | ||
OS.ErrorHandling.handleError(error); | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.