utility.js: simplify even/odd table row striping.
This commit is contained in:
@@ -2,10 +2,6 @@ import Cookie from './cookie'
|
||||
import Utility from './utility'
|
||||
|
||||
$(function() {
|
||||
// Table striping
|
||||
$(".striped tbody tr:even").addClass("even");
|
||||
$(".striped tbody tr:odd").addClass("odd");
|
||||
|
||||
// Account notices
|
||||
$("#hide-sign-up-notice").click(function(e) {
|
||||
$("#sign-up-notice").hide();
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import Utility from './utility'
|
||||
|
||||
let SavedSearch = {};
|
||||
|
||||
SavedSearch.initialize_all = function() {
|
||||
if ($("#c-saved-searches").length) {
|
||||
Utility.sorttable($("#c-saved-searches table"));
|
||||
$("#c-saved-searches table").stupidtable();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -103,15 +103,6 @@ Utility.regexp_escape = function(string) {
|
||||
return string.replace(/([.?*+^$[\]\\(){}|-])/g, "\\$1");
|
||||
}
|
||||
|
||||
Utility.sorttable = function(table) {
|
||||
table.stupidtable();
|
||||
table.bind("aftertablesort", function(event, data) {
|
||||
$("#c-saved-searches table tbody tr").removeClass("even odd");
|
||||
$("#c-saved-searches table tbody tr:even").addClass("even");
|
||||
$("#c-saved-searches table tbody tr:odd").addClass("odd");
|
||||
});
|
||||
};
|
||||
|
||||
$.fn.selectRange = function(start, end) {
|
||||
return this.each(function() {
|
||||
if (this.setSelectionRange) {
|
||||
|
||||
Reference in New Issue
Block a user