diff --git a/archive/src/main/resources/org/openrs2/archive/static/js/openrs2.js b/archive/src/main/resources/org/openrs2/archive/static/js/openrs2.js new file mode 100644 index 00000000..228234b7 --- /dev/null +++ b/archive/src/main/resources/org/openrs2/archive/static/js/openrs2.js @@ -0,0 +1,21 @@ +var buildRegex = new RegExp('>([0-9]+)(?:[.]([0-9]+))?<'); + +function buildSort(a, b) { + a = buildRegex.exec(a); + b = buildRegex.exec(b); + if (!a) { + return -1; + } else if (!b) { + return 1; + } + + var aMajor = parseInt(a[1]); + var bMajor = parseInt(b[1]); + if (aMajor !== bMajor) { + return aMajor - bMajor; + } + + var aMinor = a[2] ? parseInt(a[2]) : 0; + var bMinor = b[2] ? parseInt(b[2]) : 0; + return aMinor - bMinor; +} diff --git a/archive/src/main/resources/org/openrs2/archive/templates/caches/index.html b/archive/src/main/resources/org/openrs2/archive/templates/caches/index.html index 188a8126..94f6d69e 100644 --- a/archive/src/main/resources/org/openrs2/archive/templates/caches/index.html +++ b/archive/src/main/resources/org/openrs2/archive/templates/caches/index.html @@ -18,7 +18,7 @@ Game Env Lang - Build(s) + Build(s) Timestamp Source(s) Archives diff --git a/archive/src/main/resources/org/openrs2/archive/templates/layout.html b/archive/src/main/resources/org/openrs2/archive/templates/layout.html index f0a5576e..57f78ad7 100644 --- a/archive/src/main/resources/org/openrs2/archive/templates/layout.html +++ b/archive/src/main/resources/org/openrs2/archive/templates/layout.html @@ -13,6 +13,7 @@ +