mirror of
https://github.com/fergalmoran/dss.git
synced 2025-12-25 11:07:35 +00:00
New header functions
This commit is contained in:
@@ -1,64 +1,78 @@
|
||||
// Generated by CoffeeScript 1.6.2
|
||||
// Generated by CoffeeScript 1.4.0
|
||||
(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', 'vent', 'models/mix/mixItem', 'views/mix/mixListLayout', 'views/mix/mixListView', 'views/mix/mixDetailView', 'views/mix/mixEditView', 'views/user/userProfileView', 'models/user/userItem', 'views/user/userListView', 'views/user/userEditView'], function(App, Marionette, vent, MixItem, MixListLayout, MixListView, MixDetailView, MixEditView, UserProfileView, UserItem, UserListView, UserEditView) {
|
||||
var DssController, _ref;
|
||||
|
||||
define(['app', 'marionette', 'vent', 'utils', 'views/mix/mixListLayout', 'views/mix/mixListView', 'views/mix/mixDetailView', 'views/mix/mixEditView', 'views/user/userProfileView', 'views/user/userListView', 'views/user/userEditView', 'models/mix/mixItem', 'models/mix/mixCollection', 'models/user/userItem'], function(App, Marionette, vent, utils, MixListLayout, MixListView, MixDetailView, MixEditView, UserProfileView, UserListView, UserEditView, MixItem, MixCollection, UserItem) {
|
||||
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.initialize = function() {
|
||||
return this.listenTo(vent, "mix:random", this.showRandomMix);
|
||||
};
|
||||
|
||||
DssController.prototype.home = function() {
|
||||
console.log("Controller: home");
|
||||
this.showMixList();
|
||||
return true;
|
||||
return this.showMixList();
|
||||
};
|
||||
|
||||
DssController.prototype.showMixList = function(options) {
|
||||
var app;
|
||||
|
||||
app = require('app');
|
||||
app.contentRegion.show(new MixListLayout(options || {
|
||||
return app.contentRegion.show(new MixListLayout(options || {
|
||||
order_by: 'latest'
|
||||
}));
|
||||
return true;
|
||||
};
|
||||
|
||||
DssController.prototype.showMixListType = function(type) {
|
||||
this.showMixList({
|
||||
return this.showMixList({
|
||||
order_by: type
|
||||
});
|
||||
return true;
|
||||
};
|
||||
|
||||
DssController.prototype.showMix = function(slug) {
|
||||
var app, mix;
|
||||
|
||||
console.log("Controller: showMix");
|
||||
app = require('app');
|
||||
mix = new MixItem({
|
||||
id: slug
|
||||
});
|
||||
mix.fetch({
|
||||
return mix.fetch({
|
||||
success: function() {
|
||||
app.contentRegion.show(new MixDetailView({
|
||||
return app.contentRegion.show(new MixDetailView({
|
||||
model: mix
|
||||
}));
|
||||
return true;
|
||||
}
|
||||
});
|
||||
return true;
|
||||
};
|
||||
|
||||
DssController.prototype.showRandomMix = function() {
|
||||
var app, mix;
|
||||
console.log("Controller: showRandomMix");
|
||||
app = require('app');
|
||||
mix = new MixItem({
|
||||
id: 'random'
|
||||
});
|
||||
mix.fetch({
|
||||
success: function() {
|
||||
return app.contentRegion.show(new MixDetailView({
|
||||
model: mix
|
||||
}));
|
||||
}
|
||||
});
|
||||
return Backbone.history.navigate("/random", {
|
||||
trigger: false
|
||||
});
|
||||
};
|
||||
|
||||
DssController.prototype.uploadMix = function() {
|
||||
var app, mix;
|
||||
|
||||
console.log("Controller: mixUpload");
|
||||
app = require('app');
|
||||
mix = new MixItem({
|
||||
@@ -75,7 +89,6 @@
|
||||
|
||||
DssController.prototype.editMix = function(slug) {
|
||||
var app, mix;
|
||||
|
||||
console.log("Controller: mixEdit");
|
||||
app = require('app');
|
||||
mix = new MixItem({
|
||||
@@ -93,7 +106,6 @@
|
||||
|
||||
DssController.prototype.showChat = function() {
|
||||
var app;
|
||||
|
||||
console.log("Controller: showChat");
|
||||
app = require('app');
|
||||
return app.contentRegion.show(new ChatView());
|
||||
@@ -101,7 +113,6 @@
|
||||
|
||||
DssController.prototype.showUserList = function() {
|
||||
var app;
|
||||
|
||||
console.log("Controller: showUserList");
|
||||
app = require('app');
|
||||
return app.contentRegion.show(new UserListView());
|
||||
@@ -109,7 +120,6 @@
|
||||
|
||||
DssController.prototype.showUserProfile = function(slug) {
|
||||
var app, user;
|
||||
|
||||
console.log("Controller: showUserProfile");
|
||||
app = require('app');
|
||||
user = new UserItem({
|
||||
@@ -153,7 +163,6 @@
|
||||
|
||||
DssController.prototype.showUserFollowing = function(slug) {
|
||||
var app;
|
||||
|
||||
console.log("Controller: showUserFollowing");
|
||||
app = require('app');
|
||||
return app.contentRegion.show(new UserListView({
|
||||
@@ -163,7 +172,6 @@
|
||||
|
||||
DssController.prototype.showUserFollowers = function(slug) {
|
||||
var app;
|
||||
|
||||
console.log("Controller: showUserFollowers");
|
||||
app = require('app');
|
||||
return app.contentRegion.show(new UserListView({
|
||||
@@ -173,7 +181,6 @@
|
||||
|
||||
DssController.prototype.editUser = function() {
|
||||
var app, user;
|
||||
|
||||
console.log("Controller: editUser");
|
||||
app = require('app');
|
||||
user = new UserItem({
|
||||
|
||||
Reference in New Issue
Block a user