UNPKG

crowdstart-checkout

Version:

One Click Checkout for Crowdstart

65 lines (44 loc) 1.67 kB
// Generated by CoffeeScript 1.10.0 var Events, Header, View, crowdcontrol, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; crowdcontrol = require('crowdcontrol'); Events = crowdcontrol.Events; View = crowdcontrol.view.View; Header = (function(superClass) { var obj; extend(Header, superClass); function Header() { return Header.__super__.constructor.apply(this, arguments); } Header.prototype.tag = 'header'; Header.prototype.html = require('../../templates/header.jade'); Header.prototype.showBack = true; Header.prototype.index = 0; Header.prototype.scriptRefs = null; Header.prototype.events = ( obj = {}, obj["" + Events.Screen.SyncScript] = function(scriptRefs, index) { return this.syncScript(scriptRefs, index); }, obj ); Header.prototype.syncScript = function(scriptRefs1, index1) { this.scriptRefs = scriptRefs1; this.index = index1; if ((this.scriptRefs != null) && (this.scriptRefs[this.index] != null)) { this.showBack = this.scriptRefs[this.index].showBack; } return this.update(); }; Header.prototype.back = function() { return this.obs.trigger("" + Events.Screen.Back); }; Header.prototype.close = function() { return this.obs.trigger("" + Events.Modal.Close); }; return Header; })(View); Header.register(); module.exports = Header; //# sourceMappingURL=header.js.map