lib/middleware/jng.directives.js
function getGenericDirectives() {
    var directives = {};
    var genericDirectives = {
        'src':          'file',
        'title':        'i18n',
        'placeholder':  'i18n',
        'popover':      'i18n',
        'value':        'i18n',
        'alt':          'i18n',
        'text':         'i18n',
        'id':           null,
        'type':         null,
        'class':        null
    };
    var me = this;

    _.each(genericDirectives, function (type, attr) {

        // no b-class because it is just adding classes one time
        if (attr !== 'class') {
            directives['b-' + attr] = me.getGenericDirective('b', attr, null, true, false);
        }

        directives['bo-' + attr] = me.getGenericDirective('bo', attr, null, true, false);

        if (type) {
            directives['f-' + attr] = me.getGenericDirective('f', attr, type, false, true);
            directives['fo-' + attr] = me.getGenericDirective('fo', attr, type, false, true);
            directives['bf-' + attr] = me.getGenericDirective('bf', attr, type, true, true);
            directives['bfo-' + attr] = me.getGenericDirective('bfo', attr, type, true, true);
        }
    });

    return directives;
}
function getGenericDirectives() {
    var directives = {};
    var genericDirectives = {
        'src':          'file',
        'title':        'i18n',
        'placeholder':  'i18n',
        'popover':      'i18n',
        'value':        'i18n',
        'alt':          'i18n',
        'text':         'i18n',
        'id':           null,
        'type':         null,
        'class':        null
    };
    var me = this;

    _.each(genericDirectives, function (type, attr) {

        // no b-class because it is just adding classes one time
        if (attr !== 'class') {
            directives['b-' + attr] = me.getGenericDirective('b', attr, null, true, false);
        }

        directives['bo-' + attr] = me.getGenericDirective('bo', attr, null, true, false);

        if (type) {
            directives['f-' + attr] = me.getGenericDirective('f', attr, type, false, true);
            directives['fo-' + attr] = me.getGenericDirective('fo', attr, type, false, true);
            directives['bf-' + attr] = me.getGenericDirective('bf', attr, type, true, true);
            directives['bfo-' + attr] = me.getGenericDirective('bfo', attr, type, true, true);
        }
    });

    return directives;
}
function getGenericDirectives ( ) { var directives = { } ; var genericDirectives = { 'src' : 'file' , 'title' : 'i18n' , 'placeholder' : 'i18n' , 'popover' : 'i18n' , 'value' : 'i18n' , 'alt' : 'i18n' , 'text' : 'i18n' , 'id' : null , 'type' : null , 'class' : null } ; var me = this ; _ . each ( genericDirectives , function ( type , attr ) { // no b-class because it is just adding classes one time if ( attr !== 'class' ) { directives [ 'b-' + attr ] = me . getGenericDirective ( 'b' , attr , null , true , false ) ; } directives [ 'bo-' + attr ] = me . getGenericDirective ( 'bo' , attr , null , true , false ) ; if ( type ) { directives [ 'f-' + attr ] = me . getGenericDirective ( 'f' , attr , type , false , true ) ; directives [ 'fo-' + attr ] = me . getGenericDirective ( 'fo' , attr , type , false , true ) ; directives [ 'bf-' + attr ] = me . getGenericDirective ( 'bf' , attr , type , true , true ) ; directives [ 'bfo-' + attr ] = me . getGenericDirective ( 'bfo' , attr , type , true , true ) ; } } ) ; return directives ; }
Add generic directives. This functionality should match up to the generic.directives.js
client side code.
Add generic directives . This functionality should match up to the generic . directives . js client side code .