Вход Регистрация
Файл: templates/backend/default/assets/js/admin/jquery.requests.js
Строк: 65
<?php
$(document).ready(function(){

    $( 
"#reset_search" ).click(function() {
        
document.getElementById('sort_items').innerText 'ID';
        
document.getElementById('sort').value 'v.VID';
        
document.getElementById('order_items').innerText 'Descending';
        
document.getElementById('order').value 'DESC';
        
document.getElementById('display_items').innerText '100';
        
document.getElementById('display').value '100';
        
        $(
"select[id*='filter_']" ).each(function() {
            $(
this).select2("val""");
            $(
this).removeClass("filter-active");    
        });

        $(
"input[id*='filter_']" ).each(function() {
            var 
id = $(this).attr('id');
            var 
split id.split('_');
            var 
filter_name split[1];        
            $(
this).val("");
            $(
this).removeClass("filter-active");
            $(
"i[id='filter_remove_" filter_name "']").hide();
        });
    });    

    $(
"body").on('click'"i[id*='filter_remove_']", function(event) {
        
event.preventDefault();
        var 
id = $(this).attr('id');
        var 
split id.split('_');
        var 
filter_name split[2];
        $(
"input[name='" filter_name "']").val('');
        $(
"input[name='" filter_name "']").removeClass("filter-active");
        $(
this).hide();
    });

    $(
"input[id*='filter_']" ).each(function() {
        var 
id = $(this).attr('id');
        var 
split id.split('_');
        var 
filter_name split[1];        
        $(
this).on('input', function() {
            if($(
this).val() != '') {
                $(
"i[id='filter_remove_" filter_name "']").show();
                $(
this).addClass("filter-active");
            } else {
                $(
"i[id='filter_remove_" filter_name "']").hide();
                $(
this).removeClass("filter-active");
            }
        });
    });    

    $(
"select[id*='filter_']" ).each(function() {
        var 
id = $(this).attr('id');
        var 
split id.split('_');
        var 
filter_name split[1];        
        if($(
this).val() != '') {
            $(
"#s2id_" id).addClass("filter-active");
        }
    });    
    
    $(
"select[id*='filter_']" ).each(function() {
        var 
id = $(this).attr('id');
        var 
split id.split('_');
        var 
filter_name split[1];        
        $(
this).change(function() {
            if($(
this).val() != '') {
                $(
"#s2id_" id).addClass("filter-active");
            } else {
                $(
"#s2id_" id).removeClass("filter-active");
            }
        });
    });
    
});
?>
Онлайн: 1
Реклама