Sha256: 47c7e1741feecceaf3382af45cecabcbac5b37d54e369ea71e7416b346cd774f
Contents?: true
Size: 1.48 KB
Versions: 36
Compression:
Stored size: 1.48 KB
Contents
I"ß(function() { var 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; App.Views.Admin.Users.List = (function(superClass) { extend(List, superClass); function List(opts) { if (opts == null) { opts = {}; } List.__super__.constructor.call(this, opts); this.users = opts.users; } List.prototype.render = function() { return $("table tbody").empty(); }; List.prototype.renderUsers = function(users, order) { var i, len, user; if (order == null) { order = 'append'; } for (i = 0, len = users.length; i < len; i++) { user = users[i]; if (order === 'append') { $("table").append(JST["templates/admin/users/user"]({ user: user })); } else { $("table").prepend(JST["templates/admin/users/user"]({ user: user })); } } return $('table a.ping').click(function(e) { var userId; e.preventDefault(); userId = $(e.target).parents('tr').data('id'); return App.Env.loco.emit({ signal: 'ping', user_id: userId }); }); }; return List; })(App.Views.Base); }).call(this); :ET
Version data entries
36 entries across 23 versions & 1 rubygems