How to use the module.config function in module

To help you get started, we’ve selected a few module examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github oroinc / platform / src / Oro / Bundle / UIBundle / Resources / public / js / app / views / flash-message-view.js View on Github external
define(function(require) {
    'use strict';

    var FlashMessageView;
    var BaseView = require('oroui/js/app/views/base/view');
    var messenger = require('oroui/js/messenger');
    var _ = require('underscore');
    var config = require('module').config();

    config = _.extend({
        template: require('tpl!oroui/templates/message-item.html') // default admin template
    }, config);

    FlashMessageView = BaseView.extend({
        autoRender: true,

        template: config.temlpate,

        optionNames: BaseView.prototype.optionNames.concat(['container', 'messages', 'initializeMessenger']),

        initializeMessenger: false,

        /**
         * @inheritDoc
github oroinc / platform / src / Oro / Bundle / UIBundle / Resources / public / js / app / views / jstree / action-manager-view.js View on Github external
define(function(require) {
    'use strict';

    var ActionManagerView;
    var $ = require('jquery');
    var _ = require('underscore');
    var ActionManager = require('oroui/js/jstree-action-manager');
    var BaseView = require('oroui/js/app/views/base/view');
    var config = require('module').config();
    config = _.extend({
        inlineActionsCount: null
    }, config);

    ActionManagerView = BaseView.extend({
        /**
         * @property {Function}
         */
        template: require('tpl!oroui/templates/jstree-actions-wrapper.html'),

        /**
         * @property {Function}
         */
        inlineTemplate: require('tpl!oroui/templates/jstree-inline-actions-wrapper.html'),

        /**
github oroinc / platform / src / Oro / Bundle / UserBundle / Resources / public / js / components / role / entity-category-tabs-component.js View on Github external
define(function(require) {
    'use strict';

    var EntityCategoryTabsComponent;
    var _ = require('underscore');
    var __ = require('orotranslation/js/translator');
    var mediator = require('oroui/js/mediator');
    var BaseComponent = require('oroui/js/app/components/base/component');
    var BaseCollection = require('oroui/js/app/models/base/collection');
    var TabCollectionView = require('oroui/js/app/views/tab-collection-view');
    var config = require('module').config();

    config = _.extend({
        useDropdown: true
    }, config);

    EntityCategoryTabsComponent = BaseComponent.extend({
        /**
         * @type {Object>}
         */
        changesByCategory: null,

        /**
         * @inheritDoc
         */
        constructor: function EntityCategoryTabsComponent() {
            EntityCategoryTabsComponent.__super__.constructor.apply(this, arguments);
github oroinc / platform / src / Oro / Bundle / UIBundle / Resources / public / js / component-shortcuts-manager.js View on Github external
define(function(require) {
    'use strict';

    var ComponentShortcutsManager;

    var _ = require('underscore');
    var $ = require('jquery');

    var config = require('module').config();
    config = _.extend({
        reservedKeys: ['options']
    }, config);

    ComponentShortcutsManager = {
        reservedKeys: config.reservedKeys,

        shortcuts: {},

        /**
         * @param {String} key
         * @param {Object} shortcut
         */
        add: function(key, shortcut) {
            var capitalizeKey;
github oroinc / platform / src / Oro / Bundle / DataGridBundle / Resources / public / js / app / plugins / grid / toolbar-mass-action-plugin.js View on Github external
define(function(require) {
    'use strict';

    var ToolbarMassActionPlugin;
    var _ = require('underscore');
    var __ = require('orotranslation/js/translator');
    var BasePlugin = require('oroui/js/app/plugins/base/plugin');
    var ShowComponentAction = require('oro/datagrid/action/show-component-action');
    var ToolbarMassActionComponent = require('orodatagrid/js/app/components/toolbar-mass-action-component');

    var config = require('module').config();
    config = _.extend({
        icon: 'ellipsis-h',
        wrapperClassName: 'toolbar-mass-actions',
        label: __('oro.datagrid.mass_action.title'),
        attributes: {'data-placement': 'bottom-end'}
    }, config);

    ToolbarMassActionPlugin = BasePlugin.extend({
        enable: function() {
            this.listenTo(this.main, 'beforeToolbarInit', this.onBeforeToolbarInit);
            ToolbarMassActionPlugin.__super__.enable.call(this);
        },

        onBeforeToolbarInit: function(toolbarOptions) {
            var options = {
                datagrid: this.main,

module

Generate the minimal skeleton/boilerplate for a new Node.js module.

MIT
Latest version published 9 years ago

Package Health Score

41 / 100
Full package analysis