Sha256: 1eb1c802002c9b2e5ecec4ce770e5d7037709eca22d2e5343e1bc8b45ddea066

Contents?: true

Size: 979 Bytes

Versions: 4

Compression:

Stored size: 979 Bytes

Contents

$(function () {
  $(document).on("click", ".js-toggle-trigger", function () {
    var $container = $(this).closest(".js-toggle-container");
    return $container.toggleClass("toggle-on");
  });

  $("#enable_feature__button").on("click", function (e) {
    const featureName = $("#feature_name").val();
    const promptMessage = prompt(
      `Are you sure you want to fully enable this feature for everyone? Please enter the name of the feature to confirm it: ${featureName}`
    );

    if (promptMessage !== featureName) {
      e.preventDefault();
    }
  });
  
  $("#delete_feature__button").on("click", function (e) {
    const featureName = $("#feature_name").val();
    const promptMessage = prompt(
      `Are you sure you want to remove this feature from the list of features and disable it for everyone? Please enter the name of the feature to confirm it: ${featureName}`
    );
    
    if (promptMessage !== featureName) {
      e.preventDefault();
    }
  });
});

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
flipper-ui-0.26.0.rc2 lib/flipper/ui/public/js/application.js
flipper-ui-0.26.0.rc1 lib/flipper/ui/public/js/application.js
flipper-ui-0.25.4 lib/flipper/ui/public/js/application.js
flipper-ui-0.25.3 lib/flipper/ui/public/js/application.js