1(function() { 2 'use strict'; 3 4 angular 5 .module('irk') 6 .factory('ModulFotografia', ModulFotografia); 7 function ModulFotografia(AbstractModulService, Upload, $modal, $http) { 8 var modul = angular.extend({}, AbstractModulService); 9 modul.process = function($mainScope) { 10 $mainScope.imageChange = new Date().getTime(); 11 $mainScope.selectedImage = null; 12 $mainScope.croppedImage = null; 13 $mainScope.croppedImageBlob = null; 14 $mainScope.showPreview = true; 15 $mainScope.fileSelected = function($files, $event) { 16 if($files && $files.length) { 17 var file = $files[0]; 18 $mainScope.selectedImage = file; 19 $mainScope.imageCropper = $modal.open({ 20 animation: true, 21 templateUrl: 'imageCropper.html', 22 scope: $mainScope, 23 backdrop: 'static' 24 }).result.then(function(resultBlob) { 25 Upload.upload({ 26 url: 'REST/zdjecia/upload', 27 file: Upload.rename(resultBlob, 'croppedImage.png') 28 }).progress(function (evt) { 29 evt.config.file.progress = parseInt(100.0 * evt.loaded / evt.total); 30 }).success(function (data, status, headers, config) { 31 $mainScope.imageChange = new Date().getTime(); 32 $mainScope.updateBledyFotografii(); 33 }).error(function(data, status, headers, config) { 34 var response = config.__XHR.response; 35 if(!angular.isUndefined(response) && response != '') { 36 $mainScope.popErrorToasters(response); 37 } 38 console.debug(data); 39 }); 40 }); 41 } 42 }; 43 $mainScope.bledyFotografii = undefined; 44 $mainScope.updateBledyFotografii = function(group) { 45 return $http.get('REST/wazneInformacje/bledyFotografii', {}) 46 .then(function (bledyFotografii) { 47 $mainScope.bledyFotografii = bledyFotografii.data; 48 }); 49 }; 50 $mainScope.updateBledyFotografii(); 51 } 52 return modul; 53 } 54})();
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.