PageSourceSearch

https://www.oroweat.es/assets/components/site.js?r=382

js oroweat.es collected 2026-09-26 16:29:50 UTC 5,731 bytes, 207 lines download raw bytes

1var page_num_clicked = false;
2var submitted = false;
3
4
5$().ready(function(){
6	
7	
8	window.onscroll = function() {
9		headerFixed()
10	};
11
12	var header = document.getElementById("header");
13	var sticky = header.offsetTop;
14	
15	function headerFixed() {
16		if (window.pageYOffset > sticky) {
17			header.classList.add("fixed");
18		} else {
19			header.classList.remove("fixed");
20		}
21	}
22	
23	
24	
25	$("body").on("click", "#bt_more_products",function(){
26        $("#more_products").slideDown();
27        $(this).remove();
28    });
29    
30    
31    
32    var header_wrapper_height = $("header").height();
33    $(".scroll_to").click(function (e){
34        e.preventDefault();
35        var div = $(this).data("rel");
36        $('html, body').animate({
37            scrollTop: $("#"+div).offset().top - header_wrapper_height
38        }, 300);
39    });
40    
41    
42    if ($(".image_gallery").length>0) {
43    	$(".image_gallery").lightGallery();
44    } 
45    
46    
47	$("body").on("click", ".open_share_window",function(e){
48		e.preventDefault();
49		window.open($(this).attr("href"),"share","height=300,width=700,scrollbars=no,status=no,titlebar=no,toolbar=no,menubar=no,location=no");
50	});
51	
52	$("body").on("click", ".nav-link.scroll_to",function(e){
53		$(".nav-item").removeClass("active");
54		$(this).parent().addClass("active");
55	});
56
57	
58	
59
60
61    $("body").on("click", ".input_lbl_wrapper",function(){
62        $(this).find("input,select,textarea").focus();
63    });
64
65    $("body").on("change", "select",function(){
66        if ($(this).hasClass("placeholder")) {
67            $(this).removeClass("placeholder");
68        }
69    });
70
71    $("body").on("click", ".input_radio_lbl_wrapper ul li",function(){
72        $(this).parent("ul").children("li").removeClass("selected");
73        $(this).parents(".input_radio_lbl_wrapper").find("input").val($(this).data("rel"));
74        $(this).addClass("selected");
75    });
76
77    $("body").on("focusin", ".input_lbl_wrapper input, .input_lbl_wrapper select, .input_lbl_wrapper textarea",function(){
78        var obj = $(this);
79        if (obj.hasClass('date_mask')) {
80            setTimeout(function(){ 
81                obj.attr('placeholder','Ej: 05/03/1996');
82             }, 100);
83        }
84        obj.parents(".input_lbl_wrapper").addClass("focus animate");
85        obj.children("option:first").show();
86    });
87
88    $("body").on("focusout", ".input_lbl_wrapper input, .input_lbl_wrapper select, .input_lbl_wrapper textarea",function(){
89        if ($(this).val()=='') {
90            $(this).parents(".input_lbl_wrapper").removeClass("focus");
91        }
92        $(this).attr('placeholder','');
93    });
94
95    $(".input_lbl_wrapper").each(function(){
96        if ($(this).find("input,select,textarea").val()!='') {
97            $(this).addClass("focus");
98        }
99        if ($(this).find(".input_value").text()!='') {
100            $(this).addClass("focus");
101        }
102    });
103
104    $(".input_radio_lbl_wrapper").each(function(){
105        if ($(this).find("input").val()!='') {
106            var valor = $(this).children("input").val();
107            $(this).find("li[data-rel='"+valor+"']").addClass("selected");
108        }
109    });
110
111    $('[data-toggle="tooltip"]').tooltip();
112
113    if ($('.date_mask').length>0) {
114        $('.date_mask').mask('00/00/0000');
115    }
116    if ($('.date_time_mask').length>0) {
117        $('.date_time_mask').mask('00/00/0000 00:00');
118    }
119    if ($('.time_mask').length>0) {
120        $('.time_mask').mask('00:00');
121    }
122    if ($('.phone_mask').length>0) {
123        $('.phone_mask').mask('000000000');
124    }
125    if ($('.cp_mask').length>0) {
126        $('.cp_mask').mask('00000');
127    }
128
129    if ($('.only_number').length>0) {
130        $('.only_number').mask('0#');
131    }
132
133    if ($('.cp_iban').length>0) {
134        $('.cp_iban').mask('SS0000000000000000000000');
135	}
136
137	if ($('.cp_money').length>0) {
138        $(".cp_money").keypress(function(e){
139			var keyCode = e.which;
140			if ($(this).val().indexOf(',')>-1) {
141
142			} else {
143				if (keyCode==44) {
144					return true;
145				}
146			}
147			if (keyCode>=48 && keyCode<=57) {
148				return true;
149			}
150			if (keyCode==13	) {
151				return true;
152			}
153			return false;
154		
155		});
156	}
157
158
159    $("body").on("submit",".ajax_form", function(e){
160        e.preventDefault();
161        var obj = $(this); 
162        var role = obj.data("role");
163
164        var button = obj.find("button[type='submit']");
165        button.prop("disabled",true).append('<span class="spinner-grow spinner-grow-sm" role="status" aria-hidden="true"></span>');
166        if (submitted == false) {
167            $.ajax({
168                url: obj.attr("action"),
169                type: "POST",
170                dataType: "json",
171                data: obj.serialize()
172            })
173            .done(function( response ) {
174                button.prop("disabled",false);
175                button.find(".spinner-grow").remove();
176                obj.find(".alert").remove();
177                if (response) {
178                   
179                    if (response.status==false && response.errors) {
180                          obj.prepend('<div class="alert alert-danger">'+response.errors+'</div>');
181                    } else if (response.status==true) {
182                        if (response.redirection!='' && response.redirection!=null) {
183                            window.location = response.redirection;
184                        }
185                        if (typeof response.msg !== 'undefined' && response.msg!==null) {
186                            obj.prepend('<div class="alert alert-success">'+response.msg+'</div>');
187                        }
188                    }
189         
190                }
191                submitted = false;
192                //console.log(response);
193            });
194        }
195        submitted = true;
196    });
197
198
199
200	AOS.init();
201    
202 
203
204    
205
206
207})

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.