diff --git a/app/assets/javascripts/_shim-links-with-button-role.js b/app/assets/javascripts/_shim-links-with-button-role.js new file mode 100644 index 000000000..31d2efe6d --- /dev/null +++ b/app/assets/javascripts/_shim-links-with-button-role.js @@ -0,0 +1,15 @@ +(function(GOVUK, GDM) { + + GDM.shimLinksWithButtonRole = function() { + + if (!GOVUK.shimLinksWithButtonRole) return; + + GOVUK.shimLinksWithButtonRole.init({ + selector: '[class^=link-button]' + }); + + }; + + GOVUK.GDM = GDM; + +}).apply(this, [GOVUK||{}, GOVUK.GDM||{}]); \ No newline at end of file diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 5dd7f98dd..72420fca8 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -12,10 +12,12 @@ //= include ../../../bower_components/digitalmarketplace-frontend-toolkit/toolkit/javascripts/list-entry.js //= include ../../../bower_components/digitalmarketplace-frontend-toolkit/toolkit/javascripts/word-counter.js //= include ../../../node_modules/govuk_frontend_toolkit/javascripts/govuk/selection-buttons.js +//= include ../../../node_modules/govuk_frontend_toolkit/javascripts/govuk/shim-links-with-button-role.js ; // JavaScript in the govuk_frontend_toolkit doesn't have trailing semicolons -//= include _selection-buttons.js //= include _scroll-through-statistics.js +//= include _selection-buttons.js +//= include _shim-links-with-button-role.js //= include _tables-to-charts.js //= include ../../../bower_components/digitalmarketplace-frontend-toolkit/toolkit/javascripts/module-loader.js