1 2var modal = { 3 init: function() { 4 $("body").append('<div class="modal background"></div>'); 5 $("#ConfirmCancel").click(modal.close); 6 modal.events(); 7 }, 8 events: function() { 9 $(".modal .close").click(modal.close); 10 $("body").keyup(modal.esc); 11 }, 12 esc: function(e) { 13 if (e.keyCode === 27) { 14 if (!$(':focus').is("select")) { 15 modal.close(); 16 } 17 } 18 }, 19 show: function(id) { 20 $(".modal.background").addClass("open"); 21 $("#"+id).addClass("open"); 22 $("body").addClass("hideScroll"); 23 }, 24 hide: function(e) { 25 $(".modal.open").removeClass("open"); 26 $("body").removeClass("hideScroll"); 27 }, 28 close: function(e) { 29 $(".modal.open").removeClass("open"); 30 $("body").removeClass("hideScroll"); 31 }, 32 confirm: function(onConfirmed, action, title, subTitle) { 33 var cTitle = "Delete Confirmation"; 34 var cText = "Are you sure you want to continue?<br/><br/>Once this is deleted it will be gone forever."; 35 var cAction = "delete"; 36 if (title) cTitle = title; 37 if (subTitle) cText = subTitle; 38 if (action) cAction = action; 39 $("#ConfirmTitle").html(cTitle); 40 $("#ConfirmText").html(cText); 41 $("#ConfirmAction").html(cAction); 42 modal.show("ConfirmModal"); 43 $("#YesButton").off("click"); 44 $("#YesButton").click(function(e) { 45 if (typeof onConfirmed === "function") onConfirmed(); 46 modal.close(); 47 }); 48 }, 49 clear: function(id) { 50 $("#"+id).find("input").val(""); 51 $("#"+id).find("textarea").val(""); 52 }, 53 hasErrors: function(id) { 54 return $("#"+id).find(".error").length>0; 55 }, 56 clearErrors: function(id) { 57 $("#"+id).find(".error").removeClass("error"); 58 } 59};
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.