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
|
@ -8,20 +8,9 @@
|
|||
.clearfix
|
||||
%label Project Access:
|
||||
.input
|
||||
= f.select :project_access, options_for_select(Project.access_options, @admin_team_member.project_access), {}, class: "project-access-select"
|
||||
= f.select :project_access, options_for_select(Project.access_options, @admin_team_member.project_access), {}, class: "project-access-select chosen span3"
|
||||
|
||||
%br
|
||||
.actions
|
||||
= f.submit 'Save', class: "btn primary"
|
||||
= link_to 'Cancel', :back, class: "btn"
|
||||
|
||||
:css
|
||||
form select {
|
||||
width:300px;
|
||||
}
|
||||
|
||||
:javascript
|
||||
$('select#team_member_user_id').chosen();
|
||||
$('select#team_member_project_id').chosen();
|
||||
$('select#team_member_repo_access').chosen();
|
||||
$('select#team_member_project_access').chosen();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue