1. #1
    Sencha User demon222's Avatar
    Join Date
    Jan 2008
    Location
    Poland, Warsaw
    Posts
    127
    Vote Rating
    4
    demon222 is on a distinguished road

      0  

    Default Django sorters ...

    Django sorters ...


    can someone come in handy sorting method for python django ;-)

    Code:
    Ext.override(Ext.data.proxy.Server, {
        encodeSorters: function(sorters) {
            var min = [],
                length = sorters.length,
                i = 0;
    
            for (; i < length; i++) {
    			
    			if(sorters[i].direction == 'DESC') {
    				min[i] = '-'+sorters[i].property;
    			} else {
    				min[i] = sorters[i].property;
    			}
    			
            }
    
            return min.join(",");
    
        }	
    });

  2. #2
    Sencha - Support Team
    Join Date
    Feb 2013
    Location
    California
    Posts
    3,118
    Vote Rating
    59
    Gary Schlosberg has a spectacular aura about Gary Schlosberg has a spectacular aura about Gary Schlosberg has a spectacular aura about

      0  

    Default


    Cool! Thanks for sharing your override with the community.
    Are you a Sencha products veteran who has wondered what it might be like to work at Sencha? If so, please reach out to our recruiting manager: sheryl@sencha.com

Thread Participants: 1