PageSourceSearch

https://dfe.eprviamineira.com.br/content/js/angular/app.js

js eprviamineira.com.br collected 2026-10-02 18:15:56 UTC 3,233 bytes, 114 lines download raw bytes

1(function (window, angular) {
2
3    var module = angular.module("RFPe", [
4        "ui.utils.masks",
5        'lr.upload',
6        'ngMessages',
7        'slick'
8    ]);
9
10    module.config(TratamentoGlobalExcecao);
11    module.config(ConfiguracaoPadraoHttp);
12    module.run(ConfiguracaoPadraoHeaders);
13
14    TratamentoGlobalExcecao.$inject = ['$provide'];
15    function TratamentoGlobalExcecao($provide) {
16        // if ((sessionStorage.atualizarSenha === true || sessionStorage.atualizarSenha === 'true') && 
17        // 	 document.location.pathname !== '/password-change.html'){
18		// 	document.location.href = 'password-change.html';
19		// }
20                      
21        if (document.location.pathname !== '/password-recovery.html' &&
22			document.location.pathname !== '/password-recovery-complete.html' &&
23        	//document.location.pathname !== '/password-change.html' &&
24        	document.location.pathname !== '/login.html' &&
25        	document.location.pathname !== '/signup.html'){
26            
27    		$.ajax({
28				  url: CONFIG.baseService + 'site/api/session/' + sessionStorage.userId +'/state',
29				  headers: {
30					  'x-auth-token': sessionStorage.token,
31					  'x-requested-with': true 
32				  },
33				  cors: true,
34				  crossDomain: true,
35				  success: function(){
36					  console.log('Sessão OK');
37				  },
38	              error: function(XMLHttpRequest, textStatus, errorThrown) { 
39	            	  delete sessionStorage.token;
40					  document.location.href = 'login.html';
41	              } 
42    		});           			
43   		}
44
45        $provide.decorator("$exceptionHandler", ['$delegate', function ($delegate) {
46            return function (exception, cause) {
47
48                // loga o erro
49                //Rollbar.critical(exception.message);
50				//alert(exception.message);
51				console.error(exception.message);
52
53                // rollbar log
54                $delegate(exception, cause);
55            };
56        }]);
57		
58        $('.fa-sign-out').parent().attr('href','#').on('click',function(){
59			bootbox.confirm({
60				message: 'Confirma o logout do portal?',
61				buttons: {
62					confirm: {
63						label: 'Sim',
64						className: 'btn-danger'
65					},
66					cancel: {
67						label: 'Não',
68						className: 'btn-success'
69					}
70				},
71				callback: function (result) {
72					if (result){
73						
74						$.ajax({
75						  url: CONFIG.baseService + 'site/api/logout',
76						  headers: {
77							  'x-auth-token': sessionStorage.token,
78							  'x-requested-with': true 
79						  },
80						  cors: true,
81						  crossDomain: true,
82						  success: function(){
83								delete sessionStorage.token;
84								document.location.href = 'login.html';
85						  }
86						});
87						
88					}
89				}
90			});			
91			
92			return false;
93		});
94
95    };
96
97    /*
98    // Configuração global de requisições HTTP
99    */
100    ConfiguracaoPadraoHttp.$inject = ['$httpProvider'];
101    function ConfiguracaoPadraoHttp($httpProvider) {
102
103        $httpProvider.defaults.cache = false;
104
105        // interceptadores
106        $httpProvider.interceptors.push('httpLoader');
107    };
108
109    ConfiguracaoPadraoHeaders.$inject = ['$http'];
110    function ConfiguracaoPadraoHeaders($http) {
111        $http.defaults.headers.common["AjaxRequest"] = "true";
112    };
113
114})(window, angular);

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.