OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Remove unused code
Henriette Darge5a77b482ad63
diff --git a/app/helpers/colors_helper.rb b/app/helpers/colors_helper.rbindex f98e2b2b0bf..3fa7694d6b7 100644--- a/app/helpers/colors_helper.rb+++ b/app/helpers/colors_helper.rb@@ -33,12 +33,6 @@ module ColorsHelperoptions = {}options[:name] = c.nameoptions[:value] = c.id- options[:data] = {- color: c.hexcode,- bright: c.bright?,- dark: c.dark?,- background: c.contrasting_color(light_color: "transparent")- }options[:selected] = true if c.id == colored_thing.color_idcolors.push(options)@@ -50,12 +44,6 @@ module ColorsHelpercolored_thing.color_idend- def colored_text(color)- background = color.contrasting_color(dark_color: "#333", light_color: "transparent")- style = "background-color: #{background}; color: #{color.hexcode}"- content_tag(:span, color.hexcode, class: "color--text-preview", style:)- end-## Styles to display colors itself (e.g. for the colors autocompleter)##diff --git a/app/models/colors/hex_color.rb b/app/models/colors/hex_color.rbindex c5aca6f16aa..2d063c2e9b3 100644--- a/app/models/colors/hex_color.rb+++ b/app/models/colors/hex_color.rb@@ -1,21 +1,9 @@module Colorsmodule HexColor- ##- # Returns the best contrasting color, either white or black- # depending on the overall brightness.- def contrasting_color(light_color: "#FFFFFF", dark_color: "#333333")- if bright?- dark_color- else- light_color- end- end-### Get the fill style for this color.# If the color is light, use a dark font.# Otherwise, use a white font.- # TODO: removedef color_styles(light_color: "#FFFFFF", dark_color: "#333333")if bright?{ color: dark_color, "background-color": hexcode }@@ -31,10 +19,6 @@ module Colorsbrightness_yiq >= 150end- def dark?- brightness_yiq < 150- end-### Returns whether the color is very bright according to# YIQ lightness.