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

Allow add-ons to include YUI gallery modules

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • None
    • 2.7
    • JavaScript, Libraries
    • MOODLE_27_STABLE
    • MDL-43525-master
    • Hide

      Note: Please test with yuicomboloading both enabled, and disabled.

      • git clone https://github.com/yui/yui3-gallery.git
      • copy a gallery module or two in to your intended victim (I used mod/assign)
        • cp ~/git/yui/yui3-gallery/build/gallery-sm-menu-* mod/assign/yui/gallery/build/
      • purge caches
      • open any page in Moodle and open the developer tools
      • open the Network tab, and clear anything that's there
      • switch to the console (or press escape in Chrome)
      • run:

        YUI().use('gallery-sm-menu');
        

      • Confirm that:
        • The JS for the module was loaded from the correct source
        • The file content for each loaded file was present
        • Any relevant CSS was loaded too
      • Now load gallery-sm-treeview to confirm we didn't break anything:

        YUI().use('gallery-sm-treeview');
        

      • Confirm that:
        • The JS for the module was loaded from the correct source
        • The file content for each loaded file was present
        • Any relevant CSS was loaded too
      • Add some meta-data to the modules you included:

        for d in mod/assign/yui/gallery/build/gallery-sm-menu-*; do cp ~/git/yui/yui3-gallery/src/gallery-sm-menu/meta/sm-menu.json "$d"/meta.json
        

      • Purge Moodle caches
      • Reload the sm-menu gallery module

        YUI().use('gallery-sm-menu');
        

      • Confirm that:
        • The module was loaded again, but this time with fewer requests (only if yuicombloading = true)
        • Any relevant CSS was loaded too
      Show
      Note: Please test with yuicomboloading both enabled, and disabled. git clone https://github.com/yui/yui3-gallery.git copy a gallery module or two in to your intended victim (I used mod/assign) cp ~/git/yui/yui3-gallery/build/gallery-sm-menu-* mod/assign/yui/gallery/build/ purge caches open any page in Moodle and open the developer tools open the Network tab, and clear anything that's there switch to the console (or press escape in Chrome) run: YUI().use('gallery-sm-menu'); Confirm that : The JS for the module was loaded from the correct source The file content for each loaded file was present Any relevant CSS was loaded too Now load gallery-sm-treeview to confirm we didn't break anything: YUI().use('gallery-sm-treeview'); Confirm that : The JS for the module was loaded from the correct source The file content for each loaded file was present Any relevant CSS was loaded too Add some meta-data to the modules you included: for d in mod/assign/yui/gallery/build/gallery-sm-menu-*; do cp ~/git/yui/yui3-gallery/src/gallery-sm-menu/meta/sm-menu.json "$d"/meta.json Purge Moodle caches Reload the sm-menu gallery module YUI().use('gallery-sm-menu'); Confirm that: The module was loaded again, but this time with fewer requests (only if yuicombloading = true) Any relevant CSS was loaded too
    • 20
    • FRONTEND Sprint 7

      As a follow-on from MDL-36334, it would be useful if add-ons could specify their own gallery modules to include.

            dobedobedoh Andrew Lyons
            dobedobedoh Andrew Lyons
            Petr Skoda Petr Skoda
            Damyon Wiese Damyon Wiese
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.