<commit_before><?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html rsf:id="html" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"/>
<script rsf:id="scr=portal-matter" type="text/javascript" language="JavaScript" src="/library/js/headscripts.js"></script>
<link rsf:id="scr=portal-matter" href="/library/skin/tool_base.css" type="text/css" rel="stylesheet" media="all" />
<link rsf:id="scr=portal-matter" href="/library/skin/default/tool.css" type="text/css" rel="stylesheet" media="all" />
<title rsf:id="msg=simplepage.blti.chooser"></title>
</head>
<body rsf:id="scr=sakai-body">
	<div class="portletBody" id="portletBody">
		<div rsf:id="error-div" class="ui-widget">
			<div class="messageError below-link-help">
				<p><span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
				<span rsf:id="error"></span> </p>
			</div>
		</div>
		<h2 rsf:id="mainhead" id="mainhead"></h2>

		<a style="float:right;" role="menuitem" class="usebutton" target="sakai-basiclti-admin-iframe" onclick="showIframe(this.title);" id="blti-main-link" href="#" rsf:id="blti-main-link"></a>
		<p rsf:id="blti-tools-text"></p>

		<div rsf:id="no-blti-tools" class="ui-widget" role="alert">
			<div class="instruction below-link-help">
				<div rsf:id="no-blti-tools-text" ></div>
			</div>
		</div>

		<div rsf:id="blti-create:" style="margin-left:2em">
		  <i class="" rsf:id="blti-create-icon"></i>
		  <a href="#" target="sakai-basiclti-admin-iframe" onclick="showIframe(this.title);" rsf:id="blti-create-link"></a>
		</div>

		<form action="#" rsf:id="blti-autosubmit" id="blti-autosubmit">
			<input type="hidden" rsf:id="csrf"/>
			<input type="hidden" rsf:id="item-id" id="item-id" />
			<input type="hidden" rsf:id="select"/>
			<input type="hidden" rsf:id="add-before" id="add-before" />
			<input type="hidden" class="bold" rsf:id="submit" />
		</form>

		<script>
		// If we have the blti-autosubmit form, submit it
		setTimeout(function(){
			var form = document.getElementById("blti-autosubmit");
			if ( form != null ) form.submit();
			}, 250);
		</script>

		<form action="#" rsf:id="blti-cancel" id="blti-cancel">
			<input type="hidden" rsf:id="csrf"/>
			<input type="hidden" rsf:id="cancel2"/>
			<input type="submit" rsf:id="cancel" class='cancelButton'/>
		</form>
		<div id="modal-iframe-div" style="display:none">
			<iframe name="sakai-basiclti-admin-iframe" id="sakai-basiclti-admin-iframe" src="/library/image/sakai/spinner.gif" style="height:300px"></iframe>
		</div>
	</div>

<script>
includeLatestJQuery('BltiPicker.html');
</script>

<script>
//<![CDATA[
function showIframe(title) {
	$("#modal-iframe-div").dialog({
		title: title,
		width: modalDialogWidth(),
		modal: true,
		draggable: false,
		open: function() {
			$('#sakai-basiclti-admin-iframe').width('100%');
		},
		close: function() {
			$('#sakai-basiclti-admin-iframe').attr('src','/library/image/sakai/spinner.gif');
		}
	});

	$(window).resize(function() {
		$("#modal-iframe-div").dialog("option", "width", modalDialogWidth());
		$('#sakai-basiclti-admin-iframe').width('100%');
	});
}
//]]>
</script>


