Currently there is no JavaScript API to speak of. There should be a basic API to allow developers to extend and integrate with the default JavaScript being executed.

Comments

cpliakas’s picture

Although the old code was a bit much, the 6.x-1.x version of the module did some interesting things with JS that we should revisit and rework into something simpler.

cpliakas’s picture

Priority: Normal » Minor
cpliakas’s picture

One item that might make JS code more reusable and prevent widgets from having to loop through all of the settings to find out which ones it should act on would be to implement a "callbacks" key for $this->jsSettings. The code would look something like this...


// For the "links" widget...
$this->jsSettings['callbacks'] = array(
  'Drupal.facetapi.applyLimit',
);

// For the "checkboxes" widget...
$this->jsSettings['callbacks'] = array(
  'Drupal.facetapi.makeCheckboxes',
  'Drupal.facetapi.applyLimit',
);

See comments starting at http://drupal.org/node/1175718#comment-4564222 for more details.

cpliakas’s picture

Status: Active » Postponed

Marking as postponed. This seems like it would be better suited for the 2.x branch.

cpliakas’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Status: Postponed » Active

Moving to the 2.x branch.

webflo’s picture

Title: Improve the JavaSript API » Improve the JavaScript API