mirror of
				https://github.com/mail-in-a-box/mailinabox.git
				synced 2025-11-03 19:30:54 +00:00 
			
		
		
		
	Sort custom dns table based on fqdn
This commit is contained in:
		
							parent
							
								
									24a567c3be
								
							
						
					
					
						commit
						1484dff781
					
				@ -192,6 +192,16 @@ function show_current_custom_dns() {
 | 
			
		||||
        $('#custom-dns-current').fadeIn();
 | 
			
		||||
      else
 | 
			
		||||
        $('#custom-dns-current').fadeOut();
 | 
			
		||||
        
 | 
			
		||||
      var reverse_fqdn = function(el) {
 | 
			
		||||
        el.qname = el.qname.split('.').reverse().join('.');
 | 
			
		||||
        return el;
 | 
			
		||||
      }
 | 
			
		||||
      var sort = function(a, b) {
 | 
			
		||||
        return a.qname > b.qname ? 1 : -1;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      data = data.map(reverse_fqdn).sort(sort).map(reverse_fqdn);
 | 
			
		||||
 | 
			
		||||
      $('#custom-dns-current').find("tbody").text('');
 | 
			
		||||
      for (var i = 0; i < data.length; i++) {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user