From b78aa571ee040780a109738c771889f344ea8bf3 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Fri, 10 Jul 2015 12:33:12 -0800 Subject: [PATCH] Remove ember-table and measurements --- app/pods/protected/measurements/controller.js | 50 ------------------- app/pods/protected/measurements/route.js | 6 +-- app/pods/protected/measurements/template.hbs | 20 +------- package.json | 3 +- 4 files changed, 3 insertions(+), 76 deletions(-) delete mode 100644 app/pods/protected/measurements/controller.js diff --git a/app/pods/protected/measurements/controller.js b/app/pods/protected/measurements/controller.js deleted file mode 100644 index f71a66f..0000000 --- a/app/pods/protected/measurements/controller.js +++ /dev/null @@ -1,50 +0,0 @@ -import Ember from 'ember'; -import ColumnDefinition from 'ember-table/models/column-definition'; - -export default Ember.Controller.extend({ - measurements: [], - - measurementsEmpty: function() { - return this.get('measurements').length === 0; - }.property('measurements'), - - tableColumns: Ember.computed(function() { - let strainCol = ColumnDefinition.create({ - savedWidth: 200, - textAlign: 'text-align-left', - headerCellName: 'Strain', - contentPath: 'strain.fullNameMU', - }); - - let charCol = ColumnDefinition.create({ - savedWidth: 200, - textAlign: 'text-align-left', - headerCellName: 'Characteristic', - contentPath: 'characteristic.characteristicName', - }); - - let valCol = ColumnDefinition.create({ - savedWidth: 150, - textAlign: 'text-align-left', - headerCellName: 'Value', - contentPath: 'value', - }); - - return [strainCol, charCol, valCol]; - }), - - tableContent: Ember.computed('measurements', function() { - return this.get('measurements'); - }), - - actions: { - search: function(selectedStrains, selectedCharacteristics) { - this.store.find('measurement', { - strain: selectedStrains, - characteristic: selectedCharacteristics, - }).then((measurements)=>{ - this.set('measurements', measurements); - }); - } - }, -}); diff --git a/app/pods/protected/measurements/route.js b/app/pods/protected/measurements/route.js index 4219aea..b3f843f 100644 --- a/app/pods/protected/measurements/route.js +++ b/app/pods/protected/measurements/route.js @@ -1,8 +1,4 @@ import Ember from 'ember'; import AuthenticatedRouteMixin from 'simple-auth/mixins/authenticated-route-mixin'; -export default Ember.Route.extend(AuthenticatedRouteMixin, { - model: function() { - return this.store.findAll('measurement'); - }, -}); +export default Ember.Route.extend(AuthenticatedRouteMixin, {}); diff --git a/app/pods/protected/measurements/template.hbs b/app/pods/protected/measurements/template.hbs index 6ddf84e..bc4b4ec 100644 --- a/app/pods/protected/measurements/template.hbs +++ b/app/pods/protected/measurements/template.hbs @@ -1,21 +1,3 @@

{{genus-name}} Measurements

-{{measurement-search-panel search='search' strainLabel='All strains' charLabel='All characteristics'}} - -
-
-

Total matching measurements: {{measurements.length}}

-
-
- -{{#if measurementsEmpty}} - No results -{{else}} - {{ - ember-table - columns=tableColumns - content=tableContent - columnMode='fluid' - hasFooter=false - }} -{{/if}} +Be back soon diff --git a/package.json b/package.json index 65f1ffe..595092f 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,6 @@ "ember-data": "1.13.5", "ember-disable-proxy-controllers": "^1.0.0", "ember-export-application-global": "^1.0.2", - "ember-select-2": "1.3.0", - "ember-table": "0.5.0" + "ember-select-2": "1.3.0" } }