main.js revision 44fb638c083f86772a3280ff10af62d2621513da
14997b7e496dc262dc44a4c51c9b3cc87bbf7154Till Mossakowski/**
14997b7e496dc262dc44a4c51c9b3cc87bbf7154Till Mossakowski * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
e9458b1a7a19a63aa4c179f9ab20f4d50681c168Jens Elkner *
14997b7e496dc262dc44a4c51c9b3cc87bbf7154Till Mossakowski * Copyright (c) 2011-2014 ForgeRock AS. All rights reserved.
14997b7e496dc262dc44a4c51c9b3cc87bbf7154Till Mossakowski *
14997b7e496dc262dc44a4c51c9b3cc87bbf7154Till Mossakowski * The contents of this file are subject to the terms
14997b7e496dc262dc44a4c51c9b3cc87bbf7154Till Mossakowski * of the Common Development and Distribution License
14997b7e496dc262dc44a4c51c9b3cc87bbf7154Till Mossakowski * (the License). You may not use this file except in
14997b7e496dc262dc44a4c51c9b3cc87bbf7154Till Mossakowski * compliance with the License.
14997b7e496dc262dc44a4c51c9b3cc87bbf7154Till Mossakowski *
14997b7e496dc262dc44a4c51c9b3cc87bbf7154Till Mossakowski * You can obtain a copy of the License at
14997b7e496dc262dc44a4c51c9b3cc87bbf7154Till Mossakowski * http://forgerock.org/license/CDDLv1.0.html
14997b7e496dc262dc44a4c51c9b3cc87bbf7154Till Mossakowski * See the License for the specific language governing
14997b7e496dc262dc44a4c51c9b3cc87bbf7154Till Mossakowski * permission and limitations under the License.
14997b7e496dc262dc44a4c51c9b3cc87bbf7154Till Mossakowski *
14997b7e496dc262dc44a4c51c9b3cc87bbf7154Till Mossakowski * When distributing Covered Code, include this CDDL
14997b7e496dc262dc44a4c51c9b3cc87bbf7154Till Mossakowski * Header Notice in each file and include the License file
2d0278eddd7ecc78050bcbd6d0524344711414f5mcodescu * at http://forgerock.org/license/CDDLv1.0.html
7af6ad49991a7f73b5d4233c89648a5a523f72bdTill Mossakowski * If applicable, add the following below the CDDL Header,
ebd9d5c5fbf26b74c71a2eebda3e1d4911f615b0mcodescu * with the fields enclosed by brackets [] replaced by
14997b7e496dc262dc44a4c51c9b3cc87bbf7154Till Mossakowski * your own identifying information:
3d9ee034f596bfcc18f642e5a17a408cab4c299eTill Mossakowski * "Portions Copyrighted [year] [name of copyright owner]"
14997b7e496dc262dc44a4c51c9b3cc87bbf7154Till Mossakowski */
38a49fc8944a7d280e1b0d27c1dfa3f01802ab8aTill Mossakowski
14997b7e496dc262dc44a4c51c9b3cc87bbf7154Till Mossakowski/*global require, define, window */
ebd9d5c5fbf26b74c71a2eebda3e1d4911f615b0mcodescu
14997b7e496dc262dc44a4c51c9b3cc87bbf7154Till Mossakowski
14997b7e496dc262dc44a4c51c9b3cc87bbf7154Till Mossakowski/**
1374b4543b3e94a15df0522346617f359fdea39dmcodescu * @author yaromin
1374b4543b3e94a15df0522346617f359fdea39dmcodescu */
3d9ee034f596bfcc18f642e5a17a408cab4c299eTill Mossakowski
38a49fc8944a7d280e1b0d27c1dfa3f01802ab8aTill Mossakowskirequire.config({
14997b7e496dc262dc44a4c51c9b3cc87bbf7154Till Mossakowski paths: {
ebd9d5c5fbf26b74c71a2eebda3e1d4911f615b0mcodescu i18next: "libs/i18next-1.7.3-min",
2d0278eddd7ecc78050bcbd6d0524344711414f5mcodescu backbone: "libs/backbone-1.1.2-min",
14997b7e496dc262dc44a4c51c9b3cc87bbf7154Till Mossakowski underscore: "libs/lodash-2.4.1-min",
3d9ee034f596bfcc18f642e5a17a408cab4c299eTill Mossakowski js2form: "libs/js2form-2.0",
3d9ee034f596bfcc18f642e5a17a408cab4c299eTill Mossakowski form2js: "libs/form2js-2.0",
3d9ee034f596bfcc18f642e5a17a408cab4c299eTill Mossakowski spin: "libs/spin-2.0.1-min",
38a49fc8944a7d280e1b0d27c1dfa3f01802ab8aTill Mossakowski jquery: "libs/jquery-1.11.1-min",
38a49fc8944a7d280e1b0d27c1dfa3f01802ab8aTill Mossakowski xdate: "libs/xdate-0.8-min",
3d9ee034f596bfcc18f642e5a17a408cab4c299eTill Mossakowski doTimeout: "libs/jquery.ba-dotimeout-1.0-min",
1374b4543b3e94a15df0522346617f359fdea39dmcodescu handlebars: "libs/handlebars-1.3.0-min",
2d316f4c1c4783a514d6c70f84e3fecc98658674mcodescu moment: "libs/moment-2.8.1-min",
165e0ef4d935a44abefd85962c7a878cb12c0e88mcodescu ThemeManager: "org/forgerock/openam/ui/common/util/ThemeManager",
165e0ef4d935a44abefd85962c7a878cb12c0e88mcodescu UserDelegate: "org/forgerock/openam/ui/user/delegates/UserDelegate"
2d316f4c1c4783a514d6c70f84e3fecc98658674mcodescu },
2d316f4c1c4783a514d6c70f84e3fecc98658674mcodescu
2d316f4c1c4783a514d6c70f84e3fecc98658674mcodescu shim: {
2d316f4c1c4783a514d6c70f84e3fecc98658674mcodescu underscore: {
ebd9d5c5fbf26b74c71a2eebda3e1d4911f615b0mcodescu exports: "_"
ebd9d5c5fbf26b74c71a2eebda3e1d4911f615b0mcodescu },
2d316f4c1c4783a514d6c70f84e3fecc98658674mcodescu backbone: {
2d316f4c1c4783a514d6c70f84e3fecc98658674mcodescu deps: ["underscore"],
2d316f4c1c4783a514d6c70f84e3fecc98658674mcodescu exports: "Backbone"
1374b4543b3e94a15df0522346617f359fdea39dmcodescu },
1374b4543b3e94a15df0522346617f359fdea39dmcodescu js2form: {
1374b4543b3e94a15df0522346617f359fdea39dmcodescu exports: "js2form"
1374b4543b3e94a15df0522346617f359fdea39dmcodescu },
ebd9d5c5fbf26b74c71a2eebda3e1d4911f615b0mcodescu form2js: {
exports: "form2js"
},
spin: {
exports: "spin"
},
xdate: {
exports: "xdate"
},
doTimeout: {
deps: ["jquery"],
exports: "doTimeout"
},
handlebars: {
exports: "handlebars"
},
i18next: {
deps: ["jquery", "handlebars"],
exports: "i18next"
},
moment: {
exports: "moment"
}
}
});
/**
* Loads all application on start, so each module will be available to
* required synchronously
*/
require([
"org/forgerock/commons/ui/common/util/Constants",
"org/forgerock/commons/ui/common/main/EventManager",
"jquery",
"underscore",
"backbone",
"form2js",
"js2form",
"spin",
"xdate",
"moment",
"doTimeout",
"handlebars",
"i18next",
"org/forgerock/openam/ui/common/util/ThemeManager",
"org/forgerock/commons/ui/common/main/i18nManager",
"config/main",
"org/forgerock/openam/ui/common/main",
"org/forgerock/openam/ui/user/main",
"org/forgerock/openam/ui/dashboard/main",
"UserDelegate",
"ThemeManager",
"org/forgerock/commons/ui/user/main",
"org/forgerock/commons/ui/common/main"
], function(constants, eventManager, $, _, Backbone) {
// Helpers for the code that hasn't been properly migrated to require these as explicit dependencies:
window.$ = $;
window._ = _;
window.Backbone = Backbone;
eventManager.sendEvent(constants.EVENT_DEPENDECIES_LOADED);
});