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.
 
 
 
 
 

22 lines
637 B

import ApplicationController from './application_controller'
export default class extends ApplicationController {
connect () {
super.connect()
}
renderSidenavAccordion () {
var parent_id = this.element.dataset["subjectParentId"], $this = this, params = {}
if (parent_id !== null && parent_id !== undefined && parent_id !== "") {
params.parent_id = parent_id
} else {
params.is_root_only = true
}
$.get("/api/subjects.json", params, function (results, status) {
if (status === "success") {
$this.stimulate("SubjectsReflex#render_sidenav_accordion", results)
}
})
}
}