Pods, pods, everywhere

This commit is contained in:
Matthew Dillon 2015-06-04 12:18:59 -08:00
parent 33f783bc42
commit e623d52f34
66 changed files with 53 additions and 113 deletions

View file

@ -1,5 +0,0 @@
import SortableController from '../sortable';
export default SortableController.extend({
sortBy: 'characteristicName',
});

View file

@ -1,21 +0,0 @@
import Ember from 'ember';
import LoginControllerMixin from 'simple-auth/mixins/login-controller-mixin';
export default Ember.Controller.extend(LoginControllerMixin, {
authenticator: 'simple-auth-authenticator:jwt',
loading: false,
actions: {
authenticate: function() {
this.set('errorMessage', null);
var _this = this;
this.set('loading', true);
this._super().then(function() {
_this.set('loading', false);
}, function(error) {
_this.set('loading', false);
var message = error.error;
_this.set('errorMessage', message);
});
}
}
});

View file

@ -1,5 +0,0 @@
import SortableController from '../sortable';
export default SortableController.extend({
sortBy: 'characteristic',
});

View file

@ -1,5 +0,0 @@
import SortableController from '../sortable';
export default SortableController.extend({
sortBy: 'speciesName',
});

View file

@ -1,21 +0,0 @@
import Ember from 'ember';
export default Ember.Controller.extend({
isEditing: true,
actions: {
save: function() {
var species = this.get('model');
if (species.get('isDirty')) {
species.save();
}
this.transitionToRoute('species.index');
},
cancel: function() {
var species = this.get('model');
if (species.get('isNew')) {
species.deleteRecord();
}
this.transitionToRoute('species.index');
}
}
});

View file

@ -1,22 +0,0 @@
import Ember from 'ember';
export default Ember.Controller.extend({
isEditing: false,
actions: {
save: function() {
var species = this.get('model');
if (species.get('isDirty')) {
species.save();
}
this.toggleProperty('isEditing');
},
cancel: function() {
if (this.get('isEditing')) {
var species = this.get('model');
species.get('errors').clear();
species.rollback();
}
this.toggleProperty('isEditing');
}
}
});

View file

@ -1,5 +0,0 @@
import SortableController from '../sortable';
export default SortableController.extend({
sortBy: 'fullName',
});

View file

@ -1,21 +0,0 @@
import Ember from 'ember';
export default Ember.Controller.extend({
isEditing: true,
actions: {
save: function() {
var strain = this.get('strain');
if (strain.get('isDirty')) {
strain.save();
}
this.transitionToRoute('strains.index');
},
cancel: function() {
var strain = this.get('strain');
if (strain.get('isNew')) {
strain.deleteRecord();
}
this.transitionToRoute('strains.index');
}
}
});

View file

@ -1,19 +0,0 @@
import Ember from 'ember';
export default Ember.Controller.extend({
isEditing: false,
actions: {
save: function() {
var strain = this.get('strain');
if (strain.get('isDirty')) {
strain.save();
}
this.toggleProperty('isEditing');
},
cancel: function() {
this.get('strain').get('errors').clear();
this.get('strain').rollback();
this.toggleProperty('isEditing');
}
}
});