Sha256: 2f4de0de1edeef9ca61f3be2c0fd46f2f24f7295e95e12769930180a7b56070f

Contents?: true

Size: 907 Bytes

Versions: 62

Compression:

Stored size: 907 Bytes

Contents

/**
 * @namespace WORKAREA.primaryNav
 */
WORKAREA.registerModule('primaryNav', (function () {
    'use strict';

    var focusSearchForm = function ($takeover) {
            $('.search-form__input', $takeover).trigger('focus');
        },

        getNavContent = function (event) {
            event.preventDefault();
            return $(event.currentTarget.hash).prop('innerHTML');
        },

        open = function(event) {
            var takeover = WORKAREA.takeover.open(
                getNavContent(event),
                { 'takeoverClass': 'takeover--from-top' }
            );

            focusSearchForm(takeover);
        },

        /**
         * @method
         * @name init
         * @memberof WORKAREA.primaryNav
         */
        init = function ($scope) {
            $('[data-primary-nav]', $scope).on('click', open);
        };

    return {
        init: init
    };
}()));

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-admin-3.4.27 app/assets/javascripts/workarea/admin/modules/primary_nav.js
workarea-admin-3.5.4 app/assets/javascripts/workarea/admin/modules/primary_nav.js
workarea-admin-3.4.26 app/assets/javascripts/workarea/admin/modules/primary_nav.js
workarea-admin-3.5.3 app/assets/javascripts/workarea/admin/modules/primary_nav.js
workarea-admin-3.4.25 app/assets/javascripts/workarea/admin/modules/primary_nav.js
workarea-admin-3.5.2 app/assets/javascripts/workarea/admin/modules/primary_nav.js
workarea-admin-3.4.24 app/assets/javascripts/workarea/admin/modules/primary_nav.js
workarea-admin-3.5.1 app/assets/javascripts/workarea/admin/modules/primary_nav.js
workarea-admin-3.4.23 app/assets/javascripts/workarea/admin/modules/primary_nav.js
workarea-admin-3.4.22 app/assets/javascripts/workarea/admin/modules/primary_nav.js
workarea-admin-3.5.0 app/assets/javascripts/workarea/admin/modules/primary_nav.js
workarea-admin-3.4.21 app/assets/javascripts/workarea/admin/modules/primary_nav.js
workarea-admin-3.5.0.beta.1 app/assets/javascripts/workarea/admin/modules/primary_nav.js
workarea-admin-3.4.20 app/assets/javascripts/workarea/admin/modules/primary_nav.js
workarea-admin-3.4.19 app/assets/javascripts/workarea/admin/modules/primary_nav.js
workarea-admin-3.4.18 app/assets/javascripts/workarea/admin/modules/primary_nav.js
workarea-admin-3.4.17 app/assets/javascripts/workarea/admin/modules/primary_nav.js
workarea-admin-3.4.16 app/assets/javascripts/workarea/admin/modules/primary_nav.js
workarea-admin-3.4.15 app/assets/javascripts/workarea/admin/modules/primary_nav.js
workarea-admin-3.4.14 app/assets/javascripts/workarea/admin/modules/primary_nav.js