プロジェクト

全般

プロフィール

Vote #80875

完了

Add missing icon class to items with icon-checked class in the context menu

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Issues_2
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
2
version_id:
152
issue_org_id:
33437
author_id:
259873
assigned_to_id:
332
comments:
6
status_id:
5
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

Neither .icon class nor .icon-only class exists in context menu link with green check icon.
It looks fine, but inconsistent compared to other icon links.

There is a problem when changing the icon style depending on the theme, so please fix it.

!{width: 70%; border: 1px solid #ccc}ScreenShot.png!


diff --git a/app/helpers/context_menus_helper.rb b/app/helpers/context_menus_helper.rb
index db71abe31..d545f3c51 100644
--- a/app/helpers/context_menus_helper.rb
+++ b/app/helpers/context_menus_helper.rb
@@ -21,7 +21,7 @@ module ContextMenusHelper
   def context_menu_link(name, url, options={})
     options[:class] ||= ''
     if options.delete(:selected)
-      options[:class] += ' icon-checked disabled'
+      options[:class] += ' icon icon-checked disabled'
       options[:disabled] = true
     end
     if options.delete(:disabled)

journals

--------------------------------------------------------------------------------
Setting the target version to 4.2.0.
--------------------------------------------------------------------------------
Committed the fix. Thank you.
--------------------------------------------------------------------------------
We should clean-up the existing rule:

<pre><code class="diff">
mariusbalteanu@Mariuss-MacBook-Pro redmine % git diff
diff --git a/public/stylesheets/context_menu.css b/public/stylesheets/context_menu.css
index ff83f60a1..efa25006a 100644
--- a/public/stylesheets/context_menu.css
+++ b/public/stylesheets/context_menu.css
@@ -46,7 +46,7 @@
#context-menu li.folder:hover { z-index:40; }
#context-menu ul ul, #context-menu li:hover ul ul { display:none; }
#context-menu li:hover ul, #context-menu li:hover li:hover ul { display:block; }
-#context-menu a.icon-checked {background: url(../images/toggle_check.png) no-repeat 3px 40%;}
+#context-menu a.icon-checked {background-position: 3px 40%;}

/* selected element */
.context-menu-selection { background-color:#507AAA !important; color:#f8f8f8 !important; }
</code></pre>
--------------------------------------------------------------------------------
Marius BALTEANU wrote:
> We should clean-up the existing rule:
>
> [...]

I didn't realize there is a style for context menus only.
Thank you for reviewing!
--------------------------------------------------------------------------------
Marius BALTEANU wrote:
> We should clean-up the existing rule:

Committed the fix in r19782. Thank you.
--------------------------------------------------------------------------------


related_issues

relates,Closed,28605,Add the missing icon class to the items with icons from the contextual menu

Admin Redmine さんが約4年前に更新

  • カテゴリIssues_2 にセット
  • 対象バージョン4.2.0_152 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0