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

Filepicker icon/details/list buttons not working

    Details

    • Testing Instructions:
      Hide
      1. Create 1 course (topics format, all other settings default)
      2. Add a couple of images to the course (via drag and drop, of course!)
      3. Click on the news forum
      4. Click on 'Add a new topic'
      5. Click the image icon in the HTML editor + 'Find or upload an image...'
      6. Click on 'Server files' (but reproducible with all other repositories)
      7. Click on the 'Icons / Details / Tree' buttons
        • Ensure the view changes as each button is selected, and that the relevant button is displayed as 'selected'

      As noted by Mariana below, this should be tested before the patch is applied to ensure that your current system configuration was exhibiting the problem.

      Show
      Create 1 course (topics format, all other settings default) Add a couple of images to the course (via drag and drop, of course!) Click on the news forum Click on 'Add a new topic' Click the image icon in the HTML editor + 'Find or upload an image...' Click on 'Server files' (but reproducible with all other repositories) Click on the 'Icons / Details / Tree' buttons Ensure the view changes as each button is selected, and that the relevant button is displayed as 'selected' As noted by Mariana below, this should be tested before the patch is applied to ensure that your current system configuration was exhibiting the problem.
    • Affected Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE
    • Pull Master Branch:
      MDL-37831_filepicker_buttons

      Description

      In Moodle 2.3, I can select the 'server files' repository type, then click on the 'icon / details / list' buttons on the top-right and the view changes.

      With Moodle 2.4 / master branch these buttons are not doing anything.

      I've traced through the code and the following is called by the render function (in filepicker.js):
      this.fpnode.all('.fp-vb-icons,.fp-vb-tree,.fp-vb-details').
      on('click', this.viewbar_clicked, this);
      But the function viewbar_clicked() is never reached when I click on the buttons (according to the breakpoint I added in Chrome) - the default link action ('#') instead happens and the page scrolls up to the top.

      I've tried this with Chrome (Debian), Chrome (Windows 7), Iceweasel (Debian) and with a clean install of Moodle 2.5dev.

      To see if it helped, I tried adding the "this.fpnode.all ... 'click' ..." code (above) to the end of the viewbar_set_enabled function, but that didn't improve things.

        Gliffy Diagrams

          Attachments

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  11/Mar/13