/** * @requires $ jQuery * @requires _ UnderscoreJS */ (function (/* Object */ ns) { "use strict"; ns.userLicenseList = function (options) { qs.FormNode.apply(this, arguments); this.init(); }; var proto = ns.userLicenseList.prototype = Object.create(qs.FormNode.prototype); proto.init = function () { this.url = null; this.get('btnRenew').on('click', _.bind(this.renewOnClick, this)); this.get('dialogBtnYes').on('click', _.bind(this.dialogBtnYesOnClick, this)); this.get('dialogBtnNo').on('click', _.bind(this.dialogBtnNoOnClick, this)); }; proto.renewOnClick = function (event) { this.url = event.currentTarget.href; this.get('dialog').modal('show'); return false; }; proto.dialogBtnYesOnClick = function () { this.url += '&edit=y'; document.location = this.url; }; proto.dialogBtnNoOnClick = function () { this.url += '&edit=n'; document.location = this.url; } })(qs.defineNS('app.license'));