1functionalAreas.component('modaleAlert', { 2 templateUrl: ['URLS', function (URLS) { 3 return URLS.COMPONENTS.modaleAlert; 4 }], 5 controller: ['$scope', '$element', '$timeout', ModaleAlertCtrl], 6 bindings: { 7 id: '@', 8 size: '@', 9 onContinuaCallback: '&', 10 onAnnullaCallback: '&', 11 title: '@', 12 text: '@', 13 primaryText: '@', 14 secondaryText: '@' 15 } 16}); 17 18function ModaleAlertCtrl($scope, $element, $timeout) { 19 var vm = this; 20 21 function reposition() { 22 var modal = $(this); 23 var dialog = modal.find('.modal-dialog'); 24 modal.css('display', 'block'); 25 26 // Dividing by two centers the modal exactly, but dividing by three 27 // or four works better for larger screens. 28 dialog.css('margin-top', Math.max(0, ($(window).height() - dialog.height()) / 2)); 29 } 30 31 /** 32 * show modaal 33 */ 34 $scope.$on('modal.alert.tornaindietro.show', function (e, params) { 35 var id = vm.id ? vm.id : 'alertTornaIndietro'; 36 37 $element.find('#' + id).on('show.bs.modal', reposition); 38 39 if (params && params.id) { 40 if (params.id === vm.id) { 41 id = params.id; 42 $element.find('#' + id).modal('show'); 43 } 44 } else { 45 $element.find('#' + id).modal('show'); 46 } 47 }); 48 49 /** 50 * hide modal 51 */ 52 $scope.$on('modal.alert.tornaindietro.hide', function (e, params) { 53 var id = vm.id ? vm.id : 'alertTornaIndietro'; 54 if (params && params.id) { 55 if (params.id === vm.id) { 56 id = params.id; 57 $element.find('#' + id).modal('hide'); 58 } 59 } else { 60 $element.find('#' + id).modal('hide'); 61 } 62 }); 63}
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.