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(":"); %>