PageSourceSearch

https://www.tiemposur.com.ar/common/www/js/catalog/catalog_generic2.js?v=2

js tiemposur.com.ar collected 2026-10-02 10:05:28 UTC 8,724 bytes, 336 lines download raw bytes

1page_load=false;
2var Async=true;
3var modalClass="";
4function pageload(hash) {
5	if(hash) {
6		/*if($.browser.msie) {
7			// jquery's $.load() function does't work when hash include special characters like aao.
8			hash = encodeURIComponent(hash);
9		}*/
10		ajax_operation(hash);
11	} else {
12		if (page_load){
13			/*$('#method').val('load');
14			$('#Module').val('');
15			document.f1.method="GET";
16			document.f1.action=location.href;
17			document.f1.su
18			$('#f1').submit();*/
19			if ($('#AMBIENTE').val()!='FRONT'){
20				
21				location.href = location.href.replace('?fa=new','')+"?fa=new";//location.reload(); //ajax_default(hash);
22			}
23		}
24	}
25}
26
27$(document).ready(function() {
28	//load_datepicker();
29	$.history.init(pageload);
30	page_load=true;
31	//$.historyInit(pageload, "jquery_history.html");
32	$("#contenedor").show();
33});
34
35
36
37
38function call_func_confirm(accion,id){
39	if(confirm('Estas Seguro?')){
40		call_func(accion,id);
41	}
42}
43
44function call_func(accion,id){
45	$("#ProductId").val(id);
46	call_bak(accion);
47}
48
49function call_func_module(obj,accion,id){
50	module=$(obj).closest("div.module-contents").attr("id");
51	$("#ProductIdSel").val(id);
52	call_bak_module(module,accion);
53}
54
55function call_bak_module(module,method){
56	if (module){
57		$('#Module').val(module);
58	}
59	else{
60		$('#Module').val('');
61	}
62	call_bak_operation(module,method);
63}
64
65function call_bak_method(obj,method){
66	if ($(obj).closest(".row").attr("id")){
67		$("#row_id").val($(obj).closest(".row").attr("id"));
68	}
69	
70	module=$(obj).closest("div.module-contents").attr("id");
71	call_bak_module(module,method);
72}
73
74
75function call_bak(method){
76	$('#Module').val('');
77	call_bak_operation(null,method);
78}
79
80function call_bak_send(){
81	method=$('#method').val();
82	module=$('#Module').val();
83	call_bak_module(module,method);
84}
85
86
87var centerPopup = function(hash){
88        windowHeight   = jQuery(window).height();
89        linkOffset     = jQuery("html").scrollTop();
90        hash.w.css('top', linkOffset + (windowHeight * .1)).show();
91}
92
93var data_return;
94function call_bak_operation(module,method){
95
96	/*if ($('#PATH_URL_MRW').val()){
97		url_call_bak=$('#PATH_URL_MRW').val()+"ajax_operation.php";
98	}
99	else{
100		url_call_bak="ajax_operation.php";
101	}*/
102	url_call_bak=$('#Page').val();
103	//url_call_bak=$('#Page').val()+"/"+method;
104	var valid=true;
105	$('#method').val(method);
106	$.ajax({
107		type: 'POST',
108		url: url_call_bak,
109		cache: false,
110		async:Async,
111		dataType: "json",
112		data: $('#f1').serialize()+"&post_ajax=1",
113		error: function (xhr, ajaxOptions, thrownError) {
114			console.log(xhr.status);
115			console.log(thrownError);
116	       /* alert(xhr.status);
117	        alert(thrownError);
118	        alert(url_call_bak);
119	        alert ($('#f1').serialize()+"&post_ajax=1");
120	        */
121	      },
122		success: function(data){
123			
124			$.each(data.controls,function( intIndex, objValue ){
125				
126					if (objValue.type=="contenedor"){
127				 	 	$('#'+objValue.contenedor).writeCapture().html(objValue.html);
128				 	 	$('#'+objValue.contenedor).show();
129				 	 	$(".button").removeClass('in_process');
130				 	 	$("button").removeClass('in_process');
131				 	}else if (objValue.type=="append"){
132				 	 	$('#'+objValue.contenedor).append(objValue.html);
133				 	 	$('#'+objValue.contenedor).show();
134				 	}else if (objValue.type=="contenedor_show"){
135				 	 	$('#'+objValue.contenedor).show();
136				 	}else if (objValue.type=="contenedor_hide"){
137				 	 	$('#'+objValue.contenedor).hide();
138				 	}else if (objValue.type=="message"){
139				 		alert(objValue.message);
140				 	}else if (objValue.type=="placeholder"){
141				 		$('.'+objValue.contenedor).html(objValue.html);
142				 	}else if (objValue.type=="placeholder_show"){
143				 		$('.'+objValue.contenedor).show();
144				 	}else if (objValue.type=="formulario"){
145				 		$('#'+objValue.variable).val(objValue.valor);
146				 	}else if (objValue.type=="call_bak"){
147				 		call_bak(objValue.method);
148				 	}else if (objValue.type=="function"){
149				 		data_return=objValue.data;
150				 		eval(objValue.funccion+"()");
151				 	}else if (objValue.type=="historyLoad"){
152				 		data=objValue.history;
153						$.history.load(data);
154				 	}else if (objValue.type=="url_refresh"){
155				 		window.history.pushState("object or string", "Title", objValue.url);
156				 	}else if (objValue.type=="location"){
157				 		location.href=objValue.page;
158				 	}else if (objValue.type=="back"){
159				 		history.go(-1);
160
161				 	}else if (objValue.type=="return"){
162				 		valid= objValue.valor;
163				 	}else if (objValue.type=="error"){
164				 	 	$('#'+objValue.control).html(objValue.message);
165				 	 	valid=false;
166				 	}else if (objValue.type=="anchor"){
167				 		//alert(objValue.target);
168				 	 	window.scrollTo(0, $('#'+objValue.target).position().top);
169				 	}else if (objValue.type=="modal"){
170				 		$(".button").removeClass('in_process');
171				 		$("button").removeClass('in_process');
172				 		if (/*$('#AMBIENTE').val()=='backend' */$('#myModal').html() ){
173				 			if ($('#myModal').hasClass('in') && objValue.width!="refresh"){
174				 				if (objValue.width=='full'){
175					 				$('#myModal2 .modal-dialog').addClass('full-screen');
176					 			}
177					 			else{
178					 				$('#myModal2 .modal-dialog').removeClass('full-screen');
179					 			}
180				 				if (objValue.class){
181					 				$('#myModal .modal-dialog').addClass(objValue.class);
182					 			}
183				 				$("#content_modal2").html(objValue.html);
184				 				$('#myModal2').modal('show');
185				 			}
186				 			else{
187				 				
188				 				if (objValue.width=='full'){
189					 				$('#myModal .modal-dialog').addClass('full-screen');
190					 			}
191					 			else{
192					 				$('#myModal .modal-dialog').removeClass('full-screen');
193					 			}
194				 				if (objValue.class){
195				 					modalClass=objValue.class;
196					 				$('#myModal .modal-dialog').addClass(modalClass);
197					 			}
198				 				else{
199				 					$('#myModal .modal-dialog').removeClass(modalClass);
200							 		
201				 				}
202				 				
203				 				$("#content_modal").html(objValue.html);
204				 				
205				 				if ($("#paywall_status").val()){
206				 					$('#myModal').modal({
207						 				   backdrop: 'static',
208						 				   keyboard: false
209						 				});
210				 				}
211				 				else{
212				 					$('#myModal').modal({
213						 				   
214						 				});
215				 				}
216				 				
217				 				
218				 				//$('#myModal').modal('show');
219				 			}
220				 			
221				 		}
222				 		else{
223				 			$("#content_modal").html(objValue.html);
224					 		
225				 			$("#jqEdit").jqm().jqmShow();
226					 		if (IsNumeric(objValue.width)){
227						 		width=objValue.width;
228					 		}
229					 		else{
230					 			width=337;
231					 		}
232					 		margin_left=width/ 2;
233					 		$("#jqEdit").css('margin-left', '-'+margin_left+'px');
234					 		$("#jqEdit").css('width', width+'px');
235				 		}
236				 		load_editor();
237
238				 	 	//$("#jqEdit").jqm({onShow:centerPopup}).jqmShow();
239						//$("#jqEdit").jqm().css('top',800).jqmShow();
240				 	}else if (objValue.type=="modal_hide"){
241				 		if (/*$('#AMBIENTE').val()=='backend' */$('#myModal').html() ){
242					 		
243				 			if ($('#myModal2').hasClass('in')){
244				 				$('#myModal2').modal('hide');
245				 			}
246				 			else{
247				 				$('#myModal').modal('hide');
248				 			}
249				 			
250				 			
251				 		}
252				 		else{
253				 			$("#jqEdit").jqm().jqmHide();
254				 		}
255				 	}else if (objValue.type=="remove_process"){
256				 	 	$(".button").removeClass('in_process');
257				 	 	$("button").removeClass('in_process');
258				 	}
259
260			});
261			load_data_modules();
262		}
263	});
264	
265
266	return valid;
267}
268
269
270
271
272
273function ajax_default(){
274	$("#url_params").val('');
275	call_bak('method_default');
276}
277
278function ajax_operation(param) {
279	if (param=='comentarios' || param=='ancla_clasificados') return;
280	
281	$('#method').val('');
282	v_param=param.split("/");
283	if(v_param[0]!="0"){
284		$("#url_params").val(param);
285		$("#resultadoBusqueda").show();
286		//CFF Change
287		//call_bak(v_param[0]);
288		call_bak("call_bak");
289	}
290	//eval(v_param[0]+"_bak(v_param);");
291}
292
293
294function CatalogListView_bak(v_param) {
295	$("#class").val("ModCatalogs");
296	$("#method").val(v_param[0]);
297	$("#id").val(v_param[1]);
298	$("#Catalog_CatalogId").html(v_param[1]);
299	$("#ProductId").val("");
300	$("#p").val(v_param[2]);
301	$("#filters").val(v_param[3]);
302	$("#property_orden").val(v_param[4]);
303	$('#sub_menu_'+$("#id").val()).addClass("active");
304
305	call_bak($("#method").val());
306}
307
308function ProductEditView_bak(v_param) {
309	$("#class").val("ModCatalogs");
310	$("#method").val(v_param[0]);
311	$("#id").val(v_param[1]);
312	$("#ProductId").val(v_param[2]);
313	call_bak($("#method").val());
314}
315
316function ProductGoView_bak(v_param) {
317	$("#class").val("ModCatalogs");
318	$("#method").val(v_param[0]);
319	$("#id").val(v_param[1]);
320	$("#ProductId").val(v_param[2]);
321	call_bak($("#method").val());
322}
323
324
325function scollToId(id){
326   window.scrollTo(0,$("#"+id).offset().top);
327}
328
329function scollTo(id){
330	   window.scrollTo(0,$(id).offset().top);
331}
332
333function local_reload(){
334	location.reload(); 
335
336}

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.