{
"info": {
"author": "BlueDynamics Alliance",
"author_email": "dev@bluedynamics.com",
"bugtrack_url": null,
"classifiers": [
"Environment :: Web Environment",
"Operating System :: OS Independent",
"Programming Language :: JavaScript",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content"
],
"description": "Overview\n========\n\n``bdajax`` provides JavaScript helper functions and a simple dispatcher system\ndriven by XML-attributes. Attributes are defined in its own XML namespace,\nplaced in the XHTML markup.\n\nThe dispatcher basically provides two behaviors\n\n- trigger events\n- perform actions\n\nBehaviors are bound to JavaScript events.\n\nThis package bundles required resources for the use of bdajax inside a\n``pyramid`` or ``zope`` application. It does NOT include the\nrequired server implementations. bdajax can be used with other Python or\nnon-Python server backends too as long as action performing code is implemented\nand available through browser URL.\n\n.. contents::\n :depth: 2\n\n\nDispatching\n-----------\n\nThe main paradigm is the use of an ``event/listener`` model. It enables bdajax\nto ``listen`` to ``events`` and trigger ``events`` on ajaxified DOM components.\n\nConsider a navtree as example; the idea is to trigger an event when a\nnavigation item gets clicked. Click semantically indicates a changed context.\nThen listen to this event on all DOM elements to get notified on changing\nserver context.\n\nThis makes it possible to have completely decoupled \"sub-applications\" knowing\nnothing but an event contract from each other.\n\n\nAttributes\n----------\n\nFollowing attributes are available:\n\n**ajax:bind=\"evt1 evt2\"**\n Indicate bdajax behavior on DOM element and the event(s) triggering\n it/them.\n\n**ajax:event=\"evt1:sel1 evt2:sel2\"**\n Trigger event(s) on selector. The triggered event gets the target\n as additional parameter on event.ajaxtarget.\n\n**ajax:action=\"name1:selector1:mode1 name2:selector2:mode2\"**\n Perform AJAX action(s) on selector with mode. Selector points to target\n DOM element, mode defines how to modify the DOM tree. Possible\n mode values are ``inner`` and ``replace``.\n\n**ajax:target=\"http://fubar.org?param=value\"**\n AJAX target definition. Consists out of target context URL and a\n query string used for requests on the target context.\n ``ajax:target`` is mandatory when ``ajax:event`` is defined, and\n optional when ``ajax:action`` is defined (depends on if event is triggered\n by bdajax or browser event).\n\n**ajax:confirm=\"Do you really want to do this?\"**\n Show confirmation dialog before actually executing actions and trigger\n events.\n\n**ajax:overlay=\"actionname:selector:content_selector\"**\n Renders ajax action to overlay with selector. ``selector`` is optional and\n defaults to ``#ajax-overlay``. ``content_selector`` is optional to\n ``selector`` and defaults to ``.overlay_content``.\n\n**ajax:overlay-css=\"additional-overlay-css-class\"**\n Additional CSS class which is added when overlay is opened and removed\n as soon as overlay is closed.\n\n**ajax:form=\"True\"**\n Indicate AJAX form. Valid only on ``form`` elements. Value gets ignored.\n\n**ajax:path=\"/some/path\"**\n Sets the browser URL path and pushes history state if supported by browser.\n If value is ``href``, path gets taken from ``href`` attribute. If value is\n ``target`` path gets taken from event ``ajaxtarget`` or ``ajax:target``\n attribute. Otherwise value is taken as defined.\n\n On ``popstate`` event bdajax executes the definitions written to state\n object. The state object consists of ``target``, ``action`` and ``event``\n attributes. Execution behaves the way described at ``ajax:action`` and\n ``ajax:event``.\n\n Target gets taken from ``ajax:path-target`` if set, otherwise falls back\n to target from event ``ajaxtarget`` or ``ajax:target``. If\n ``ajax:path-target`` set with empty value, target gets taken from ``path``.\n\n Action gets taken from ``ajax:path-action`` if set, otherwise falls back\n to ``ajax:action``. If ``ajax:path-action`` set with empty value, action\n execution on history state change can be suppressed even if ``ajax:action``\n is set.\n\n Event gets taken from ``ajax:path-event`` if set, otherwise falls back\n to ``ajax:event``. If ``ajax:path-event`` set with empty value, event\n triggering on history state change can be suppressed even if ``ajax:event``\n is set.\n\n Overlay gets taken from ``ajax:path-overlay`` if set, otherwise falls back\n to ``ajax:overlay``. If ``ajax:path-overlay`` set with empty value, overlay\n triggering on history state change can be suppressed even if\n ``ajax:overlay`` is set.\n\n Additional CSS class for overlay gets taken from ``ajax:path-overlay-css``\n if set, otherwise falls back to ``ajax:overlay-css``.\n\n If no action and no event and no overlay defined on history state change,\n bdajax performs a redirect to target.\n\n Bdajax appends the request parameter ``popstate=1`` to requests made by\n history browsing. This is useful to determine on server side whether to\n skip setting ajax path as continuation definition.\n\n**ajax:path-target=\"http://fubar.org?param=value\"**\n Can be used in conjunction with ``ajax:path``.\n\n**ajax:path-action=\"name1:selector1:mode1\"**\n Can be used in conjunction with ``ajax:path``.\n\n**ajax:path-event=\"evt1:sel1\"**\n Can be used in conjunction with ``ajax:path``.\n\n**ajax:path-overlay=\"actionname:selector:content_selector\"**\n Can be used in conjunction with ``ajax:path``.\n\n**ajax:path-overlay-css=\"actionname:selector:content_selector\"**\n Can be used in conjunction with ``ajax:path``.\n\n.. note::\n\n No selectors containing spaces are supported!\n\n\nProvide dependencies on server\n------------------------------\n\nThis package already includes resource configuration for ``Zope`` and\n``pyramid``. This is done by ZCML. Include the following ZCML include statement\nto your ZCML configuration:\n\n.. code-block:: xml\n\n