forked from getpatchwork/patchwork
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
views: Move js code to separate file
Move patch-list related JS code to a new patch-list.js file, to make the JavaScript easy to read and change in one place. This makes automatic code formatting easier, makes it more straightforward to measure test coverage and discover opportunities for refactoring, and simplifies a possible future migration to TypeScript if the project chooses to go in that direction. No user-visible change should be noticed. Signed-off-by: Raxel Gutierrez <[email protected]> Signed-off-by: Stephen Finucane <[email protected]> [stephenfin: Addressed merged conflicts]
- Loading branch information
1 parent
09613eb
commit 0cea2e4
Showing
3 changed files
with
24 additions
and
17 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
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,14 @@ | ||
$( document ).ready(function() { | ||
$("#patch-list").stickyTableHeaders(); | ||
|
||
$("#patch-list").checkboxes("range", true); | ||
|
||
$("#check-all").change(function(e) { | ||
if(this.checked) { | ||
$("#patch-list > tbody").checkboxes("check"); | ||
} else { | ||
$("#patch-list > tbody").checkboxes("uncheck"); | ||
} | ||
e.preventDefault(); | ||
}); | ||
}); |
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