1 /*****************************************************************************
2 * Copyright (c) 2016 Max Breitenfeldt and others.
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Apache License, Version 2.0
6 * which accompanies this distribution, and is available at
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *****************************************************************************/
12 * This is a sort function for dataTables to sort tables by the status column.
13 * The order should be: online < online/idle < offline
15 jQuery.extend(jQuery.fn.dataTableExt.oSort, {
16 "status-pre": function (a) {
29 "status-asc": function (a, b) {
30 return ((a < b) ? -1 : ((a > b) ? 1 : 0));
33 "status-desc": function (a, b) {
34 return ((a < b) ? 1 : ((a > b) ? -1 : 0));