You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

29 lines
857 B

import ApplicationController from './application_controller'
export default class extends ApplicationController {
static targets = ["input"]
connect () {
super.connect()
}
search () {
this.stimulate("DocumentReflex#render_case_lists_search_results",
{ q: this.inputTarget.value, page: 1 },
this.element.dataset["doctrineId"])
}
paginate () {
this.stimulate("DocumentReflex#render_case_lists_search_results",
{ q: this.element.dataset["q"], page: this.element.dataset["page"] },
this.element.dataset["doctrineId"])
}
loadYears () {
var $this = this
$.get("/api/jurisprudences/years.json", {}, function (data, status) {
if (status === "success") {
$this.stimulate("DocumentReflex#render_years", data)
}
});
}
}