/** * @requires $ jQuery * @requires _ UnderscoreJS */ (function (/* Object */ ns) { 'use strict'; /** * @alias app.event.attendee.admin.List * @param {Object} options * @constructor */ ns.List = function (options) { this.construct.apply(this, arguments); }; ns.List.prototype.construct = function (options) { this.eventId = options.eventId; this.statusElements = $(options.statusElementsSelector); this.statusElements.change(_.bind(this.statusOnChange, this)); }; ns.List.prototype.statusOnChange = function (e) { var request = { id: $(e.target).data('id'), action: 'setStatus', status: e.target.value }; console.log('request', request); qs.ajax(qs.constant('BASE_URL') + '/' + qs.constant('CURRENT_PAGE'), request); } })(qs.defineNS('app.event.attendee.admin'));