<commit_before>
{% load ndf_tags %}
{% load i18n %}

<style>

.divider-line { font-size: xx-large; color:lightgray; }
.line-height-2 { line-height:2; }
.line-height-2pt5 { line-height:2.5; }
.fontsize-x-large { font-size: x-large; }

.margin-0 { margin: 0 !important ;}

.resource-drawer { 
border-color: #D3D3D3; border-style: solid; 
padding: 0 !important; 
overflow-y: auto;
}

.resource-drawer li.bullet-item:hover{
background-color: #ecf0f1; cursor:pointer;
}

.posted-by{ color: #808080; font-size: small; }

.selected-resource { background-color:lightgray !important ; }

.resource-type-image {
height:40px; 		
background-repeat:no-repeat; background-size: 48px 48px
}

</style>

<form data-abide id="form-edit-node" method="POST" action="">

	<header class="row">

    <h2 class="medium-12 columns">
		{% if node %}
			Editing {{title}}: {{node.name}}
		{% else %}
			Create a New {{title}}
		{% endif %}
    </h2>

    <nav class="medium-12 columns">
   		<dl class="tabs" data-tab>
	
		<dd><h3>View:</h3></dd>
	
		<dd class="active" title="Click here to add Name, Description, Privacy and Tags">
	  	<!-- change name of collection tab overide block in your code -->
	  		<a href="#panel-name-description">{% block page_tab %} {{title}} {% endblock %}</a>
		</dd>
		<dd title="Click here to add/edit Prior Node">
	  		<a href="#panel-prior-node">Prior Node</a>
		</dd>
		<!-- change name of collection tab overide block in your code -->
		<dd title="Click here to add/edit collection">
	  		<a href="#panel-collection">{% block collection_tab %}Collection {% endblock %}</a> 
		</dd>  
	
     	</dl>
  	</nav>
  	</header>

  	{% csrf_token %}

  	<div id="node-details-edit-div" class="tabs-content" > 

    	<div class="active content row" id="panel-name-description">
      		<div class="medium-6 columns">
	
			<div class="row">
	  			<div class="medium-8 columns">
	    			<label>{{title}} Name</label>
	    			<input id="name_id" name="name" type="text" value="{{node.name}}" placeholder="Enter name..." required>
	    			<small class="error">Please give your page a descriptive name. It's helpful for others and for yourself.</small>
	  			</div>

	  			<div class="medium-4 columns">
	    			{% if node.created_by == request.user.pk %}		    	
						<span data-tooltip class="has-tip" title="Public pages can be viewed and edited by any group member, while private pages are only for you"><label>Privacy</label></span>

						<div class="privacy-mode switch round">
						{% if node.access_policy == "PUBLIC" or node.group_type == "PUBLIC" %}
							<input id="PUBLIC" name="login-mode" value="PUBLIC" type="radio" checked>
							<label for="PUBLIC" onclick="">Public <i class="fi-torsos-all"></i></label>

							<input id="PRIVATE" name="login-mode" value="PRIVATE" type="radio">
							<label for="PRIVATE" onclick="">Private <i class="fi-lock"></i></label>
						{% else %}
							{% if node.access_policy == "PRIVATE" or node.group_type == "PRIVATE" %}
								<input id="PUBLIC" name="login-mode" value="PUBLIC" type="radio" >
								<label for="PUBLIC" onclick="">Public <i class="fi-torsos-all"></i></label>

								<input id="PRIVATE" name="login-mode" value="PRIVATE" type="radio" checked>
								<label for="PRIVATE" onclick="">Private <i class="fi-lock"></i></label>
							{% endif %}
						{% endif %}
							<span></span>
						</div>

					{% else %}

						{% if not node %}
							<span data-tooltip class="has-tip" title="Public pages can be viewed and edited by any group member, while private pages are only for you"><label>Privacy</label></span>
							<div class="privacy-mode switch round">
						
								<input id="PUBLIC" name="login-mode" value="PUBLIC" type="radio" checked>
								<label for="PUBLIC" onclick="">Public <i class="fi-torsos-all"></i></label>

								<input id="PRIVATE" name="login-mode" value="PRIVATE" type="radio">
								<label for="PRIVATE" onclick="">Private <i class="fi-lock"></i></label>
							
								<span></span>
							</div>

						{% endif %}

					{% endif %}	    
	  			</div>
			</div>

			<div id="message" style="display:none; color:red"></div>

			<div class="row">
	  
	  			<div class="large-6 columns"><label>Language<select name="lan"><option id="en" value="en">en</option><option id="hi" value="hi">hi</option><option id="mar" value="mar">mar</option></select></label>
	     		</div>

	  			<div class="large-6 columns" style="padding: 1.8em;">
	  				<a href="#view-map-edit-widget" data-reveal-id="view-map-edit-widget" title="Click to add location markers">
	  					<i class="fi-marker"></i> &nbsp; Add Location
	  				</a>
	  			</div>
			</div>

			<div class="row">
	  			<div class="medium-12 columns">
	    			{% include "ndf/add_editor.html" with var_name="content_org" var_placeholder="Enter the content here" var_value=node.content_org|default_if_none:"" node_id=node.pk%}
	  			</div>
			</div>

			<div class="row">
	  			<div class="medium-12 columns">
	    			<span data-tooltip class="has-tip" title="Tags help identify similiar work easily. You can add as many labels as you wish using a comma ','"><label>Tag{{node.tags|pluralize|default_if_none:"s"}}</label>
	    			</span>
	    			<input id="tags_id" name="tags" type="text" value="{{node.tags|join:', '|default_if_none:""}}" placeholder="Separate tags with commas...">
	  			</div>		
			</div>
	
      		</div>
  		</div>

  		{% block prior_node %}

	    	<div class="content" id="panel-prior-node"  style="width:95%;">
	      	<div class="row">
				<div class="small-12 columns">
		  			<h5>Add or edit Prior Node : </h5>
				</div>
				<br/>
		
				<div class="small-12 columns">
		  			<div id="prior_node_drawer">
		    			{% edit_drawer_widget "prior_node" groupid node title %}
		  			</div>
				</div>
	      	</div>
	    	</div>
    
	    {% endblock %}


	    {% block collection %}

	    <div class="content" id="panel-collection" style="width:95%;">
	    <div class="row">
	    	{% if node %}
			<div class="small-3 columns">		
	    		<a href="{% url "theme_topic_create" groupid app_id theme_GST_id %}"> <input class="small button split" type="button" value=" + Add Theme" > </a>
			</div>
			<div class="small-9 columns">		
				<a href="{% url "theme_topic_create" groupid app_id topic_GST_id %}"> <input class="small button split" type="button" value=" + Add Topic" > </a>
			</div>
			{% endif %}
			<div class="small-12 columns">
		  		<div id="collection_drawer" >
		    		{% edit_drawer_widget "collection" groupid node title %}
		  		</div>
			</div>
	      
	  	</div>
	 	</div>

	    {% endblock %}

	</div>  

	{% block add_fields %} {% endblock %}
  
  	<div class="row" >
    	<input type="submit" id="save-node" value="Save as Draft And Preview" class="button medium-6 columns"/>
  	</div>

  	<!-- Overlay : Map Widget -->
    <div class="content reveal-modal graph-div" id="view-map-edit-widget" data-reveal>    
      
      	<!-- #{#% #if '/edit/' in request.path  or '/image_detail/' in request.path  or '/video_detail/' in request.path%} -->
  		<a class="close-reveal-modal" >&#215;</a>
        {% include "ndf/map_widget.html" with mode="edit" %}
        <!-- <div style="background-color:gray; width:100%; height:80%;"></div> -->
      	<!-- #{#%# endif %} -->
    </div>

    <input type="hidden" id="nodes_list" value="{{nodes_list}}">						
</form>

<script type="text/javascript">

	$(document).ready(function(){
		$("#name_id").change(function(){

			var name = $("#name_id").val();
			var nodes = $("#nodes_list").val();

			if (nodes.indexOf(name) > 0)  
			{
				$("#message").css("display", "block");
				$("#message").html("Name '"+ name +"' already exist .. Please choose another name");
				$("#name_id").val("");
			}
			else
			{
				$("#message").css("display", "none");
			}

		});
	});


	$("#save-node").click(function() {

		pn_arr = []
		cn_arr = []
		md_arr = [] //for adding module

		$(".node_id").each(function (){
			if ($(this).parent(".bullet-item").parent("#prior_node_drawer2").attr("id") == "prior_node_drawer2") {
				pn_arr.push($(this).val());
			}

			if ($(this).parent(".bullet-item").parent("#collection_drawer2").attr("id") == "collection_drawer2") {
				cn_arr.push($(this).val());
			}

			if ($(this).parent(".bullet-item").parent("#module_drawer2").attr("id") == "module_drawer2") {
  				md_arr.push($(this).val());
  			}
		});

		$("#prior_node_list").val(pn_arr)
		$("#collection_list").val(cn_arr) 
		$("#module_list").val(md_arr)   

		{% block base_save_on_click %}{% endblock %}
	});


  $(document).on('open', '#view-map-edit-widget[data-reveal]', function () {  
    
    $.ajax({
  url: "{% url 'get_visited_location' groupid %}",
  success: function(data){ 
   
  	data = JSON.parse(data);

    var lastVisitedLocationVal = data;
    
    if(lastVisitedLocationVal){

      if(lastVisitedLocationVal == "[]"){
        lastVisitedLocationVal = JSON.parse(lastVisitedLocationVal);
      }

      if(lastVisitedLocationVal.length > 0){
            // lastVisitedLocationVal = JSON.parse(lastVisitedLocationVal);
            var zoom = lastVisitedLocationVal.pop(),
                lng = lastVisitedLocationVal[1],
                lat = lastVisitedLocationVal[0];
              map.setView([lat, lng], zoom);
            }
    }
    else if( tempArr.length )
    {
      var group = new L.featureGroup(tempArr)
          map.fitBounds(group.getBounds());
    }
   
  }
});

  });

	$(document).on('opened', '#view-map-edit-widget[data-reveal]', function () {  
	
		map.invalidateSize();  
	   
	});

</script>

<commit_msg>Now collection tab page is the landing page for editing themes<commit_after>
{% load ndf_tags %}
{% load i18n %}

<style>

.divider-line { font-size: xx-large; color:lightgray; }
.line-height-2 { line-height:2; }
.line-height-2pt5 { line-height:2.5; }
.fontsize-x-large { font-size: x-large; }

.margin-0 { margin: 0 !important ;}

.resource-drawer { 
border-color: #D3D3D3; border-style: solid; 
padding: 0 !important; 
overflow-y: auto;
}

.resource-drawer li.bullet-item:hover{
background-color: #ecf0f1; cursor:pointer;
}

.posted-by{ color: #808080; font-size: small; }

.selected-resource { background-color:lightgray !important ; }

.resource-type-image {
height:40px; 		
background-repeat:no-repeat; background-size: 48px 48px
}

</style>

<form data-abide id="form-edit-node" method="POST" action="">

	<header class="row">

    <h2 class="medium-12 columns">
		{% if node %}
			Editing {{title}}: {{node.name}}
		{% else %}
			Create a New {{title}}
		{% endif %}
    </h2>

    <nav class="medium-12 columns">
   		<dl class="tabs" data-tab>
		{% if node %}
			<dd><h3>View:</h3></dd>
		
			<dd title="Click here to add Name, Description, Privacy and Tags">
		  	<!-- change name of collection tab overide block in your code -->
		  		<a href="#panel-name-description"> {{title}} </a>
			</dd>
			<dd title="Click here to add/edit Prior Node">
		  		<a href="#panel-prior-node">Prior Node</a>
			</dd>
			<!-- change name of collection tab overide block in your code -->
			<dd class="active" title="Click here to add/edit collection">
		  		<a href="#panel-collection">Collection </a> 
			</dd>  
			  
		{% else %}
			<dd><h3>View:</h3></dd>
		
			<dd class="active" title="Click here to add Name, Description, Privacy and Tags">
		  	<!-- change name of collection tab overide block in your code -->
		  		<a href="#panel-name-description"> {{title}} </a>
			</dd>
			<dd title="Click here to add/edit Prior Node">
		  		<a href="#panel-prior-node">Prior Node</a>
			</dd>
			<!-- change name of collection tab overide block in your code -->
			<dd title="Click here to add/edit collection">
		  		<a href="#panel-collection">Collection </a> 
			</dd>  
		{% endif %}
     	</dl>
  	</nav>
  	</header>

  	{% csrf_token %}

  	<div id="node-details-edit-div" class="tabs-content" > 
  		{% if node %}

  		<!-- Collection tab block -->
	    <div class="active content" id="panel-collection" style="width:95%;">
		    <div class="row">
		    	{% if node %}
				<div class="small-3 columns">		
		    		<a href="{% url "theme_topic_create" groupid app_id theme_GST_id %}"> <input class="small button split" type="button" value=" + Add Theme" > </a>
				</div>
				<div class="small-9 columns">		
					<a href="{% url "theme_topic_create" groupid app_id topic_GST_id %}"> <input class="small button split" type="button" value=" + Add Topic" > </a>
				</div>
				{% endif %}
				<div class="small-12 columns">
			  		<div id="collection_drawer" >
			    		{% edit_drawer_widget "collection" groupid node title %}
			  		</div>
				</div>
		      
		  	</div>
	 	</div>


  		<!-- Block Description -->
		<div class="content row" id="panel-name-description">
	  		<div class="medium-6 columns">

				<div class="row">
		  			<div class="medium-8 columns">
		    			<label>{{title}} Name</label>
		    			<input id="name_id" name="name" type="text" value="{{node.name}}" placeholder="Enter name..." required>
		    			<small class="error">Please give your page a descriptive name. It's helpful for others and for yourself.</small>
		  			</div>

		  			<div class="medium-4 columns">
		    			{% if node.created_by == request.user.pk %}		    	
							<span data-tooltip class="has-tip" title="Public pages can be viewed and edited by any group member, while private pages are only for you"><label>Privacy</label></span>

							<div class="privacy-mode switch round">
							{% if node.access_policy == "PUBLIC" or node.group_type == "PUBLIC" %}
								<input id="PUBLIC" name="login-mode" value="PUBLIC" type="radio" checked>
								<label for="PUBLIC" onclick="">Public <i class="fi-torsos-all"></i></label>

								<input id="PRIVATE" name="login-mode" value="PRIVATE" type="radio">
								<label for="PRIVATE" onclick="">Private <i class="fi-lock"></i></label>
							{% else %}
								{% if node.access_policy == "PRIVATE" or node.group_type == "PRIVATE" %}
									<input id="PUBLIC" name="login-mode" value="PUBLIC" type="radio" >
									<label for="PUBLIC" onclick="">Public <i class="fi-torsos-all"></i></label>

									<input id="PRIVATE" name="login-mode" value="PRIVATE" type="radio" checked>
									<label for="PRIVATE" onclick="">Private <i class="fi-lock"></i></label>
								{% endif %}
							{% endif %}
								<span></span>
							</div>

						{% else %}

							{% if not node %}
								<span data-tooltip class="has-tip" title="Public pages can be viewed and edited by any group member, while private pages are only for you"><label>Privacy</label></span>
								<div class="privacy-mode switch round">
							
									<input id="PUBLIC" name="login-mode" value="PUBLIC" type="radio" checked>
									<label for="PUBLIC" onclick="">Public <i class="fi-torsos-all"></i></label>

									<input id="PRIVATE" name="login-mode" value="PRIVATE" type="radio">
									<label for="PRIVATE" onclick="">Private <i class="fi-lock"></i></label>
								
									<span></span>
								</div>

							{% endif %}

						{% endif %}	    
		  			</div>
				</div>

				<div id="message" style="display:none; color:red"></div>

				<div class="row">
		  
		  			<div class="large-6 columns"><label>Language<select name="lan"><option id="en" value="en">en</option><option id="hi" value="hi">hi</option><option id="mar" value="mar">mar</option></select></label>
		     		</div>

		  			<div class="large-6 columns" style="padding: 1.8em;">
		  				<a href="#view-map-edit-widget" data-reveal-id="view-map-edit-widget" title="Click to add location markers">
		  					<i class="fi-marker"></i> &nbsp; Add Location
		  				</a>
		  			</div>
				</div>

				<div class="row">
		  			<div class="medium-12 columns">
		    			{% include "ndf/add_editor.html" with var_name="content_org" var_placeholder="Enter the content here" var_value=node.content_org|default_if_none:"" node_id=node.pk%}
		  			</div>
				</div>

				<div class="row">
		  			<div class="medium-12 columns">
		    			<span data-tooltip class="has-tip" title="Tags help identify similiar work easily. You can add as many labels as you wish using a comma ','"><label>Tag{{node.tags|pluralize|default_if_none:"s"}}</label>
		    			</span>
		    			<input id="tags_id" name="tags" type="text" value="{{node.tags|join:', '|default_if_none:""}}" placeholder="Separate tags with commas...">
		  			</div>		
				</div>

	  		</div>
		</div>

  		<!-- Prior node block -->
    	<div class="content" id="panel-prior-node"  style="width:95%;">
	      	<div class="row">
				<div class="small-12 columns">
		  			<h5>Add or edit Prior Node : </h5>
				</div>
				<br/>
		
				<div class="small-12 columns">
		  			<div id="prior_node_drawer">
		    			{% edit_drawer_widget "prior_node" groupid node title %}
		  			</div>
				</div>
	      	</div>
    	</div>


	    {% else %}
	    	<!-- Block Description -->
	    	<div class="active content row" id="panel-name-description">
	      		<div class="medium-6 columns">
		
				<div class="row">
		  			<div class="medium-8 columns">
		    			<label>{{title}} Name</label>
		    			<input id="name_id" name="name" type="text" value="{{node.name}}" placeholder="Enter name..." required>
		    			<small class="error">Please give your page a descriptive name. It's helpful for others and for yourself.</small>
		  			</div>

		  			<div class="medium-4 columns">
		    			{% if node.created_by == request.user.pk %}		    	
							<span data-tooltip class="has-tip" title="Public pages can be viewed and edited by any group member, while private pages are only for you"><label>Privacy</label></span>

							<div class="privacy-mode switch round">
							{% if node.access_policy == "PUBLIC" or node.group_type == "PUBLIC" %}
								<input id="PUBLIC" name="login-mode" value="PUBLIC" type="radio" checked>
								<label for="PUBLIC" onclick="">Public <i class="fi-torsos-all"></i></label>

								<input id="PRIVATE" name="login-mode" value="PRIVATE" type="radio">
								<label for="PRIVATE" onclick="">Private <i class="fi-lock"></i></label>
							{% else %}
								{% if node.access_policy == "PRIVATE" or node.group_type == "PRIVATE" %}
									<input id="PUBLIC" name="login-mode" value="PUBLIC" type="radio" >
									<label for="PUBLIC" onclick="">Public <i class="fi-torsos-all"></i></label>

									<input id="PRIVATE" name="login-mode" value="PRIVATE" type="radio" checked>
									<label for="PRIVATE" onclick="">Private <i class="fi-lock"></i></label>
								{% endif %}
							{% endif %}
								<span></span>
							</div>

						{% else %}

							{% if not node %}
								<span data-tooltip class="has-tip" title="Public pages can be viewed and edited by any group member, while private pages are only for you"><label>Privacy</label></span>
								<div class="privacy-mode switch round">
							
									<input id="PUBLIC" name="login-mode" value="PUBLIC" type="radio" checked>
									<label for="PUBLIC" onclick="">Public <i class="fi-torsos-all"></i></label>

									<input id="PRIVATE" name="login-mode" value="PRIVATE" type="radio">
									<label for="PRIVATE" onclick="">Private <i class="fi-lock"></i></label>
								
									<span></span>
								</div>

							{% endif %}

						{% endif %}	    
		  			</div>
				</div>

				<div id="message" style="display:none; color:red"></div>

				<div class="row">
		  
		  			<div class="large-6 columns"><label>Language<select name="lan"><option id="en" value="en">en</option><option id="hi" value="hi">hi</option><option id="mar" value="mar">mar</option></select></label>
		     		</div>

		  			<div class="large-6 columns" style="padding: 1.8em;">
		  				<a href="#view-map-edit-widget" data-reveal-id="view-map-edit-widget" title="Click to add location markers">
		  					<i class="fi-marker"></i> &nbsp; Add Location
		  				</a>
		  			</div>
				</div>

				<div class="row">
		  			<div class="medium-12 columns">
		    			{% include "ndf/add_editor.html" with var_name="content_org" var_placeholder="Enter the content here" var_value=node.content_org|default_if_none:"" node_id=node.pk%}
		  			</div>
				</div>

				<div class="row">
		  			<div class="medium-12 columns">
		    			<span data-tooltip class="has-tip" title="Tags help identify similiar work easily. You can add as many labels as you wish using a comma ','"><label>Tag{{node.tags|pluralize|default_if_none:"s"}}</label>
		    			</span>
		    			<input id="tags_id" name="tags" type="text" value="{{node.tags|join:', '|default_if_none:""}}" placeholder="Separate tags with commas...">
		  			</div>		
				</div>
		
	      		</div>
  			</div>

  		<!-- Prior node block -->
    	<div class="content" id="panel-prior-node"  style="width:95%;">
	      	<div class="row">
				<div class="small-12 columns">
		  			<h5>Add or edit Prior Node : </h5>
				</div>
				<br/>
		
				<div class="small-12 columns">
		  			<div id="prior_node_drawer">
		    			{% edit_drawer_widget "prior_node" groupid node title %}
		  			</div>
				</div>
	      	</div>
    	</div>
    

	    <!-- Collection tab block -->
	    <div class="content" id="panel-collection" style="width:95%;">
		    <div class="row">
		    	{% if node %}
				<div class="small-3 columns">		
		    		<a href="{% url "theme_topic_create" groupid app_id theme_GST_id %}"> <input class="small button split" type="button" value=" + Add Theme" > </a>
				</div>
				<div class="small-9 columns">		
					<a href="{% url "theme_topic_create" groupid app_id topic_GST_id %}"> <input class="small button split" type="button" value=" + Add Topic" > </a>
				</div>
				{% endif %}
				<div class="small-12 columns">
			  		<div id="collection_drawer" >
			    		{% edit_drawer_widget "collection" groupid node title %}
			  		</div>
				</div>
		      
		  	</div>
	 	</div>

	    {% endif %}

    	
	</div>  

	{% block add_fields %} {% endblock %}
  
  	<div class="row" >
    	<input type="submit" id="save-node" value="Save as Draft And Preview" class="button medium-6 columns"/>
  	</div>

  	<!-- Overlay : Map Widget -->
    <div class="content reveal-modal graph-div" id="view-map-edit-widget" data-reveal>    
      
      	<!-- #{#% #if '/edit/' in request.path  or '/image_detail/' in request.path  or '/video_detail/' in request.path%} -->
  		<a class="close-reveal-modal" >&#215;</a>
        {% include "ndf/map_widget.html" with mode="edit" %}
        <!-- <div style="background-color:gray; width:100%; height:80%;"></div> -->
      	<!-- #{#%# endif %} -->
    </div>

    <input type="hidden" id="nodes_list" value="{{nodes_list}}">						
</form>

<script type="text/javascript">

	$(document).ready(function(){
		$("#name_id").change(function(){

			var name = $("#name_id").val();
			var nodes = $("#nodes_list").val();

			if (nodes.indexOf(name) > 0)  
			{
				$("#message").css("display", "block");
				$("#message").html("Name '"+ name +"' already exist .. Please choose another name");
				$("#name_id").val("");
			}
			else
			{
				$("#message").css("display", "none");
			}

		});
	});


	$("#save-node").click(function() {

		pn_arr = []
		cn_arr = []
		md_arr = [] //for adding module

		$(".node_id").each(function (){
			if ($(this).parent(".bullet-item").parent("#prior_node_drawer2").attr("id") == "prior_node_drawer2") {
				pn_arr.push($(this).val());
			}

			if ($(this).parent(".bullet-item").parent("#collection_drawer2").attr("id") == "collection_drawer2") {
				cn_arr.push($(this).val());
			}

			if ($(this).parent(".bullet-item").parent("#module_drawer2").attr("id") == "module_drawer2") {
  				md_arr.push($(this).val());
  			}
		});

		$("#prior_node_list").val(pn_arr)
		$("#collection_list").val(cn_arr) 
		$("#module_list").val(md_arr)   

		{% block base_save_on_click %}{% endblock %}
	});


  $(document).on('open', '#view-map-edit-widget[data-reveal]', function () {  
    
    $.ajax({
  url: "{% url 'get_visited_location' groupid %}",
  success: function(data){ 
   
  	data = JSON.parse(data);

    var lastVisitedLocationVal = data;
    
    if(lastVisitedLocationVal){

      if(lastVisitedLocationVal == "[]"){
        lastVisitedLocationVal = JSON.parse(lastVisitedLocationVal);
      }

      if(lastVisitedLocationVal.length > 0){
            // lastVisitedLocationVal = JSON.parse(lastVisitedLocationVal);
            var zoom = lastVisitedLocationVal.pop(),
                lng = lastVisitedLocationVal[1],
                lat = lastVisitedLocationVal[0];
              map.setView([lat, lng], zoom);
            }
    }
    else if( tempArr.length )
    {
      var group = new L.featureGroup(tempArr)
          map.fitBounds(group.getBounds());
    }
   
  }
});

  });

	$(document).on('opened', '#view-map-edit-widget[data-reveal]', function () {  
	
		map.invalidateSize();  
	   
	});

</script>


{'fraction_non_alphanumeric': 0.19016129032258064, 'fraction_numerical': 0.007540322580645162, 'mean_word_length': 2.910596026490066, 'pattern_counts': {'":': 0, '<': 504, '<?xml version=': 0, '>': 508, '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': '5324938', 'n_tokens_mistral': 10115, 'n_tokens_neox': 8289, 'n_words': 1833}