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

Add support for catching XWiki's custom Prototype.js events in jQuery

    XMLWordPrintable

Details

    • New Feature
    • Resolution: Fixed
    • Major
    • 6.4
    • 6.4-rc-1
    • None
    • Easy

    Description

      We have JavaScript widgets that have been written using Prototype.js and which send custom events. For instance the suggest input fires an event 'xwiki:suggest:selected'. Replacing all these widgets with something based on jQuery (or a full fledged framework like Angular) is a lengthy process and until it's done we should be able to catch these events from jQuery code.

      require(['jquery', 'xwiki-events-bridge'], function($) {
        $('.suggest-input').on('xwiki:suggest:selected', function(event, data) {
          console.log('Selected: ' + data.info);
        });
      });
      

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: