changeset 2632:647ee04f863e

Added XStatic.JQuery.TableSorter plugin in +tickets view
author Saurabh Kathpalia <saurabh.kathpalia95@gmail.com>
date Fri, 20 Jun 2014 15:52:42 +0530
parents f5bd3a0b0e07
children 466093278e4d 4cc1d15c203c eb7e3ca48b21 80be9ab7c2ad 82ffb3f45eed
files MoinMoin/static/js/tickets.js MoinMoin/templates/tickets.html MoinMoin/themes/basic/static/css/basic.css MoinMoin/themes/basic/static/custom-less/basic.less MoinMoin/themes/basic/static/img/asc.png MoinMoin/themes/basic/static/img/bg.png MoinMoin/themes/basic/static/img/desc.png setup.py wikiconfig.py
diffstat 9 files changed, 33 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/static/js/tickets.js	Wed Jun 18 21:22:48 2014 +0530
+++ b/MoinMoin/static/js/tickets.js	Fri Jun 20 15:52:42 2014 +0530
@@ -36,4 +36,6 @@
         }
     }
 
+    $("#ticket-list").tablesorter();
+
 });
--- a/MoinMoin/templates/tickets.html	Wed Jun 18 21:22:48 2014 +0530
+++ b/MoinMoin/templates/tickets.html	Fri Jun 20 15:52:42 2014 +0530
@@ -83,5 +83,6 @@
 {% endblock %}
 {% block body_scripts %}
 {{ super() }}
+    <script src="{{ url_for('serve.files', name='jquery_tablesorter', filename='jquery.tablesorter.js') }}"></script>
     <script src="{{ url_for('static', filename='js/tickets.js') }}"></script>
 {% endblock %}
--- a/MoinMoin/themes/basic/static/css/basic.css	Wed Jun 18 21:22:48 2014 +0530
+++ b/MoinMoin/themes/basic/static/css/basic.css	Fri Jun 20 15:52:42 2014 +0530
@@ -6357,9 +6357,10 @@
   position: absolute;
 }
 #ticket-list thead th:hover {
-  background: #e8e8e8;
-}
-#ticket-list tr td {
+  background-color: #e8e8e8;
+}
+#ticket-list tr td,
+#ticket-list thead th {
   cursor: pointer;
 }
 #ticket-list tr td:first-child a {
@@ -6382,3 +6383,14 @@
 .moin-ticketsearch-form {
   display: inline;
 }
+.tablesorter-header {
+  background-image: url('../img/bg.png');
+  background-repeat: no-repeat;
+  background-position: right center;
+}
+.tablesorter-headerAsc {
+  background-image: url('../img/asc.png');
+}
+.tablesorter-headerDesc {
+  background-image: url('../img/desc.png');
+}
--- a/MoinMoin/themes/basic/static/custom-less/basic.less	Wed Jun 18 21:22:48 2014 +0530
+++ b/MoinMoin/themes/basic/static/custom-less/basic.less	Fri Jun 20 15:52:42 2014 +0530
@@ -331,9 +331,9 @@
   position: absolute;
 }
 #ticket-list thead th:hover {
-  background: #e8e8e8;
+  background-color: #e8e8e8;
 }
-#ticket-list tr td {
+#ticket-list tr td, #ticket-list thead th {
   cursor: pointer;
 }
 #ticket-list tr td:first-child a {
@@ -355,3 +355,14 @@
 .moin-ticketsearch-form {
   display: inline;
 }
+.tablesorter-header {
+  background-image: url('../img/bg.png');
+  background-repeat: no-repeat;
+  background-position: right center;
+}
+.tablesorter-headerAsc {
+  background-image: url('../img/asc.png');
+}
+.tablesorter-headerDesc {
+  background-image: url('../img/desc.png');
+}
Binary file MoinMoin/themes/basic/static/img/asc.png has changed
Binary file MoinMoin/themes/basic/static/img/bg.png has changed
Binary file MoinMoin/themes/basic/static/img/desc.png has changed
--- a/setup.py	Wed Jun 18 21:22:48 2014 +0530
+++ b/setup.py	Fri Jun 20 15:52:42 2014 +0530
@@ -112,6 +112,7 @@
         'XStatic-TWikiDraw-moin>=2004.10.23.2',
         'XStatic-AnyWikiDraw>=0.14.2',
         'XStatic-svg-edit-moin>=2012.11.15.1',
+        'XStatic-JQuery.TableSorter>=2.14.5.1',
     ],
     # optional features and their list of requirements
     extras_require={
--- a/wikiconfig.py	Wed Jun 18 21:22:48 2014 +0530
+++ b/wikiconfig.py	Fri Jun 20 15:52:42 2014 +0530
@@ -68,6 +68,7 @@
         'ckeditor',
         'autosize',
         'svgedit_moin', 'twikidraw_moin', 'anywikidraw',
+        'jquery_tablesorter',
     ]
     pkg = __import__('xstatic.pkg', fromlist=mod_names)
     for mod_name in mod_names: