<commit_before><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
	"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<title>Jasmine Spec Runner - offlineFeaturesManager</title>

		<link rel="shortcut icon" type="image/png" href="../vendor/jasmine-1.3.1/jasmine_favicon.png">
		<link rel="stylesheet" type="text/css" href="../vendor/jasmine-1.3.1/jasmine.css">
		<script type="text/javascript" src="../vendor/jasmine-1.3.1/jasmine.js"></script>
		<script type="text/javascript" src="../vendor/jasmine-1.3.1/jasmine-html.js"></script>
		<script type="text/javascript" src="../vendor/jasmine.async/lib/jasmine.async.js"></script>

	<script>
		var dojoConfig = {
			paths: { 
				edit: location.pathname.replace(/\/[^/]+$/, "") + "../../lib/edit",
				vendor: location.pathname.replace(/\/[^/]+$/, "") + "../../vendor" 
			}
		}
	</script>

		<link rel="stylesheet" href="http://js.arcgis.com/3.10/js/dojo/dijit/themes/claro/claro.css">
		<link rel="stylesheet" href="http://js.arcgis.com/3.10/js/esri/css/esri.css">
		<script src="http://js.arcgis.com/3.10/"></script>

	<!-- include spec files here... -->
	<script type="text/javascript" src="spec/offlineAttachmentsSpec.js"></script>

	<script type="text/javascript">

	var g_map;
	var g_featureLayers = [];
	var g_offlineFeaturesManager;
	var g_modules = {};
	var g_editsStore;
	var g_formNode;

	require(["esri/map", 
		"esri/layers/GraphicsLayer", "esri/graphic",
		"esri/layers/FeatureLayer", "esri/geometry", "esri/request",
		"dojo/dom", "dojo/on", "dojo/query",
		"dojo/dom-construct",
        "../dist/offline-edit-min.js",
        "dojo/domReady!"],
		function(Map, 
			GraphicsLayer, Graphic, 
			FeatureLayer, geometry, esriRequest,
			dom, on, query,
			domConstruct) 
		{
			g_modules.esriRequest = esriRequest;
			g_modules.Graphic = Graphic;
			g_offlineFeaturesManager = new O.esri.Edit.OfflineFeaturesManager();
			g_editsStore = new O.esri.Edit.EditStore();

			g_offlineFeaturesManager.initAttachments(function(success)
			{
				console.log("attachments inited", success);
			});

			g_formNode = dom.byId('theForm');

			g_map = new Map("map", {
				basemap: "topo",
				center: [-0.90, 41.64],
				zoom: 5,//9
				sliderStyle: "small"
			});

			var fsUrl = "http://services2.arcgis.com/CQWCKwrSm5dkM28A/arcgis/rest/services/Military/FeatureServer/";
			// var layersIds = [0,1,2,3,4,5,6];
			var layersIds = [1,2,3,6];

			layersIds.forEach(function(layerId)
			{
				var layer = new FeatureLayer(fsUrl + layerId, {
					mode: FeatureLayer.MODE_SNAPSHOT,
					outFields: ['*']
				});
				g_featureLayers.push(layer);			
			})

			g_map.addLayers(g_featureLayers);

			g_map.on('layers-add-result', test);

			function test() 
			{
				try
				{
					g_featureLayers.forEach(function(layer)
					{
						g_offlineFeaturesManager.extend(layer);
					});		
				}
				catch(err)
				{
					console.log(err);
				}<commit_msg>add callback to layer.extend<commit_after><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
	"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<title>Jasmine Spec Runner - offlineFeaturesManager</title>

		<link rel="shortcut icon" type="image/png" href="../vendor/jasmine-1.3.1/jasmine_favicon.png">
		<link rel="stylesheet" type="text/css" href="../vendor/jasmine-1.3.1/jasmine.css">
		<script type="text/javascript" src="../vendor/jasmine-1.3.1/jasmine.js"></script>
		<script type="text/javascript" src="../vendor/jasmine-1.3.1/jasmine-html.js"></script>
		<script type="text/javascript" src="../vendor/jasmine.async/lib/jasmine.async.js"></script>

	<script>
		var dojoConfig = {
			paths: { 
				edit: location.pathname.replace(/\/[^/]+$/, "") + "../../lib/edit",
				vendor: location.pathname.replace(/\/[^/]+$/, "") + "../../vendor" 
			}
		}
	</script>

		<link rel="stylesheet" href="http://js.arcgis.com/3.10/js/dojo/dijit/themes/claro/claro.css">
		<link rel="stylesheet" href="http://js.arcgis.com/3.10/js/esri/css/esri.css">
		<script src="http://js.arcgis.com/3.10/"></script>

	<!-- include spec files here... -->
	<script type="text/javascript" src="spec/offlineAttachmentsSpec.js"></script>

	<script type="text/javascript">

	var g_map;
	var g_featureLayers = [];
	var g_offlineFeaturesManager;
	var g_modules = {};
	var g_editsStore;
	var g_formNode;

	require(["esri/map", 
		"esri/layers/GraphicsLayer", "esri/graphic",
		"esri/layers/FeatureLayer", "esri/geometry", "esri/request",
		"dojo/dom", "dojo/on", "dojo/query",
		"dojo/dom-construct",
        "../dist/offline-edit-src.js",
        "dojo/domReady!"],
		function(Map, 
			GraphicsLayer, Graphic, 
			FeatureLayer, geometry, esriRequest,
			dom, on, query,
			domConstruct) 
		{
			g_modules.esriRequest = esriRequest;
			g_modules.Graphic = Graphic;
			g_offlineFeaturesManager = new O.esri.Edit.OfflineFeaturesManager();
			g_editsStore = new O.esri.Edit.EditStore();

			g_offlineFeaturesManager.initAttachments(function(success)
			{
				console.log("attachments inited", success);
			});

			g_formNode = dom.byId('theForm');

			g_map = new Map("map", {
				basemap: "topo",
				center: [-0.90, 41.64],
				zoom: 5,//9
				sliderStyle: "small"
			});

			var fsUrl = "http://services2.arcgis.com/CQWCKwrSm5dkM28A/arcgis/rest/services/Military/FeatureServer/";
			// var layersIds = [0,1,2,3,4,5,6];
			var layersIds = [1,2,3,6];

			layersIds.forEach(function(layerId)
			{
				var layer = new FeatureLayer(fsUrl + layerId, {
					mode: FeatureLayer.MODE_SNAPSHOT,
					outFields: ['*']
				});
				g_featureLayers.push(layer);			
			})

			g_map.addLayers(g_featureLayers);

			g_map.on('layers-add-result', test);

			function test() 
			{
				try
				{
					g_featureLayers.forEach(function(layer)
					{
						g_offlineFeaturesManager.extend(layer,function(success,message){
							if(!success){
								alert("There was a problem extending the layer: " + layer);
							}
						});
					});		
				}
				catch(err)
				{
					console.log(err);
				}
{'fraction_non_alphanumeric': 0.18884048257372654, 'fraction_numerical': 0.017091152815013406, 'mean_word_length': 3.3316400580551524, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 49, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '3386062', 'n_tokens_mistral': 2654, 'n_tokens_neox': 2226, 'n_words': 314}