1$(function(){ 2 // 对å页ç龿¥æ·»å å¤ç 3 if (!tools.isEmptyValue($('.pagination').toArray())){ 4 $('.pagination>a ').each(function(index, el) { 5 if ($(el).attr('href') !="#") { 6 el.href+=location.search; 7 }; 8 }); 9 }; 10 11 // éªè¯ç 12$('input[name="captchas"]').one('focusin',function(e){ 13 img = $(this).next('img.captchas'); 14 if (tools.isEmptyValue(img)) { 15 img = $(this).next().next('img.captchas'); 16 }; 17 if ($(img).attr('src') == "" || $(img).attr('src') == "#" || $(img).attr('src') == "/img/blank.png") { 18 $(img).attr('src',SITE_URL+'captchas'); 19 }; 20}); 21 22if ($('img.captchas').attr('src') == "" || $('img.captchas').attr('src') == "#" || $('img.captchas').attr('src') == "/img/blank.png") { 23 $('img.captchas').attr('src',SITE_URL+'captchas'); 24}; 25// $('img.captchas').after('<a href="#">è·åéªè¯ç </a>'); 26 27$('img.captchas').click(function(e){ 28 $(this).attr('src',''); 29 $(this).attr('src',SITE_URL+'captchas'); 30}); 31}); 32 33/** 34 * @brief å建表åéªè¯ 35 * 注æå¼ç¨ jquery.validate.js å jquery.validate.lang.cn.js 36 * @param frm 表å Id 37 * @param rules éªè¯è§å 38 */ 39function make_validate(frm,rules,messages,inline){ 40 if (inline == 0) { 41 inline = "block"; 42 }else{ 43 inline = "inline"; 44 } 45 $('#'+frm).validate({ 46 ignore: ".ignore", // å¿½ç¥ 47 rules:rules, 48 onchange: true, 49 onblur: true, 50 messages:messages, 51 errorClass: "help-"+inline+" validate", 52 errorElement: "span", 53 highlight:function(element, errorClass, validClass) { 54 $(element).removeClass('success'); 55 $(element).addClass('error'); 56 }, 57 unhighlight: function(element, errorClass, validClass) { 58 $(element).removeClass('error'); 59 $(element).addClass('success'); 60 } 61 // ,errorPlacement: function(error, element) { 62 // error.appendTo($(element).parents(".control-group")); 63 // } 64 }); 65} 66 67/** 68 * @brief å建表åéªè¯ 69 带æè¿å彿°, å¯ä»¥éªè¯åç´æ¥ç¨ajaxå¤ç 70 * 注æå¼ç¨ jquery.validate.js å jquery.validate.lang.cn.js 71 * @param frm 表å Id 72 * @param rules éªè¯è§å 73 */ 74function make_validate_submit(frm,rules,messages,submit_fun,inline){ 75 if (inline == 0) { 76 inline = "block"; 77 }else{ 78 inline = "inline"; 79 } 80 $('#'+frm).validate({ 81 ignore: ".ignore", // å¿½ç¥ 82 rules:rules, 83 onchange: true, 84 onblur: true, 85 messages:messages, 86 errorClass: "help-inline validate", 87 errorElement: "span", 88 highlight:function(element, errorClass, validClass) { 89 $(element).removeClass('success'); 90 $(element).addClass('error'); 91 }, 92 unhighlight: function(element, errorClass, validClass) { 93 $(element).removeClass('error'); 94 $(element).addClass('success'); 95 }, 96 submitHandler:function(form){ 97 form.preventDefault(); 98 submit_fun(form); 99 } 100 }); 101}
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.