fixes #145: add test function for janitor trials
This commit is contained in:
27
app/assets/javascripts/janitor_trials.js
Normal file
27
app/assets/javascripts/janitor_trials.js
Normal file
@@ -0,0 +1,27 @@
|
||||
(function() {
|
||||
Danbooru.JanitorTrials = {};
|
||||
|
||||
Danbooru.JanitorTrials.initialize_all = function() {
|
||||
$("#c-janitor-trials input[value=Test]").click(function(e) {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/janitor_trials/test.json",
|
||||
data: {
|
||||
janitor_trial: {
|
||||
user_name: $("#janitor_trial_user_name").val()
|
||||
}
|
||||
},
|
||||
success: function(data) {
|
||||
$("#test-results").html(data);
|
||||
}
|
||||
});
|
||||
|
||||
e.preventDefault();
|
||||
});
|
||||
}
|
||||
})();
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
Danbooru.JanitorTrials.initialize_all();
|
||||
});
|
||||
Reference in New Issue
Block a user