1<!-- 2 3$(document).ready(function () { 4 5$(".general-fade").hide(); 6 7////////////////////////////////////////////////////////// 8$(".only-no").keyup(function(){ 9var this_val = this.value; 10if(isNaN(this_val)){ 11this.value = this_val.replace(/[^0-9.]/gi, ""); 12} 13}).change(function(){ 14var this_val = this.value; 15if(isNaN(this_val)){ 16this.value = this_val.replace(/[^0-9.]/gi, ""); 17} 18}); 19 20////////////////////////////////////////////////// 21$(".general-form").submit(function(e){ 22e.preventDefault(); 23var formdata = new FormData(this); 24$(".general-fade").show(); 25var page_url = $(this).attr("action"); 26var page_result = $(this).attr("id"); 27 28$.ajax({ 29url: page_url, 30type: "POST", 31data: formdata, 32mimeTypes:"multipart/form-data", 33contentType: false, 34cache: false, 35processData: false, 36success: function(data){ 37$("." + page_result).html(data); 38$("html, body").animate({scrollTop:0}, "slow"); 39$(".general-fade").hide(); 40},error: function(){ 41$(".general-fade").hide(); 42sweetAlert("Notice", "Error occured!", "error"); 43} 44}); 45 46}); 47 48////////////////////////////////////////////////// 49$(".general-link").click(function(e){ 50e.preventDefault(); 51$(".general-fade").show(); 52var page_url = $(this).attr("href") + "/gh/1/"; 53 54$.get(page_url,function(data){ 55$(".form-div").html(data); 56$("html, body").animate({scrollTop:0}, "slow"); 57}); 58 59}); 60 61////////////////////////////////////////////////// 62$(".change-picture-label").click(function(){ 63var this_id = $(this).attr("id"); 64$(".special-member").val(this_id); 65}); 66 67/////////////////////////////////////////////// 68$(".general-link-conf").click(function(e){ 69e.preventDefault(); 70$(".general-fade").show(); 71var page_url = $(this).attr("href") + "&gh=1"; 72var conf_title = $(this).attr("name"); 73var conf_text = $(this).attr("lang"); 74 75swal({ 76 title: conf_title, 77 text: conf_text, 78 type: "warning", 79 showCancelButton: true, 80 confirmButtonColor: "#DD6B55", 81 confirmButtonText: "Yes", 82 closeOnConfirm: true 83}, 84function(isConfirm){ 85 if (isConfirm) { 86$.get(page_url,function(data){ 87$(".form-div").html(data); 88$("html, body").animate({scrollTop:0}, "slow"); 89}); 90 } else { 91$(".general-fade").hide(); 92return false; 93 } 94}); 95 96}); 97 98/////////////////////////////////////////////// 99 100$("input:checkbox:not(.sel-group)").change(function () { 101var checked_class = $(this).attr("class"); 102var det_unchecked = $("input:checkbox."+checked_class+":not(:checked)").length; 103var det_unchecked_all = $("input:checkbox:not(:checked)").length; 104 105if(det_unchecked > 0){ 106$("input:checkbox#"+checked_class).prop("checked", false); 107}else if(det_unchecked == 0 && det_unchecked_all == 1){ 108$("input:checkbox#"+checked_class).prop("checked", true); 109}else{ 110$("input:checkbox#"+checked_class).prop("checked", true); 111} 112}); 113 114$("input.sel-group").change(function(){ 115var group_id = $(this).attr("id"); 116$("input:checkbox."+group_id).prop("checked", $(this).prop("checked")); 117var det_unchecked_all = $("input:checkbox:not(:checked)").length; 118}); 119 120/////////////////////////////////////////////// 121$(".del-btn").click(function(){ 122var det_checked_all = $("input:checkbox:not(.sel-group):checked").length; 123if(det_checked_all > 0){ 124swal({ 125 title: "Confirmation", 126 text: "Are you sure you want to " + det_action_title + " " + det_checked_all + " " + conf_text + "(s)?", 127 type: "warning", 128 showCancelButton: true, 129 confirmButtonColor: "#DD6B55", 130 confirmButtonText: "Yes", 131 closeOnConfirm: true 132}, 133function(isConfirm){ 134 if (isConfirm) { 135$(".sub-del").click(); 136 } else { 137return false; 138 } 139}); 140}else{ 141sweetAlert("Notice", "Atleast one " + conf_text + " must be selected.", "error"); 142} 143}); 144 145/////////////////////////////////////////// 146$("#ufile").change(function(){ 147$(".img-form").submit(); 148}); 149 150///////////////////////////////////// 151$(".js-example-basic-single").select2(); 152 153/////////////////////////////// 154$("body").find( ".general-form2" ).on( "submit", function(e) { 155e.preventDefault(); 156var formdata = new FormData(this); 157var page_url = $(this).attr("action"); 158var page_result = $(this).attr("id"); 159var this_name = $(this).attr("name"); 160var this_lang = $(this).attr("lang"); 161var this_title = $(this).attr("title"); 162 163document.getElementById(this_name).style.display = "none"; 164document.getElementById(this_lang).style.display = "inline-block"; 165$.ajax({
166url: page_url, 167type: "POST", 168data: formdata, 169mimeTypes:"multipart/form-data", 170contentType: false, 171cache: false, 172processData: false, 173success: function(data){ 174document.getElementById(this_lang).style.display = "none"; 175document.getElementById(this_name).style.display = "inline-block"; 176if(this_title == "add"){ 177$("." + page_result).append(data); 178}else if(this_title == "edit"){ 179$("." + page_result).html(data); 180} 181},error: function(){ 182alert("Error occured!"); 183document.getElementById(this_lang).style.display = "none"; 184document.getElementById(this_name).style.display = "inline-block"; 185} 186}); 187 188}); 189 190////////////////////// 191 192 193}); 194///////////////////////////////// 195 196function delete_file(url, par, val, del_loader, del_result){ 197 198document.getElementById(del_loader).style.display = "inline-block"; 199 200if(val != ""){ 201$.post(url, {parameter : par, parameter_value : val}, function(data){ 202if(data == 1){ 203document.getElementById(del_result).outerHTML = ""; 204} 205 }).error(function() { 206sweetAlert("Notice", "Error occured!", "error"); 207document.getElementById(del_loader).style.display = "none"; 208 }); 209} 210} 211 212////////////////////////////////////////// 213function only_no(what){ 214var this_val = what.value; 215if(isNaN(this_val)){ 216what.value = this_val.replace(/[^0-9.-]/gi, ""); 217} 218} 219 220////////////////////////////////////////// 221 222//-->
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.