-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The sorting feature is added to all the tables #60
base: master
Are you sure you want to change the base?
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,11 +9,12 @@ | |
{{ msg('app-title') }} | ||
</title> | ||
{% block stylesheets %} | ||
<link rel="stylesheet" href="//tools-static.wmflabs.org/cdnjs/ajax/libs/twitter-bootstrap/3.3.6/css/bootstrap.min.css" /> | ||
<link rel="stylesheet" href="//tools-static.wmflabs.org/cdnjs/ajax/libs/twitter-bootstrap/3.3.6/css/bootstrap.min.css" /> | ||
{% endblock %} | ||
{% block scripts %} | ||
<script type="text/javascript" src="//tools-static.wmflabs.org/cdnjs/ajax/libs/jquery/1.12.0/jquery.min.js"></script> | ||
<script type="text/javascript" src="//tools-static.wmflabs.org/cdnjs/ajax/libs/twitter-bootstrap/3.3.6/js/bootstrap.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/sortablejs@1.14.0/Sortable.min.js"></script> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This (which is https://github.com/SortableJS/Sortable ) doesn't seem to be a table-sorting library, but rather is for sorting lists. The one I was suggesting is https://github.com/HubSpot/sortable Libraries should also be loaded from the tools-static.wmflabs.org/cdnjs service. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually it was working for me. But will surely look into this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, sorry perhaps I'm testing it wrongly. I was expecting to see sorting icons on the table headers, is that right? I don't see anything like that, and there are no errors in the JS console. |
||
{% endblock %} | ||
</head> | ||
<body> | ||
|
@@ -49,7 +50,10 @@ | |
{% block main %} | ||
{% endblock %} | ||
</main> | ||
|
||
<script> | ||
var table = document.getElementById('sortable'); | ||
var sortable = new Sortable(table); | ||
</script> | ||
<footer class="text-right"> | ||
<hr /> | ||
<ul class="list-inline"> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for the extra spaces at the end of the line.