Sha256: 0eeb85c23847ba7ae58443e519ba9d962c50510b5cb2e0eb163a94287db2ad05
Contents?: true
Size: 746 Bytes
Versions: 4
Compression:
Stored size: 746 Bytes
Contents
/* global show_flash */ document.addEventListener("spree:load", function() { $('[data-hook=general_settings_clear_cache] #clear_cache').click(function () { if (confirm(Spree.translations.are_you_sure)) { $.ajax({ type: 'POST', url: Spree.routes.clear_cache, data: { authenticity_token: AUTH_TOKEN }, dataType: 'json' }).done(function () { show_flash('success', 'Cache was flushed.') }) .fail(function (message) { if (message.responseJSON['error']) { show_flash('error', message.responseJSON['error']) } else { show_flash('error', 'There was a problem while flushing cache.') } }) } }) })
Version data entries
4 entries across 4 versions & 1 rubygems