{:uriI"Ñfile:///Users/byroot/workspace/shopify/shipit-engine/app/assets/javascripts/shipit/deploy.js.coffee?type=application/javascript&pipeline=self&id=f056d8264361c8918ae529257f4784e73d2f20cf887fa44a90cfb05c764da7e8:ET:load_pathI"I/Users/byroot/workspace/shopify/shipit-engine/app/assets/javascripts;T: filenameI"a/Users/byroot/workspace/shopify/shipit-engine/app/assets/javascripts/shipit/deploy.js.coffee;T: nameI"shipit/deploy;T:logical_pathI"shipit/deploy.self.js;T:content_typeI"application/javascript;T: sourceI"·(function() { var AbortButton, bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; AbortButton = (function() { var SELECTOR; SELECTOR = '[data-action="abort"]'; AbortButton.listen = function() { return $(document).on('click', SELECTOR, this.handle); }; AbortButton.handle = function(event) { var button; event.preventDefault(); button = new AbortButton($(event.currentTarget)); return button.trigger(); }; function AbortButton($button) { this.$button = $button; this.reenable = bind(this.reenable, this); this.waitForCompletion = bind(this.waitForCompletion, this); this.url = this.$button.attr('href'); this.shouldRollback = this.$button.data('rollback'); } AbortButton.prototype.trigger = function() { if (this.isDisabled()) { return false; } this.disable(); this.waitForCompletion(); return $.post(this.url).success(this.waitForCompletion).error(this.reenable); }; AbortButton.prototype.waitForCompletion = function() { return setTimeout(this.reenable, 3000); }; AbortButton.prototype.reenable = function() { this.$button.removeClass('pending btn-disabled'); return this.$button.siblings(SELECTOR).removeClass('btn-disabled'); }; AbortButton.prototype.disable = function() { this.$button.addClass('pending btn-disabled'); return this.$button.siblings(SELECTOR).addClass('btn-disabled'); }; AbortButton.prototype.isDisabled = function() { return this.$button.hasClass('btn-disabled'); }; return AbortButton; })(); AbortButton.listen(); }).call(this); ;T: metadata{ :dependencieso:Set: @hash{ I"environment-version;TTI"environment-paths;TTI"jprocessors:type=application/javascript&file_type=application/javascript&engines=.coffee&pipeline=self;TTI"ofile-digest:///Users/byroot/workspace/shopify/shipit-engine/app/assets/javascripts/shipit/deploy.js.coffee;TT: requiredo;;{: stubbedo;;{: linkso;;{: charsetI" utf-8;F: digest"%õÏÔ²5Ê›{?‰—sß-Ϋxí¨F¬ÞB¶üi›: lengthi·:dependencies_digest"%6-äÚðž•_7é@’§?9ôhÏɆ Ôñn¡ƒüMǵì:idI"Ef056d8264361c8918ae529257f4784e73d2f20cf887fa44a90cfb05c764da7e8;F: mtimel+Ùü¬U