diff --git a/tarteaucitron.js b/tarteaucitron.js index 2c3b0c1..7d348d6 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -209,6 +209,7 @@ var tarteaucitron = { "bodyPosition": "bottom", "removeCredit": false, "showAlertSmall": false, + "showDetailsOnClick": true, "showIcon": true, "iconPosition": "BottomRight", "cookieslist": false, @@ -383,9 +384,14 @@ var tarteaucitron = { for (i = 0; i < cat.length; i += 1) { html += '
  • '; html += '
    '; - html += ' '; + if(tarteaucitron.parameters.showDetailsOnClick) + { + html += ' '; + }else{ + html += ' ' + tarteaucitron.lang[cat[i]].title + ''; + } html += '
    '; - html += '
    '; + html += '
    '; html += ' ' + tarteaucitron.lang[cat[i]].details; html += '
    '; html += '
  • '; @@ -752,6 +758,7 @@ var tarteaucitron = { for (i = 0; i < toggleBtns.length; i++) { toggleBtns[i].dataset.index = i; tarteaucitron.addClickEventToElement(toggleBtns[i], function () { + if(!tarteaucitron.parameters.showDetailsOnClick) return false; tarteaucitron.userInterface.toggle('tarteaucitronDetails' + cat[this.dataset.index], 'tarteaucitronInfoBox'); if (document.getElementById('tarteaucitronDetails' + cat[this.dataset.index]).style.display === 'block') { this.setAttribute('aria-expanded', 'true');