From: Stefan Baebler Date: Sat, 31 Aug 2019 09:34:57 +0000 (+0200) Subject: Merge branch 'master' into tag-colour-preview-rebase X-Git-Tag: live~2471^2~4 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/e731dd71a77ad4ad1e9db22535e89444bb98e5d9?hp=7c8779709f6be1cf242dedaaf826cadb3da88e66 Merge branch 'master' into tag-colour-preview-rebase --- diff --git a/app/assets/javascripts/index.js b/app/assets/javascripts/index.js index 2c7d70e11..562eb80fd 100644 --- a/app/assets/javascripts/index.js +++ b/app/assets/javascripts/index.js @@ -347,6 +347,10 @@ $(document).ready(function () { }); } }); + + $('.colour-preview-box').each(function () { + $(this).css("background-color", $(this).data("colour")); + }); } page.unload = function () { diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index d3488fe73..40c5eaa2a 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -1230,6 +1230,15 @@ tr.turn:hover { border-left: 1px solid #ddd; background-color: #fff; } + + .colour-preview-box { + float: right; + width: 12px; + height: 12px; + margin: 4px 0px; + border: 1px solid rgba(0, 0, 0, .1); + // add color via inline css on element: background-color: ; + } } .warning { diff --git a/config/locales/en.yml b/config/locales/en.yml index e8a36f945..c6ed0f628 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -279,6 +279,7 @@ en: wikidata_link: "The %{page} item on Wikidata" wikipedia_link: "The %{page} article on Wikipedia" telephone_link: "Call %{phone_number}" + colour_preview: "Colour %{colour_value} preview" note: title: "Note: %{id}" new_note: "New Note"