<commit_before><div id="categories_edition" class="overlay container" style="opacity: 0.90; background-color: gray; position: fixed; width: 100%; height: 100%; top: 0px; left: 0px; z-index: 9999; overflow-y: auto; display:none; padding: 20px 20px 20px 20px;">
<button type="button" class="btn btn-primary btn-for-categorize2 active" data-toggle="button">Editar</button>
<ul class="categories edit_categories"> 
<% new_categories = subject_categories(profile_or_current_subject, {:scope => scope, :limit => 0}) %>
<% new_categories.each do |category| %>
    <%= render :partial => 'categories/category', :locals => { :category => category } %>
<% end %> 
</ul>
</div>

<script>
$(document).ready(function(){
	$(".btn-for-categorize2").click(function(){
		$("#categories_edition").fadeOut();
  });
$(".edit_categories").sortable();
$(".edit_categories").disableSelection();
 
});
</script><commit_msg>Fixing stuff with sort<commit_after><div id="categories_edition" class="overlay container" style="opacity: 0.90; background-color: gray; position: fixed; width: 100%; height: 100%; top: 0px; left: 0px; z-index: 9999; overflow-y: auto; display:none; padding: 20px 20px 20px 20px;">
<button type="button" class="btn btn-primary btn-for-categorize2 active" data-toggle="button">Editar</button>
<ul class="categories edit_categories"> 
<% new_categories = subject_categories(profile_or_current_subject, {:scope => scope, :limit => 0}) %>
<% new_categories.each do |category| %>
    <%= render :partial => 'categories/category', :locals => { :category => category } %>
<% end %> 
</ul>
</div>

<script>
$(document).ready(function(){
	$(".btn-for-categorize2").click(function(){
		$("#categories_edition").fadeOut();
  });
	var x;
	var y;
$(".edit_categories").sortable({
	start:function(event,ui){
		 //Reduces size
		 $(ui.item).width($(ui.item).width()*0.85);
		 $(ui.item).height($(ui.item).height()*0.85);
		 
		 //This is to fix cursor to middle position
		// $(this).sortable("option", "cursorAt", {
   		//	 left: Math.floor(ui.helper.width()),
   		//	 top: Math.floor(ui.helper.height())
 		 //}); 
	},
	beforeStop:function(event,ui){

	},

	tolerance: "pointer"
}).disableSelection();
 
});
</script>
{'fraction_non_alphanumeric': 0.20598911070780399, 'fraction_numerical': 0.02631578947368421, 'mean_word_length': 5.391304347826087, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 37, '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': '1206942', 'n_tokens_mistral': 805, 'n_tokens_neox': 720, 'n_words': 154}