<commit_before>
//  viewProject_SearchMaint.js


//  Javascript for the viewProject.jsp page for maintenance of a single search

//    Only loaded for logged in users

//  JavaScript directive:   all variables have to be declared with "var", maybe other things

"use strict";


$(document).ready(function()  { 
	try {
		initPageSearchMaint();
	} catch( e ) {
		reportWebErrorToServer.reportErrorObjectToServer( { errorException : e } );
		throw e;
	}
});

/////////////
function initPageSearchMaint() {
	//  tool tips for files attached to searches
	$(".search_file_link_for_tooltip_jq").each(function() { // Grab search file links
		var $search_file_link_tooltip_jq = $(this).children(".search_file_link_tooltip_jq");
		if ( $search_file_link_tooltip_jq.length > 0 ) {
			var tipText = $search_file_link_tooltip_jq.text();
			$(this).qtip({ 
				content: {
					text: tipText
				}
			});
		}
	});
	//   Attach Delete Search click handlers
	$(".delete_search_link_jq").click(function(eventObject) {
		var clickThis = this;
		try {
			deleteSearchClickHandler( clickThis, eventObject );
		} catch( e ) {
			reportWebErrorToServer.reportErrorObjectToServer( { errorException : e } );
			throw e;
		}
		return false;
	});	 			
	$("#delete_search_confirm_button").click(function(eventObject) {
		var clickThis = this;
		try {
			deleteSearchConfirmed( clickThis, eventObject );
		} catch( e ) {
			reportWebErrorToServer.reportErrorObjectToServer( { errorException : e } );
			throw e;
		}
		return false;
	});
	$(".delete_search_overlay_show_hide_parts_jq").click(function(eventObject) {
		var clickThis = this;
		try {
			closeConfirmDeleteSearchOverlay( clickThis, eventObject );
		} catch( e ) {
			reportWebErrorToServer.reportErrorObjectToServer( { errorException : e } );
			throw e;
		}
		return false;
	});
	///////  Attach Delete Search Weblink Click handlers
	$(".delete_search_webLink_link_jq").click(function(eventObject) {
		var clickThis = this;
		try {
			deleteSearchWebLinkClickHandler( clickThis, eventObject );
		} catch( e ) {
			reportWebErrorToServer.reportErrorObjectToServer( { errorException : e } );
			throw e;
		}
		return false;
	});	 			
	$("#delete_search_web_link_confirm_button").click(function(eventObject) {
		var clickThis = this;
		try {
			deleteSearchWebLinkConfirmed( clickThis, eventObject );
		} catch( e ) {
			reportWebErrorToServer.reportErrorObjectToServer( { errorException : e } );
			throw e;
		}
		return false;
	});
	$(".delete_search_web_link_overlay_show_hide_parts_jq").click(function(eventObject) {
		var clickThis = this;
		try {
			closeConfirmDeleteSearchWebLinkOverlay( clickThis, eventObject );
		} catch( e ) {
			reportWebErrorToServer.reportErrorObjectToServer( { errorException : e } );
			throw e;
		}
		return false;
	});
	///////  Attach Delete Search Comment Click handlers
	$("#delete_search_comment_confirm_button").click(function(eventObject) {
		var clickThis = this;
		try {
			deleteSearchCommentConfirmed( clickThis, eventObject );
		} catch( e ) {
			reportWebErrorToServer.reportErrorObjectToServer( { errorException : e } );
			throw e;
		}
		return false;
	});
	$(".delete_search_comment_overlay_show_hide_parts_jq").click(function(eventObject) {
		var clickThis = this;
		try {
			closeConfirmDeleteSearchCommentOverlay( clickThis, eventObject );
		} catch( e ) {
			reportWebErrorToServer.reportErrorObjectToServer( { errorException : e } );
			throw e;
		}
		return false;
	});
	/////////////////////////
	setTimeout( function() { // put in setTimeout so if it fails it doesn't kill anything else
		try {
			initQCPlotPSMScoreVsScoreClickHandlers();
		} catch( e ) {
			reportWebErrorToServer.reportErrorObjectToServer( { errorException : e } );
			throw e;
		}
	},10);
	//  Initialize the buttons from the current values of the check boxes.
	//     The check boxes may be checked from using the back button.
	updateButtonsBasedOnCheckedSearches ( );
}


