1angular.module('carouselApp', []) 2 .controller('CarouselController', ['$scope', '$window', function($scope, $window) { 3 $scope.openFullSizedCarouselInNewTab = function(imageBytesArray, selectedImageIndex) { 4 var imagesListItemsHtml = ''; 5 for (var i = 0; i < imageBytesArray.length; i++) { 6 var imageBytes = imageBytesArray[i]; 7 imagesListItemsHtml += '<li data-orbit-slide='+i+' style="text-align:center; height: 100%;"><img ' + 8 'src="data:image/jpeg;base64,'+imageBytes+'" ' + 9 'style="transform:translateY(-50%); top:50%; position:relative; display:inline-block;" ' + 10 'alt="Image Unavailable"/></li>' 11 } 12 var foundationOrbitCarouselPage = 13 '<html>' + 14 '<head>' + 15 '<title>Vehicle Images</title>' + 16 '<link rel="stylesheet" type="text/css" href="'+cdnServer+'/css/foundation/5.4.0/css/normalize.css">' + 17 '<link rel="stylesheet" type="text/css" href="'+cdnServer+'/css/foundation/5.4.0/css/foundation.css">' + 18 '</head>' + 19 '<body style="background-color: #1e1e1e;">' + 20 '<ul data-orbit data-options="timer:false;" style="height: 100%;">' + imagesListItemsHtml + '</ul>' + 21 '<script type="text/javascript" src="'+cdnServer+'/css/foundation/5.4.0/js/vendor/jquery.js"></script>' + 22 '<script type="text/javascript" src="'+cdnServer+'/css/foundation/5.4.0/js/foundation/foundation.js"></script>' + 23 '<script type="text/javascript" src="'+cdnServer+'/css/foundation/5.4.0/js/foundation/foundation.orbit.js"></script>' + 24 '<script>' + 25 ' $(document).foundation();' + 26 ' $(\'div.orbit-container\').find(\'li[data-orbit-slide="'+selectedImageIndex+'"]\').trigger(\'click\');' + 27 '</script>' + 28 '</body>' + 29 '</html>'; 30 var html = new Blob([foundationOrbitCarouselPage], {type: 'text/html'}); 31 $window.open(URL.createObjectURL(html), '_blank'); 32 } 33 }]) 34 .directive('carousel', function() { 35 return { 36 restrict: 'E', 37 templateUrl: staticDirectory + '/javascript/angular-utils/templates/carouselCustomTemplate.html', 38 scope: { 39 imageByteArray: '=', 40 carouselWidth: '@', 41 carouselHeight: '@', 42 imageHeight: '@', 43 imageWidth: '@', 44 backgroundColor: '@' 45 } 46 }; 47 });
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.