Changeset - ebbaebaae058
[Not reviewed]
default
0 1 0
Takumi IINO - 11 years ago 2014-07-21 17:46:25
trot.thunder@gmail.com
templates: replace YUI with jquery in kallithea/templates/index_base.html
1 file changed with 5 insertions and 5 deletions:
0 comments (0 inline, 0 general)
kallithea/templates/index_base.html
Show inline comments
 
@@ -148,40 +148,40 @@
 
        myDataTable.subscribe('postRenderEvent',function(oArgs) {
 
            tooltip_activate();
 
            quick_repo_menu();
 
        });
 

	
 
        var filterTimeout = null;
 

	
 
        updateFilter = function () {
 
            // Reset timeout
 
            filterTimeout = null;
 

	
 
            // Reset sort
 
            var state = myDataTable.getState();
 
            state.sortedBy = {key:'name', dir:YAHOO.widget.DataTable.CLASS_ASC};
 

	
 
            // Get filtered data
 
            myDataSource.sendRequest(YUD.get('q_filter').value,{
 
                success : myDataTable.onDataReturnInitializeTable,
 
                failure : myDataTable.onDataReturnInitializeTable,
 
                scope   : myDataTable,
 
                argument: state
 
            });
 

	
 
        };
 
        YUE.on('q_filter','click',function(){
 
            if(!YUD.hasClass('q_filter', 'loaded')){
 
        $('#q_filter').click(function(){
 
            if(!$('#q_filter').hasClass('loaded')){
 
                //TODO: load here full list later to do search within groups
 
                YUD.addClass('q_filter', 'loaded');
 
                $('#q_filter').addClass('loaded');
 
            }
 
        });
 

	
 
        YUE.on('q_filter','keyup',function (e) {
 
        $('#q_filter').keyup(function(){
 
            clearTimeout(filterTimeout);
 
            filterTimeout = setTimeout(updateFilter,600);
 
        });
 

	
 
        if(YUD.get('q_filter').value) {
 
        if($('#q_filter').val()) {
 
            updateFilter();
 
        }
 
      </script>
0 comments (0 inline, 0 general)