View | Details | Raw Unified | Return to bug 45600
Collapse All | Expand All

(-)a/management/univention-management-console-module-udm/umc/js/udm/TreeModel.js (-1 / +8 lines)
 Lines 88-94   define([ Link Here 
88
				results = array.map(results, lang.hitch(this, function(obj) {
88
				results = array.map(results, lang.hitch(this, function(obj) {
89
					obj.sortlabel = obj.label;
89
					obj.sortlabel = obj.label;
90
					if (obj.objectType === 'dns/reverse_zone') {
90
					if (obj.objectType === 'dns/reverse_zone') {
91
						obj.sortlabel = array.map(obj.label.split('.'), function(v) { return sprintf('%03d', v); }).join('.');
91
						// sort IP's numerical
92
						if (~obj.label.indexOf(':')) {
93
							// ipv6
94
							obj.sortlabel = array.map(obj.label.split(':'), function(v) { return sprintf('%05d', parseInt(v, 16)); }).join(':');
95
						} else {
96
							// ipv4
97
							obj.sortlabel = array.map(obj.label.split('.'), function(v) { return sprintf('%03d', v); }).join('.');
98
						}
92
					}
99
					}
93
					return obj;
100
					return obj;
94
				}));
101
				}));

Return to bug 45600