Details

    • Testing Instructions:
      Hide

      1. Install a right-to-left language pack such as Hebrew or Arabic.
      2. Login and edit your profile in English
      3. Click a help icon
      4. Help popups open to the right of the icon, away from the label
      5. Switch your language to Hebrew/Arabic and save
      6. Press browser back button to get back to edit profile and refresh page
      7. Click a help icon
      8. Help popups still open to the right so the label is obscured and the 'close' image is still in the top right

      With patch applied:

      IMPORTANT: Purge all caches (Site Administration > Development > Purge all caches) prior to TESTING

      8. Help popups open the 'opposite' way and the close icon is in the correct location.

      Show
      1. Install a right-to-left language pack such as Hebrew or Arabic. 2. Login and edit your profile in English 3. Click a help icon 4. Help popups open to the right of the icon, away from the label 5. Switch your language to Hebrew/Arabic and save 6. Press browser back button to get back to edit profile and refresh page 7. Click a help icon 8. Help popups still open to the right so the label is obscured and the 'close' image is still in the top right With patch applied: IMPORTANT: Purge all caches (Site Administration > Development > Purge all caches) prior to TESTING 8. Help popups open the 'opposite' way and the close icon is in the correct location.
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      master_MDL-35215
    • Rank:
      43854

      Description

      When using Moodle in right-to-left (RTL) languages the help popups open the wrong way, which can obscure the label.

        Issue Links

          Activity

          Hide
          Petr Škoda added a comment -

          Thanks for the report and patch, I am going to reassign it because I do not have any knowledge of RTL languages or support in Moodle, sorry.

          Show
          Petr Škoda added a comment - Thanks for the report and patch, I am going to reassign it because I do not have any knowledge of RTL languages or support in Moodle, sorry.
          Hide
          Simon Coggins added a comment -

          This should be ready to test and merge.

          Simon

          Show
          Simon Coggins added a comment - This should be ready to test and merge. Simon
          Hide
          Michael de Raadt added a comment -

          This seems to be in the wrong state.

          Show
          Michael de Raadt added a comment - This seems to be in the wrong state.
          Hide
          Simon Coggins added a comment -

          Sorry about that - I thought "Start peer review" was the same as "Request peer review".

          Show
          Simon Coggins added a comment - Sorry about that - I thought "Start peer review" was the same as "Request peer review".
          Hide
          Michael de Raadt added a comment -

          Hi, Simon.

          You should be able to request a peer review now.

          Mary: I've assigned you as peer reviewer on this issue. If you are not keen, please set the peer review field to moodle.com.

          Nadav: I've added you as a watcher on this issue as I thought you might be interested in commenting.

          Show
          Michael de Raadt added a comment - Hi, Simon. You should be able to request a peer review now. Mary: I've assigned you as peer reviewer on this issue. If you are not keen, please set the peer review field to moodle.com. Nadav: I've added you as a watcher on this issue as I thought you might be interested in commenting.
          Hide
          Nadav Kavalerchik added a comment -

          Does not seems to position the floating help overlay the the left of the "?" icon.
          Does align the "X" close icon to the left in rtl mode.

          Tested using: master (2.4dev 10-9-2012) branch + patch.

          Show
          Nadav Kavalerchik added a comment - Does not seems to position the floating help overlay the the left of the "?" icon. Does align the "X" close icon to the left in rtl mode. Tested using: master (2.4dev 10-9-2012) branch + patch.
          Hide
          Mary Evans added a comment -

          @Nadav

          It is important that you Purge all caches prior to testing.

          I did as you did and got the same results. After purging Moodle caches it works great!

          Show
          Mary Evans added a comment - @Nadav It is important that you Purge all caches prior to testing. I did as you did and got the same results. After purging Moodle caches it works great!
          Hide
          Mary Evans added a comment -

          @ Simon
          I have just tested this and works great.

          I am happy for this to go forward for Integration Review, but best to wait for Nadav to re-test.

          Many thanks.

          Show
          Mary Evans added a comment - @ Simon I have just tested this and works great. I am happy for this to go forward for Integration Review, but best to wait for Nadav to re-test. Many thanks.
          Hide
          Nadav Kavalerchik added a comment -

          Works great!

          Thank you Mary for the reminder - "Purge all caches" ( I only cleaned the "Theme Cache", the first time, which did not make any difference. I wonder why?)

          btw, I wonder if those changes might be useful for the YUI3 Menu alignment???

          Show
          Nadav Kavalerchik added a comment - Works great! Thank you Mary for the reminder - "Purge all caches" ( I only cleaned the "Theme Cache", the first time, which did not make any difference. I wonder why?) btw, I wonder if those changes might be useful for the YUI3 Menu alignment???
          Hide
          Simon Coggins added a comment -

          It's because the fix was to the javascript not the css.

          Sorry about missing it out of the testing instructions - I have "$CFG->cachejs = false;" in my config.php so I forgot about it.

          In terms of other places with similar issues, searching the code for "WidgetPositionAlign" outside YUI's lib directory would be a good place to start - any reference to TL, TR, BL, BR, LC or RC should probably be reversed in RTL languages. Here's what I found with a quick search:

          calendar/yui/eventmanager/eventmanager.js: points:[Y.WidgetPositionAlign.TL, Y.WidgetPositionAlign.BC]
          lib/form/yui/dateselector/dateselector.js: points:[Y.WidgetPositionAlign.BL, Y.WidgetPositionAlign.TL]
          message/module.js: points:[Y.WidgetPositionAlign.BR, Y.WidgetPositionAlign.BR]
          question/type/multianswer/module.js: points: [Y.WidgetPositionAlign.TC, Y.WidgetPositionAlign.BC]

          Show
          Simon Coggins added a comment - It's because the fix was to the javascript not the css. Sorry about missing it out of the testing instructions - I have "$CFG->cachejs = false;" in my config.php so I forgot about it. In terms of other places with similar issues, searching the code for "WidgetPositionAlign" outside YUI's lib directory would be a good place to start - any reference to TL, TR, BL, BR, LC or RC should probably be reversed in RTL languages. Here's what I found with a quick search: calendar/yui/eventmanager/eventmanager.js: points: [Y.WidgetPositionAlign.TL, Y.WidgetPositionAlign.BC] lib/form/yui/dateselector/dateselector.js: points: [Y.WidgetPositionAlign.BL, Y.WidgetPositionAlign.TL] message/module.js: points: [Y.WidgetPositionAlign.BR, Y.WidgetPositionAlign.BR] question/type/multianswer/module.js: points: [Y.WidgetPositionAlign.TC, Y.WidgetPositionAlign.BC]
          Hide
          Nadav Kavalerchik added a comment -

          BTW, How do i change the behaviour of the Click event of the "?" help icon to a "Mouse Over" event for the field's label that display the help overlay automatically when the user passes the mouse over the label of each field in the Form.

          Show
          Nadav Kavalerchik added a comment - BTW, How do i change the behaviour of the Click event of the "?" help icon to a "Mouse Over" event for the field's label that display the help overlay automatically when the user passes the mouse over the label of each field in the Form.
          Hide
          Nadav Kavalerchik added a comment -

          @Simon
          Thank you for the detailed info.

          @Mary
          Should we open an Issue for all those potential YUI3 RTL alignment issues?

          Show
          Nadav Kavalerchik added a comment - @Simon Thank you for the detailed info. @Mary Should we open an Issue for all those potential YUI3 RTL alignment issues?
          Hide
          Simon Coggins added a comment -

          Hi Nadav,

          Changing this line (~1360) of lib/javascript-static.js:

          properties.node.on('click', this.display, this, properties);

          to:

          properties.node.on('mouseover', this.display, this, properties);

          it should do what you want.

          Show
          Simon Coggins added a comment - Hi Nadav, Changing this line (~1360) of lib/javascript-static.js: properties.node.on('click', this.display, this, properties); to: properties.node.on('mouseover', this.display, this, properties); it should do what you want.
          Hide
          Nadav Kavalerchik added a comment -

          @Simon
          Beautiful! Thanks

          Show
          Nadav Kavalerchik added a comment - @Simon Beautiful! Thanks
          Hide
          Mary Evans added a comment -

          I hope this has been rebased?

          Show
          Mary Evans added a comment - I hope this has been rebased?
          Hide
          Andrew Nicols added a comment -

          I'm just wondering why you're now passing the langconfig direction here and then testing for RTL with a get_string call.

          It would probably be better to use

          if (Y.one('html').get('dir') == 'rtl') {
          }
          

          or

          if (Y.one('body').hasClass('dir-rtl')) {
          }
          
          Show
          Andrew Nicols added a comment - I'm just wondering why you're now passing the langconfig direction here and then testing for RTL with a get_string call. It would probably be better to use if (Y.one('html').get('dir') == 'rtl') { } or if (Y.one('body').hasClass('dir-rtl')) { }
          Hide
          Simon Coggins added a comment -

          You're right, that would be a better way to do it. I'll reopen the issue, update, rebase then resubmit.

          Thanks!

          Show
          Simon Coggins added a comment - You're right, that would be a better way to do it. I'll reopen the issue, update, rebase then resubmit. Thanks!
          Hide
          Simon Coggins added a comment -

          Okay, I've updated this to use the html dir attribute instead, which avoids the need to pass lang strings to the module.

          Show
          Simon Coggins added a comment - Okay, I've updated this to use the html dir attribute instead, which avoids the need to pass lang strings to the module.
          Hide
          Dan Poltawski added a comment -

          Sending all 'waiting for peer review' issues to integration before freeze, as agreed in Integrators Meeting 19/10/12. We are doing this to ensure any 'integratable issues' will not got missed before freeze..

          Show
          Dan Poltawski added a comment - Sending all 'waiting for peer review' issues to integration before freeze, as agreed in Integrators Meeting 19/10/12. We are doing this to ensure any 'integratable issues' will not got missed before freeze..
          Hide
          Dan Poltawski added a comment -

          Thanks Simon, i've integrated this now (22, 23 and master)

          Show
          Dan Poltawski added a comment - Thanks Simon, i've integrated this now (22, 23 and master)
          Hide
          Ankit Agarwal added a comment - - edited

          There is no close icon (but a close button) any more. Refer MDL-28235
          Please suggest If I should go ahead with testing disregarding the close icon.
          Thanks

          Show
          Ankit Agarwal added a comment - - edited There is no close icon (but a close button) any more. Refer MDL-28235 Please suggest If I should go ahead with testing disregarding the close icon. Thanks
          Hide
          Mary Evans added a comment -

          Go ahead and disregard the mention of close icon.

          Show
          Mary Evans added a comment - Go ahead and disregard the mention of close icon.
          Hide
          Ankit Agarwal added a comment -

          Works as expected.
          Passing
          Thanks

          Show
          Ankit Agarwal added a comment - Works as expected. Passing Thanks
          Hide
          Dan Poltawski added a comment -

          Hurray!

          You did it, congratulations! You have on Mojito credit to redeem after the release of Moodle 2.4

          Show
          Dan Poltawski added a comment - Hurray! You did it, congratulations! You have on Mojito credit to redeem after the release of Moodle 2.4

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: