(function ($, document, window) { var query = { StartIndex: 0, Limit: 100000 }; var currentResult; function reloadList(page) { Dashboard.showLoadingMsg(); ApiClient.getSmartMatchInfos(query).then(function (infos) { currentResult = infos; populateList(page, infos); Dashboard.hideLoadingMsg(); }, function () { Dashboard.hideLoadingMsg(); }); } function populateList(page, result) { var infos = result.Items; if (infos.length > 0) { infos = infos.sort(function (a, b) { a = a.OrganizerType + " " + a.Name; b = b.OrganizerType + " " + b.Name; if (a == b) { return 0; } if (a < b) { return -1; } return 1; }); } var html = ""; var currentType; for (var i = 0, length = infos.length; i < length; i++) { var info = infos[i]; if (info.OrganizerType != currentType) { currentType = info.OrganizerType; if (html.length > 0) { html += ""; } html += "
" + info.MatchStrings[n] + "
"; html += "" + Globalize.translate('ButtonDelete') + ""; html += ""; html += "