Merge branch 'master' into clostridium

* master:
  Inline images in CSP
  Strains form formatting
  Clean up delete button and tests
  Lint
This commit is contained in:
Matthew Dillon 2015-11-16 10:55:10 -07:00
commit 09650e0f1b
10 changed files with 94 additions and 18 deletions

View file

@ -19,11 +19,13 @@ export function testConfig() {
this.post('/species');
this.get('/species/:id');
this.put('/species/:id');
this.delete('/species/:id');
this.get('/characteristics');
this.post('/characteristics');
this.get('/characteristics/:id');
this.put('/characteristics/:id');
this.delete('/characteristics/:id');
this.get('/strains', function(db /*, request*/) {
return {
@ -39,4 +41,5 @@ export function testConfig() {
};
});
this.put('/strains/:id');
this.delete('/strains/:id');
}

View file

@ -1,6 +1,5 @@
import DS from 'ember-data';
import config from '../config/environment';
import Ember from 'ember';
const { Model, attr, hasMany } = DS;

View file

@ -1,16 +1,23 @@
import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'button',
classNames: ["button-red", "smaller", "delete"],
const { Component } = Ember;
export default Component.extend({
tagName: 'span',
showConfirmDelete: false,
click: function() {
if (!this.get('showConfirmDelete')) {
actions: {
initialClick: function() {
this.set('showConfirmDelete', true);
} else {
},
cancelDelete: function() {
this.set('showConfirmDelete', false);
},
confirmDelete: function() {
this.attrs.delete();
}
},
},
});

View file

@ -1,5 +1,12 @@
{{#if showConfirmDelete}}
Are you sure?
{{#unless showConfirmDelete}}
<button class="button-red smaller delete" {{action "initialClick"}}>
Delete
</button>
{{else}}
Delete
{{/if}}
<button class="button-red smaller delete-confirm" {{action "confirmDelete"}}>
Confirm Delete
</button>
<button class="button-gray smaller delete-cancel" {{action "cancelDelete"}}>
Cancel Delete
</button>
{{/unless}}

View file

@ -30,7 +30,7 @@
{{text-editor value=isolatedFrom update=(action "isolatedFromDidChange")}}
</div>
</div>
<div data-row-span="3">
<div data-row-span="2">
<div data-field-span="1">
<label>Accession Numbers</label>
{{one-way-input type="text" class="accession-numbers" value=accessionNumbers update=(action "accessionNumbersNameDidChange")}}
@ -39,6 +39,8 @@
<label>GenBank</label>
{{one-way-input type="text" class="genbank" value=genbank update=(action "genbankDidChange")}}
</div>
</div>
<div data-row-span="1">
<div data-field-span="1">
<label>Whole Genome Sequence</label>
{{one-way-input type="text" class="whole-genome-sequenc" value=wholeGenomeSequence update=(action "wholeGenomeSequenceDidChange")}}