diff --git a/html/admin/js/routers/router.js b/html/admin/js/routers/router.js index f987058fd4..84a7f29aeb 100644 --- a/html/admin/js/routers/router.js +++ b/html/admin/js/routers/router.js @@ -184,21 +184,17 @@ $(document).ready(function() { applicationEdit: function(appkey) { if (this.foxxList === undefined) { + var self = this; this.foxxList = new window.FoxxCollection(); this.foxxList.fetch({ success: function() { - console.log(this.foxxList.findWhere({_key: appkey})); - /*var editAppView = new window.ApplicationEditView(); - window.applicationEditView.options.colId = colid; - window.collectionView.render();*/ + var editAppView = new window.foxxEditView({model: self.foxxList.findWhere({_key: appkey})}); + editAppView.render(); } }); } else { - window.meierei = this.foxxList; - console.log(this.foxxList.findWhere({_key: appkey})); - /*var editAppView = new window.ApplicationEditView{} - window.applicationEditView.options.colId = colid; - window.collectionView.render();*/ + var editAppView = new window.foxxEditView({model: this.foxxList.findWhere({_key: appkey})}); + editAppView.render(); } }, diff --git a/html/admin/js/templates/foxxEditView.ejs b/html/admin/js/templates/foxxEditView.ejs index 8be0f4f2b6..81025a633b 100644 --- a/html/admin/js/templates/foxxEditView.ejs +++ b/html/admin/js/templates/foxxEditView.ejs @@ -1,4 +1,4 @@ -<% var appInfos = attributes.app.split(":"); %> +<%var appInfos = attributes.app.split(":"); %> diff --git a/html/admin/js/views/foxxEditView.js b/html/admin/js/views/foxxEditView.js index 25f484caa6..670d8e7a35 100644 --- a/html/admin/js/views/foxxEditView.js +++ b/html/admin/js/views/foxxEditView.js @@ -6,6 +6,7 @@ window.foxxEditView = Backbone.View.extend({ template: new EJS({url: '/_admin/html/js/templates/foxxEditView.ejs'}), render: function() { + console.log(this.model); $(this.el).html(this.template.render(this.model)); $('#change-foxx').modal('show'); $('.modalTooltips').tooltip({