PageSourceSearch

https://usssa.com/js/directives/uiColorpicker.js

js usssa.com collected 2026-09-24 09:32:03 UTC 880 bytes, 26 lines download raw bytes

1usssa.directive('uiColorpicker', function() {
2    return {
3        restrict: 'E',
4        require: 'ngModel',
5        scope: false,
6        replace: true,
7        template: "<span><input class='input-small' /></span>",
8        link: function(scope, element, attrs, ngModel) {
9            var input = element.find('input');
10            var options = angular.extend({
11                color: ngModel.$viewValue,
12                change: function(color) {
13                    scope.$apply(function() {
14                      ngModel.$setViewValue(color.toHexString());
15                    });
16                }
17            }, scope.$eval(attrs.options));
18            
19            ngModel.$render = function() {
20              input.spectrum('set', ngModel.$viewValue || '');
21            };
22            
23            input.spectrum(options);
24        }
25    };
26});

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.