in public/components/stub-modal/stub-modal.js [515:550]
prodOffice: currentFilteredOffice() || guessCurrentOfficeFromTimezone()
};
}
return wfPreferencesService.getPreference('preferredStub').then((data) => {
return createStubData(contentType, data.section);
}, () => {
return createStubData(contentType, null);
});
}
$rootScope.$on('stub:edit', function (event, stub) {
open(stub, 'edit');
});
$rootScope.$on('stub:create', function (event, contentType) {
setUpPreferredStub(contentType).then((stub) => {
open(stub, 'create')
});
});
$rootScope.$on('content:import', function () {
setUpPreferredStub(null).then((stub) => {
open(stub, 'import')
});
});
function open(stub, mode) {
$modal.open({
templateUrl: '/assets/components/stub-modal/stub-modal.html',
controller: StubModalInstanceCtrl,
windowClass: 'stubModal',
resolve: {