mirror of
https://github.com/fergalmoran/dss.git
synced 2025-12-27 12:07:54 +00:00
Refactored user edit view
This commit is contained in:
@@ -1,17 +1,16 @@
|
||||
// Generated by CoffeeScript 1.6.2
|
||||
// Generated by CoffeeScript 1.3.3
|
||||
(function() {
|
||||
var __hasProp = {}.hasOwnProperty,
|
||||
__extends = 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; };
|
||||
|
||||
define(['app', 'marionette', 'models/mix/item', 'views/mix/list', 'views/mix/detail', 'views/mix/edit'], function(App, Marionette, MixItem, MixListView, MixDetailView, MixEditView) {
|
||||
var DssController, _ref;
|
||||
|
||||
define(['app', 'marionette', 'models/mix/item', 'views/mix/list', 'views/mix/detail', 'views/mix/edit', 'models/user/item', 'views/user/userEditView'], function(App, Marionette, MixItem, MixListView, MixDetailView, MixEditView, UserItem, UserEditView) {
|
||||
var DssController;
|
||||
DssController = (function(_super) {
|
||||
|
||||
__extends(DssController, _super);
|
||||
|
||||
function DssController() {
|
||||
_ref = DssController.__super__.constructor.apply(this, arguments);
|
||||
return _ref;
|
||||
return DssController.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
DssController.prototype.home = function() {
|
||||
@@ -22,7 +21,6 @@
|
||||
|
||||
DssController.prototype.showMixList = function(type, options) {
|
||||
var app;
|
||||
|
||||
console.log("Controller: showMixList");
|
||||
type = type || "latest";
|
||||
app = require('app');
|
||||
@@ -34,7 +32,6 @@
|
||||
|
||||
DssController.prototype.showMix = function(slug) {
|
||||
var app, mix;
|
||||
|
||||
console.log("Controller: showMix");
|
||||
app = require('app');
|
||||
mix = new MixItem({
|
||||
@@ -53,7 +50,6 @@
|
||||
|
||||
DssController.prototype.editMix = function(slug) {
|
||||
var app, mix;
|
||||
|
||||
console.log("Controller: mixEdit");
|
||||
app = require('app');
|
||||
mix = new MixItem({
|
||||
@@ -75,6 +71,23 @@
|
||||
});
|
||||
};
|
||||
|
||||
DssController.prototype.editUser = function() {
|
||||
var app, user;
|
||||
console.log("Controller: editUser");
|
||||
app = require('app');
|
||||
user = new UserItem({
|
||||
id: com.podnoms.settings.currentUser
|
||||
});
|
||||
user.fetch({
|
||||
success: function() {
|
||||
return app.contentRegion.show(new UserEditView({
|
||||
model: user
|
||||
}));
|
||||
}
|
||||
});
|
||||
return true;
|
||||
};
|
||||
|
||||
return DssController;
|
||||
|
||||
})(Marionette.Controller);
|
||||
|
||||
Reference in New Issue
Block a user