Sha256: 38177637ddd3da40e43dbdbf71d0febfddefc8a2881e56f1b98eec91f0b8a436

Contents?: true

Size: 824 Bytes

Versions: 6

Compression:

Stored size: 824 Bytes

Contents

((exports) => {
  const $ = exports.$; // eslint-disable-line

  $(() => {
    const $moderationDetails = $(".moderation-details");
    const $toggleContentButton = $moderationDetails.find(".toggle-content");
    const $reportedContent = $moderationDetails.find(".reported-content");
    const $currentContent = $reportedContent.find(".current");
    const $originalContent = $reportedContent.find(".original");

    $originalContent.hide();

    $toggleContentButton.on("click", () => {
      $currentContent.toggle();
      $originalContent.toggle();

      if ($currentContent.is(":hidden")) {
        $toggleContentButton.html($toggleContentButton.data("see-current-button-label"));
      } else {
        $toggleContentButton.html($toggleContentButton.data("see-original-button-label"));
      }
    })
  })
})(window)

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
decidim-admin-0.24.3 app/assets/javascripts/decidim/admin/moderations.js.es6
decidim-admin-0.24.2 app/assets/javascripts/decidim/admin/moderations.js.es6
decidim-admin-0.24.1 app/assets/javascripts/decidim/admin/moderations.js.es6
decidim-admin-0.24.0 app/assets/javascripts/decidim/admin/moderations.js.es6
decidim-admin-0.24.0.rc2 app/assets/javascripts/decidim/admin/moderations.js.es6
decidim-admin-0.24.0.rc1 app/assets/javascripts/decidim/admin/moderations.js.es6