Reduce the amount of JavaScript written in views
Seeing `:javascript` all over Views feels like a code smell. This goes a long way towards reducing the amount of JS in views, but there's still plenty to be done on that front.
This commit is contained in:
parent
b565f33472
commit
d6c384c20f
18 changed files with 22 additions and 122 deletions
|
@ -1,8 +1,3 @@
|
|||
= form_tag switch_project_refs_path(@project), method: :get, class: "project-refs-form" do
|
||||
= select_tag "ref", grouped_options_refs, onchange: "this.form.submit();", class: "project-refs-select"
|
||||
= select_tag "ref", grouped_options_refs, onchange: "this.form.submit();", class: "project-refs-select chosen"
|
||||
= hidden_field_tag :destination, destination
|
||||
|
||||
:javascript
|
||||
$(function(){
|
||||
$('.project-refs-select').chosen();
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue