Sha256: c0feb96b4f62217b42f273cc3a054e9cfc0f5b952c8494c8747a67bd20fa8d48

Contents?: true

Size: 1.34 KB

Versions: 62

Compression:

Stored size: 1.34 KB

Contents

(function () {
    'use strict';

    window.WORKAREA.config = window.WORKAREA.config || {};

    /**
     * @namespace WORKAREA.config
     * @property {object} date
     * @property {object} categorizedAutocompleteFields
     * @property {object} deletionForms
     * @property {array} imageFileExtensions
     * @property {object} formSubmittingControls
     */

    WORKAREA.config.date = {
        format: '%Y-%m-%d %I:%M %P %:z',
        formatDate: '%Y-%m-%d',
        hours: '%I',
        minutes: '%M',
        ampm: '%P'
    };

    WORKAREA.config.categorizedAutocompleteFields = {
        uiOptions: {
            minLength: 2
        }
    };

    WORKAREA.config.deletionForms = {
        message: 'Are you sure you want to delete this?'
    };

    WORKAREA.config.imageFileExtensions = ['jpg', 'jpeg', 'gif', 'png'];

    WORKAREA.config.formSubmittingControls = {
        changeDelay: 500,
        inputDelay: 1000
    };

    /**
     * I18n
     */

    I18n.fallbacks = true;

    var locale = $('meta[property="locale"]').attr('content');
    if (locale) {
        I18n.locale = locale;
    }

    /**
     * CSRF Token configuration for jQuery Ajax requests
     */

    $(document).ajaxSend(function(event, xhr) {
        var token = $('meta[name=csrf-token]').attr('content');
        xhr.setRequestHeader('X-CSRF-Token', token);
    });
})();

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-core-3.5.15 app/assets/javascripts/workarea/core/config.js
workarea-core-3.4.36 app/assets/javascripts/workarea/core/config.js
workarea-core-3.5.14 app/assets/javascripts/workarea/core/config.js
workarea-core-3.4.35 app/assets/javascripts/workarea/core/config.js
workarea-core-3.5.13 app/assets/javascripts/workarea/core/config.js
workarea-core-3.4.34 app/assets/javascripts/workarea/core/config.js
workarea-core-3.5.12 app/assets/javascripts/workarea/core/config.js
workarea-core-3.4.33 app/assets/javascripts/workarea/core/config.js
workarea-core-3.5.11 app/assets/javascripts/workarea/core/config.js
workarea-core-3.5.10 app/assets/javascripts/workarea/core/config.js
workarea-core-3.4.32 app/assets/javascripts/workarea/core/config.js
workarea-core-3.5.9 app/assets/javascripts/workarea/core/config.js
workarea-core-3.4.31 app/assets/javascripts/workarea/core/config.js
workarea-core-3.5.8 app/assets/javascripts/workarea/core/config.js
workarea-core-3.4.30 app/assets/javascripts/workarea/core/config.js
workarea-core-3.5.7 app/assets/javascripts/workarea/core/config.js
workarea-core-3.4.29 app/assets/javascripts/workarea/core/config.js
workarea-core-3.5.6 app/assets/javascripts/workarea/core/config.js
workarea-core-3.4.28 app/assets/javascripts/workarea/core/config.js
workarea-core-3.5.5 app/assets/javascripts/workarea/core/config.js