<commit_before>{% extends "base.html" %}

{% block extrahead %}
<link rel="stylesheet" href="{{ STATIC_URL }}css/filelist.css" type="text/css" />
<script type="text/javascript" charset="utf-8" src="{{ STATIC_URL }}js/jquery.paginate.js"></script>
    <script src="{{STATIC_URL}}js/jquery.json.js" type="text/javascript" charset="utf-8"></script>
    <script src="{{STATIC_URL}}js/jquery.cookie.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
$(function() {
    $('#file-list').paginate({itemsPerPage: 15});

    $('#file-list-find-button').click(function(event)
    {
        var expr = new RegExp( $('#file-list-filter').val() );

        $('#file-list').filterItems( function(filename) {
            return expr.test(filename);
        });

        event.preventDefault();
    });

    $('#file-list-reset-button').click(function(event)
    {
        $('#file-list').filterItems();
        event.preventDefault();
    });
	
    var defaultOptions = {
        panels: [
        {
            name: 'htmleditor',
            ratio: 0.5
        },

        {
            name: 'gallery',
            ratio: 0.5
        }
        ],
        recentFiles: [],
        lastUpdate: 0
    };
    
	var options = null;
    try {
        var cookie = $.cookie('options');
        options = $.secureEvalJSON(cookie);
        if (!options) {
            options = defaultOptions;
        }
    } catch (e) {    
        options = defaultOptions;
    }
	
	$.each(options.recentFiles, function(index) {
		var fileId = options.recentFiles[index].fileId;
		$('#recent-file-list ul').append('<li><a href="/editor/' + fileId + '/">' + fileId + '</a></li>');
	});
});
</script>
{% endblock extrahead %}

{% block maincontent %}
<div id="main-page-widgets">

<div class="file-list-widget">
    <form action="#" method="GET">
    <p><input name="filter" id="file-list-filter" type="text" size="60" />
        <input type="submit" value="Znajdź" id="file-list-find-button"/>
        <input type="reset" value="Wyczyść" id="file-list-reset-button"/>
    </p>
    </form>
    <div id="file-list">
    {% load explorer_tags %}
    {% for file in files %}
    <p title="{{file|bookname}}"><a href="{% url editor_view file %}">{{ file|bookname }}</a></p>
    {% endfor %}
    </div>
</div><commit_msg>Poprawienie wyszukiwarki HTML. Closes #122.<commit_after>{% extends "base.html" %}

{% block extrahead %}
<link rel="stylesheet" href="{{ STATIC_URL }}css/filelist.css" type="text/css" />
    <script src="{{STATIC_URL}}js/jquery.json.js" type="text/javascript" charset="utf-8"></script>
    <script src="{{STATIC_URL}}js/jquery.cookie.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
$(function() {
	function search(event) {
        var expr = new RegExp($('#file-list-filter').val(), 'i');
    	
        $('#file-list p').hide().filter(function(index) {
            return expr.test($(this).attr('title'));
        }).show();
    
        event.preventDefault();
    }
	
    $('#file-list-find-button').click(search);
	$('#file-list-filter').bind('keyup change DOMAttrModified', search);
		
    var defaultOptions = {
        panels: [
        {
            name: 'htmleditor',
            ratio: 0.5
        },

        {
            name: 'gallery',
            ratio: 0.5
        }
        ],
        recentFiles: [],
        lastUpdate: 0
    };
    
	var options = null;
    try {
        var cookie = $.cookie('options');
        options = $.secureEvalJSON(cookie);
        if (!options) {
            options = defaultOptions;
        }
    } catch (e) {    
        options = defaultOptions;
    };
	
	$.each(options.recentFiles, function(index) {
		var fileId = options.recentFiles[index].fileId;
		$('#recent-file-list ul').append('<li><a href="/editor/' + fileId + '/">' + fileId + '</a></li>');
	});
});
</script>
{% endblock extrahead %}

{% block maincontent %}
<div id="main-page-widgets">

<div class="file-list-widget">
    <form action="#" method="GET">
    <p><input name="filter" id="file-list-filter" type="text" size="60" />
        <input type="submit" value="Znajdź" id="file-list-find-button"/>
        <input type="reset" value="Wyczyść" id="file-list-reset-button"/>
    </p>
    </form>
    <div id="file-list">
    {% load explorer_tags %}
    {% for file in files %}
    <p title="{{file|bookname}}"><a href="{% url editor_view file %}">{{ file|bookname }}</a></p>
    {% endfor %}
    </div>
</div>
{'fraction_non_alphanumeric': 0.20554323725055432, 'fraction_numerical': 0.005764966740576497, 'mean_word_length': 2.649676375404531, 'pattern_counts': {'":': 0, '<': 59, '<?xml version=': 0, '>': 59, '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': '4657258', 'n_tokens_mistral': 1510, 'n_tokens_neox': 1436, 'n_words': 265}