1(function() { 2 'use strict'; 3 4 angular 5 .module("irk") 6 .directive("zgodaComponent", ZgodaComponent); 7 8 function ZgodaComponent() { 9 return { 10 restrict : "E", 11 transclude: true, 12 scope: { 13 domyslna: '=?', 14 indexZgody: '=?', 15 zgody: '=', 16 brakujaceZgody: '=' 17 }, 18 template: function() { 19 // Celowe umieszczenie template w pliku js. 20 // Użycie ng-transclude uniemożliwia skorzystania z ng-include. 21 // ng-include kompiluje podany template zanim doda go do 22 // drzewa DOM, wiÄc ng-transclude nie może byÄ wtedy przekazany. 23 return '' + 24 '<div ng-switch on="domyslna">' + 25 '<div ng-switch-when="true">' + 26 '<input type="checkbox" ng-model="zgody[0]" style="margin-right: 0.5em;">' + 27 '<label ng-if="isBrakujeZgody(brakujaceZgody, 0)" class="chbx checkbox-error-label" tooltip="{{domyslnaTrescBrakuZgody}}">' + 28 '<span>{{domyslnaTrescZgody}}</span><sup><span class="glyphicon glyphicon-asterisk" style="font-size:0.7em;"></span></sup>' + 29 '</label>' + 30 '<label ng-if="!isBrakujeZgody(brakujaceZgody, 0)" class="chbx">' + 31 '<span>{{domyslnaTrescZgody}}</span><sup><span class="glyphicon glyphicon-asterisk" style="font-size:0.7em;"></span></sup>' + 32 '</label>' + 33 '</div>' + 34 '<div ng-switch-default>' + 35 '<input type="checkbox" ng-model="zgody[indexZgody]" style="margin-right: 0.5em;">' + 36 '<label ng-if="isBrakujeZgody(brakujaceZgody, indexZgody)" class="chbx checkbox-error-label" tooltip="{{domyslnaTrescBrakuZgody}}">' + 37 '<ng-transclude></ng-transclude>' + 38 '</label>' + 39 '<label ng-if="!isBrakujeZgody(brakujaceZgody, indexZgody)" class="chbx">' + 40 '<ng-transclude></ng-transclude>' + 41 '</label>' + 42 '</div>' + 43 '</div>'; 44 }, 45 controller: function($scope, i18n) { 46 $scope.domyslna = angular.isDefined($scope.domyslna) ? $scope.domyslna : false; 47 48 $scope.isBrakujeZgody = function(brakujaceZgody, indexZgody) { 49 return brakujaceZgody && brakujaceZgody.includes(indexZgody); 50 } 51 52 var pobierzTlumaczenia = function() { 53 i18n.get('interfejs.irk.strona.Rejestracja.Zgoda').then(function(tlumaczenie) { 54 $scope.domyslnaTrescZgody = tlumaczenie; 55 }); 56 i18n.get('interfejs.irk.strona.Rejestracja.Zgoda.required').then(function(tlumaczenie) { 57 $scope.domyslnaTrescBrakuZgody = tlumaczenie; 58 }); 59 }; 60 pobierzTlumaczenia(); 61 62 } 63 } 64 } 65})();
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.