Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-12038

Add support for triggering XWiki's custom Prototype.js events from jQuery

    Details

    • Tests:
      Integration
    • Difficulty:
      Medium
    • Similar issues:

      Description

      We have JavaScript widgets that have been written using Prototype.js and which listen to custom events. For instance the date picker listens to the xwiki:dom:updated event and re-initializes the date text input elements that have been replaced. Rewriting all these widgets with something based on jQuery (or a full fledged framework) is a lengthy process and until it's done we should be able to trigger these events from jQuery code.

      require(['jquery', 'xwiki-events-bridge'], function($) {
        $(document).trigger('xwiki:dom:updated', {'elements': $('.some-container').toArray()});
      });
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mflorea Marius Dumitru Florea
                Reporter:
                mflorea Marius Dumitru Florea
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: