cleaned references to app-attached views

pull/612/head
Justin Richer 2014-06-04 13:19:04 -04:00
parent 580f6d990e
commit 00b35ddd9d
1 changed files with 7 additions and 7 deletions

View File

@ -499,7 +499,7 @@ var AppRouter = Backbone.Router.extend({
view.load(function() {
$('#content').html(view.render().el);
app.clientListView.delegateEvents();
view.delegateEvents();
setPageTitle("Manage Clients");
});
@ -521,8 +521,8 @@ var AppRouter = Backbone.Router.extend({
var client = new ClientModel();
this.clientFormView = new ClientFormView({model:client, systemScopeList: this.systemScopeList});
this.clientFormView.load(function() {
var view = new ClientFormView({model:client, systemScopeList: this.systemScopeList});
view.load(function() {
// set up this new client to require a secret and have us autogenerate one
client.set({
tokenEndpointAuthMethod: "client_secret_basic",
@ -540,7 +540,7 @@ var AppRouter = Backbone.Router.extend({
}, { silent: true });
$('#content').html(app.clientFormView.render().el);
$('#content').html(view.render().el);
setPageTitle("New Client");
});
},
@ -594,10 +594,10 @@ var AppRouter = Backbone.Router.extend({
displayClientSecret:false
}, { silent: true });
app.clientFormView = new ClientFormView({model:client, systemScopeList: app.systemScopeList});
app.clientFormView.load(function() {
var view = new ClientFormView({model:client, systemScopeList: app.systemScopeList});
view.load(function() {
console.log("yup!");
$('#content').html(app.clientFormView.render().el);
$('#content').html(view.render().el);
setPageTitle("Edit Client");
});