From e86a1081453468588b18a26fce779af3c531de0e Mon Sep 17 00:00:00 2001 From: Hilda Stastna Date: Mon, 14 May 2018 20:33:37 +0200 Subject: [PATCH] Change text color to blue for different columns when displaying Drift for VM --- app/controllers/application_controller/compare.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/app/controllers/application_controller/compare.rb b/app/controllers/application_controller/compare.rb index f2664dfae29..d0b4d2ebfcd 100644 --- a/app/controllers/application_controller/compare.rb +++ b/app/controllers/application_controller/compare.rb @@ -1213,10 +1213,11 @@ def drift_add_section_field_expanded(view, section, field) elsif fld[:_match_] img_bkg = "cell-bkg-plain-no-shade" else + style = "color: #21a0ec;" if fld[:_match_] == false img_bkg = "cell-bkg-plain-mark-txt-no-shade" unset_same_flag end - row.merge!(drift_add_txt_col(idx, val, img_bkg)) + row.merge!(drift_add_txt_col(idx, val, img_bkg, style)) end row end @@ -1240,8 +1241,12 @@ def drift_add_image_col(idx, img_src, img_bkg, val) {"col#{idx + 1}".to_sym => html} end - def drift_add_txt_col(idx, col, img_bkg) - html_text = "
#{col}
" + def drift_add_txt_col(idx, col, img_bkg, style = nil) + html_text = if style + "
#{col}
" + else + "
#{col}
" + end {"col#{idx + 1}".to_sym => html_text} end