diff --git a/app/javascript/src/javascripts/common.js b/app/javascript/src/javascripts/common.js index c6428f0e4..9c5a3b900 100644 --- a/app/javascript/src/javascripts/common.js +++ b/app/javascript/src/javascripts/common.js @@ -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(); diff --git a/app/javascript/src/javascripts/saved_searches.js b/app/javascript/src/javascripts/saved_searches.js index 4f0e0bc48..af0069c45 100644 --- a/app/javascript/src/javascripts/saved_searches.js +++ b/app/javascript/src/javascripts/saved_searches.js @@ -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(); } } diff --git a/app/javascript/src/javascripts/utility.js b/app/javascript/src/javascripts/utility.js index 246b6c676..1fb3c7879 100644 --- a/app/javascript/src/javascripts/utility.js +++ b/app/javascript/src/javascripts/utility.js @@ -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) { diff --git a/app/javascript/src/styles/common/tables.scss b/app/javascript/src/styles/common/tables.scss index 1d200e64b..8f68b7bba 100644 --- a/app/javascript/src/styles/common/tables.scss +++ b/app/javascript/src/styles/common/tables.scss @@ -35,7 +35,7 @@ table.striped { } } - tr.even { + tr:nth-child(even) { background-color: #FAFAFA; } } diff --git a/app/views/artist_versions/_revert_listing.html.erb b/app/views/artist_versions/_revert_listing.html.erb index 1a4381650..b73fb7112 100644 --- a/app/views/artist_versions/_revert_listing.html.erb +++ b/app/views/artist_versions/_revert_listing.html.erb @@ -19,7 +19,7 @@
<% @artist_versions.each do |artist_version| %> -