https://fxboss.firstcitizens.com/app/components/document/view_document_controller.js?v=31082026-1758
1var app = angular.module('bossApp'); 2app.controller('viewDocumentCtrl', ['$rootScope', '$scope', '$modalInstance', '$http', '$sce', 'DocumentService', function($rootScope, $scope, $modalInstance, $http, $sce, DocumentService) { 3 $scope.displayDocument = false; 4 5 var dir = $modalInstance.documentObject.directory; 6 var file = $modalInstance.documentObject.fileName; 7 var id = $modalInstance.documentObject.id; 8 var user_ref_id = $rootScope.user_ref_id.replace(/[(]/g,"openBrace").replace(/[)]/g,"closeBrace").replace(/[=]/g,"equals").replace(/[+]/g,"plus").replace(/[/]/g,"slash"); 9 var url = $rootScope.api_Path+"document/openDocument?fileName="+file+"&directory="+dir+"&user_ref_id="+ user_ref_id +"&mcdUserId="+$rootScope.currentUser.userId+"&id="+id; 10 var trustedURL=null 11 if(dir && (dir.indexOf("data:")!=-1 || dir.indexOf("blob")!=-1)){ 12 trustedURL = $sce.trustAsResourceUrl(dir); 13 }else{ 14 trustedURL = $sce.trustAsResourceUrl(url); 15 } 16 17 18 var xhr = new XMLHttpRequest(); 19 20 xhr.open('GET', trustedURL); 21 xhr.onreadystatechange = handler; 22 xhr.responseType = 'blob'; 23 if(keycloak.token){ 24 xhr.setRequestHeader('Authorization', 'Bearer ' + keycloak.token); 25 } 26 xhr.send(); 27 28 function handler() { 29 if (this.readyState === this.DONE) { 30 if (this.status === 200) { 31 // this.response is a Blob, because we set responseType above 32 var data_url = URL.createObjectURL(this.response); 33 document.querySelector('#output-frame-id').src = data_url; 34 } else { 35 console.error('no pdf :('); 36 } 37 } 38 } 39 40 var documentObject = $modalInstance.documentObject; 41 $scope.documentObject = angular.copy(documentObject); 42 $scope.cancel = function() { 43 $modalInstance.dismiss('cancel'); 44 }; 45 46 /** 47 * Display Document Type based upon file type. 48 */ 49 function getDocumentType(docType) { 50 if (docType) { 51 var arrData = docType.split("."); 52 return arrData[1]; 53 } 54 } 55 $scope.displayDocument = true; 56}]);
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.