Pods, pods, everywhere
This commit is contained in:
parent
33f783bc42
commit
e623d52f34
66 changed files with 53 additions and 113 deletions
|
@ -1,5 +0,0 @@
|
|||
import SortableController from '../sortable';
|
||||
|
||||
export default SortableController.extend({
|
||||
sortBy: 'characteristicName',
|
||||
});
|
|
@ -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);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
|
@ -1,5 +0,0 @@
|
|||
import SortableController from '../sortable';
|
||||
|
||||
export default SortableController.extend({
|
||||
sortBy: 'characteristic',
|
||||
});
|
|
@ -1,5 +0,0 @@
|
|||
import SortableController from '../sortable';
|
||||
|
||||
export default SortableController.extend({
|
||||
sortBy: 'speciesName',
|
||||
});
|
|
@ -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');
|
||||
}
|
||||
}
|
||||
});
|
|
@ -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');
|
||||
}
|
||||
}
|
||||
});
|
|
@ -1,5 +0,0 @@
|
|||
import SortableController from '../sortable';
|
||||
|
||||
export default SortableController.extend({
|
||||
sortBy: 'fullName',
|
||||
});
|
|
@ -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');
|
||||
}
|
||||
}
|
||||
});
|
|
@ -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');
|
||||
}
|
||||
}
|
||||
});
|
Reference in a new issue