PageSourceSearch

https://transportjudetean.cjbraila.ro/resurse/js/parcari_mobile/contraventionMobile.js?v=23.11.21

js cjbraila.ro collected 2026-09-25 08:38:21 UTC 8,101 bytes, 259 lines download raw bytes

1function populareValoriCombo_Contravention(attr, isJSON,attrJSON, attrJSON_FromVect,
2		isInputAutocomplete){ 
3	 $.ajax({type: "POST",
4			async : true,
5			url: app.contextPath +"/contraventiePolitistController/getValoriAttrContravention",
6			data: {"ftoken": Cookies.get('ftoken'),
7				 "attr":attr ,
8				 "schema":"dbo",
9				 "isJSON":isJSON, //true or false 
10				 "attrJSON": attrJSON, 
11				 "attrJSON_FromVect":attrJSON_FromVect //attrJSON_vect={null or value}
12			},
13			success: function (response) {
14				 var idSelect="#raportSelect_"+attr;
15				 if(attrJSON!=""){
16					 idSelect+="__"+attrJSON;
17				 }
18				 if(attrJSON_FromVect!=""){
19					 idSelect+="__"+attrJSON_FromVect;
20				 }
21				 if(isInputAutocomplete==true){
22					 $( idSelect ).autocomplete({
23					      source: response
24					    });
25				 }else{
26					 for(var i=0;i<response.length;i++){ 
27						 $(idSelect).append($('<option>', { 
28						        value: response[i],
29						        text : response[i] 
30						    }));
31					 }  
32				 }
33				
34			 },
35			error: function(){ 
36				hideLoading();
37			}
38     });//end ajax
39	
40}
41function populareValoriComboTipContraventie(attr){
42	 $.ajax({type: "POST",
43			async : true,
44			url: app.contextPath +"/contraventiePolitistController/getValoriTipContraventie",
45			data: {"ftoken": Cookies.get('ftoken'),
46				 "attr":attr 
47			},
48			success: function (response) {
49				 var idSelect="#raportSelectContraventie_"+attr; 
50				 for(var i=0;i<response.length;i++){ 
51					 $(idSelect).append($('<option>', { 
52					        value: response[i],
53					        text : response[i] 
54					    }));
55				 } 
56			 },
57			error: function(){ 
58				hideLoading();
59			}
60  });//end ajax
61}
62
63function amendaEmisa(idPVContraventie){
64	swal({
65		  title: "Sunteti sigur ca amenda a fost emisa?",
66		  text: "",
67		  icon: "warning", 
68		  buttons: true, 
69		  buttons: ["Nu", "Da"],
70		  dangerMode: true
71	}) .then(function(willDone){  
72		  if (willDone) {
73			 $.ajax({type: "POST",
74					async : true,
75					url: app.contextPath +"/contraventiePolitistController/amendaEmisa",
76					data: {"ftoken": Cookies.get('ftoken'),
77						 "idPVContraventie":idPVContraventie,
78						 "schema":"dbo"
79					},
80					success: function (response) {
81						console.log("in amendaEmisa",response);
82						 swal({
83							 title:  "Succes!",
84							 text:   "",
85							 icon:   "success",
86							 button: "Inchide",
87						 });
88						 app.Rapoarte.construireRaportConstareContraventii(); 
89					 },
90					error: function(){ 
91						hideLoading();
92					}
93			 	});//end ajax
94	 }});
95}
96function amendaAchitata(idPVContraventie,sum_amenda,achitat_sum_before){ 
97	
98	if(Number(sum_amenda)<0){
99		 swal({
100			 title:  "Va rugam introduceti contravaloarea amenzii!",
101			 text:   "",
102			 icon:   "warning",
103			 button: "Inchide",
104		 });
105	}else{
106	  var mesaj='<h3>Adăugare amendă</h3>';
107	  if(Number(achitat_sum_before)!=0){
108		  mesaj+="<label>Pana in acest moment s-a achitat valoarea de:"+achitat_sum_before+" lei.</label>";
109	  } 
110		  mesaj+='<label>Introduceți valoare amendă:</label> <input type="number" onchange="afiseazaMesajSuma('+idPVContraventie+','+sum_amenda+','+ac
110hitat_sum_before+')" id="achitat_sum">';
111		 
112	  var message = document.createElement('span');
113	    message.setAttribute("id", "divMesajAmendaAchitata");
114	    message.innerHTML = mesaj; 		
115	    if(idPVContraventie!=undefined){
116		    swal({
117			      title: "",
118			      content: message,
119			      buttons: true, 
120				  buttons: ["Renunță","Salvare"],
121			      closeOnClickOutside: false, 
122			      closeOnEsc: false 
123			    }).then(function(willDelete){  
124			    	if (willDelete) {
125			    		var achitat_sum= document.getElementById("achitat_sum").value;
126			    		achitat_sum=Number(achitat_sum)+Number(achitat_sum_before);
127			    			$.ajax({type: "POST",
128								async : true,
129								url: app.contextPath +"/contraventiePolitistController/amendaAchitata",
130								data: {"ftoken": Cookies.get('ftoken'),
131									 "idPVContraventie":idPVContraventie,
132									 "schema":"dbo",
133									 "achitat_sum":achitat_sum,
134									 "sum_amenda":sum_amenda
135								},
136								success: function (response) {
137									console.log("in amendaAchitata",response);
138									 swal({
139										 title:  "Succes!",
140										 text:   "",
141										 icon:   "success",
142										 button: "Inchide",
143									 });
144									 app.Rapoarte.construireRaportConstareContraventii(); 
145								 },
146								error: function(){ 
147									hideLoading();
148								}
149						 	});//end ajax 
150			    	    
151			 }});//end swal
152	    }
153	}//end if
154}
155function saveOrUpdateValoareAmenda(idPVContraventie,sum_amenda){
156	var mesaj='<h3>Contravaloare amendă</h3>'    
157	
158	 mesaj+='<label>Introduceți valoare amendă:</label> <input type="number" id="sum_amenda">';
159		 
160	  var message = document.createElement('span');
161	    message.setAttribute("id", "divMesajSum_amenda");
162	    message.innerHTML = mesaj; 		
163	    if(idPVContraventie!=undefined){
164		    swal({
165			      title: "",
166			      content: message,
167			      buttons: true, 
168				  buttons: ["Renunță","Salvare"],
169			      closeOnClickOutside: false, 
170			      closeOnEsc: false 
171			    }).then(function(willDelete) {  
172			    	if (willDelete) {
173			    		var achitat_sum= document.getElementById("sum_amenda").value; 
174			    			$.ajax({type: "POST",
175								async : true,
176								url: app.contextPath +"/contraventiePolitistController/saveValoareAmenda",
177								data: {"ftoken": Cookies.get('ftoken'),
178									 "idPVContraventie":idPVContraventie,
179									 "schema":"dbo", 
180									 "sum_amenda":achitat_sum
181								},
182								success: function (response) {
183									console.log("in amendaAchitata",response);
184									 swal({
185										 title:  "Succes!",
186										 text:   "",
187										 icon:   "success",
188										 button: "Inchide",
189									 });
190									 app.Rapoarte.construireRaportConstareContraventii(); 
191								 },
192								error: function(){ 
193									hideLoading();
194								}
195						 	});//end ajax 
196			    	    
197			 }});//end swal
198	    }
199}
200 function afiseazaMesajSuma(idPVContraventie,sum_amenda,achitat_sum_before){
201	 var achitat_sum= document.getElementById("achitat_sum").value;
202	 achitat_sum=Number(achitat_sum)+Number(achitat_sum_before); 
203	 if(achitat_sum>Number(sum_amenda)){ 
204		 swal({
205		      title: "Atenție!",
206		      text: "Valoarea introdusă e mai mare decât valoarea amenzii, introduceți suma corectă!",
207		      buttons: true, 
208			  buttons: ["Inchide","Introduceți altă valoare"],
209		      closeOnClickOutside: false, 
210		      closeOnEsc: false 
211		    }).then(function(willDelete){  
212		    	if (willDelete) {
213		    		amendaAchitata(idPVContraventie,sum_amenda,achitat_sum_before); 
214		    }});//end swal
215	 }
216 }
217 
218 function getAllPhotos(id,urlAPI){
219	 $.ajax({type: "POST",
220			async : false,
221			url: app.contextPath +"/contraventiePolitistController/getPhotos",
222			data: {"ftoken": Cookies.get('ftoken'),
223				 "id":id 
224			},
225			success: function (response) {
226				console.log(response); 
227				for(var i in response){
228					var idPV=response[i].id;
229					var photos=response[i].photos;
230					 var txtPhoto="";
231					for(var j in photos){
232						var urlNew=urlAPI+photos[j];
233					txtPhoto+="<img src='resurse/icons/doc_negru.png' width='25px' height='auto' class='masterTooltip' title='PV-contraventie' onclick='window.open(\""+urlNew+"\",\"_blank\");' >";
234					 	}
235					$("#photoIdsPV_"+idPV).html(txtPhoto); 
236				}
237				
238			 },
239			error: function(){ 
240				hideLoading();
241			}
242       });//end ajax
243 }
244 
245function getPozeContravention(idDiv_galerie, vectPhoto,urlAPI){
246	var itemsPoze=[];
247	for(var i in vectPhoto) {
248		itemsPoze.push({src: urlAPI+vectPhoto[i]});
249	} 
250	 $('#'+idDiv_galerie).magnificPopup({ //creez galeria de imagini
251		    items: itemsPoze,
252		    tLoading: 'Loading image ...',
253		    gallery: {
254				enabled: true,
255				navigateByImgClick: true
256			},
257	 		 type: 'image' // this is default type
258     });
259}

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.