Fix collission with sortable.js script
TableSortable and Sortable javascripts were using the same CSS class name to define completely different and separated behaviours causing unexpected errors. Now `sortable.js` script will use `.sortable` class and `table_sortable.js` will use `.table-sortable` instead.
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
};
|
||||
},
|
||||
initialize: function() {
|
||||
$("table.sortable th").on("click", function() {
|
||||
$(".table-sortable th").on("click", function() {
|
||||
var rows, table;
|
||||
table = $(this).parents("table").eq(0);
|
||||
rows = table.find("tbody tr").toArray().sort(App.TableSortable.comparer($(this).index()));
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
</div>
|
||||
|
||||
<h2><%= t("admin.stats.polls.all") %></h2>
|
||||
<table id="polls" class="stack sortable">
|
||||
<table id="polls" class="stack table-sortable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t("admin.stats.polls.table.poll_name") %></th>
|
||||
@@ -52,7 +52,7 @@
|
||||
<h3 id="<%= dom_id(poll) %>_questions">
|
||||
<%= t("admin.stats.polls.poll_questions", poll: poll.name) %>
|
||||
</h3>
|
||||
<table class="stack sortable">
|
||||
<table class="stack table-sortable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t("admin.stats.polls.table.question_name") %></th>
|
||||
|
||||
Reference in New Issue
Block a user