From fb09cec038c508c5cdcbbc3a622f5d931837b173 Mon Sep 17 00:00:00 2001 From: Jos Groot Lipman Date: Sat, 25 Mar 2017 22:09:03 +0000 Subject: [PATCH] FSN#39312 API documentatie verbeteringen svn path=/Website/trunk/; revision=33261 --- APPL/API2/TESTER/api2_tester.asp | 1 + APPL/API2/TESTER/tester.js | 9 +++++++-- APPL/API2/model_apis.inc | 6 ++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/APPL/API2/TESTER/api2_tester.asp b/APPL/API2/TESTER/api2_tester.asp index 2006c8650f..f6b01e77e6 100644 --- a/APPL/API2/TESTER/api2_tester.asp +++ b/APPL/API2/TESTER/api2_tester.asp @@ -133,6 +133,7 @@ var fac_id = Request.QueryString("fac_id").Count > 0&&String(Request.QueryString StatusText: Duration: Records: + Size: Result:

diff --git a/APPL/API2/TESTER/tester.js b/APPL/API2/TESTER/tester.js
index 55668a688b..e7ded00f37 100644
--- a/APPL/API2/TESTER/tester.js
+++ b/APPL/API2/TESTER/tester.js
@@ -7,6 +7,7 @@ function callbackDone(data, textStatus, jqXHR)
     $("#Duration").text(Math.floor(new Date - tm) + "ms");
     var txt = String(jqXHR.responseText);
     $("#Result").text(txt);
+    $("#ResultSize").text(txt.length);
 
     var objects_count = 1;
     if (jqXHR.responseText.indexOf("[") > 0)
@@ -89,11 +90,15 @@ function doInit()
 function process_api_list(data)
 {
     $("#api").empty();
+    var lastmodule = "";
     $.each( data.apis
           , function (index, value)
             {
-                apiname = this.id;
-                $("#api").append("");
+                if (lastmodule != this.modulecode)
+                    $("#api").append("");
+                lastmodule = this.modulecode;
+                var apiname = this.id;
+                $("#api").append("");
             }
           );
 }
\ No newline at end of file
diff --git a/APPL/API2/model_apis.inc b/APPL/API2/model_apis.inc
index 17740de35a..bea5f7c9c4 100644
--- a/APPL/API2/model_apis.inc
+++ b/APPL/API2/model_apis.inc
@@ -76,6 +76,12 @@ model_apis =
                 oRs.Close();
             }
 
+            api2_names.sort(function (a, b) {
+                if (a.modulecode == b.modulecode)
+                    return a.id < b.id ? -1: 1;
+                else
+                    return a.modulecode < b.modulecode ? -1: 1;
+            });
             // Graag zou ik er ook info instoppen over het model zelf.
             // Dan moet ik echter alle model_xxxx.inc bestanden includen wat ik niet wil.
             // Daarom moet je zelf maar /api2/xxxx.api aanroepen voor de details