<commit_before>/*
 * Copyright (c) 2012 Evolveum
 *
 * The contents of this file are subject to the terms
 * of the Common Development and Distribution License
 * (the License). You may not use this file except in
 * compliance with the License.
 *
 * You can obtain a copy of the License at
 * http://www.opensource.org/licenses/cddl1 or
 * CDDLv1.0.txt file in the source code distribution.
 * See the License for the specific language governing
 * permission and limitations under the License.
 *
 * If applicable, add the following below the CDDL Header,
 * with the fields enclosed by brackets [] replaced by
 * your own identifying information:
 *
 * Portions Copyrighted 2012 [name of copyright owner]
 */

var offside;
window.onresize = setWidthForTempMessage;
function initMessages() {
	offside = $(".feedbackContainer").height() + 135;
	if($(window).scrollTop() < offside){
		$(".tempMessage").css("opacity", 0);
		$(".tempMessage").hide();
	}
	
	//$(".messages-details-bold").disableTextSelection();
	//$(".messages-topPanel").disableTextSelection();
	
	$("a").click(function(){
		$(".messagesTop").remove();
		$(".tempMessagesTop").remove();
	});
	
	$(".messagesTop").find(".messages-topPanel").each(function(index){
		var arrow;
		var className = $(this).attr('class');
		if(className.indexOf("messages-topError") >= 0){
			arrow = "messages-topError";
		} else if(className.indexOf("messages-topSucc") >= 0){
			arrow = "messages-topSucc";
		} else if(className.indexOf("messages-topWarn") >= 0){
			arrow = "messages-topWarn";
		} else {
			arrow = "messages-topInfo";
		}
		
		var blockContent = $("#" + $(this).attr('id') + "_content");
		if(blockContent.length > 0){
			if(isFilled(blockContent)){
				$(this).append("<span class='"+ arrow +"-arrow arrow-down'></span>");
				var exceptionHeight = $(this).find(".messages-topException").height();
				var arrowPosition = $(this).height() / 2 - exceptionHeight + 3;
				alert($(this).height());
				//var arrowPosition = $(this).height() / 2 + 4;
				$("." + arrow +"-arrow").css("marginTop", - arrowPosition);
			}
		}
	});
	
	setTempMessagePositionWhileScroll();
	
	//$(document).find("messages-topError");
	$(".messagePanel .messages-topError").mouseenter(function(){
		var idBlock = $(this).attr("id");
		var blockContent = $("#" + idBlock + "_content");
		if(blockContent.length > 0){
			if(isFilled(blockContent)){
				$(this).css("backgroundColor","#FFC2AE");
				$(this).css("cursor","pointer");
			}<commit_msg>Disable show panel's height to popup window (MID-835)<commit_after>/*
 * Copyright (c) 2012 Evolveum
 *
 * The contents of this file are subject to the terms
 * of the Common Development and Distribution License
 * (the License). You may not use this file except in
 * compliance with the License.
 *
 * You can obtain a copy of the License at
 * http://www.opensource.org/licenses/cddl1 or
 * CDDLv1.0.txt file in the source code distribution.
 * See the License for the specific language governing
 * permission and limitations under the License.
 *
 * If applicable, add the following below the CDDL Header,
 * with the fields enclosed by brackets [] replaced by
 * your own identifying information:
 *
 * Portions Copyrighted 2012 [name of copyright owner]
 */

var offside;
window.onresize = setWidthForTempMessage;
function initMessages() {
	offside = $(".feedbackContainer").height() + 135;
	if($(window).scrollTop() < offside){
		$(".tempMessage").css("opacity", 0);
		$(".tempMessage").hide();
	}
	
	//$(".messages-details-bold").disableTextSelection();
	//$(".messages-topPanel").disableTextSelection();
	
	$("a").click(function(){
		$(".messagesTop").remove();
		$(".tempMessagesTop").remove();
	});
	
	$(".messagesTop").find(".messages-topPanel").each(function(index){
		var arrow;
		var className = $(this).attr('class');
		if(className.indexOf("messages-topError") >= 0){
			arrow = "messages-topError";
		} else if(className.indexOf("messages-topSucc") >= 0){
			arrow = "messages-topSucc";
		} else if(className.indexOf("messages-topWarn") >= 0){
			arrow = "messages-topWarn";
		} else {
			arrow = "messages-topInfo";
		}
		
		var blockContent = $("#" + $(this).attr('id') + "_content");
		if(blockContent.length > 0){
			if(isFilled(blockContent)){
				$(this).append("<span class='"+ arrow +"-arrow arrow-down'></span>");
				var exceptionHeight = $(this).find(".messages-topException").height();
				var arrowPosition = $(this).height() / 2 - exceptionHeight + 3;
				//alert($(this).height());
				//var arrowPosition = $(this).height() / 2 + 4;
				$("." + arrow +"-arrow").css("marginTop", - arrowPosition);
			}
		}
	});
	
	setTempMessagePositionWhileScroll();
	
	//$(document).find("messages-topError");
	$(".messagePanel .messages-topError").mouseenter(function(){
		var idBlock = $(this).attr("id");
		var blockContent = $("#" + idBlock + "_content");
		if(blockContent.length > 0){
			if(isFilled(blockContent)){
				$(this).css("backgroundColor","#FFC2AE");
				$(this).css("cursor","pointer");
			}
{'fraction_non_alphanumeric': 0.18421052631578946, 'fraction_numerical': 0.010566188197767145, 'mean_word_length': 4.2534031413612565, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1570102', 'n_tokens_mistral': 1689, 'n_tokens_neox': 1487, 'n_words': 375}