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

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

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.4-rc-1
    • Fix Version/s: 6.4
    • Labels:
      None
    • Difficulty:
      Easy
    • Similar issues:

      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

              • 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: