PageSourceSearch

https://rh.camaraconchas.sp.gov.br/content/material-angular/js/modules/form.js

js camaraconchas.sp.gov.br collected 2026-10-08 20:51:28 UTC 4,243 bytes, 130 lines download raw bytes

1cecamApp 
2
3    // =========================================================================
4    // INPUT FEILDS MODIFICATION
5    // =========================================================================
6
7    //Add blue animated border and remove with condition when focus and blur
8
9    .directive('fgLine', function(){
10        return {
11            restrict: 'C',
12            link: function(scope, element) {
13                if($('.fg-line')[0]) {
14                    $('body').on('focus', '.form-control', function(){
15                        $(this).closest('.fg-line').addClass('fg-toggled');
16                    })
17
18                    $('body').on('blur', '.form-control', function(){
19                        var p = $(this).closest('.form-group');
20                        var i = p.find('.form-control').val();
21
22                        if (p.hasClass('fg-float')) {
23                            if (i.length == 0) {
24                                $(this).closest('.fg-line').removeClass('fg-toggled');
25                            }
26                        }
27                        else {
28                            $(this).closest('.fg-line').removeClass('fg-toggled');
29                        }
30                    });
31                }
32    
33            }
34        }
35        
36    })
37
38    
39
40    // =========================================================================
41    // AUTO SIZE TEXTAREA
42    // =========================================================================
43    
44    .directive('autoSize', function(){
45        return {
46            restrict: 'A',
47            link: function(scope, element){
48                if (element[0]) {
49                   autosize(element);
50                }
51            }
52        }
53    })
54    
55
56    // =========================================================================
57    // BOOTSTRAP SELECT
58    // =========================================================================
59
60    .directive('selectPicker', function(){
61        return {
62            restrict: 'A',
63            link: function(scope, element, attrs) {
64                //if (element[0]) {
65                    element.selectpicker();
66                //}
67            }
68        }
69    })
70    
71
72    // =========================================================================
73    // INPUT MASK
74    // =========================================================================
75
76    .directive('inputMask', function(){
77        return {
78            restrict: 'A',
79            scope: {
80              inputMask: '='
81            },
82            link: function(scope, element){
83                if (scope.inputMask != undefined)
84                    element.mask(scope.inputMask.mask);
85                else {
86                    var mask = $(element).attr('data-input-mask');
87                    if (mask != undefined)
88                        element.mask(mask);
89                }
90            }
91        }
92    })
93
94    
95    // =========================================================================
96    // COLOR PICKER
97    // =========================================================================
98
99    .directive('colordPicker', function(){
100        return {
101            restrict: 'A',
102            link: function(scope, element, attrs) {
103                $(element).each(function(){
104                    var colorOutput = $(this).closest('.cp-container').find('.cp-value');
105                    $(this).farbtastic(colorOutput);
106                });
107                
108            }
109        }
110    })
111
112
113
114    // =========================================================================
115    // PLACEHOLDER FOR IE 9 (on .form-control class)
116    // =========================================================================
117
118    .directive('formControl', function(){
119        return {
120            restrict: 'C',
121            link: function(scope, element, attrs) {
122                if(angular.element('html').hasClass('ie9')) {
123                    $('input, textarea').placeholder({
124                        customClass: 'ie9-placeholder'
125                    });
126                }
127            }
128            
129        }
130    })

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.