Skip to content

Instantly share code, notes, and snippets.

@fooker
Created February 9, 2015 22:14
Show Gist options
  • Save fooker/8c40a68bbfbf73621c04 to your computer and use it in GitHub Desktop.
Save fooker/8c40a68bbfbf73621c04 to your computer and use it in GitHub Desktop.
diff --git a/ddserver/resources/templates/hosts.html b/ddserver/resources/templates/hosts.html
index 51edaa6..ff05102 100644
--- a/ddserver/resources/templates/hosts.html
+++ b/ddserver/resources/templates/hosts.html
@@ -28,7 +28,7 @@
<thead>
<tr data-bind="foreach: columns" style="cursor:pointer;">
<!-- ko if: isSortable == true -->
- <th data-bind="click:$parent.sortBy($data.rowText)">
+ <th data-bind="click: function() { $parent.sortBy($data.rowText); }">
<span data-bind="text: headerText"></span>
<span data-bind="css:$parent.sortByCSS($data.rowText)"></span>
</th>
@@ -112,7 +112,8 @@
],
pageSize: pagination_items_per_page
});
+ this.gridViewModel.sortBy("hostname");
};
ko.applyBindings(new PagedGridModel(items));
</script>
-{% endblock %}
\ No newline at end of file
+{% endblock %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment