PageSourceSearch

https://painting-portrait.com/static/js/themes.js?v=4.0072

js painting-portrait.com collected 2026-10-06 16:28:15 UTC 12,007 bytes, 314 lines download raw bytes

1// JavaScript Document
2//前端显示方式(0:自适应 1:窄屏 2:宽屏)
3
4$.fn.webDisplay=function(type){
5	if(type==0){
6		if($(window).width()>=1250){$('body').addClass('w_1200');}
7		$(window).resize(function(){
8			if($(window).width()>=1250){
9				$('body').addClass('w_1200');
10			}else{
11				$('body').removeClass('w_1200');
12			}
13		});
14	}else if(type==2){
15		$('body').addClass('w_1200');
16	}
17}
18
19function nav(father,son,bor,del){	//判断导航栏,如果太长自动隐藏  参数:父元素,子元素,border的大小,是否延迟
20	var delay = del ? del : 1;
21	var func = function(){
22		var chd = $(son);
23		var nav = $(father).width();
24		var chd_width = 0;
25		var border = bor ? bor : 0;
26		chd.show();
27		chd.each(function(){
28			var w = $(this).width();
29			var pl = $(this).css("padding-left");
30			var	pr = $(this).css("padding-right");
31			var ml = $(this).css("margin-left");
32			var mr = $(this).css("margin-right");
33			var width = parseInt(w) + parseInt(pl) + parseInt(pr) + parseInt(ml) + parseInt(mr) + border;
34			chd_width +=width;
35			if(chd_width>nav){
36				$(this).hide();
37			}else{
38				$(this).show();
39			}
40		});
41	}
42	func();
43	$(window).resize(function(){
44		if(delay){
45			setTimeout(func, 210);
46		}else{
47			func();
48		}
49	});
50}
51
52function showthis(o1,o2,i,c){
53	$(o1).eq(i).addClass(c).siblings(o1).removeClass(c);
54	$(o2).eq(i).show().siblings(o2).hide();
55}
56
57function SetEditorContents(ContentsId){		//PC版编辑器设置
58	var _this = $(ContentsId);
59	var _img = _this.find("img");
60	_img.each(function(){
61		var _float = $(this).css("float");
62		if(_float=='left'){
63			$(this).css("margin-right","20px");
64		}else if(_float=='right'){
65			$(this).css("margin-left","20px");
66		}
67    });
68	_this.find('td').css('word-break', 'normal');
69}
70$(function(){SetEditorContents("#global_editor_contents");})
71
72function product_gallery(){// 产品详细页放大镜/static/static/inc/products/gallery.php使用的函数
73	$('#small_img .small_img_list .bd , .left_small_img').on('click', 'span', function(){
74		var img=$(this).attr('pic');
75		var big_img=$(this).attr('big');
76		$('#bigimg_src').attr('src', img).parent().attr('href', big_img);
77		$(this).addClass('on').siblings('span').removeClass('on');
78		$('#zoom').css('width', 'auto');
79		var_j(document).a('domready', MagicZoom.refresh);
80		var_j(document).a('mousemove', MagicZoom.z1);
81	});
82}
83
84function case_gallery(){// 案例详细页/static/static/inc/case/gallery.php使用的函数
85	$('#small_img .small_img_list .bd').delegate('span', 'click', function(){
86		var img=$(this).attr('pic');
87		var big_img=$(this).attr('big');
88		$('#bigimg_src').attr('src', img).parent().attr('href', big_img);
89		$(this).addClass('on').siblings('span').removeClass('on');
90	});
91}
92
93$(function(){
94	/*社交媒体*/
95	$("#chat_window .chat_box.is_respon .chat_box_menu .more").click(function(){
96		$("#chat_window .chat_box .box").toggleClass("show");
97	});
98	$("#chat_window .chat_box .box .chat_close").click(function(){
99		$("#chat_window .chat_box .box").removeClass("show");
100	});
101	$(window).scroll(function(){
102		if($(window).scrollTop()>0){
103			$('#go_top').addClass("show");
104		}else{
105			$('#go_top').removeClass("show");
106		}
107	});
108	$('#go_top').click(function(){$("html, body").animate({"scrollTop":0}, 700);});
109	
110	//添加包裹class;处理响应式时table宽度超出内容区的问题
111	$("#global_editor_contents table").wrap("<div class='editor_table_wrap'></div>");
112	
113	$('.dark').css({opacity:"0.5"});//透明公共样式
114	$('#newsletter,#pop_newsletter_form').submit(function(){//订阅ok
115		if(global_obj.check_form($(this).find('*[notnull]'), $(this).find('*[format]'))){return false;}
116		$(this).find('input[type=submit]').attr('disabled', 'disabled');
117		$.post('?do_action=action.newsletter', $(this).serialize(), function(data){
118			if(data.status==1){
119				global_obj.win_alert(lang_obj.global.add_newsletter, function(){$('#newsletter input[name=Email],#pop_newsletter_form input[name=Email]').val('');});
120				if($("#newsletter_pop").length){
121					$("#newsletter_pop,.newsletter_mask").removeClass("show");
122				}
123			}else{
124				global_obj.win_alert('"'+data.msg+'" '+lang_obj.global.email_exists,'','sorry');
125			}
126		}, 'json');
127		$(this).find('input[type=submit]').removeAttr('disabled');
128		return false;
129	});
130	$("#footer_feedback").animate({bottom:-270},function(){
131		$("#footer_feedback").animate({bottom:-290},function(){
132			$("#footer_feedback").animate({bottom:-270});
133		});
134	});
135	$("#footer_feedback .title .close").click(function(){$("#footer_feedback").remove();});
136
137	$('#footer_feedback .title').click(function(){//底部留言js
138		if($(this).parent('#footer_feedback').attr('class')=='up'){
139			$(this).parent('#footer_feedback').stop(false,true).animate({bottom:"0px"},'fast');
140			$(this).parent('#footer_feedback').removeClass('up');
141		}else{
142			$(this).parent('#footer_feedback').stop(false,true).animate({bottom:"-270px"},'fast');
143			$(this).parent('#footer_feedback').addClass('up');
144		}
145	});
146	$('#lib_feedback_form form[name=feedback], .ueeshop_responsive_feedback form[name=feedback],#lib_feedback_form form[name=feedback], .ueeshop_responsive_article_feedback form[name=feedback]').submit(function(){//在线留言、单页留言提交处理ok
147		if(global_obj.check_form($(this).find('*[notnull]'), $(this).find('*[format]'))){return false;}
148		var e=$(this).find('input[name=Email]');
149		var float=$(this).find('input[name=float]');
150		e.removeAttr('style');
151		if(e.length!=0){
152			if(e.val()!='' && (/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(e.val())===false)){
153				e.css('border', '1px solid red');
154				e.focus();
155				global_obj.win_alert(lang_obj.format.email,'','sorry');
156				return false;
157			}
158		}
159		$(this).find('input:submit').attr('disabled', 'disabled');
160
161		$.post('?do_action=action.submit_feedback', $(this).serialize(), function(data){
162			$('#lib_feedback_form form[name=feedback] input:submit, .ueeshop_responsive_feedback form[name=feedback] input:submit').removeAttr('disabled');
163			global_obj.win_alert(data.msg);
164			if(data.status==1){
165				$('#lib_feedback_form input[type=text]').val('');
166				$('#lib_feedback_form textarea').val('');
167				$('#lib_feedback_form .rows span img').click();
168			}else if(data.status==-1){
169				$('#lib_feedback_form input[name=VCode]').css('border', '1px solid red').val('').focus().siblings('img').click();
170			}else if(data.status==-2){
171
172			}
173		},'json');
174		return false;
175	});
176
177	$('#lib_down_list a, .ueeshop_responsive_download_list a').click(function(){
178		var id = $(this).attr('l');
179		if ($(this).hasClass('pwd')){
180			global_obj.win_alert('', function (){
181				var pwd = $('.win_alert input[name=Password]').val();
182				$.get('/', {do_action:'action.download_pwd', DId:id, pwd:pwd}, function (data){
183					if (data.ret==1){
184						$('.win_alert .error_tips').hide(0).html('');
185						if (data.msg.url==0){//内链
186							$('.win_alert').remove();
187							global_obj.div_mask(1);
188							window.location.href = '/?do_action=action.download'+'&DId='+id+'&pwd='+pwd;
189						}else{//外链
190							window.location.href = data.msg.url;
191						}
192					}else{
193						$('.win_alert .error_tips').show(0).html(data.msg[0]);
194					}
195				}, 'json');
196			}, 'password');
197		}else{
198			if(!$(this).is('[target]')){
199				window.location = '/?do_action=action.download'+'&DId='+id;
200			}
201		}
202	});//下载
203	//产品附件下载
204	$('.pro_right .down_list a,.ueeshop_responsive_products_detail .down_list a').click(function(){
205		var proid = $(this).attr('ProId');
206		var path = $(this).attr('path');
207		if ($(this).hasClass('pwd')){
208			global_obj.win_alert('', function (){
209				var pwd = $('.win_alert input[name=Password]').val();
210				$.get('/', {do_action:'action.products_download_pwd', Path:path, ProId:proid, pwd:pwd}, function (data){
211					if (data.ret==1){
212						$('.win_alert .error_tips').hide(0).html('');
213						$('.win_alert').remove();
214						global_obj.div_mask(1);
215						window.location.href = '/?do_action=action.products_download&Path='+path+'&ProId='+proid+'&pwd='+pwd;
216					}else{
217						$('.win_alert .error_tips').show(0).html(data.msg[0]);
218					}
219				}, 'json');
220
221			}, 'password');
222		}else{
223			window.location = '/?do_action=action.products_download&Path='+path+'&ProId='+proid;
224		}
225	});//产品附件下载 end
226
227	$(".prod_info_pdf").click(function(){$("#export_pdf").attr("src", "//pdfmyurl.com?url="+window.location.href.replace(/^http[s]?:\/\//, ""));});//PDF打印
228	$('#add_to_inquiry , .add_to_inquiry').click(function(){	//加入询盘篮
229		$.post('?do_action=action.add_inquiry', 'ProId='+$(this).attr('data'), function(data){
230			if(data.inq_type){
231				window.location.href="/inquiry.html";
232			}else{
233				if(data.is_there==-1){
234					tips = lang_obj.global.already;
235				}else{
236					tips = lang_obj.global.add_success;
237				}
238				global_obj.div_mask();
239				$('body').prepend('<div id="global_win_alert" class="responsive_win_alert"><div id="alert_top"><div id="alert_img"></div><div id="alert_tips">'+tips+'</div>'+'<div class="clear"></div></div><div id="alert_bottom"><a href="javascript:void(0);" id="alert_continue">'+lang_obj.global.continues+'</a><a href="/inquiry.html" id="alert_inquery">'+lang_obj.global.inquery+'</a><div class="clear"></div></div></div>');
240				
241				$('#alert_continue').click(function(){
242					$('#global_win_alert').remove();
243					$('#div_mask').remove();
244				});
245			}
246		},'json');
247	});
248	$('#lib_inquire_list>ul>li .info .remove a, .ueeshop_responsive_products_inquiry .remove a').click(function(){//删除询盘篮
249		var obj=$(this).parent().parent().parent();
250		$.post('?do_action=action.del_inquiry', 'ProId='+$(this).attr('data'), function(data){
251			if(data.status==1){
252				global_obj.win_alert('Successful!', function(){obj.remove();});
253			}else if(data.status==2){
254				global_obj.win_alert('Successful!', function(){location=location;});
255			}else if(data.status==-1){
256				global_obj.win_alert('Error!','','sorry');
257			}
258		},'json');
259	});
260	$('#lib_inquire_list form[name=inquiry], .ueeshop_responsive_products_inquiry form[name=inquiry]').submit(function(){//产品询盘提交处理
261		if(global_obj.check_form($(this).find('*[notnull]'))){return false;}
262		var e=$(this).find('input[name=Email]');
263		if(e.size()){
264			e.removeAttr('style');
265			if(e.val()!='' && (/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(e.val())===false)){
266				e.css('border', '1px solid red');
267				e.focus();
268				global_obj.win_alert(lang_obj.format.email,'','sorry');
269				return false;
270			}
271		}
272		$(this).find('input:submit').attr('disabled', 'disabled');
273
274		$.post('?do_action=action.submit_inquiry', $(this).serialize(), function(data){
275			if(data.status==1){
276				//global_obj.win_alert(data.msg, function(){window.location.href='/';});
277				window.location.href='/inquiry_success.html';
278			}else{
279				global_obj.win_alert(data.msg,'','sorry');
280			}
281		},'json');
282
283		$(this).find('input:submit').removeAttr('disabled');
284		return false;
285	});
286	$('#lib_review_form form[name=review], .ueeshop_responsive_products_detail_review form[name=review]').submit(function(){//评论
287		if(global_obj.check_form($(this).find('*[notnull]'), $(this).find('*[format]'))){return false;}
288		$(this).find('input:submit').removeAttr('disabled');
289		$.post('?do_action=action.submit_review', $(this).serialize(), function(data){
290			if(data.status==1){
291				global_obj.win_alert(data.msg, function(){window.location.href=window.location.href;});
292			}else{
293				global_obj.win_alert(data.msg,'','sorry');
294			}
295		},'json');
296		return false;
297	});
298
299	$('.ueeshop_responsive_products_detail_review .review_list,#pdetail .review_list').on('click','.page_item',function(){//产品详情评论分页
300		$.post('?do_action=action.turn_page_ajax', {page:$(this).attr('page'),ProId:$('input[name="ProId"]').val()}, function(data){
301			if(data.ret==1){
302				$('.review_list').html(data.msg);
303			}else{
304				
305			}
306		},'json');
307		return false;
308	});
309
310	$(".email_copy").bind('copy', function(){
311		$.post('?do_action=action.email_copy_log', {email:$(this).text(),url:location.href});
312		return false;
313	});
314});

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.