PageSourceSearch

https://dinamika-tosol.ru/catalog/view/javascript/blog/blog.color.js

js dinamika-tosol.ru collected 2026-10-08 21:34:05 UTC 4,131 bytes, 174 lines download raw bytes

1$(document).ready(function(){
2
3colorbox_css = function() {�	    $('#colorbox').css('z-index','9999');
4	    $('#cboxOverlay').css('z-index','9999');
5	    $('#cboxOverlay').css('opacity','0.3');
6	    $('#cboxWrapper').css('z-index','9999');
7}
8
9
10colorbox_resize = function() {
11
12var modal_height = $('#cboxContent').height();
13var modal_width = $('#cboxContent').width();
14
15var modalheight_modal = $('#cboxLoadedContent').height();
16var modalwidth_modal = $('#cboxLoadedContent').width();
17
18 if (modal_height != modalheight_modal  || modal_width != modalwidth_modal) {
19    if (modalheight_modal !=0 && modal_height!= null) {
20    		if (modalwidth_modal !=0 && modal_width!= null) {
21   				$(this).colorbox.resize();
22			}
23		}
24	}
25}
26
27
28colorbox_image = function(e) {
29
30var gal = $('.imagebox').colorbox({
31	 width: "auto",
32	 height: "auto",
33	 scrolling: true,
34	 returnFocusOther: true,
35	 reposition: false,
36	 fixed: false,
37	 maxHeight: "90%",
38	 maxWidth: "90%",
39	 innerHeight: "90%",
40	 innerWidth: "90%",
41	 opacity: 0.5,
42	 overlayClose: true,
43     onLoad: function () {�     },
44     onComplete: function () {
45
46     	colorbox_css();
47
48        $(this).colorbox.resize();
49
50		colorboxInterval = setInterval( function() {
51               colorbox_resize()
52			 }, 2000 );
53        },
54
55	 onClosed: function(){
56			 clearInterval(colorboxInterval);
57			 $.colorbox.close();
58
59	 },
60    });
61
62  return gal;
63}
64
65
66
67colorbox_modal = function(e) {
68
69var colorboxInterval;
70var cmswidget =  $(e).attr('data-cmswidget');
71var template_modal = $(e).attr('data-template_modal');
72var modal_link = $(e).attr('href');
73
74$.ajax({
75	url: modal_link,
76	type: 'POST',
77	data: { cmswidget: cmswidget, sc_ajax: '2', template_modal: template_modal},
78	dataType: 'html',
79	beforeSend: function()
80	{
81	},
82	success: function(html) {
83	if (html) {
84	 /************************/
85		    $("#modal_base_tmp").remove();
86
87			$('#cmswidget-' + cmswidget).append('<div id="modal_base_tmp" style="display: none; clear: both;"><div id="modal_tmp" style="clear: both;">'+html+'</div></div>');
88		    $("#modal_tmp").css( { "width" : "100%" });
89
90			$.colorbox({
91			 title: "",
92			 width: "auto",
93			 height: "auto",
94			 scrolling: true,
95			 returnFocusOther: true,
96			 reposition: false,
97			 fixed: false,
98			 maxHeight: "90%",
99			 maxWidth: "90%",
100			 innerHeight: "90%",
101			 innerWidth: "90%",
102			 opacity: 0.5,
103			 overlayClose: true,
104			 inline: true,
105		     href: '#modal_tmp',
106			 onOpen: function(){
107			 },
108			 onLoad: function(){
109			 },
110		     onComplete: function () {
111
112                colorbox_css();
113                var container_width = $("#modal_tmp").width() - 20;
114			   // $("#cboxLoadedContent .breadcrumb ").hide();
115		        $("#cboxLoadedContent > div ").css( { "margin" : "0", "padding" : "0px" } );
116		        $("#cboxLoadedContent #content").css( { "margin" : "0", "padding" : "0px" } );
117		        $("#cboxLoadedContent .row").css( { "margin" : "0", "padding" : "0px" } );
118		        $("#cboxLoadedContent .container").css( { "width" : container_width+'px', "padding" : "0px" } );
119
120
121		        $(window).resize(function() {
122		          //colorbox_resize();
123		        });
124
125				colorboxInterval = setInterval( function() {
126		              // colorbox_resize();
127				}, 2000 );
128
129		     },
130
131			 onClosed: function(){
132				 clearInterval(colorboxInterval);
133				  $("#modal_base_tmp").remove();
134		  	 },
135
136			 });
137	/*************************/
138	}
139
140	}
141 });
142
143	return false;
144
145}
146
147
148var colorbox_loader = function (event) {
149	$(document).off('click', '.imagebox', colorbox_loader);
150	var gl = colorbox_image(this);
151	$(this).click();
152	$(document).on('click', '.imagebox', colorbox_loader);
153	return false;
154}
155
156var colorbox_modal_loader = function (event) {
157	colorbox_modal(this);
158	return false;
159}
160
161
162//*******************************************
163    if ($.isFunction($.fn.on)) {
164        $(document).on('click', '.imagebox', colorbox_loader);
165    } else {
166        $('.imagebox').live('click', colorbox_loader);
167    }
168
169    if ($.isFunction($.fn.on)) {
170        $(document).on('click', '.colorbox_modal', colorbox_modal_loader);
171    } else {
172        $('.colorbox_modal').live('click', colorbox_modal_loader);
173    }
174});

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.