2017-09-28 00:52:04 +08:00
|
|
|
// Load #1, load as little as possible because we are in a race to get the loading screen up.
|
|
|
|
define([
|
2023-01-07 19:49:46 +08:00
|
|
|
'/components/nthen/index.js',
|
2017-09-28 00:52:04 +08:00
|
|
|
'/api/config',
|
2017-12-01 23:05:20 +08:00
|
|
|
'/common/dom-ready.js',
|
2017-09-28 00:52:04 +08:00
|
|
|
'/common/sframe-common-outer.js',
|
2020-11-04 18:22:31 +08:00
|
|
|
], function (nThen, ApiConfig, DomReady, SFCommonO) {
|
2017-09-28 00:52:04 +08:00
|
|
|
|
|
|
|
// Loaded in load #2
|
2020-01-27 19:18:25 +08:00
|
|
|
var hash, href;
|
2017-09-28 00:52:04 +08:00
|
|
|
nThen(function (waitFor) {
|
2017-12-01 23:05:20 +08:00
|
|
|
DomReady.onReady(waitFor());
|
2017-09-28 00:52:04 +08:00
|
|
|
}).nThen(function (waitFor) {
|
2020-11-04 18:22:31 +08:00
|
|
|
var obj = SFCommonO.initIframe(waitFor, true);
|
|
|
|
href = obj.href;
|
|
|
|
hash = obj.hash;
|
2021-06-11 22:15:31 +08:00
|
|
|
if (!hash) {
|
|
|
|
window.location.href = '/form/';
|
|
|
|
waitFor.abort();
|
|
|
|
}
|
2017-09-28 00:52:04 +08:00
|
|
|
}).nThen(function (/*waitFor*/) {
|
2018-02-15 02:41:07 +08:00
|
|
|
SFCommonO.start({
|
2020-01-27 19:18:25 +08:00
|
|
|
hash: hash,
|
|
|
|
href: href,
|
2018-09-18 22:36:29 +08:00
|
|
|
useCreationScreen: true,
|
|
|
|
messaging: true
|
2018-02-15 02:41:07 +08:00
|
|
|
});
|
2017-09-28 00:52:04 +08:00
|
|
|
});
|
|
|
|
});
|