FSN#39312 API documentatie verbeteringen
svn path=/Website/trunk/; revision=33261
This commit is contained in:
@@ -133,6 +133,7 @@ var fac_id = Request.QueryString("fac_id").Count > 0&&String(Request.QueryString
|
||||
<tr><td>StatusText:</td><td><span id="StatusText"></span></td></tr>
|
||||
<tr><td>Duration:</td><td><span id="Duration"></span></td></tr>
|
||||
<tr><td>Records:</td><td><span id="Records"></span></td></tr>
|
||||
<tr><td>Size:</td><td><span id="ResultSize"></span></td></tr>
|
||||
<tr><td>Result:<button onclick='$("#xml").val($("#Result").text())'>^^^</button></td>
|
||||
<td style='border:1px solid #666;font-size:0.8em;background-color:#fafafa;min-width:800px;'>
|
||||
<pre id="Result" style="padding:0 8px 0 2px;"></pre>
|
||||
|
||||
@@ -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("<option value="+ apiname +">" + (this.modulecode||"Other") + ": " + apiname + "</option>");
|
||||
if (lastmodule != this.modulecode)
|
||||
$("#api").append("<optgroup label='" + this.modulecode + ": " + this.module + "'></option>");
|
||||
lastmodule = this.modulecode;
|
||||
var apiname = this.id;
|
||||
$("#api").append("<option value="+ apiname +">" + apiname + "</option>");
|
||||
}
|
||||
);
|
||||
}
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user