RTL direction and right to left writing is for Persian, Arabic and Hebrew languages and I think its better to add this feature to nice menu. any one has plan for this project?

Comments

add1sun’s picture

Status: Active » Postponed (maintainer needs more info)

I'm not sure what would be needed to accommodate RTL within Nice Menus since I do not use a RTL myself. Could you explain what would be needed? Are the changes needed only CSS or do they require the underlying HTML to provide something?

druvision’s picture

For vertical menus, RTL works even now. Simply define a vertical menu block popping left. See the nice menus on Drupal Israel for example.

I've tested it now and Horizontal menus also work, out of the box. Small cosmetic changes is all that is needed.

Amnon
-
Professional: Drupal Israel | Drupal Development & Consulting | בניית אתרים
Personal: Hitech Dolphin: Regain Simple Joy :)

druvision’s picture

Status: Postponed (maintainer needs more info) » Fixed
haggai_e’s picture

StatusFileSize
new312 bytes

Hi,

I've created an -rtl.css file for this module, with little tweaks I thought were needed for the rtl version.
The file gets loaded automatically by an rtl aware theme, when put in the nice_menus module directory. Previously such styles were put in the theme's css file, but I believe they belong in the module itself.

Regards

add1sun’s picture

Status: Fixed » Needs review

Changing stats so we can see about adding this.

haggai_e’s picture

StatusFileSize
new2.9 KB

Thanks for checking this out.

I found out that this previous patch didn't work well on IE6, so I've created a new one. It also put the little triangle on the left in horizontal nice-menus when an rtl language is used.

Regards,
Haggai Eran

druvision’s picture

This only solves part of the issue.

Indeed, the main pop-down menu looks RTLised, but sub-menus behave strangely.

Amnon

druvision’s picture

To clear: The main pulldown menu looks RTLised - but submenus behave strangely.

add1sun’s picture

Status: Needs review » Needs work

Based on the comments it sounds like this still needs work.

haggai_e’s picture

Hi,
I'm sorry I haven't replied so long, I was a little busy. I really didn't test this patch with deeper menu hierarchies, so its possible that I haven't RTLized the deeper sub menus. I'll try to look into it soon.

Haggai

holydrupal’s picture

The issue with nice menu is that the menu has problem in browsers like IE6, I myself changed the style and created an RTL style for it, but because the browsers, I finally make my RTL style compatible just for FF2 and IE7 and hide the sub menus in IE6.

any one could be able to fix the issue?

add1sun’s picture

Version: 5.x-1.x-dev » 6.x-2.x-dev

Work should continue on this against HEAD.

lameei’s picture

subscribing!!!

tombigel’s picture

Amnon asked me to try and tackle this one.
Give me a couple of days and you'll have RTL support working.

tombigel’s picture

StatusFileSize
new2.26 KB

Well, it took me much less time then I expected.
Attached here 2 files -
The original nice_menus_default.css with /*LTR*/ comments (To comply with Drupal coding standards)
The incremental nice_menus_default-rtl.css file that loads automatically when switching to an RTL language (put it in the module's folder).

Added some comments in the RTL file.
Built on 6x-2.x-dev
Tested on IE 6.0.29, IE 7.0, FF 3.0.4, Safari 3.2.1, Opera 9.62

tombigel’s picture

StatusFileSize
new2.3 KB

Tere was a bug that messed with vertical menus location
Here is the updated file

druvision’s picture

Works great for me.

I've copied the nice_menus_default-rtl.css file attached by tom into my Drupal5 nice_menus installation - it works! You can see it on action on http://nusmile.tv - see the dropdown menu above the image.

Note: I made a diff and there were no changes between the D5 and the D6 version of nice_menus_default-rtl.css, so I've simply copied the file.

At last!

druvision’s picture

Status: Needs work » Needs review
druvision’s picture

Status: Needs review » Reviewed & tested by the community

The patch works great with Drupal 6 as well - now tested on http://sos.levavie.info. This covers D6 testing as well.

Let's commit it.

Thanks in Advance,

Amnon
-
Professional: Drupal Development & Consulting
Personal: Hitech Dolphin: Regain Simple Joy :)

add1sun’s picture

Status: Reviewed & tested by the community » Needs work

Unfortunately zips of full files are *not* patches. I will need to work on making this into a patch before I will review it.

tombigel’s picture

The important part is just a new css file, no other files are changed.
The changes to the original CSS are just the /*LTR*/ comments as required by Drupal guidelines and has no functional meaning.

I'll need to compare the original CSS file to the latest dev snapshot in oreder to see if there are any differences and create the patch.
I'll do it sometime soon

Meanwhile please test the RTL css file, this is a very important addition for anybody who writes BiDi websites.

add1sun’s picture

Righto, it is just easier to see things and, more importantly, to add and remove from existing installs for testing when it is in patch form. I'll probably get to this myself later today on a long flight home. I do want to get this in ASAP.

add1sun’s picture

Here it is in patch form with a minor tweak to the LTR comments to match core style. I played around and in my limited testing it worked well. I'll try to get time to commit this sometime this weekend.

add1sun’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new5.4 KB

Hm, d.o is acting weird and cut off my attachment. Grrr. Again.

tombigel’s picture

Cool, thanks.
I'll test the patch my self later this week.

add1sun’s picture

Status: Reviewed & tested by the community » Fixed

I've gone ahead and committed this to HEAD so it will be in the next tarball made tomorrow morning. If there are any issues you find in testing it in the dev version, just open a new ticket for a bug. Thanks to everyone who worked on this!

tombigel’s picture

Just downloaded 6.x-2.x-dev, no nice_menus_default-rtl.css.
Are you sure it's there?

add1sun’s picture

Ugh. Sorry about that. Forgot to "cvs add" the new file when I committed. It is in HEAD now and will be in the tarball after the next packaging run which will be midnight GMT.

tombigel’s picture

Thanks.

I've noticed a regression in my implementation -

I removed the "float" from ul.nice-menu-down:

/* IE6 doesn't correctly calculate the width of a floated element that contains right floated elements. */
ul.nice-menu-down {
  float:none;
}

And in some cases (Can't pinpoint which right now) it causes the nice-menus <ul> to span all the way to the bottom of the screen, overlapping (transparently) every link and form element of the page, making them inaccessible.

I think that changing it to float:right;width:100% or float:right !important;float:none(only IE6 sees the "none" part) will fix it, but it needs a browser wide testing and I don't have the time right now (weekend maybe).

UPDATE: float:right;width:100% not good for IE6, but, in FF setting the height of the ul to an explicit value fixes the problem. I'll look further into it.

Tom B.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

tombigel’s picture

Status: Closed (fixed) » Needs work

Reopening this one, still need to iron out this IE bug.

I think float:right !important;float:none is the right solution, but i need others to test this.

add1sun’s picture

Status: Needs work » Closed (fixed)

Let's open a new issue that is a bug against 6.x-2.x since this issue was for getting the code in to begin with and now it is a bug.