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() {
|
initialize: function() {
|
||||||
$("table.sortable th").on("click", function() {
|
$(".table-sortable th").on("click", function() {
|
||||||
var rows, table;
|
var rows, table;
|
||||||
table = $(this).parents("table").eq(0);
|
table = $(this).parents("table").eq(0);
|
||||||
rows = table.find("tbody tr").toArray().sort(App.TableSortable.comparer($(this).index()));
|
rows = table.find("tbody tr").toArray().sort(App.TableSortable.comparer($(this).index()));
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2><%= t("admin.stats.polls.all") %></h2>
|
<h2><%= t("admin.stats.polls.all") %></h2>
|
||||||
<table id="polls" class="stack sortable">
|
<table id="polls" class="stack table-sortable">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><%= t("admin.stats.polls.table.poll_name") %></th>
|
<th><%= t("admin.stats.polls.table.poll_name") %></th>
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
<h3 id="<%= dom_id(poll) %>_questions">
|
<h3 id="<%= dom_id(poll) %>_questions">
|
||||||
<%= t("admin.stats.polls.poll_questions", poll: poll.name) %>
|
<%= t("admin.stats.polls.poll_questions", poll: poll.name) %>
|
||||||
</h3>
|
</h3>
|
||||||
<table class="stack sortable">
|
<table class="stack table-sortable">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><%= t("admin.stats.polls.table.question_name") %></th>
|
<th><%= t("admin.stats.polls.table.question_name") %></th>
|
||||||
|
|||||||
Reference in New Issue
Block a user