mirror of
				https://github.com/retspen/webvirtcloud
				synced 2025-07-31 12:41:08 +00:00 
			
		
		
		
	Fixed pep8
This commit is contained in:
		
							parent
							
								
									6a066f6e6d
								
							
						
					
					
						commit
						2aa5558df7
					
				
					 14 changed files with 110 additions and 89 deletions
				
			
		| 
						 | 
				
			
			@ -147,41 +147,41 @@
 | 
			
		|||
            {% endif %}
 | 
			
		||||
{% endblock %}
 | 
			
		||||
{% block script %}
 | 
			
		||||
    <script>
 | 
			
		||||
        $.expr[':'].Contains = $.expr.createPseudo(function (arg) {
 | 
			
		||||
            return function (elem) {
 | 
			
		||||
                return $(elem).text().toUpperCase().indexOf(arg.toUpperCase()) >= 0;
 | 
			
		||||
            };
 | 
			
		||||
<script>
 | 
			
		||||
    $.expr[':'].Contains = $.expr.createPseudo(function (arg) {
 | 
			
		||||
        return function (elem) {
 | 
			
		||||
            return $(elem).text().toUpperCase().indexOf(arg.toUpperCase()) >= 0;
 | 
			
		||||
        };
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    $(document).ready(function () {
 | 
			
		||||
        // add event button labeled "filter"
 | 
			
		||||
        $('#filter_button').click(function (event) {
 | 
			
		||||
            // get value
 | 
			
		||||
            var filter_val = $('#filter_input').val();
 | 
			
		||||
            if (filter_val == '') {
 | 
			
		||||
                // show all
 | 
			
		||||
                $('tbody tr').show();
 | 
			
		||||
            } else {
 | 
			
		||||
                // show only matches
 | 
			
		||||
                $('tbody tr:Contains(\'' + filter_val + '\')').show();
 | 
			
		||||
                // hide non-matching items
 | 
			
		||||
                $('tbody tr:not(:Contains(\'' + filter_val + '\'))').hide();
 | 
			
		||||
            }
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
        $(document).ready(function () {
 | 
			
		||||
            // add event button labeled "filter"
 | 
			
		||||
            $('#filter_button').click(function (event) {
 | 
			
		||||
                // get value
 | 
			
		||||
                var filter_val = $('#filter_input').val();
 | 
			
		||||
                if (filter_val == '') {
 | 
			
		||||
                    // show all
 | 
			
		||||
                    $('tbody tr').show();
 | 
			
		||||
                } else {
 | 
			
		||||
                    // show only matches
 | 
			
		||||
                    $('tbody tr:Contains(\'' + filter_val + '\')').show();
 | 
			
		||||
                    // hide non-matching items
 | 
			
		||||
                    $('tbody tr:not(:Contains(\'' + filter_val + '\'))').hide();
 | 
			
		||||
                }
 | 
			
		||||
            });
 | 
			
		||||
        // add event button labeled "clear"
 | 
			
		||||
        $('#filter_clear').click(function (event) {
 | 
			
		||||
            $('#filter_input').val('');
 | 
			
		||||
            $('#filter_button').click();
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
            // add event button labeled "clear"
 | 
			
		||||
            $('#filter_clear').click(function (event) {
 | 
			
		||||
                $('#filter_input').val('');
 | 
			
		||||
        // trigger filter when enter key pressed
 | 
			
		||||
        $('#filter_input').keyup(function (event) {
 | 
			
		||||
            if (event.keyCode == 13) {
 | 
			
		||||
                $('#filter_button').click();
 | 
			
		||||
            });
 | 
			
		||||
 | 
			
		||||
            // trigger filter when enter key pressed
 | 
			
		||||
            $('#filter_input').keyup(function (event) {
 | 
			
		||||
                if (event.keyCode == 13) {
 | 
			
		||||
                    $('#filter_button').click();
 | 
			
		||||
                }
 | 
			
		||||
            });
 | 
			
		||||
            }
 | 
			
		||||
        });
 | 
			
		||||
    </script>
 | 
			
		||||
    });
 | 
			
		||||
</script>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue