pebble / clay

Pebble Config Framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cancel/Discard changes button

amenychtas opened this issue · comments

Is possible to use the generic button to cancel/discard changes? What is the recommended approach on this?

yup.

In your custom function:

module.exports = function(minified) {
  var clayConfig = this;

  clayConfig.on(clayConfig.EVENTS.AFTER_BUILD, function() {
    clayConfig.getItemById('cancel-btn').on('click', function() {
      document.location.href = window.returnTo;
    });
  });
};

Great! Many thanks! 👍