///////////////
function validateURL(textval) {
	var urlregex = new RegExp(
	"^(http|https|ftp)\://([a-zA-Z0-9\.\-]+(\:[a-zA-Z0-9\.&amp;%\$\-]+)*@)*((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])|([a-zA-Z0-9\-]+\.)*[a-zA-Z0-9\-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(\:[0-9]+)*(/($|[a-zA-Z0-9\.\,\?\'\\\+&amp;%\$#\=~_\-]+))*$");<commit_msg>Web:Bugfix For move QC Charts to QC page from Project page<commit_after>
//  viewProject_SearchMaint.js


//  Javascript for the viewProject.jsp page for maintenance of a single search

//    Only loaded for logged in users

//  JavaScript directive:   all variables have to be declared with "var", maybe other things

"use strict";


$(document).ready(function()  { 
	try {
		initPageSearchMaint();
	} catch( e ) {
		reportWebErrorToServer.reportErrorObjectToServer( { errorException : e } );
		throw e;
	}
});

/////////////
function initPageSearchMaint() {
	//  tool tips for files attached to searches
	$(".search_file_link_for_tooltip_jq").each(function() { // Grab search file links
		var $search_file_link_tooltip_jq = $(this).children(".search_file_link_tooltip_jq");
		if ( $search_file_link_tooltip_jq.length > 0 ) {
			var tipText = $search_file_link_tooltip_jq.text();
			$(this).qtip({ 
				content: {
					text: tipText
				}
			});
		}
	});
	//   Attach Delete Search click handlers
	$(".delete_search_link_jq").click(function(eventObject) {
		var clickThis = this;
		try {
			deleteSearchClickHandler( clickThis, eventObject );
		} catch( e ) {
			reportWebErrorToServer.reportErrorObjectToServer( { errorException : e } );
			throw e;
		}
		return false;
	});	 			
	$("#delete_search_confirm_button").click(function(eventObject) {
		var clickThis = this;
		try {
			deleteSearchConfirmed( clickThis, eventObject );
		} catch( e ) {
			reportWebErrorToServer.reportErrorObjectToServer( { errorException : e } );
			throw e;
		}
		return false;
	});
	$(".delete_search_overlay_show_hide_parts_jq").click(function(eventObject) {
		var clickThis = this;
		try {
			closeConfirmDeleteSearchOverlay( clickThis, eventObject );
		} catch( e ) {
			reportWebErrorToServer.reportErrorObjectToServer( { errorException : e } );
			throw e;
		}
		return false;
	});
	///////  Attach Delete Search Weblink Click handlers
	$(".delete_search_webLink_link_jq").click(function(eventObject) {
		var clickThis = this;
		try {
			deleteSearchWebLinkClickHandler( clickThis, eventObject );
		} catch( e ) {
			reportWebErrorToServer.reportErrorObjectToServer( { errorException : e } );
			throw e;
		}
		return false;
	});	 			
	$("#delete_search_web_link_confirm_button").click(function(eventObject) {
		var clickThis = this;
		try {
			deleteSearchWebLinkConfirmed( clickThis, eventObject );
		} catch( e ) {
			reportWebErrorToServer.reportErrorObjectToServer( { errorException : e } );
			throw e;
		}
		return false;
	});
	$(".delete_search_web_link_overlay_show_hide_parts_jq").click(function(eventObject) {
		var clickThis = this;
		try {
			closeConfirmDeleteSearchWebLinkOverlay( clickThis, eventObject );
		} catch( e ) {
			reportWebErrorToServer.reportErrorObjectToServer( { errorException : e } );
			throw e;
		}
		return false;
	});
	///////  Attach Delete Search Comment Click handlers
	$("#delete_search_comment_confirm_button").click(function(eventObject) {
		var clickThis = this;
		try {
			deleteSearchCommentConfirmed( clickThis, eventObject );
		} catch( e ) {
			reportWebErrorToServer.reportErrorObjectToServer( { errorException : e } );
			throw e;
		}
		return false;
	});
	$(".delete_search_comment_overlay_show_hide_parts_jq").click(function(eventObject) {
		var clickThis = this;
		try {
			closeConfirmDeleteSearchCommentOverlay( clickThis, eventObject );
		} catch( e ) {
			reportWebErrorToServer.reportErrorObjectToServer( { errorException : e } );
			throw e;
		}
		return false;
	});
	//  Initialize the buttons from the current values of the check boxes.
	//     The check boxes may be checked from using the back button.
	updateButtonsBasedOnCheckedSearches ( );
}


///////////////
function validateURL(textval) {
	var urlregex = new RegExp(
	"^(http|https|ftp)\://([a-zA-Z0-9\.\-]+(\:[a-zA-Z0-9\.&amp;%\$\-]+)*@)*((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])|([a-zA-Z0-9\-]+\.)*[a-zA-Z0-9\-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(\:[0-9]+)*(/($|[a-zA-Z0-9\.\,\?\'\\\+&amp;%\$#\=~_\-]+))*$");
{'fraction_non_alphanumeric': 0.17610348349029842, 'fraction_numerical': 0.02473618518098264, 'mean_word_length': 3.9656338028169014, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1686566', 'n_tokens_mistral': 3467, 'n_tokens_neox': 3158, 'n_words': 541}