Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-32297

date_time_selector popup is too constrained

    Details

    • Testing Instructions:
      Hide

      Test pre-requisites

      • This test has to be done on different themes (the more the better)

      Test steps

      1. Go to Navigation > Site pages > Calendar and click on 'New event'
      2. Click to edit the date
      3. Make sure the date selector does not overlap with the dropdown menu
      4. Using Firebug, edit the HTML and remove the fields 'Type of event', 'Name' and 'Description'.
      5. Click to edit the date
      6. Make sure the date selector does not overlap with the dropdown menu

      (This fix won't work when the inputs are closer to <body> but MDL-26649 will take care of it)

      Show
      Test pre-requisites This test has to be done on different themes (the more the better) Test steps Go to Navigation > Site pages > Calendar and click on 'New event' Click to edit the date Make sure the date selector does not overlap with the dropdown menu Using Firebug, edit the HTML and remove the fields 'Type of event', 'Name' and 'Description'. Click to edit the date Make sure the date selector does not overlap with the dropdown menu (This fix won't work when the inputs are closer to <body> but MDL-26649 will take care of it)
    • Workaround:
      Hide

      Change constraint from form to body:

      lib/form/yui/dateselector/dateselector.js

      fix_position : function() {
        if (this.currentowner) {
          // this.panel.set('constrain', this.currentowner.get('node').ancestor('form'));
          this.panel.set('constrain', this.currentowner.get('node').ancestor('body'));
          this.panel.set('align', {
            node:this.currentowner.get('node').one('select'),
            points:[Y.WidgetPositionAlign.BL, Y.WidgetPositionAlign.TL]
          });
        }
      },

      Show
      Change constraint from form to body: lib/form/yui/dateselector/dateselector.js fix_position : function() { if (this.currentowner) { // this.panel.set('constrain', this.currentowner.get('node').ancestor('form')); this.panel.set('constrain', this.currentowner.get('node').ancestor('body')); this.panel.set('align', { node:this.currentowner.get('node').one('select'), points:[Y.WidgetPositionAlign.BL, Y.WidgetPositionAlign.TL] }); } },
    • Affected Branches:
      MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-32297-master

      Description

      The date_time_selector has a javascript calendar popup, this works ok, unless the date_time_selector is one of the top elements of the form.
      The popup is constrained by the form area, but this is too restricted for some cases.

      I've added a picture of the form constrain, and one where it has been replaced by the body element (simple fix).

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    10/Sep/12