Commit 85f17935 authored by Clement Ho's avatar Clement Ho

Pass project ID through the DOM

parent 99ffd0d4
......@@ -13,7 +13,7 @@
params: {
per_page: 20,
active: true,
project_id: 2,
project_id: this.getProjectId(),
current_user: true,
},
searchValueFunction: this.getSearchInput,
......
......@@ -13,7 +13,7 @@
params: {
per_page: 20,
active: true,
project_id: 2,
project_id: this.getProjectId(),
current_user: true,
},
searchValueFunction: this.getSearchInput,
......
......@@ -21,6 +21,10 @@
this.dropdown.removeEventListener('click.dl', this.itemClickedWrapper);
}
getProjectId() {
return this.input.getAttribute('data-project-id');
}
getCurrentHook() {
return this.droplab.hooks.filter(h => h.id === this.hookId)[0];
}
......
......@@ -12,7 +12,7 @@
class: "check_all_issues left"
.issues-other-filters.filtered-search-container
.filtered-search-input-container
%input.form-control.filtered-search{ placeholder: 'Search or filter results...', 'data-id' => 'filtered-search' }
%input.form-control.filtered-search{ placeholder: 'Search or filter results...', 'data-id' => 'filtered-search', 'data-project-id' => @project.id }
= icon('filter')
%button.clear-search.hidden{ type: 'button' }
= icon('times')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment