<commit_before>{% extends 'admin/base_site.html' %}

{% load i18n admin_modify adminmedia %}

{% block breadcrumbs %}{% if not is_popup %}
<div class="breadcrumbs">
     <a href="/admin/">{% trans "Home" %}</a> &rsaquo;
     <a href="/admin/slots/">Slots</a> &rsaquo; 
	 <a href="/admin/slots/slot/">Slots</a>
</div>
{% endif %}{% endblock %}

{% block cols %}
	13
{% endblock %}

{% block sidebar %}{% endblock %}

{% block content %}
	<div class="grid_13">
		<div class="module">
			<style>
				#sortable{margin:10px; list-style:none;}
				#sortable li{ padding:5px 10px; border:1px solid #ABABAB; margin:5px 0; background:#EEE;}
				/*#sortable div input{visibility:hidden;}*/
				#sortable li input{float:right;}
				#change_pending{padding:10px;background-color:#FFF47F;font-weight:bold; margin-top:4px;}
				.slot_order{font-size:18px;font-weight:bold;width:45px;}
			</style>
			<script type="text/javascript">
				$(function() {
					$('#change_pending').hide();
					$("#sortable").sortable({
						items: "li",
						update: function(event, ui){
							var i = 0;
							var j = 1;
							$(".slot_order").each(function(){
								$(this).text(j);
								j++;
							});
							$("li > input").each(function(){
								$(this).val(i);
								i++;
								$('#change_pending').show();
							});
						}
					});
				});
			</script>
			<div style="border:0;">
				<div class="inner"><h1>{{ slot }}, shows {{ slot.count }} item{% ifnotequal slot.count 1 %}s{% endifnotequal %}.</h1>
				* drag and drop the items to change the order of which they appear.
				<div id="change_pending">
					You have made a change that has not been saved yet. <a href="">cancel</a>
				</div></div>
				<form action="." method="POST">
					<ul id="sortable">
						{% for form in forms %}  
							{{ form.as_ul }}
						{% endfor %}
					</ul><commit_msg>added deleteablity<commit_after>{% extends 'admin/base_site.html' %}

{% load i18n admin_modify adminmedia %}

{% block breadcrumbs %}{% if not is_popup %}
<div class="breadcrumbs">
     <a href="/admin/">{% trans "Home" %}</a> &rsaquo;
     <a href="/admin/slots/">Slots</a> &rsaquo; 
	 <a href="/admin/slots/slot/">Slots</a>
</div>
{% endif %}{% endblock %}

{% block cols %}
	13
{% endblock %}

{% block sidebar %}{% endblock %}

{% block content %}
	<div class="grid_13">
		<div class="module">
			<style>
				#sortable{margin:10px; list-style:none;}
				#sortable li{ padding:5px 10px; border:1px solid #ABABAB; margin:5px 0; background:#EEE;}
				/*#sortable div input{visibility:hidden;}*/
				#sortable li input{float:right; visibility:hidden; }
				#change_pending{padding:10px;background-color:#FFF47F;font-weight:bold; margin-top:4px;}
				.slot_order{font-size:18px;font-weight:bold;width:45px;}
				.del{float:right; font-size:11px; color:#666; margin:5px 0; cursor:pointer;}
				#sortable li.flagged{background:#ffeeff; color:#aa0000;}
			</style>
			<script type="text/javascript">
				function init(){
					$('.deletelink').click(function(){
						$(this).parent().addClass('flagged');
						$(this).parent().insertAfter($(this).parent().siblings());
						$(this).addClass('addlink');
						$(this).removeClass('deletelink');
						$('#change_pending').show();
						init();
					});
					$('.addlink').click(function(){
						$(this).parent().removeClass('flagged');
						$(this).addClass('deletelink');
						$(this).removeClass('addlink');
						$('#change_pending').show();
						init();
					});
					var i = 0;
					var j = 1;
					$(".slot_order").each(function(){
						if(!$(this).parent().parent().hasClass('flagged')){
							$(this).text(j);
							j++;
						} else {
							$(this).text("Flagged for Deletion");
						}
					});
					$("li > input").each(function(){
						if(!$(this).parent().hasClass('flagged')) {
							$(this).val(i);
							i++;
						} else {
							$(this).val("-1");
						}
						$('#change_pending').show();
					});
				}
				$(function() {
					$('#change_pending').hide();
					$('#sortable > li').each(function(){
						$(this).prepend('<div class="del deletelink">&nbsp;</div>');
					});
					init();
					$("#sortable").sortable({
						items: "li",
						update: init
					});
				});
			</script>
			<div style="border:0;">
				<div class="inner"><h1>{{ slot }}, shows {{ slot.count }} item{% ifnotequal slot.count 1 %}s{% endifnotequal %}.</h1>
				* drag and drop the items to change the order of which they appear.
				<div id="change_pending">
					You have made a change that has not been saved yet. <a href="">cancel</a>
				</div></div>
				<form action="." method="POST">
					<ul id="sortable">
						{% for form in forms %}  
							{{ form.as_ul }}
						{% endfor %}
					</ul>
{'fraction_non_alphanumeric': 0.21457403866581687, 'fraction_numerical': 0.014871468026343744, 'mean_word_length': 3.0342759211653814, 'pattern_counts': {'":': 0, '<': 57, '<?xml version=': 0, '>': 60, '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': '2477891', 'n_tokens_mistral': 2158, 'n_tokens_neox': 1584, 'n_words': 326}