aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorZachary Sloan2013-07-03 20:42:44 +0000
committerZachary Sloan2013-07-03 20:42:44 +0000
commit253df1a5adb060df3202de5b80a5065a3614e368 (patch)
tree0051ea89f7102b2fcd89251eb21c53ccced49e26 /wqflask
parent62bd1bb6ad9f9f1c991127387154b5e0ca271fae (diff)
downloadgenenetwork2-253df1a5adb060df3202de5b80a5065a3614e368.tar.gz
Made the table in the group manager sortable, etc
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/templates/admin/group_manager.html36
1 files changed, 35 insertions, 1 deletions
diff --git a/wqflask/wqflask/templates/admin/group_manager.html b/wqflask/wqflask/templates/admin/group_manager.html
index 6b7809d3..df3eda33 100644
--- a/wqflask/wqflask/templates/admin/group_manager.html
+++ b/wqflask/wqflask/templates/admin/group_manager.html
@@ -21,7 +21,7 @@
</div>
</div>
- <table class="table table-hover">
+ <table id="dataset_list" class="table table-hover">
<thead>
<tr>
<th>Read</th>
@@ -46,4 +46,38 @@
<!-- End of body -->
+{% endblock %}
+
+{% block js %}
+ <script language="javascript" type="text/javascript" src="/static/new/packages/DataTables/js/jquery.js"></script>
+ <script language="javascript" type="text/javascript" src="/static/new/packages/DataTables/js/jquery.dataTables.min.js"></script>
+ <script language="javascript" type="text/javascript" src="/static/packages/DT_bootstrap/DT_bootstrap.js"></script>
+ <script language="javascript" type="text/javascript" src="/static/packages/TableTools/media/js/TableTools.min.js"></script>
+ <script language="javascript" type="text/javascript" src="/static/packages/underscore/underscore-min.js"></script>
+
+ <script type="text/javascript" charset="utf-8">
+ $(document).ready( function () {
+ console.time("Creating table");
+ $('#dataset_list').dataTable( {
+ "sDom": "Tftipr",
+ "oTableTools": {
+ "aButtons": [
+ "copy",
+ "print",
+ {
+ "sExtends": "collection",
+ "sButtonText": 'Save <span class="caret" />',
+ "aButtons": [ "csv", "xls", "pdf" ]
+ }
+ ],
+ "sSwfPath": "/static/packages/TableTools/media/swf/copy_csv_xls_pdf.swf"
+ },
+ "iDisplayLength": 50,
+ "bLengthChange": true,
+ "bDeferRender": true,
+ "bSortClasses": false
+ } );
+ console.timeEnd("Creating table");
+ });
+ </script>
{% endblock %} \ No newline at end of file