1. Saurabh Kathpalia
  2. moin-2.0

Commits

Saurabh Kathpalia  committed 647ee04

Added XStatic.JQuery.TableSorter plugin in +tickets view

  • Participants
  • Parent commits f5bd3a0
  • Branches default

Comments (0)

Files changed (9)

File MoinMoin/static/js/tickets.js

View file
         }
     }
 
+    $("#ticket-list").tablesorter();
+
 });

File MoinMoin/templates/tickets.html

View file
 {% 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 %}

File MoinMoin/themes/basic/static/css/basic.css

View file
   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 {
 .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');
+}

File MoinMoin/themes/basic/static/custom-less/basic.less

View file
   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 {
 .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');
+}

File MoinMoin/themes/basic/static/img/asc.png

Added
New image

File MoinMoin/themes/basic/static/img/bg.png

Added
New image

File MoinMoin/themes/basic/static/img/desc.png

Added
New image

File setup.py

View file
         '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={

File wikiconfig.py

View file
         'ckeditor',
         'autosize',
         'svgedit_moin', 'twikidraw_moin', 'anywikidraw',
+        'jquery_tablesorter',
     ]
     pkg = __import__('xstatic.pkg', fromlist=mod_names)
     for mod_name in mod_names: