PageSourceSearch

https://gobbisp.com/Data/sunup/template/cn/js/feedback.cn.js

js gobbisp.com collected 2026-10-06 06:39:05 UTC 3,811 bytes, 116 lines download raw bytes

1$(function(){
2	$('#feedback').validate({
3		errorElement: 'span',
4		errorClass: 'false',
5		validClass: 'right',
6		onfocusout: function(element){
7	        $(element).valid();
8	    },
9		errorPlacement: function(error,element){
10			element.parent().next().append(error);
11		},
12		highlight: function(element, errorClass, validClass) {
13			$(element).removeClass('right').addClass('false');
14			$(element).parent().next().removeClass('right').addClass('false').find('i').html('');
15        },
16        success: function(span){
17			span.parent().removeClass('false').addClass('right');
18			//span.prev('.iconfont').html('');
19		},
20		rules: {
21			username: {
22				required: true
23			},
24			email: {
25				required: true,
26				email: true
27			},
28			phone: {
29				minlength: 5,
30				maxlength: 11,
31				digits: true
32			},
33			title: {
34				required: true
35			},
36			message: {
37				required: true,
38				minlength: 6
39			}
40		},
41		messages: {
42			username: {
43				required: '请填写姓名'
44			},
45			email: {
46				required: '请填写E-mail',
47				email      : '请输入正确格式的电子邮件'
48			},
49			phone: {
50				minlength: "电话号码长度为5-11位",
51				maxlength: "电话号码长度为5-11位",
52				digits: '电话号码只能输入数字'
53			},
54			title: {
55				required: '请填写标题'
56			},
57			message: {
58				required: '请填写问题描述',
59				minlength: "问题描述至少要6个字符"
60			}
61		},
62	   /* 重写错误显示消息方法,以alert方式弹出错误消息 */  
63       showErrors : function(errorMap, errorList) {  
64        var msg = "";  
65        $.each(errorList, function(i, v) {  
66         msg += (v.message + "<br/>");  
67        });  
68        if (msg != "")  
69         appUtil.wintitle(msg);  
70       },  
71       /* 失去焦点时不验证 */  
72       onfocusout : false,
73       onkeyup:false,
74	});	
75})
76$.validator.setDefaults( {
77	submitHandler: function (form) {
78	$(form).ajaxSubmit({
79	    type:"post",
80        url:"/api/feedback?"+ (new Date()).getTime(),
81        success: function (result, statusText, xhr, ele) {
82        if (result.isSuccess) {
83            appUtil.wintitle($("#feedbacktitle").val()+"已经发送成功!");
84			var textinfo = $("#feedback input[type='text'],textarea");
85			textinfo.each(function(){
86				$(this).val("");
87			});
88        } else {
89            appUtil.wintitle("您提交的太频繁!休息一会吧!");
90        }
91    }
92    });
93	}
94});
95/*验证demo表单end*/
96/*** app.js ***/
97var appUtil = {
98    wintitle: function (a) {
99        var c, d, b = this;
100        this.msg_back || (c = '<div id="msg_back" onclick="appUtil.hideAlert();" style="display:none;position:absolute;background-color: #666;width:100%;height:' + document.body.scrollHeight + 'px;left:0px;top:0px;filter:alpha(opacity=10);opacity:0.1;z-index:1000;"></div>', d = '<div id="msg_body" onclick="appUtil.hideAlert();" style="display:none;position:fixed;overflow:hidden;border-radius:5px;text-align:center;z-index:1001;width:60%;color:#FFF;height:auto;line-height:22px;padding:15px 0;top:260px;left:40%;margin-left:-20%;filter:alpha(opacity=60);opacity: 0.8;background:#000;"></div>', this.msg_back = $(c), this.msg_body = $(d), this.msg_back.appendTo(document.body), this.msg_body.appendTo(document.body)),
101        this.msg_body.html(a),
102        b.msg_back.show(),
103        b.msg_body.show(),
104        //$.browser.safari && $.browser.version <= 532.9 && window.scrollTo(0, 0),
105        msgTimeout = setTimeout(function () {
106            b.msg_back.hide(),
107            b.msg_body.hide()
108        },
109        3e3)
110    },
111    hideAlert: function () {
112        this.msg_back.hide(),
113        this.msg_body.hide(),
114        msgTimeout && window.clearTimeout(msgTimeout)
115    }
116}; !(window.jQuery);

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.