Merge branch 'master' into clostridium

* master:
  Clean up forms a bit
  Missing import in ajax-request
This commit is contained in:
Matthew Dillon 2015-07-16 21:24:46 -08:00
commit 8c3bf30ace
5 changed files with 28 additions and 26 deletions

View file

@ -1,4 +1,4 @@
<form class="grid-form"> <form class="grid-form" {{action 'save' on='submit'}}>
<fieldset> <fieldset>
<legend><em>{{species.speciesName}}</em></legend> <legend><em>{{species.speciesName}}</em></legend>
<div data-row-span="2"> <div data-row-span="2">
@ -30,13 +30,13 @@
</div> </div>
</div> </div>
</fieldset> </fieldset>
</form> <br>
<br> <a class="button-red smaller" {{action 'cancel'}}>
<a class="button-red smaller" {{action 'cancel'}}> Cancel
Cancel
</a>
{{#if species.hasDirtyAttributes}}
<a class="button-green smaller" {{action 'save'}}>
Save
</a> </a>
{{/if}} {{#if species.hasDirtyAttributes}}
<button type="submit" class="button-green smaller">
Save
</button>
{{/if}}
</form>

View file

@ -1,4 +1,4 @@
<form class="grid-form"> <form class="grid-form" {{action 'save' on='submit'}}>
<fieldset> <fieldset>
<legend><em>{{strain.strainName}}</em></legend> <legend><em>{{strain.strainName}}</em></legend>
<div data-row-span="2"> <div data-row-span="2">
@ -49,13 +49,13 @@
</div> </div>
</div> </div>
</fieldset> </fieldset>
</form> <br>
<br> <a class="button-red smaller" {{action 'cancel'}}>
<a class="button-red smaller" {{action 'cancel'}}> Cancel
Cancel
</a>
{{#if strain.hasDirtyAttributes}}
<a class="button-green smaller" {{action 'save'}}>
Save
</a> </a>
{{/if}} {{#if strain.hasDirtyAttributes}}
<button type="submit" class="button-green smaller">
Save
</button>
{{/if}}
</form>

View file

@ -2,7 +2,7 @@
<div class="span-1"> <div class="span-1">
<fieldset> <fieldset>
<form> <form {{action 'search' on='submit'}}>
<ul> <ul>
<li> <li>
<label>Strains</label> <label>Strains</label>
@ -29,9 +29,9 @@
}} }}
</li> </li>
<li> <li>
<a class="action button-gray smaller right" {{action 'search'}}> <button type="submit" class="action button-gray smaller right">
Search Search
</a> </button>
</li> </li>
</ul> </ul>
</form> </form>

View file

@ -1,7 +1,7 @@
<div class="span-1"> <div class="span-1">
<fieldset> <fieldset>
<legend>New User Signup</legend> <legend>New User Signup</legend>
<form> <form {{action 'save' on='submit'}}>
<ul> <ul>
<li> <li>
<label>Name</label> <label>Name</label>
@ -20,9 +20,9 @@
{{input type="password" value=passwordConfirm}} {{input type="password" value=passwordConfirm}}
</li> </li>
<li> <li>
<a class="button-green smaller" {{action 'save'}}> <button type="submit" class="button-green smaller">
Submit Submit
</a> </button>
</li> </li>
</ul> </ul>
</form> </form>

View file

@ -1,3 +1,5 @@
import Ember from 'ember';
export default function ajaxRequest(url, options) { export default function ajaxRequest(url, options) {
return new Ember.RSVP.Promise(function(resolve, reject) { return new Ember.RSVP.Promise(function(resolve, reject) {
options = options || {}; options = options || {};