mirror of
				https://github.com/retspen/webvirtcloud
				synced 2025-07-31 12:41:08 +00:00 
			
		
		
		
	rearrange search functionality
This commit is contained in:
		
							parent
							
								
									a47d006771
								
							
						
					
					
						commit
						d7c0f9445d
					
				
					 10 changed files with 31 additions and 80 deletions
				
			
		| 
						 | 
				
			
			@ -81,10 +81,10 @@
 | 
			
		|||
    </dl>
 | 
			
		||||
    
 | 
			
		||||
    {% if state %}
 | 
			
		||||
        <div class="row">
 | 
			
		||||
            <h5 class="page-header mr-auto">{% trans "Volumes" %}</h5>
 | 
			
		||||
            <div class="col-3 ">
 | 
			
		||||
                <input id="filter" class="form-control" type="text" placeholder="{% trans 'Search' %}">
 | 
			
		||||
        <div class="container">
 | 
			
		||||
            <div class="row">
 | 
			
		||||
                <h5 class="page-header mr-auto">{% trans "Volumes" %}</h5>
 | 
			
		||||
                {% include 'search_block.html' %}
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
            
 | 
			
		||||
| 
						 | 
				
			
			@ -194,7 +194,8 @@
 | 
			
		|||
    {% include 'pleasewaitdialog.html' %}
 | 
			
		||||
{% endblock %}
 | 
			
		||||
{% block script %}
 | 
			
		||||
    <script src="{% static "js/sortable.min.js" %}"></script>
 | 
			
		||||
    <script src="{% static 'js/sortable.min.js' %}"></script>
 | 
			
		||||
    <script src="{% static 'js/filter-table.js' %}"></script>
 | 
			
		||||
    <script>
 | 
			
		||||
        $('.format-convert').hide();
 | 
			
		||||
        $(document).on('change', '.volume-convert', function () {
 | 
			
		||||
| 
						 | 
				
			
			@ -216,17 +217,4 @@
 | 
			
		|||
            }
 | 
			
		||||
        });
 | 
			
		||||
    </script>
 | 
			
		||||
    <script>
 | 
			
		||||
        $(document).ready(function () {
 | 
			
		||||
            (function ($) {
 | 
			
		||||
                $('#filter').keyup(function () {
 | 
			
		||||
                    var rex = new RegExp($(this).val(), 'i');
 | 
			
		||||
                    $('.searchable tr').hide();
 | 
			
		||||
                    $('.searchable tr').filter(function () {
 | 
			
		||||
                        return rex.test($(this).text());
 | 
			
		||||
                    }).show();
 | 
			
		||||
                })
 | 
			
		||||
            }(jQuery));
 | 
			
		||||
        });
 | 
			
		||||
    </script>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue