<commit_before><?php $this->load->view('thread/header');?>

<body>
    <div id="container">
    	<div id="header">
			Welcome <?=$username?>
        </div><!-- Close header -->
        
        
        	
            <?php $this->load->view('thread/menu');?>
			
			<script type="text/javascript">
				$( init );

				function init() {
				
					$('.node').draggable(nodeSettings);
					$('#add_btn').draggable({ revert: 'invalid', grid: [ 5,5 ] });
					
					
					initializeToolbox();
					setNodeContainerHeight(); 

					
					$('.node .type-container a').live("click", function(){
						
						var nodeType = $(this).attr("href");
						
						var dialogSelector = "#type-examples ." + nodeType + " .dialog";
						
						$(dialogSelector).clone().dialog({
							autoOpen: true,
							height: 300,
							width: 350,
							modal: true,
							buttons: {
								"Create": function() {
									
									
									
									$( this ).dialog( "destroy" );
								},
								Cancel: function() {
									
									$( this ).dialog( "destroy" );
								}
							},
						});
						return false;
					});
				
	


					
				}
				
			</script>
			<div id = "content-wrapper">
				<div class = "left section"></div>
				<div class = "middle section"></div>
				<div class = "right section"></div>
			
				<div id="nodes">
					<?php if($query): foreach($query as $post):?>
					<div class = "node align-<?=$post->position;?>" data-entry_id = "<?=$post->entry_id;?>" data-status = "current" data-position = "<?=$post->position;?>" style = "top:<?=$post->top;?>px">
						<? $this->load->view('modules/basic-textbox', array('post' => $post)); ?>
					</div>
					<?php endforeach; else: ?>
						<h1>no nodes yet!</h1>
					<?php endif; ?>
				</div><!-- Close nodes -->
				<aside id = "toolbox">
					<ul>
						<li><a class = "save_btn" href="#">Save</a></li>
						<li id="trash" >
							<p>Drop here to delete</p>
						</li>
						
						<li id="add_btn">
							<p>Drag to add</p>
						</li>

					</ul>
				</aside>
			</div>
			
			<div id = "type-examples" style="display:none">
				<?php $post->entry_name = "Error: Missing Content: ENTRY_NAME"; ?>
				<?php $post->entry_date = "Error: Missing Content: ENTRY_DATE"; ?>
				<?php $post->entry_body = "Error: Missing Content: entry_body"; ?>
				
				<!-- Start adding different modules here -->
				<? $this->load->view('modules/basic-textbox', array('post' => $post, 'hasDialog' => true)); ?>
				
			</div>
			
        <?php //$this->load->view('thread/footer');?>
    	
    </div><!-- Close container -->
</body>
</html><commit_msg>Add entry working but no real data<commit_after><?php $this->load->view('thread/header');?>

<body>
    <div id="container">
    	<div id="header">
			Welcome <?=$username?>
        </div><!-- Close header -->
        
        
        	
            <?php $this->load->view('thread/menu');?>
			
			<script type="text/javascript">
				$( init );

				function init() {
				
					$('.node').draggable(nodeSettings);
					$('#add_btn').draggable({ revert: 'invalid', grid: [ 5,5 ] });
					
					
					initializeToolbox();
					setNodeContainerHeight(); 

					
					$('.node .type-container a').live("click", function(){
						
						var node = $(this).closest('.node');
						var nodeType = $(this).attr("href");
						
						var dialogSelector = "#type-examples ." + nodeType + " .dialog";
						
						$(dialogSelector).clone().dialog({
							autoOpen: true,
							height: 300,
							width: 350,
							modal: true,
							buttons: {
								"Create": function() {
								
									node.empty();
									node.append($("#type-examples ." + nodeType).clone());
									
									$( this ).dialog( "destroy" );
								},
								Cancel: function() {
									
									$( this ).dialog( "destroy" );
								}
							},
						});
						return false;
					});
				
	


					
				}
				
			</script>
			<div id = "content-wrapper">
				<div class = "left section"></div>
				<div class = "middle section"></div>
				<div class = "right section"></div>
			
				<div id="nodes">
					<?php if($query): foreach($query as $post):?>
					<div class = "node align-<?=$post->position;?>" data-entry_id = "<?=$post->entry_id;?>" data-status = "current" data-position = "<?=$post->position;?>" style = "top:<?=$post->top;?>px">
						<? $this->load->view('modules/basic-textbox', array('post' => $post)); ?>
					</div>
					<?php endforeach; else: ?>
						<h1>no nodes yet!</h1>
					<?php endif; ?>
				</div><!-- Close nodes -->
				<aside id = "toolbox">
					<ul>
						<li><a class = "save_btn" href="#">Save</a></li>
						<li id="trash" >
							<p>Drop here to delete</p>
						</li>
						
						<li id="add_btn">
							<p>Drag to add</p>
						</li>

					</ul>
				</aside>
			</div>
			
			<div id = "type-examples" style="display:none">
				<?php $post->entry_name = "Error: Missing Content: ENTRY_NAME"; ?>
				<?php $post->entry_date = "Error: Missing Content: ENTRY_DATE"; ?>
				<?php $post->entry_body = "Error: Missing Content: entry_body"; ?>
				<?php $post->entry_date = 1; ?>
				
				<!-- Start adding different modules here -->
				<? $this->load->view('modules/basic-textbox', array('post' => $post, 'hasDialog' => true)); ?>
				
			</div>
			
        <?php //$this->load->view('thread/footer');?>
    	
    </div><!-- Close container -->
</body>
</html>
{'fraction_non_alphanumeric': 0.2121887774061687, 'fraction_numerical': 0.0039018952062430325, 'mean_word_length': 2.0550510783200906, 'pattern_counts': {'":': 2, '<': 126, '<?xml version=': 0, '>': 167, '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': '5540981', 'n_tokens_mistral': 2497, 'n_tokens_neox': 1688, 'n_words': 364}