Skip to content

Commit 98b3b38

Browse files
committed
Replaced the angular fonticon picker with react in custom buttons
1 parent 51c7472 commit 98b3b38

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

app/javascript/components/fonticon-picker/index.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ const FontIconPicker = ({ iconTypes, selected, onChangeURL }) => {
7777
onClick={onModalApply}
7878
disabled={selectedIcon === activeIcon || activeIcon === undefined}
7979
>
80-
Apply
80+
{ __('Apply') }
8181
</Button>
8282
<Button id="cancel-icon-picker-modal" bsStyle="default" className="btn-cancel" onClick={hideModal}>
83-
Cancel
83+
{ __('Cancel') }
8484
</Button>
8585
</Modal.Footer>
8686
</Modal>

app/views/shared/buttons/_ab_options_form.html.haml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,8 @@
4545
.form-group
4646
%label.control-label.col-md-2
4747
= _('Icon')
48-
.col-md-8#button-icon-picker{'ng-controller' => 'fonticonPickerController as vm'}
49-
%miq-fonticon-picker{'input-name' => 'button_icon', :selected => @edit[:new][:button_icon], 'icon-changed' => 'vm.select(selected);'}
50-
%miq-fonticon-family{:selector => 'ff', :title => 'Font Fabulous'}
51-
%miq-fonticon-family{:selector => 'pficon', :title => 'PatternFly'}
52-
%miq-fonticon-family{:selector => 'fa', :title => 'Font Awesome'}
48+
.col-md-8#button-icon-picker
49+
= react 'FonticonPicker', :selected => @edit[:new][:button_icon], :onChangeURL => url
5350
.form-group
5451
%label.control-label.col-md-2
5552
= _('Icon Color')

app/views/shared/buttons/_group_form.html.haml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,8 @@
3131
.form-group
3232
%label.control-label.col-md-2
3333
= _('Icon')
34-
.col-md-8#button-icon-picker{'ng-controller' => 'fonticonPickerController as vm'}
35-
%miq-fonticon-picker{'input-name' => 'button_icon', :selected => @edit[:new][:button_icon], 'icon-changed' => 'vm.select(selected);'}
36-
%miq-fonticon-family{:selector => 'ff', :title => 'Font Fabulous'}
37-
%miq-fonticon-family{:selector => 'pficon', :title => 'PatternFly'}
38-
%miq-fonticon-family{:selector => 'fa', :title => 'Font Awesome'}
34+
.col-md-8#button-icon-picker
35+
= react 'FonticonPicker', :selected => @edit[:new][:button_icon], :onChangeURL => url
3936
.form-group
4037
%label.control-label.col-md-2
4138
= _('Icon Color')

0 commit comments

Comments
 (0)