プロジェクト

全般

プロフィール

Vote #77235

完了

Responsive layout. Change menu selector in responsive.js.

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

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

0%

予定工数:
category_id:
57
version_id:
116
issue_org_id:
22105
author_id:
103744
assigned_to_id:
1
comments:
4
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

Hello.
In our redmine we are using custom menu with sub items and other cool things.
Everything was nice before there is was added responsive layout in redmine.
Menu works before window resize less than 899px (responsive.css media max-width: 899px) and groving up more 899px our menu stays flatten (in mobile view a lot of functions works good).
Reason - wrong (for us) selector in responsive.js

So, there is 2 variables (functions):
_initMobileMenu and _initDesktopMenu
_initMobileMenu:

$('#main-menu > ul').detach().appendTo('.js-project-menu');
$('#top-menu > ul').detach().appendTo('.js-general-menu');
$('#sidebar > *').detach().appendTo('.js-sidebar');
$('#account ul').detach().appendTo('.js-profile-menu'); // bad selector

better change to

$('#main-menu > ul').detach().appendTo('.js-project-menu');
$('#top-menu > ul').detach().appendTo('.js-general-menu');
$('#sidebar > *').detach().appendTo('.js-sidebar');
$('#account > ul').detach().appendTo('.js-profile-menu'); // changed to only child uls (no subchilds)

_initDesktopMenu:

$('.js-project-menu > ul').detach().appendTo('#main-menu');
$('.js-general-menu ul').detach().appendTo('#top-menu'); // bad selector
$('.js-sidebar > *').detach().appendTo('#sidebar');
$('.js-profile-menu ul').detach().appendTo('#account');  // bad selector

better change to

$('.js-project-menu > ul').detach().appendTo('#main-menu');
$('.js-general-menu > ul').detach().appendTo('#top-menu'); // changed to only child uls (no subchilds)
$('.js-sidebar > *').detach().appendTo('#sidebar');
$('.js-profile-menu > ul').detach().appendTo('#account');  // changed to only child uls (no subchilds)

And responsive.js was wrote that we cannot patch anything there, only direct change in source (or I missed something), but we dont change any source of redmine (its our rule).

Please, if its not hard, add this small changes to some release, its not about redmine, its about our system. Of cource, we can change our menu structure (move ul to div\span), but its very long for us (a lot of changes need to do: style, rednder, js, items tree).
Now we just disabled responsive menu, but its not good solution.
Thanks in advance.


journals

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Committed, thanks.
--------------------------------------------------------------------------------

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

  • カテゴリUI - Responsive_57 にセット
  • 対象バージョン3.2.2_116 にセット

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

いいね!0
いいね!0