- $("#mkwsSwitch").append($("<a/>", { href: '#',
- onclick: "switchView(\'targets\')",
- text: "Target Info",
- }));
+ $("#mkwsSwitch").append($("<a/>", {
+ href: '#',
+ onclick: "switchView(\'targets\')",
+ text: "Targets"
+ }));
+
+ if (!config.mkws_switch) {
+ $("#mkwsSwitch").css("display", "none");
+ }
+
+ var sort_html = '<select name="sort" id="sort">';
+ for(var i = 0; i < config.sort.length; i++) {
+ var key = config.sort[i][0];
+ var val = config.sort[i].length == 1 ? config.sort[i][0] : config.sort[i][1];
+
+ sort_html += '<option value="' + key + '"';
+ if (key == config.sort_default) {
+ sort_html += ' selected="selected"';
+ }
+ sort_html += '>' + val + '</option>';
+ }
+ sort_html += '</select>';