Sha256: eb28e35db64a936b13b57d56f63226a7fb3bfb3ccf383830936265c04b226925

Contents?: true

Size: 802 Bytes

Versions: 23

Compression:

Stored size: 802 Bytes

Contents

angular.module('AgileProxy').directive('appEnhancedFormElement', function ($rootScope, $compile, DomIdService) {
    return {
        restrict: 'A',
        scope: true,
        link: function (scope, element, attrs) {
            var label, localScope;
            if (element.attr('id') === undefined) {
                element.attr('id', DomIdService.nextId());
            }
            localScope = $rootScope.$new(true);
            angular.extend(localScope, {
                elementId: element.attr('id'),
                labelText: attrs.label
            });
            label = $compile('<label class="control-label" for="elementId">{{labelText}}</label>')(localScope);
            element.wrap('<div class="form-group">');
            element.parent().prepend(label);

        }
    };
});

Version data entries

23 entries across 23 versions & 2 rubygems

Version Path
agile-proxy-0.1.26 assets/ui/app/directive/AppEnhancedFormElement.js
agile-proxy-jruby-0.1.26-jruby assets/ui/app/directive/AppEnhancedFormElement.js
agile-proxy-jruby-0.1.25-jruby assets/ui/app/directive/AppEnhancedFormElement.js
agile-proxy-0.1.25 assets/ui/app/directive/AppEnhancedFormElement.js
agile-proxy-0.1.24 assets/ui/app/directive/AppEnhancedFormElement.js
agile-proxy-0.1.23 assets/ui/app/directive/AppEnhancedFormElement.js
agile-proxy-0.1.22 assets/ui/app/directive/AppEnhancedFormElement.js
agile-proxy-0.1.21 assets/ui/app/directive/AppEnhancedFormElement.js
agile-proxy-0.1.20 assets/ui/app/directive/AppEnhancedFormElement.js
agile-proxy-0.1.19 assets/ui/app/directive/AppEnhancedFormElement.js
agile-proxy-0.1.18 assets/ui/app/directive/AppEnhancedFormElement.js
agile-proxy-0.1.13 assets/ui/app/directive/AppEnhancedFormElement.js
agile-proxy-0.1.12 assets/ui/app/directive/AppEnhancedFormElement.js
agile-proxy-0.1.11 assets/ui/app/directive/AppEnhancedFormElement.js
agile-proxy-0.1.10 assets/ui/app/directive/AppEnhancedFormElement.js
agile-proxy-0.1.9 assets/ui/app/directive/AppEnhancedFormElement.js
agile-proxy-0.1.8 assets/ui/app/directive/AppEnhancedFormElement.js
agile-proxy-0.1.7 assets/ui/app/directive/AppEnhancedFormElement.js
agile-proxy-0.1.6 assets/ui/app/directive/AppEnhancedFormElement.js
agile-proxy-0.1.5 assets/ui/app/directive/AppEnhancedFormElement.js