Skip to content

Commit 65a3144

Browse files
Remove codemirror tech debt
1 parent 66865b8 commit 65a3144

File tree

10 files changed

+18
-66
lines changed

10 files changed

+18
-66
lines changed

app/helpers/catalog_helper/orchestration_template_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def orchestration_template_content(record)
4545
]
4646
miq_structured_list({
4747
:title => _('Content'),
48-
:mode => "method_built_in_data",
48+
:mode => "method_inline_data",
4949
:rows => rows
5050
})
5151
end

app/helpers/miq_ae_class_helper.rb

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,13 +341,24 @@ def method_details(ae_method, sb_data)
341341
})
342342
end
343343

344-
def method_built_in_data(ae_method)
344+
def method_inline_data(ae_method)
345345
rows = [
346346
row_data('', {:input => 'code_mirror', :props => {:mode => 'ruby', :payload => ae_method.data}})
347347
]
348348
miq_structured_list({
349349
:title => _('Data'),
350-
:mode => "method_built_in_data",
350+
:mode => "method_inline_data",
351+
:rows => rows
352+
})
353+
end
354+
355+
def method_builtin_data(ae_method)
356+
rows = [
357+
row_data(_('Builtin name'), ae_method.data),
358+
]
359+
miq_structured_list({
360+
:title => _('Data'),
361+
:mode => "method_builtin_data",
351362
:rows => rows
352363
})
353364
end

app/helpers/miq_ae_customization_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def miq_ae_customization_content(record)
4444
]
4545
miq_structured_list({
4646
:title => _('Content'),
47-
:mode => "method_built_in_data",
47+
:mode => "method_inline_data",
4848
:rows => rows
4949
})
5050
end

app/views/catalog/explorer.html.haml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,3 @@
1919
ManageIQ.afterOnload = {action: () => miqPrepRightCellForm("#{x_active_tree}")}
2020
- else
2121
= render :partial => "layouts/x_gtl"
22-
23-
-# To include MyCodeMirror JS and CSS files
24-
= render :partial => "/layouts/my_code_mirror",
25-
:locals => {:text_area_id => "miq_none",
26-
:mode => "htmlmixed",
27-
:height => '350px',
28-
:width => '600px'}

app/views/miq_ae_class/_method_inputs.html.haml

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,9 @@
1212
= render :partial => "embedded_methods"
1313
= render :partial => "domain_overrides", :locals => {:node_prefix => "aem", :model => "Method"}
1414
- if @ae_method.location == "inline"
15-
- if @in_a_form
16-
%h3= @ae_method.location == 'builtin' ? _('Builtin name') : _('Data')
17-
= text_area("method1",
18-
"data",
19-
:value => @ae_method.data,
20-
:size => "90x20",
21-
:disabled => true,
22-
:style => "display:none;")
23-
-# Create a MyCodeMirror editor for the text area
24-
= render :partial => "/layouts/my_code_mirror",
25-
:locals => {:text_area_id => "method1_data",
26-
:mode => "ruby",
27-
:line_numbers => true,
28-
:read_only => true}
29-
- else
30-
= method_built_in_data(@ae_method)
15+
= method_inline_data(@ae_method)
16+
- elsif @ae_method.location == 'builtin'
17+
= method_builtin_data(@ae_method)
3118
- elsif @ae_method.location == 'expression'
3219
= @expression
3320
- elsif playbook_style_location?(@ae_method.location)
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
11
#main_div
22
= render :partial => "all_tabs"
3-
4-
-# To include MyCodeMirror JS and CSS files
5-
= render :partial => "/layouts/my_code_mirror", :locals => {:text_area_id => "miq_none", :mode => "ruby"}

app/views/miq_ae_class/show.html.haml

Lines changed: 0 additions & 5 deletions
This file was deleted.

app/views/pxe/_template_script_data.html.haml

Lines changed: 0 additions & 11 deletions
This file was deleted.

app/views/pxe/explorer.html.haml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,3 @@
99
= render :partial => "template_list"
1010
- when :iso_datastores_tree
1111
= render :partial => "iso_datastore_list"
12-
13-
-# To include MyCodeMirror JS and CSS files
14-
= render(:partial => "/layouts/my_code_mirror",
15-
:locals => {:text_area_id => "miq_none",
16-
:mode => "xml",
17-
:modes => %w(shell xml)})

spec/views/miq_ae_class/show.html.haml_spec.rb

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)