(function(ns) { "use strict"; ns.Popup = function (options) { this.cookieName = options.cookieName; qs.FormNode.apply(this, arguments); this.init(); setTimeout(this.node.modal.bind(this.node), options.delay * 1000); }; var proto = ns.Popup.prototype = Object.create(qs.FormNode.prototype); proto.init = function () { this.get('btnRegister').add(this.get('btnClose')).on('click', this.buttonOnClick.bind(this)); }; proto.buttonOnClick = function () { Cookies.set(this.cookieName, '1', { expires: 30*12*5}); this.node.modal('hide'); } })(qs.defineNS('app.EventPopup'));