main.js revision 9ad7d0020702ab233be7bce3c52cf209ebec0e35
325N/A/**
325N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
325N/A *
325N/A * Copyright (c) 2014-2015 ForgeRock AS. All rights reserved.
325N/A *
325N/A * The contents of this file are subject to the terms
325N/A * of the Common Development and Distribution License
325N/A * (the License). You may not use this file except in
325N/A * compliance with the License.
325N/A *
325N/A * You can obtain a copy of the License at
325N/A * http://forgerock.org/license/CDDLv1.0.html
325N/A * See the License for the specific language governing
325N/A * permission and limitations under the License.
325N/A *
325N/A * When distributing Covered Code, include this CDDL
325N/A * Header Notice in each file and include the License file
325N/A * at http://forgerock.org/license/CDDLv1.0.html
325N/A * If applicable, add the following below the CDDL Header,
325N/A * with the fields enclosed by brackets [] replaced by
325N/A * your own identifying information:
325N/A * "Portions Copyrighted [year] [name of copyright owner]"
325N/A */
325N/A
325N/A/*global require, define, window, JSONEditor */
325N/A
325N/Arequire.config({
325N/A paths: {
325N/A less: "libs/less-1.5.1-min",
325N/A i18next: "libs/i18next-1.7.3-min",
325N/A i18nGrid: "libs/i18n/grid.locale-en",
325N/A backbone: "libs/backbone-1.1.2-min",
325N/A underscore: "libs/lodash-2.4.1-min",
325N/A js2form: "libs/js2form-2.0",
325N/A form2js: "libs/form2js-2.0",
325N/A spin: "libs/spin-2.0.1-min",
325N/A jquery: "libs/jquery-2.1.1-min",
325N/A jqueryui: "libs/jquery-ui-1.11.1-min",
325N/A jqgrid: "libs/jquery.jqGrid-4.5.4-min",
325N/A gentleSelect: "libs/jquery-gentleSelect-0.1.3.1-min",
325N/A cron: "libs/jquery-cron-r2427",
325N/A xdate: "libs/xdate-0.8-min",
325N/A doTimeout: "libs/jquery.ba-dotimeout-1.0-min",
325N/A handlebars: "libs/handlebars-1.3.0-min",
325N/A bootstrap: "libs/bootstrap.min",
325N/A "bootstrap-dialog": "libs/bootstrap-dialog.min",
325N/A placeholder: "libs/jquery.placeholder",
325N/A moment: "libs/moment-2.8.1-min",
325N/A AuthnDelegate: "org/forgerock/openidm/ui/common/delegates/AuthnDelegate",
325N/A jsonEditor: "libs/jsoneditor-0.7.9-min",
325N/A ThemeManager: "org/forgerock/openidm/ui/common/util/ThemeManager",
325N/A "ldapjs-filter": "libs/ldapjs-filter-2253-min"
325N/A },
325N/A
325N/A shim: {
325N/A underscore: {
325N/A exports: "_"
325N/A },
325N/A backbone: {
325N/A deps: ["underscore"],
325N/A exports: "Backbone"
325N/A },
325N/A js2form: {
325N/A exports: "js2form"
325N/A },
325N/A form2js: {
325N/A exports: "form2js"
325N/A },
325N/A spin: {
325N/A exports: "spin"
325N/A },
325N/A jsonEditor: {
325N/A exports: "jsonEditor"
325N/A },
325N/A cron: {
325N/A deps: ["jquery"]
325N/A },
325N/A gentleSelect: {
325N/A deps: ["jquery"]
325N/A },
325N/A jqueryui: {
325N/A deps: ["jquery"],
325N/A exports: "jqueryui"
325N/A },
325N/A i18nGrid: {
325N/A deps: ["jquery"]
325N/A },
325N/A jqgrid: {
325N/A deps: ["jqueryui", "i18nGrid"]
325N/A },
325N/A xdate: {
325N/A exports: "xdate"
325N/A },
325N/A doTimeout: {
325N/A deps: ["jquery"],
325N/A exports: "doTimeout"
325N/A },
325N/A handlebars: {
325N/A exports: "handlebars"
325N/A },
325N/A i18next: {
325N/A deps: ["jquery", "handlebars"],
325N/A exports: "i18next"
325N/A },
325N/A moment: {
325N/A exports: "moment"
325N/A },
325N/A bootstrap: {
325N/A deps: ["jquery"]
325N/A },
325N/A placeholder: {
325N/A deps: ["jquery"]
325N/A },
325N/A 'bootstrap-dialog': {
325N/A deps: ["jquery", "underscore","backbone", "bootstrap"]
325N/A }
325N/A }
325N/A});
325N/A
325N/A/**
325N/A * Loads all application on start, so each module will be available to
325N/A * required synchronously
325N/A */
325N/Arequire([
325N/A "jquery",
325N/A "underscore",
325N/A "backbone",
325N/A "less",
325N/A "form2js",
325N/A "js2form",
325N/A "spin",
325N/A "jqgrid",
325N/A "jqueryui",
325N/A "xdate",
325N/A "moment",
325N/A "doTimeout",
325N/A "handlebars",
325N/A "placeholder",
325N/A "i18next",
325N/A "jsonEditor",
325N/A "gentleSelect",
325N/A "cron",
325N/A "org/forgerock/commons/ui/common/main/i18nManager",
325N/A "org/forgerock/commons/ui/common/util/Constants",
325N/A "org/forgerock/commons/ui/common/main/EventManager",
325N/A "org/forgerock/openidm/ui/common/main",
325N/A "org/forgerock/openidm/ui/admin/main",
325N/A "org/forgerock/commons/ui/common/main",
325N/A "AuthnDelegate",
325N/A "ThemeManager",
325N/A "config/main"
325N/A], function(
325N/A $,
325N/A _,
325N/A Backbone,
325N/A less,
325N/A form2js,
325N/A js2form,
325N/A spin,
325N/A jqgrid,
325N/A jqueryui,
325N/A xdate,
325N/A moment,
doTimeout,
handlebars,
placeholder,
i18next,
jsonEditor,
gentleSelect,
cron,
i18n,
constants,
eventManager) {
// 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);
JSONEditor.defaults.options.theme = 'bootstrap3';
JSONEditor.defaults.options.iconlib = "fontawesome4";
});