Problem/Motivation

My site's theme code uses particular button and drop-down styling that has its own interaction model and javascript for handling drop-downs. I can prevent the addtocal.css from loading to style the buttons to fit my theme, but there currently isn't a way to prevent the addtocal.js file's menu-toggler javascript from interfering with my theme's javascript without also dropping the ics download javascript code.

Proposed resolution

I propose splitting the module's javascript library into two parts, one for the menu-handling and one for the downloading code. This would allow themes to prevent loading of the menu-handling js while allowing the download code to still operate.

User interface changes

None by default, allows customization.

API changes

Will allow a theme to add a block like this to their info.yml to block the module's CSS & JS if the theme is providing its own:

libraries-override:
  addtocal/addtocal:
    js:
      addtocal.js: false
    css:
      theme:
        addtocal.css: false

Data model changes

None

I have a patch worked up that I'll post in a moment.

Issue fork addtocal-3187762

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

adamfranco created an issue. See original summary.

wxactly’s picture

Issue summary: View changes

Thanks adamfranco - I split out addtocal-download into a separate file, this will be in the next release.

wxactly’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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