1 2(function(){ 3 4 var app = angular.module('camerdata'); 5 6 app.controller('formImportaExportaController', function($scope, comunications, $translate, StorageService, $location, sharedProperties, $state, $document) { 7 8 $scope.$parent.settings.showBottomBannerGrey = true; 9 $scope.$parent.content.hideTopBar = false; 10 $scope.$parent.content.headerImage = "/img/landing/bbdd_espanolas_header.png"; 11 $scope.$parent.content.headerTitle = "importaExporta.key2"; 12 13 14 $scope.userData = {}; 15 $scope.userData.message = ""; 16 $scope.formulari = {}; 17 $scope.formulari.ubicacion = ""; 18 $scope.formulari.actividad = ""; 19 $scope.formulari.productos = ""; 20 $scope.formulari.observaciones = ""; 21 22 23 $scope.init = function(){ 24 $scope.codPortal = $scope.$parent.codPortal; 25 if (StorageService.getToken()) 26 { 27 $scope.userData = StorageService.getUserData(); 28 if($scope.userData.cod_pais == 'E'){ 29 $scope.userData.cod_pais = 'España'; 30 } 31 } 32 $scope.userData.errContact = false; 33 $scope.userData.errEmail = false; 34 $scope.userData.errMessage = false; 35 $scope.userData.errInfo = false; 36 $scope.userData.info = false; 37 $scope.userData.politica = false; 38 } 39 40 $scope.send = function() 41 { 42 sharedProperties.validateUserForm($scope) 43 44 if($scope.hasError) 45 { 46 $scope.$parent.content.modalForm = true; 47 }else{ 48 $scope.$parent.content.modalLoading = true; 49 comunications.sendSolicitudFormulario($scope.formulari, 'BBDD importacion exportacion', 50 $scope.userData).then(function(response){ 51 $scope.$parent.content.modalLoading = false; 52 $state.go("solicitudSent"); 53 }, function(error){ 54 $scope.$parent.content.modalLoading = false; 55 // $scope.$parent.content.modalForm = true; 56 }) 57 } 58 59 } 60 61 $scope.toTarifas = function() 62 { 63 StorageService.setOriginTarifas("estadisticas"); 64 //$state.go("formTarifas") 65 if ($state.href('informacion').indexOf("codPortal") !== -1) 66 { 67 var url = $state.href('informacion') + "&producto=importaExporta"; 68 } 69 else 70 { 71 var url = $state.href('informacion') + "?producto=importaExporta"; 72 } 73 window.open(url,'_blank'); 74 }; 75 76 }); 77})();
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.