|
45 | 45 | .form-group |
46 | 46 | %label.control-label.col-md-2 |
47 | 47 | = _('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 |
53 | 50 | .form-group |
54 | 51 | %label.control-label.col-md-2 |
55 | 52 | = _('Icon Color') |
|
102 | 99 | miqSelectPickerEvent('dialog_id', '#{url}'); |
103 | 100 | miqSelectPickerEvent('display_for', '#{url}'); |
104 | 101 | miqSelectPickerEvent('submit_how', '#{url}'); |
105 | | - miq_bootstrap('#button-icon-picker'); |
106 | | -
|
107 | | - // This is an ugly hack to be able to use this component in a non-angular context with miq-observe |
108 | | - // FIXME: Remove this when the form is converted to angular |
109 | | - $(function() { |
110 | | - $('#button-icon-picker input[type="hidden"]').on('change', _.debounce(function() { |
111 | | - miqObserveRequest('#{url}', { |
112 | | - no_encoding: true, |
113 | | - data: 'button_icon' + '=' + $(this).val(), |
114 | | - }); |
115 | | - }, 700, {leading: true, trailing: true})); |
116 | | - }); |
0 commit comments