PageSourceSearch

https://www.bgchc.org/html/common/themes/arrevalib_so.js

js bgchc.org collected 2026-09-24 22:40:47 UTC 4,113 bytes, 136 lines download raw bytes

1// ARREVA LIB 23 07 2020
2
3// TABLE RESPONSIVE
4
5function tabres_f(idtable){
6  eval('document.getElementById("' + idtable + '").scrollBy(200, 0, "smooth")');
7}
8function tabres_r(idtable){
9  eval('document.getElementById("' + idtable + '").scrollBy(-200, 0, "smooth")');
10}
11	
12function tabres_dir(idconte){
13	var x = eval('document.getElementById("'+ idconte +'")');
14	var y_ofx = x.offsetWidth;
15	console.log(idconte +' - '+ y_ofx);
16	var y = x.getElementsByClassName("rhscont_div_int")[0].id;
17	var yint_ofx = x.getElementsByClassName("rhscont_div_int")[0].getElementsByTagName("thead")[0].offsetWidth;
18	//console.log(yint_ofx);
19
20	if( yint_ofx > y_ofx ){
21		x.getElementsByClassName("rhscont_div_int")[0].style.display = "block";
22		document.getElementById("fix_tabler_class").innerHTML = "<style>.table_reports_fix_buttons{width: calc(100% - 94px);margin: 0 auto;display: block;}</style>"
23	}
24	var nodel = document.createElement("DIV");
25		if( yint_ofx > y_ofx ){
26		nodel.setAttribute("class", "tri_l thead_sup");
27		}else{
28		nodel.setAttribute("class", "tri_l");
29		}
30	nodel.setAttribute("title", "Scroll Left");
31	var nodelf = "tabres_r('"+ y + "')"
32	eval('nodel.setAttribute("onclick", "' + nodelf +'")');
33	x.appendChild(nodel);
34
35	var noder = document.createElement("DIV");
36		if( yint_ofx > y_ofx ){
37		noder.setAttribute("class", "tri_r thead_sup");
38		}else{
39		noder.setAttribute("class", "tri_r");	
40		}
41	noder.setAttribute("title", "Scroll Right");
42	var noderf = "tabres_f('"+ y + "')"
43	eval('noder.setAttribute("onclick", "' + noderf +'")');
44	x.appendChild(noder);
45
46}
47
48/* DETECT portlet-journal-content */
49
50function detect_pjc(){
51	var x = document.getElementsByClassName("portlet-journal-content");
52	var pjclenght = document.getElementsByClassName("portlet-journal-content").length;
53	//console.log('portlet-journal-content: ' + pjclenght );
54		if (pjclenght != 0){	
55			var i;
56			for (i = 0; i < pjclenght; i++) {
57				var y = x[i].getElementsByClassName("div_anchor").length;
58				var q = x[i].getElementsByClassName("adm_mode").length;
59				var z = x[i].id;
60				//console.log('Y: ' + y  );
61				if(y != 0){
62					//console.log('Y n : ' + y + " - z: " + z );
63					eval('document.getElementById("' + z + '").style.marginBottom = "0px"');
64				}
65				if(q != 0){
66					eval('document.getElementById("' + z + '").style.marginBottom = "0px"');
67				}
68			}
69		}	
70}
71
72
73$( window ).on( "load", function() {
74	detect_pjc();
75});
76
77 // ONLINE-ADMINISTRATION DETECT
78
79function oa_det(){
80	
81	var lat_menu_level_1 = document.getElementsByClassName("lat_menu_level_1");
82	var lat_menu_level_1_l = document.getElementsByClassName("lat_menu_level_1").length;
83	
84	if (lat_menu_level_1_l != 0){
85		var lat_menu_level_1_li = document.getElementsByClassName("lat_menu_level_1_li");
86		var lat_menu_level_1_li_l = document.getElementsByClassName("lat_menu_level_1_li").length;
87		
88		var i;
89		for (i = 0; i < lat_menu_level_1_li_l; i++) {
90			var x = lat_menu_level_1_li[i].getElementsByClassName("lat_menu_level_1_a")[0].href
91			var y = x.length
92			var z = x.slice((y - 21),y)
93			//console.log('xxx: ' + x + 'yyy: ' + y + ' zzz: '+ z);
94			if (z == "online-administration"){
95				//console.log('pasa');
96				lat_menu_level_1_li[i].title = "Online Administration"
97			}
98
99		}
100	}
101	
102	// RESPONSIVE MENU
103	
104	var res_menu_level_1 = document.getElementsByClassName("ef_div_res_l1");
105	var res_menu_level_1_l = document.getElementsByClassName("ef_div_res_l1").length;
106	if (res_menu_level_1_l != 0){
107
108		var j;
109		for (j = 0; j < res_menu_level_1_l; j++) {
110			var xx = res_menu_level_1[j].getElementsByClassName("res_link")[0].href
111			var yy = xx.length
112			var zz = xx.slice((yy - 21),yy)
113			//console.log('xxx: ' + xx + 'yyy: ' + yy + ' zzz: '+ zz);
114			if (zz == "online-administration"){
115
116				res_menu_level_1[j].parentElement.title = "Online Administration"
117			}
118
119		}
120	}
121	
122	
123	
124}
125
126$( window ).on( "load", function() {
127	 oa_det();
128});
129
130$(document).ready(function(){
131	$('#top_responsive_button_menu_a').click(function(){
132		// oa_det();
133	})
134});
135
136

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.