</body>
</html>
<commit_msg>LSNBLDR-644 - Add receiver code for post.message<commit_after><?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html rsf:id="html" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"/>
<script rsf:id="scr=portal-matter" type="text/javascript" language="JavaScript" src="/library/js/headscripts.js"></script>
<link rsf:id="scr=portal-matter" href="/library/skin/tool_base.css" type="text/css" rel="stylesheet" media="all" />
<link rsf:id="scr=portal-matter" href="/library/skin/default/tool.css" type="text/css" rel="stylesheet" media="all" />
<title rsf:id="msg=simplepage.blti.chooser"></title>
</head>
<body rsf:id="scr=sakai-body">
	<div class="portletBody" id="portletBody">
		<div rsf:id="error-div" class="ui-widget">
			<div class="messageError below-link-help">
				<p><span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
				<span rsf:id="error"></span> </p>
			</div>
		</div>
		<h2 rsf:id="mainhead" id="mainhead"></h2>

		<a style="float:right;" role="menuitem" class="usebutton" target="sakai-basiclti-admin-iframe" onclick="showIframe(this.title);" id="blti-main-link" href="#" rsf:id="blti-main-link"></a>
		<p rsf:id="blti-tools-text"></p>

		<div rsf:id="no-blti-tools" class="ui-widget" role="alert">
			<div class="instruction below-link-help">
				<div rsf:id="no-blti-tools-text" ></div>
			</div>
		</div>

		<div rsf:id="blti-create:" style="margin-left:2em">
		  <i class="" rsf:id="blti-create-icon"></i>
		  <a href="#" target="sakai-basiclti-admin-iframe" onclick="showIframe(this.title);" rsf:id="blti-create-link"></a>
		</div>

		<form action="#" rsf:id="blti-autosubmit" id="blti-autosubmit">
			<input type="hidden" rsf:id="csrf"/>
			<input type="hidden" rsf:id="item-id" id="item-id" />
			<input type="hidden" rsf:id="select"/>
			<input type="hidden" class="bold" rsf:id="submit" />
		</form>

		<script>
		// If we have the blti-autosubmit form, submit it
		setTimeout(function(){
			var form = document.getElementById("blti-autosubmit");
			if ( form != null ) form.submit();
			}, 250);
		</script>

		<form action="#" rsf:id="blti-cancel" id="blti-cancel">
			<input type="hidden" rsf:id="csrf"/>
			<input type="hidden" rsf:id="cancel2"/>
			<input type="submit" rsf:id="cancel" class='cancelButton'/>
		</form>
		<div id="modal-iframe-div" style="display:none">
			<iframe name="sakai-basiclti-admin-iframe" id="sakai-basiclti-admin-iframe" src="/library/image/sakai/spinner.gif" style="height:400px"></iframe>
		</div>
	</div>

<script>
includeLatestJQuery('BltiPicker.html');
</script>

<script>
//<![CDATA[
function showIframe(title) {
	$("#modal-iframe-div").dialog({
		title: title,
		width: modalDialogWidth(),
		modal: true,
		draggable: false,
		open: function() {
			$('#sakai-basiclti-admin-iframe').attr('width', '100%');
		},
		close: function() {
			$('#sakai-basiclti-admin-iframe').attr('src','/library/image/sakai/spinner.gif');
		}
	});

	$(window).resize(function() {
		$("#modal-iframe-div").dialog("option", "width", modalDialogWidth());
		$('#sakai-basiclti-admin-iframe').attr('width', '100%');
	});
}

// Make sure to be careful to use .style.height or .height sepending on the iframe 
// tag you are working with.
window.addEventListener('message', function(e) {
	try {
		var message = JSON.parse(e.data);
		var idval = 'sakai-basiclti-admin-iframe';
		if ( message.subject == 'lti.frameResize' ) {
		var height = message.height;
			document.getElementById(idval).style.height = height;
			document.getElementById(idval).style.width = '100%';
			console.log('BltiPicker received lti.frameResize height='+height);
		}
	} catch (error) {
		console.log('BltiPicker lti.frameResize of '+idval+' failed height='+height);
		console.log(e.data);
	}
});
//]]>
</script>


</body>
</html>

{'fraction_non_alphanumeric': 0.22546095444685466, 'fraction_numerical': 0.009490238611713666, 'mean_word_length': 4.925301204819277, 'pattern_counts': {'":': 0, '<': 140, '<?xml version=': 2, '>': 140, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 4}, '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': '1787529', 'n_tokens_mistral': 3061, 'n_tokens_neox': 2800, 'n_words': 454}