PHP 8.1.33
Preview: gdpr-admin.js Size: 3.27 KB
/home/jambtst2015/public_html/cccng.org/wp-content/plugins/gdpr-framework/assets/gdpr-admin.js

jQuery(function($) {
  /**
   * requried issue on Consent show repeater
   */
  $(document).on("click", ".show_form_consent_gdpr", function(e) {
    $(".gdpr-hidden input").prop("disabled", false);
    $(".gdpr-hidden").removeClass("gdpr-hidden");
    $(".show_form_consent_gdpr").hide();
  });
  /**
   * requried issue on Consent hide repeater
   */

  $(document).on("click", ".hide_form_consent_gdpr", function(e) {
    $(".gdpr-show-hide").addClass("gdpr-hidden");
    $(".gdpr-hidden input").prop("disabled", true);
    $(".show_form_consent_gdpr").show();
  });
  /**
   * Fix issue with more then one consent add.
   */
  $(document).ready(function() {
    $(".gdpr-hidden input").prop("disabled", true);
  });
  // Handler to open the modal dialog
  $(document).on("click", ".gdpr-open-modal", function(e) {
    $($(this).data("gdpr-modal-target")).dialog("open");
    e.preventDefault();
  });

  // Initialize all modals on page
  $(".gdpr-modal").each(function(i, e) {
    var $base = $(this);

    $base.dialog({
      title: $base.data("gdpr-title"),
      dialogClass: "wp-dialog",
      autoOpen: false,
      draggable: false,
      width: "auto",
      modal: true,
      resizable: false,
      closeOnEscape: true,
      position: {
        my: "center",
        at: "center",
        of: window
      },
      create: function() {
        // style fix for WordPress admin
        $(".ui-dialog-titlebar-close").addClass("ui-button");
      },
      open: function() {
        // Bind a click on the overlay to close the dialog
        $(".ui-widget-overlay").bind("click", function() {
          $base.dialog("close");
        });

        // Bind a custom close button to close the dialog
        $base.find(".gdpr-close-modal").bind("click", function(e) {
          $base.dialog("close");
          e.preventDefault();
        });

        // Fix overlay CSS issues in admin
        $(".wp-dialog").css("z-index", 9999);
        $(".ui-widget-overlay").css("z-index", 9998);
      },
      close: function() {
        $(".wp-dialog").css("z-index", 101);
        $(".ui-widget-overlay").css("z-index", 100);
      }
    });
  });

  /**
   * https://github.com/DubFriend/jquery.repeater
   */
  $(".js-gdpr-repeater").each(function() {
    var $repeater = $(this).repeater({
      isFirstItemUndeletable: true
    });
    if (window.repeaterData != undefined) {
      // will only work if repeater data is defined.
      if (typeof window.repeaterData[$(this).data("name")] !== undefined) {
        $repeater.setList(window.repeaterData[$(this).data("name")]);
      }
    }
  });

  /**
   * Init select2
   */
  $(".js-gdpr-select2").select2({
    width: "style"
  });

  /**
   * Auto-fill DPA info
   */
  $(".js-gdpr-country-selector").on("change", function() {
    var dpaData, $website, $email, $phone;
    var countryCode = $(this).val();

    if (!window.gdprDpaData[countryCode]) {
      return;
    }

    dpaData = window.gdprDpaData[countryCode];

    $website = $("#gdpr_dpa_website");
    if ("" === $website.data("set")) {
      $website.val(dpaData["website"]);
    }

    $email = $("#gdpr_dpa_email");
    if ("" === $email.data("set")) {
      $email.val(dpaData["email"]);
    }

    $phone = $("#gdpr_dpa_phone");
    if ("" === $phone.data("set")) {
      $phone.val(dpaData["phone"]);
    }
  });
});

Directory Contents

Dirs: 3 × Files: 40

Name Size Perms Modified Actions
css DIR
- drwxr-xr-x 2024-12-13 01:55:14
Edit Download
images DIR
- drwxr-xr-x 2024-12-13 01:55:14
Edit Download
js DIR
- drwxr-xr-x 2024-12-13 01:55:14
Edit Download
47.61 KB lrw-r--r-- 2024-02-28 13:55:36
Edit Download
41.85 KB lrw-r--r-- 2024-02-28 13:55:36
Edit Download
56.29 KB lrw-r--r-- 2024-02-28 13:55:36
Edit Download
46.55 KB lrw-r--r-- 2024-02-28 13:55:36
Edit Download
51.26 KB lrw-r--r-- 2024-02-28 13:55:36
Edit Download
2.77 KB lrw-r--r-- 2024-02-28 13:55:36
Edit Download
46.47 KB lrw-r--r-- 2024-02-28 13:55:36
Edit Download
2.96 KB lrw-r--r-- 2024-02-28 13:55:36
Edit Download
3.19 KB lrw-r--r-- 2024-02-28 13:55:36
Edit Download
3.98 KB lrw-r--r-- 2024-02-28 13:55:36
Edit Download
20.20 KB lrw-r--r-- 2024-02-28 13:55:36
Edit Download
5.28 KB lrw-r--r-- 2024-02-28 13:55:36
Edit Download
7.22 KB lrw-r--r-- 2024-02-28 13:55:36
Edit Download
3.27 KB lrw-r--r-- 2024-02-28 13:55:36
Edit Download
15.98 KB lrw-r--r-- 2024-02-28 13:55:36
Edit Download
6.16 KB lrw-r--r-- 2024-02-28 13:55:36
Edit Download
9.62 KB lrw-r--r-- 2024-02-28 13:55:36
Edit Download
1.32 KB lrw-r--r-- 2024-02-28 13:55:36
Edit Download
4.24 KB lrw-r--r-- 2024-02-28 13:55:36
Edit Download
87.01 KB lrw-r--r-- 2024-02-28 13:55:36
Edit Download
19.38 KB lrw-r--r-- 2024-02-28 13:55:36
Edit Download
124.20 KB lrw-r--r-- 2024-02-28 13:55:36
Edit Download
109.65 KB lrw-r--r-- 2024-02-28 13:55:36
Edit Download
16.81 KB lrw-r--r-- 2024-02-28 13:55:36
Edit Download
12.39 KB lrw-r--r-- 2024-02-28 13:55:36
Edit Download
388 B lrw-r--r-- 2024-02-28 13:55:36
Edit Download
483 B lrw-r--r-- 2024-02-28 13:55:36
Edit Download
21.78 KB lrw-r--r-- 2024-02-28 13:55:36
Edit Download
10.30 KB lrw-r--r-- 2024-02-28 13:55:36
Edit Download
7.72 KB lrw-r--r-- 2024-02-28 13:55:36
Edit Download
19.05 KB lrw-r--r-- 2024-02-28 13:55:36
Edit Download
826 B lrw-r--r-- 2024-02-28 13:55:36
Edit Download
123.72 KB lrw-r--r-- 2024-02-28 13:55:36
Edit Download
109.17 KB lrw-r--r-- 2024-02-28 13:55:36
Edit Download
86.52 KB lrw-r--r-- 2024-02-28 13:55:36
Edit Download
18.89 KB lrw-r--r-- 2024-02-28 13:55:36
Edit Download
16.33 KB lrw-r--r-- 2024-02-28 13:55:36
Edit Download
75.83 KB lrw-r--r-- 2024-02-28 13:55:36
Edit Download
14.89 KB lrw-r--r-- 2024-02-28 13:55:36
Edit Download
65.04 KB lrw-r--r-- 2024-02-28 13:55:36
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).