<commit_before>﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="ArcGisJSWithAjaxControlToolkit._Default" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
	<title></title>
	<style>
		.accordion .header, .accordion .selected-header {
			padding: 0.2em 0.5em;
		}
		.accordion .header {
			border: 1px solid black;
			background-color: #a79191;
		}
		.accordion .selected-header {
			border: 1px solid black;
			background-color: yellow;
		}
	</style>
	<script>
		(function () {
			"use strict";
			var mapFrame, mapStuff;

			if (!window.mapStuff) {
				window.mapStuff = {};
			}

			/**
			@param {Sys.Extended.UI.TabPanel} tabPanel
			@param {HTMLDivElement} tabPanel._element
			@param {EventArgs} e
			*/
			function onTabClick(tabPanel, e) {
				var mapFrame;
				if (!mapFrame) {
					mapFrame = document.createElement("iframe");
					mapFrame.src = "Map.html";
					mapFrame.width = 800;
					mapFrame.height = 600;
					tabPanel._element.appendChild(mapFrame);
				}
			}

			window.mapStuff.onTabClick = onTabClick;
		}());
	</script>
</head>
<body>
	<form id="form1" runat="server">
		<ajaxToolkit:ToolkitScriptManager runat="server" CombineScripts="true"></ajaxToolkit:ToolkitScriptManager>
		<ajaxToolkit:Accordion ID="Accordion1" runat="server" CssClass="accordion" 
			HeaderCssClass="header" HeaderSelectedCssClass="selected-header" ContentCssClass="content">
			<Panes>
				<ajaxToolkit:AccordionPane runat="server" ID="PlaceholderPane">
					<Header>Placeholder</Header>
					<Content>Go to the map pane</Content>
				</ajaxToolkit:AccordionPane>
				<ajaxToolkit:AccordionPane runat="server" ID="MapPane">
					<Header>Map</Header>
					<Content>
						<ajaxToolkit:TabContainer ID="TabContainer1" runat="server">
							<ajaxToolkit:TabPanel ID="PlaceholderTabPanel" HeaderText="Other Tab" runat="server"><commit_msg>Removed the local mapFrame variable from onTabClick so that duplicate map iframes are no longer created.<commit_after>﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="ArcGisJSWithAjaxControlToolkit._Default" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
	<title></title>
	<style>
		.accordion .header, .accordion .selected-header {
			padding: 0.2em 0.5em;
		}
		.accordion .header {
			border: 1px solid black;
			background-color: #a79191;
		}
		.accordion .selected-header {
			border: 1px solid black;
			background-color: yellow;
		}
	</style>
	<script>
		(function () {
			"use strict";
			var mapFrame, mapStuff;

			if (!window.mapStuff) {
				window.mapStuff = {};
			}

			/** Creates the map iframe if it does not already exist.
			@param {Sys.Extended.UI.TabPanel} tabPanel The tab panel that was just activated.
			@param {HTMLDivElement} tabPanel._element This is the div element of the tab panel.
			@param {EventArgs} e
			*/
			function onTabClick(tabPanel, e) {
				if (!mapFrame) {
					mapFrame = document.createElement("iframe");
					mapFrame.src = "Map.html";
					// Specify the desired size of the map iframe here.
					mapFrame.width = 800;
					mapFrame.height = 600;
					tabPanel._element.appendChild(mapFrame);
				}
			}

			window.mapStuff.onTabClick = onTabClick;
		}());
	</script>
</head>
<body>
	<form id="form1" runat="server">
		<ajaxToolkit:ToolkitScriptManager runat="server" CombineScripts="true"></ajaxToolkit:ToolkitScriptManager>
		<ajaxToolkit:Accordion ID="Accordion1" runat="server" CssClass="accordion" 
			HeaderCssClass="header" HeaderSelectedCssClass="selected-header" ContentCssClass="content">
			<Panes>
				<ajaxToolkit:AccordionPane runat="server" ID="PlaceholderPane">
					<Header>Placeholder</Header>
					<Content>Nothing to see here.  Click on the <em>Map</em> pane header.</Content>
				</ajaxToolkit:AccordionPane>
				<ajaxToolkit:AccordionPane runat="server" ID="MapPane">
					<Header>Map</Header>
					<Content>
						<ajaxToolkit:TabContainer ID="TabContainer1" runat="server">
							<ajaxToolkit:TabPanel ID="PlaceholderTabPanel" HeaderText="Other Tab" runat="server">
{'fraction_non_alphanumeric': 0.14081434803683957, 'fraction_numerical': 0.012118274357731459, 'mean_word_length': 4.191194968553459, 'pattern_counts': {'":': 0, '<': 63, '<?xml version=': 0, '>': 63, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, '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': '560057', 'n_tokens_mistral': 1688, 'n_tokens_neox': 1378, 'n_words': 282}