Skip to content

Commit

Permalink
switched to native ember component to fix status bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mgenev committed Mar 23, 2015
1 parent a91fb1f commit 09fc17c
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 13 deletions.
4 changes: 2 additions & 2 deletions client/app/pods/components/status-activity/template.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{yield}}
<div class="form-group">
<label for="status-activity">What are you doing?</label>
{{input type="text" id="status-activity" value=model.activity class="form-control"}}
</div>
{{input type="text" id="status-activity" value=status.activity class="form-control"}}
</div>
3 changes: 1 addition & 2 deletions client/app/pods/components/status-note/template.hbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{{yield}}
<div class="form-group">
<label for="status-note">What is on your mind?</label>
{{input type="text" id="status-note" value=model.note class="form-control" autofocus="autofocus"}}
{{input type="text" id="status-note" value=status.note class="form-control" autofocus="autofocus"}}
</div>

6 changes: 3 additions & 3 deletions client/app/pods/components/status-state-picker/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ export default Ember.Component.extend( FocusForKeypress, {
action: 'submitAction',
keyDown: function (e) {
if (e.keyCode === 13) {
this.sendAction('action', this.get('model'));
this.sendAction('action', this.get('status'));
}
},
actions: {
pickState: function (state) {
this.model.set('state', state);
this.status.set('state', state);
}
},
removeOutline: function() {
removeOutline: function() {
this.$().css('outline-style', 'none');
}.on('didInsertElement')
});
2 changes: 1 addition & 1 deletion client/app/pods/components/wizard-form/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default Ember.Component.extend({

submitAction: function() {
if (this.get('lastStep')) {
this.sendAction('action', this.get('model'));
this.sendAction('action', this.get('status'));
} else {
this.triggerAction({
action: 'nextStep',
Expand Down
8 changes: 4 additions & 4 deletions client/app/pods/components/wizard-form/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
{{/each}}
</ol>

<form role="form" {{action 'submitAction' model on='submit'}}>
{{dynamic-component type=type model=model}}
<form role="form" {{action 'submitAction' status on='submit'}}>

{{component type status=status}}

{{#unless lastStep}}
<div {{action 'nextStep'}} class="btn btn-info">Next</div>
{{else}}
<button {{action 'submitAction' model}} type="submit" class="btn btn-default">Submit</button>
<button {{action 'submitAction' status}} type="submit" class="btn btn-default">Submit</button>
{{/unless}}

<div class="bump"></div>

</form>

{{yield}}

2 changes: 1 addition & 1 deletion client/app/pods/s/feed/status/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
<div class="page-header">
<h2>Status</h2>
</div>
{{wizard-form action="postStatus" steps=steps model=model}}
{{wizard-form action="postStatus" steps=steps status=model}}
</div>

0 comments on commit 09fc17c

Please sign in to comment.