Skip to content

Commit 932e403

Browse files
committed
javascript_highlight unused as of 7d85b05
1 parent 9c35b43 commit 932e403

File tree

3 files changed

+0
-24
lines changed

3 files changed

+0
-24
lines changed

app/helpers/js_helper.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ def javascript_prepend_span(element, cls)
2222
"$('##{j_str(element)}').prepend('#{content_tag(:span, nil, :class => cls)}');".html_safe
2323
end
2424

25-
def javascript_highlight(element, status)
26-
"miqHighlight('##{j_str(element)}', #{j_str(status)});".html_safe
27-
end
28-
2925
def javascript_disable_field(element)
3026
"$('##{j_str(element)}').prop('disabled', true);".html_safe
3127
end

app/javascript/oldjs/miq_application.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -207,19 +207,6 @@ window.miqGetBrowserInfo = function() {
207207
}
208208
};
209209

210-
// Turn highlight on or off
211-
window.miqHighlight = function(elem, status) {
212-
if ($(elem).length) {
213-
return;
214-
}
215-
216-
if (status) {
217-
$(elem).addClass('active');
218-
} else {
219-
$(elem).removeClass('active');
220-
}
221-
};
222-
223210
// Turn on activity indicator
224211
window.miqSparkle = function(status) {
225212
if (status) {

spec/helpers/js_helper_spec.rb

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,6 @@
2121
end
2222
end
2323

24-
context '#javascript_highlight' do
25-
it 'returns js to to add or remove the active class on the element' do
26-
expect(javascript_highlight('foo', true)).to eq("miqHighlight('\#foo', true);")
27-
expect(javascript_highlight('foo', false)).to eq("miqHighlight('\#foo', false);")
28-
end
29-
end
30-
3124
context '#javascript_disable_field' do
3225
it 'returns js to disable the provided element' do
3326
expect(javascript_disable_field('foo')).to eq("$('#foo').prop('disabled', true);")

0 commit comments

Comments
 (0)