File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- $ ( ( ) => {
1+ document . addEventListener ( 'DOMContentLoaded' , ( ) => {
2+ document . querySelectorAll ( '.js-subscription-type-select, .js-subscription-frequency-select' ) . forEach ( ( el ) => {
3+ $ ( el ) . select2 ( ) ;
4+ } ) ;
5+
26 $ ( '.js-enable-subscription' ) . on ( 'change' , async ( evt ) => {
37 const $tgt = $ ( evt . target ) ;
48 const $sub = $tgt . parents ( 'details' ) ;
Original file line number Diff line number Diff line change 1- // Place all the styles related to the Subscriptions controller here.
2- // They will automatically be included in application.css.
3- // You can use Sass (SCSS) here: http://sass-lang.com/
1+ @import ' variables' ;
2+
3+ .new_subscription {
4+ .select2-container {
5+ height : 37px ;
6+ margin : 4px 0px ;
7+ }
8+
9+ .select2-container {
10+ .selection {
11+ .select2-selection {
12+ border-color : $muted-graphic ;
13+ height : 100% ;
14+ padding : 4px 0 ;
15+ }
16+
17+ .select2-selection__arrow {
18+ top : 50% ;
19+ translate : 0 -50% ;
20+ }
21+ }
22+ }
23+ }
Original file line number Diff line number Diff line change 1414 <%= f . select :type ,
1515 options_for_select ( type_choice_for ( current_user ) , selected : @subscription . type ) ,
1616 { include_blank : true } ,
17- class : 'form-element' %>
17+ class : 'form-element js-subscription-type-select ' %>
1818 </ div >
1919
2020 < div class ="form-group ">
3535 < div class ="form-caption "> How often do you want to be sent these emails?</ div >
3636 <%= f . select :frequency ,
3737 options_for_select ( frequency_choice , selected : @subscription . frequency ) ,
38- { include_blank : true } , class : 'form-element' %>
38+ { include_blank : true } ,
39+ class : 'form-element js-subscription-frequency-select' %>
3940 </ div >
4041
4142 < div class ="actions ">
You can’t perform that action at this time.
0 commit comments