Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-write project filters using classes (#109)
For project filters, save serialized data and construct SQL from the data instead of storing SQL. This enables better control for translated genres and makes for more powerful language selectors. Update the project filters UI with some javascript to hide language selection mode when 'any' is selected and automate the difficulty checkboxes.
- Loading branch information
Showing
8 changed files
with
368 additions
and
404 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/*global $*/ | ||
$(function () { | ||
"use strict"; | ||
var langSelector = $("#language"); | ||
var langMatch = $("#lang-match"); | ||
var diffAll = $("#diff-all"); | ||
var diffOpt = $(".diff-opt"); | ||
|
||
function showMatcher() { | ||
langMatch.css("visibility", (0 === langSelector.prop("selectedIndex") ? "hidden" : "visible")); | ||
} | ||
|
||
langSelector.change(function () { | ||
showMatcher(); | ||
}); | ||
|
||
diffAll.change(function () { | ||
diffOpt.prop("checked", false); | ||
}); | ||
|
||
diffOpt.change(function () { | ||
diffAll.prop("checked", false); | ||
}); | ||
|
||
showMatcher(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters