PageSourceSearch

https://vinrada.gov.ua/themes/default/js/functions.js?v=1790963653

js vinrada.gov.ua collected 2026-10-02 17:54:39 UTC 10,987 bytes, 379 lines download raw bytes

1$(document).ready(function(){
2
3    $('a.drop_structure').click(function(){
4        if (!confirm('Удалить?')){
5            return false;
6        }
7    });
8	
9	$(".right_ul ul").superfish();
10	$(".left_menu .left_ul").superfish();
11
12    // голосування
13    $(".answer").click(function(){
14        var quest_id = $(this).attr("id");
15        $(".answer").removeClass("active");
16        $(this).addClass("active");
17
18    });
19
20    $("#vote_action").click(function(){
21        var answer_id = $("#vote_question .active").attr("id");
22        if(answer_id) {
23            $.ajax({
24                url: "/ajax.php",
25                type: "POST",
26                data: ({
27                    pAction : 'get_vote',
28                    answer_id : answer_id,
29                }),
30                success: function(result) {
31                    $("#vote_action").css("display","none");
32                    $("#show_results").css("display","none");
33                    $("#vote_res").html("<div class=\"comment_text\">Дякуємо. Ваш голос зараховано.</div> ");
34					var new_res = $(".active b").html();
35					new_res = parseInt(new_res);
36					new_res = new_res + 1;
37					$(".active b").html(new_res);
38					$(".answer span").slideDown(300);
39                }
40            });
41        } else {
42            alert("Потрібно обрати варіант відповіді!");
43        };
44    });
45	
46	$("#show_results").click(function(){
47		$(".answer span").slideDown(300);
48	});
49		
50
51    $("#select_type").on("change", function(){
52        var type_id = $(this).val();
53        $.ajax({
54            url: "/ajax.php",
55            type: "POST",
56            data: ({
57                pAction : 'get_doc_type',
58                type_id : type_id
59            }),
60            success: function(result){
61                if (result == 'y') {
62                    $(".for_sessions").removeClass("sr-only").find("select").prop("required", true).prop("selected", false).find(".default_option").prop("selected", true);
63                    $("#filter_sess").html('<option value="0" class="default_option">Всі сесії...</option>');
64                } else {
65                    $(".for_sessions").addClass("sr-only").find("select").prop("selected", false).prop("required", false).find(".default_option").prop("selected", true);
66                    $("#filter_sess").html('<option value="0" class="default_option">Всі сесії...</option>');
67                }
68            }
69        });
70    });		
71
72    $("#select_type2").on("change", function(){
73        var type_id = $(this).val();
74        $.ajax({
75            url: "/ajax.php",
76            type: "POST",
77            data: ({
78                pAction : 'get_new_doc_type',
79                type_id : type_id
80            }),
81            success: function(result){
82                if (result == 'y') {
83                    $(".for_sessions").removeClass("sr-only").find("select").prop("required", true).prop("selected", false).find(".default_option").prop("selected", true);
84                    $("#filter_sess2").html('<option value="0" class="default_option">Всі сесії...</option>');
85                } else {
86                    $(".for_sessions").addClass("sr-only").find("select").prop("selected", false).prop("required", false).find(".default_option").prop("selected", true);
87                    $("#filter_sess2").html('<option value="0" class="default_option">Всі сесії...</option>');
88                }
89            }
90        });
91    });
92	
93	$("#filter_conv").on("change",function(){
94		var convocation_id = $(this).val();
95        var type_id = $("#select_type").val();
96		$.ajax({
97			url: "/ajax.php",
98			type: "POST",
99			data: ({
100				pAction : 'get_filter_session',
101				convocation_id : convocation_id,
102				type_id : type_id
103			}),
104			success: function(result) {
105				$("#filter_sess").html(result);
106			}
107		});
108	});
109	
110	$("#filter_conv2").on("change",function(){
111		var convocation_id = $(this).val();
112        var type_id = $("#select_type2").val();
113		$.ajax({
114			url: "/ajax.php",
115			type: "POST",
116			data: ({
117				pAction : 'get_new_filter_session',
118				convocation_id : convocation_id,
119				type_id : type_id
120			}),
121			success: function(result) {
122				$("#filter_sess2").html(result);
123			}
124		});
125	});
126	
127	moment.locale('uk');	
128	$('#filter_from_date').daterangepicker({
129        locale: {
130            format: 'DD.MM.YYYY',
131            separator: " - ",
132            applyLabel: "Застосувати",
133            cancelLabel: "Скасувати",
134            fromLabel: "Із",
135            toLabel: "до",
136            customRangeLabel: "Задати інтервал",
137            weekLabel: "Тижні",
138            daysOfWeek: [
139                "Нд",
140                "Пн",
141                "Вт",
142                "Ср",
143                "Чт",
144                "Пт",
145                "Сб"
146            ],
147            "monthNames": [
148                "Січень",
149                "Лютий",
150                "Березень",
151                "Квітень",
152                "Травень",
153                "Червень",
154                "Липень",
155                "Серпень",
156                "Вересень",
157                "Жовтень",
158                "Листопад",
159                "Грудень"
160            ],
161            "firstDay": 1
162        },
163        autoUpdateInput: false
164	});	
165	$('#filter_from_date').on('apply.daterangepicker', function(ev, picker) {
166		$(this).val(picker.startDate.format('DD.MM.YYYY') + ' - ' + picker.endDate.format('DD.MM.YYYY'));
167	});
168	$('#filter_from_date').on('cancel.daterangepicker', function(ev, picker) {
169		$(this).val('');
170	});
171
172    $("#main_slider").jCarouselLite({
173        auto: 8000,
174        speed: 1500,
175        circular: true,
176        mouseWheel: true,
177        btnNext: ".next",
178        btnPrev: ".prev",
179        visible: 1,
180        easing: 'easeInOutQuint',
181        animation: 1000,
182        btnGo:[".1", ".2", ".3", ".4", ".5", ".6", ".7", ".8"],
183        beforeStart: function(a) {
184            //$(".btgo").hide();
185        },
186        afterEnd:
187            function(a){
188                cls_go = $(a).attr("class");
189                $(".goActive").removeClass("goActive");
190                $(".btgo ."+cls_go).addClass("goActive");
191                $(".btgo").show(300);
192            }
193    });
194
195    $(".slide_title ").click(function(){
196        var ok = $(this).attr("href");
197        window.open(ok,"_blank");
198    });
199
200    $("#all_photo_slider").jCarouselLite({
201        auto: 8000,
202        speed: 1500,
203        circular: true,
204        btnNext: ".pnext",
205        btnPrev: ".pprev",
206        visible: 4,
207        scroll: 1,
208        easing: 'easeInOutQuint',
209        animation: 1000
210    });
211
212    $("#goslink").jCarouselLite({
213        auto: 5000,
214        speed: 1500,
215        circular: true,
216        btnNext: ".bnext",
217        btnPrev: ".bprev",
218        visible: 2,
219        scroll: 1,
220        easing: 'easeInOutQuint',
221        animation: 1000
222    });
223    /*
224    $('ul.tabs').delegate('li:not(.current)', 'click', function() {
225        $(this).addClass('current').siblings().removeClass('current').parents('div.section').find('div.box').hide().eq($(this).index()).fadeIn(150);
226    });
227    */
228
229    $("#left .left_menu li span.fixtriangle").click(function(){
230        if($(this).parent().find("ul.sub_ul").css("display")=="none") {
231            $(this).addClass("fixtriangle_close");
232            $(this).parent().find("ul.sub_ul").show();    
233        }else {
234            $(this).removeClass("fixtriangle_close");
235            $(this).parent().find("ul.sub_ul").hide();    
236        }        
237
238    });
239
240    imgs = new Array();
241
242    imgs_o = new Image();
243    imgs_o.src='/upload/Image/7_4udes_mini/1.jpg';
244    imgs.push(imgs_o);
245    
246    imgs_o = new Image();
247    imgs_o.src='/upload/Image/7_4udes_mini/2.jpg';
248    imgs.push(imgs_o);
249    
250    imgs_o = new Image();
251    imgs_o.src='/upload/Image/7_4udes_mini/3.jpg';
252    imgs.push(imgs_o);
253    
254    imgs_o = new Image();
255    imgs_o.src='/upload/Image/7_4udes_mini/4.jpg';
256    imgs.push(imgs_o);
257    
258    imgs_o = new Image();
259    imgs_o.src='/upload/Image/7_4udes_mini/5.jpg';
260    imgs.push(imgs_o);
261    
262    imgs_o = new Image();
263    imgs_o.src='/upload/Image/7_4udes_mini/6.jpg';
264    imgs.push(imgs_o);
265    
266    imgs_o = new Image();
267    imgs_o.src='/upload/Image/7_4udes_mini/7.jpg';
268    imgs.push(imgs_o);
269    
270    imgs_o = new Image();
271    imgs_o.src='/upload/Image/7_4udes_mini/8.jpg';
272    imgs.push(imgs_o);
273    
274    imgs_o = new Image();
275    imgs_o.src='/upload/Image/7_4udes_mini/9.jpg';
276    imgs.push(imgs_o);
277    
278    imgs_o = new Image();
279    imgs_o.src='/upload/Image/7_4udes_mini/10.jpg';
280    imgs.push(imgs_o);
281    
282    imgs_o = new Image();
283    imgs_o.src='/upload/Image/7_4udes_mini/11.jpg';
284    imgs.push(imgs_o);
285    
286    imgs_o = new Image();
287    imgs_o.src='/upload/Image/7_4udes_mini/12.jpg';
288    imgs.push(imgs_o);
289    
290    imgs_o = new Image();
291    imgs_o.src='/upload/Image/7_4udes_mini/13.jpg';
292    imgs.push(imgs_o);
293    
294    imgs_o = new Image();
295    imgs_o.src='/upload/Image/7_4udes_mini/14.jpg';
296    imgs.push(imgs_o);
297    
298    imgs_o = new Image();
299    imgs_o.src='/upload/Image/7_4udes_mini/15.jpg';
300    imgs.push(imgs_o);
301    
302    imgs_o = new Image();
303    imgs_o.src='/upload/Image/7_4udes_mini/16.jpg';
304    imgs.push(imgs_o);
305    
306    imgs_o = new Image();
307    imgs_o.src='/upload/Image/7_4udes_mini/17.jpg';
308    imgs.push(imgs_o);
309    
310    imgs_o = new Image();
311    imgs_o.src='/upload/Image/7_4udes_mini/18.jpg';
312    imgs.push(imgs_o);
313    
314    imgs_o = new Image();
315    imgs_o.src='/upload/Image/7_4udes_mini/19.jpg';
316    imgs.push(imgs_o);
317    
318    imgs_o = new Image();
319    imgs_o.src='/upload/Image/7_4udes_mini/20.jpg';
320    imgs.push(imgs_o);
321    
322    imgs_o = new Image();
323    imgs_o.src='/upload/Image/7_4udes_mini/21.jpg';
324    imgs.push(imgs_o);
325    
326    imgs_o = new Image();
327    imgs_o.src='/upload/Image/7_4udes_mini/22.jpg';
328    imgs.push(imgs_o);
329    
330    top_imgi=1;
331    top_imgc=imgs.length-top_imgi;
332
333    if ($("#top_img").length && imgs[0]) {
334
335        setInterval("showTime()",3000);
336    }
337
338});
339
340function showTime() {    
341    top_imgi++;    
342    if (top_imgi>top_imgc) top_imgi=0;
343    $("#top_img").fadeTo(500,0);
344
345    setTimeout(function(){ 
346        $('#top_img').attr('src',imgs[top_imgi].src); 
347        $('#top_img').fadeTo(1000,1);
348    },1000);
349}
350
351function reloadCaptcha(img_id){
352    $("img#"+img_id).attr("src", "/libs/kcaptcha/index.php?"+Math.random());
353}
354
355function show_unit_doc (doc_id) {
356	$("tr#doc_"+doc_id).addClass("green").delay(1000).queue(function(next){
357		$(this).removeClass("green");
358		next();
359	});
360}
361
362function set_special (hash) {
363	if ($("body").hasClass("is_special")) {
364		$("body").removeClass("is_special");
365	} else {
366		$("body").addClass("is_special");
367	}
368	$.ajax({
369		url: "/ajax.php",
370		type: "POST",
371		data: ({
372			pAction: 'switch_special',
373			hash: hash
374		}),
375		success: function (result) {
376		}
377	});
378	return false;
379}

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.