-$(document).ready(function() {
- var jqxhr = jQuery.get("http://mkws.indexdata.com/service-proxy-auth")
+ return sort_html;
+}
+
+function mkws_html_perpage(config) {
+ var perpage_html = '<select name="perpage" id="perpage">';
+
+ for(var i = 0; i < config.perpage.length; i++) {
+ var key = config.perpage[i];
+
+ perpage_html += '<option value="' + key + '"';
+ if (key == config.perpage_default) {
+ perpage_html += ' selected="selected"';
+ }
+ perpage_html += '>' + key + '</option>';
+ }
+ perpage_html += '</select>';
+
+ return perpage_html;
+}
+
+/*
+ * Run service-proxy authentication in background (after page load).
+ * The username/password is configured in the apache config file
+ * for the site.
+ */
+function mkws_service_proxy_auth(auth_url) {
+ if (!auth_url)
+ auth_url = "/service-proxy-auth";
+
+ var jqxhr = jQuery.get(auth_url)