Skip to content

Commit

Permalink
Replaced the angular fonticon picker with react in custom buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
skateman committed Apr 20, 2020
1 parent c7b938b commit 599807f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
7 changes: 2 additions & 5 deletions app/views/shared/buttons/_ab_options_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,8 @@
.form-group
%label.control-label.col-md-2
= _('Icon')
.col-md-8#button-icon-picker{'ng-controller' => 'fonticonPickerController as vm'}
%miq-fonticon-picker{'input-name' => 'button_icon', :selected => @edit[:new][:button_icon], 'icon-changed' => 'vm.select(selected);'}
%miq-fonticon-family{:selector => 'ff', :title => 'Font Fabulous'}
%miq-fonticon-family{:selector => 'pficon', :title => 'PatternFly'}
%miq-fonticon-family{:selector => 'fa', :title => 'Font Awesome'}
.col-md-8#button-icon-picker
= react 'IconPicker', :selected => @edit[:new][:button_icon], :iconTypes => {'ff' => 'Font Fabulous', 'pficon' => 'PatternFly', 'fa' => 'Font Awesome'}, :onChangeURL => url
.form-group
%label.control-label.col-md-2
= _('Icon Color')
Expand Down
7 changes: 2 additions & 5 deletions app/views/shared/buttons/_group_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,8 @@
.form-group
%label.control-label.col-md-2
= _('Icon')
.col-md-8#button-icon-picker{'ng-controller' => 'fonticonPickerController as vm'}
%miq-fonticon-picker{'input-name' => 'button_icon', :selected => @edit[:new][:button_icon], 'icon-changed' => 'vm.select(selected);'}
%miq-fonticon-family{:selector => 'ff', :title => 'Font Fabulous'}
%miq-fonticon-family{:selector => 'pficon', :title => 'PatternFly'}
%miq-fonticon-family{:selector => 'fa', :title => 'Font Awesome'}
.col-md-8#button-icon-picker
= react 'IconPicker', :selected => @edit[:new][:button_icon], :iconTypes => {'ff' => 'Font Fabulous', 'pficon' => 'PatternFly', 'fa' => 'Font Awesome'}, :onChangeURL => url
.form-group
%label.control-label.col-md-2
= _('Icon Color')
Expand Down

0 comments on commit 599807f

Please sign in to comment.