Problem/Motivation

Most of what we used Libraries API for can be done with hook_library(), so it would be better to rely on core instead of depending on another contrib module unnecessarily.

Proposed resolution

Simplify code by registering libraries with hook_library() and '#attached' => 'library' in a render array. We can still check for the Libraries API for people who want multisite libraries support, but we don't need to depend on it.

User interface changes

None.

API changes

  • Updated the README, but this should not affect anything since we will continue to use highcharts_render() as before.
  • Updated the project page information.

Comments

scottrigby’s picture

Assigned: Unassigned » scottrigby
Status: Active » Fixed

This was done in the following commits:

  • 6c537c
    Use hook_library(). Convert chart container to a render array, making use of libraries and attachments, and pass through drupal_render(). Drop highcharts_settings() and highcharts_load_js() (since we can do all this with #attached js), and theme_highcharts_chart() (since modules can now alter the render array). Remove $ajax param from highcharts_render() (since drupal_process_attached() will handle ensuring libraries are only loaded once). Other related module and documentation cleanup. Clean up example in README.
  • 9e531
    Remove dependency on Libraries API. Use core library functionality
  • d873f
    Update readme intro

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.