1/** 2 * @Project NUKEVIET 4.x 3 * @Author VINADES.,JSC ( [email protected] ) 4 * @Copyright ( C ) 2014 VINADES.,JSC. All rights reserved 5 * @License GNU/GPL version 2 or any later version 6 * @Createdate 1 - 31 - 2010 5 : 12 7 */ 8 9function nv_validReset(a) 10{ 11 $(".has-error",a).removeClass("has-error"); 12 $("[data-mess]",a).tooltip("destroy"); 13 $(a)[0].reset(); 14} 15 16function nv_validErrorShow(a) { 17 $(a).parent().parent().addClass("has-error"); 18 $("[data-mess]",$(a).parent().parent().parent()).not(".tooltip-current").tooltip("destroy"); 19 $(a).tooltip({ 20 title: function() { 21 return $(a).attr("data-current-mess") 22 } 23 }); 24 $(a).focus().tooltip("show") 25} 26function nv_validErrorHidden(a) { 27 $(a).parent().parent().removeClass("has-error") 28} 29 30function nv_validCheck(a) { 31 var c = $(a).attr("data-pattern"), 32 b = $(a).val(); 33 if ("email" == $(a).prop("type") && !nv_mailfilter.test(b)) return !1; 34 if ("undefined" == typeof c || "" == c) { 35 if ("" == b) return !1 36 } else if (a = c.match(/^\/(.*?)\/([gim]*)$/), !(a ? new RegExp(a[1], a[2]) : new RegExp(c)).test(b)) return !1; 37 return !0 38} 39 40function nv_validForm(a) { 41 $(".has-error", a).removeClass("has-error"); 42 var c = 0; 43 $(a).find(".required").each(function() { 44 $(this).val(trim(strip_tags($(this).val()))); 45 if (!nv_validCheck(this)) return c++, $(".tooltip-current", a).removeClass("tooltip-current"), $(this).addClass("tooltip-current").attr("data-current-mess", $(this).attr("data-mess")), nv_validErrorShow(this), !1 46 }); 47 c || ($(a).find("[type='submit']").prop("disabled", !0), $.ajax({ 48 type: $(a).prop("method"), 49 cache: !1, 50 url: $(a).prop("action"), 51 data: $(a).serialize(), 52 dataType: "json", 53 success: function(b) { 54 change_captcha('.fcode'); 55 "error" == b.status && "" != b.input ? ($(".tooltip-current", a).removeClass("tooltip-current"), $(a).find("[name=" + b.input + "]").each(function() { 56 $(this).addClass("tooltip-current").attr("data-current-mess", b.mess); 57 nv_validErrorShow(this) 58 }), setTimeout(function() { 59 $(a).find("[type='submit']").prop("disabled", !1) 60 }, 1E3)) : ($("input,select,button,textarea", a).prop("disabled", !0), "error" == b.status ? $(a).next().html(b.mess).removeClass("alert-info").addClass("alert-danger").show() : $(a).next().html(b.mess).removeClass("alert-danger").addClass("alert-info").show(), $("[data-mess]").tooltip("destroy"), setTimeout(function() { 61 $(a).next().hide(); 62 $("input,select,button,textarea", a).not(".disabled").prop("disabled", !1); 63 nv_validReset(a) 64 }, 5E3)) 65 } 66 })); 67 return !1 68}; 69$(function() { 70 var a = $("#contactButton"); 71 if (a) { 72 var b = $(".ctb", a), 73 c = $(".panel", a), 74 d = function() { 75 c.hide(); 76 b.removeClass("fs").show() 77 }, 78 e = $("[data-cs]", a); 79 $(document).on("keydown", function(a) { 80 27 === a.keyCode && b.is(".fs") && d() 81 }); 82 $(document).on("click", function() { 83 b.is(".fs") && d() 84 }); 85 c.on("click", function(a) { 86 a.stopPropagation() 87 }); 88 $(".close", a).on("click", function() { 89 d() 90 }); 91 b.on("click", function() { 92 return b.is(".ld") ? (b.addClass("fs").hide(), c.fadeIn(), !1) : ($.ajax({ 93 type: "POST", 94 cache: !1, 95 url: nv_base_siteurl + "index.php?" + nv_lang_variable + "=" + nv_lang_data + "&" + nv_name_variable + "=" + b.attr( "data-module" ), 96 data: "loadForm=1&checkss=" + e.data("cs"), 97 dataType: "html", 98 success: function(a) { 99 e.html(a); 100 b.addClass("ld fs").hide(); 101 c.fadeIn(); 102 change_captcha() 103 } 104 }), !1) 105 }) 106 } 107});
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.