Moodle
  1. Moodle
  2. MDL-35294

Add AJAX support to block buttons

    Details

    • Affected Branches:
      MOODLE_23_STABLE
    • Rank:
      43955

      Description

      When reviewing MDL-6424 I detected that the block buttons do not support "ajaxified" actions, like the sections/activities do.

      It would be great to have at least these operations working under JS:

      • show/hide
      • delete

      Ciao

        Issue Links

          Activity

          Hide
          Michael de Raadt added a comment -

          My +1 to that.

          Show
          Michael de Raadt added a comment - My +1 to that.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Also, just guessing if, for consistency... we should make the "move/drag" area of the blocks to be restricted also to the same sort of icon that activities have (instead of being able to move them from the whole block header).

          Note I'm not 100% sure.... just putting the case on the table... ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Also, just guessing if, for consistency... we should make the "move/drag" area of the blocks to be restricted also to the same sort of icon that activities have (instead of being able to move them from the whole block header). Note I'm not 100% sure.... just putting the case on the table... ciao
          Hide
          Andrew Nicols added a comment -

          Eloy: We discussed this at the time as it originally was moved on a move icon rather than the whole block header. We (Ruslan and I) felt at the time that it was easier for users to move the whole header. This also gives a more consistent feel with the movable dialogues (activity chooser, file picker, etc). That said, it wouldn't be difficult at all to change to this behaviour.

          It's quite easy to delete blocks or hide them, but at present showing a block presents some challenges with the JS. We did do a proof of concept for this with the intention of working on it for Moodle 2.4 but time hasn't allowed us so far.

          The issue with AJAXifying the show button specifically is that some blocks include javascript with them in some way - either echoing it directly (naughty) or using a YUI module, or one of the many other ways to load JS in Moodle.

          In summary, we can easily add Delete, and Hide, but Show is a lot trickier at present.

          If someone could make a decision on the Move icon, we can make any changes required there too.

          Show
          Andrew Nicols added a comment - Eloy: We discussed this at the time as it originally was moved on a move icon rather than the whole block header. We (Ruslan and I) felt at the time that it was easier for users to move the whole header. This also gives a more consistent feel with the movable dialogues (activity chooser, file picker, etc). That said, it wouldn't be difficult at all to change to this behaviour. It's quite easy to delete blocks or hide them, but at present showing a block presents some challenges with the JS. We did do a proof of concept for this with the intention of working on it for Moodle 2.4 but time hasn't allowed us so far. The issue with AJAXifying the show button specifically is that some blocks include javascript with them in some way - either echoing it directly (naughty) or using a YUI module, or one of the many other ways to load JS in Moodle. In summary, we can easily add Delete, and Hide, but Show is a lot trickier at present. If someone could make a decision on the Move icon, we can make any changes required there too.

            People

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

              Dates

              • Created:
                Updated: