aboutsummaryrefslogtreecommitdiff
path: root/javascript/app/routes/package/show/file.js
diff options
context:
space:
mode:
Diffstat (limited to 'javascript/app/routes/package/show/file.js')
-rw-r--r--javascript/app/routes/package/show/file.js27
1 files changed, 0 insertions, 27 deletions
diff --git a/javascript/app/routes/package/show/file.js b/javascript/app/routes/package/show/file.js
deleted file mode 100644
index 568d288..0000000
--- a/javascript/app/routes/package/show/file.js
+++ /dev/null
@@ -1,27 +0,0 @@
-import Ember from 'ember';
-
-export default Ember.Route.extend({
- store : Ember.inject.service(),
- model : function (params) {
- const packageInfo = this.modelFor('package');
- if(packageInfo.modules[params.filePath]) {
- return this.get('store').loadHaskellModule(packageInfo.id,params.filePath)
- .catch((e) => {console.log(e);this.transitionTo("/not-found");});
- } else {
- return this.get('store').loadFile(packageInfo.id,params.filePath)
- .then((result) => {
- document.title = packageInfo.id;
- return result;
- })
- .catch((e) => {console.log(e);this.transitionTo("/not-found");});
- }
- },
- afterModel (model) {
- document.title = model.id + " - " + this.modelFor('package').id;
- },
- actions : {
- didTransition : function () {
- this.send("fileOpened",this.currentModel.id);
- }
- }
-});