Project

General

Profile

Actions

Defect #22105

closed

Responsive layout. Change menu selector in responsive.js.

Added by Vasil Kovalevsky almost 9 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Category:
UI - Responsive
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

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.


Files

22105.patch (1.21 KB) 22105.patch Vasil Kovalevsky, 2016-02-24 05:16
Actions #2

Updated by Toshi MARUYAMA over 8 years ago

  • Category set to UI - Responsive
Actions #3

Updated by Toshi MARUYAMA over 8 years ago

  • Target version set to 3.2.2
Actions #4

Updated by Jean-Philippe Lang over 8 years ago

  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Resolution set to Fixed

Committed, thanks.

Actions

Also available in: Atom PDF