Merge pull request #122 from tiwilliam/cancel-edit-key

ui: Add cancel button to key edit
pull/127/head
Armon Dadgar 11 years ago
commit 6440fc77b6

@ -210,6 +210,7 @@
{{ textarea value=model.valueDecoded class="form-control"}}
</div>
<button {{ action "updateKey"}} {{bind-attr disabled=isLoading }} {{ bind-attr class=":btn isLoading:btn-warning:btn-success" }}>Update</button>
<button {{ action "cancelEdit"}} {{bind-attr disabled=isLoading }} {{ bind-attr class=":btn isLoading:btn-warning:btn-default" }}>Cancel</button>
<button {{ action "deleteKey"}} {{bind-attr disabled=isLoading }} {{ bind-attr class=":btn :pull-right isLoading:btn-warning:btn-danger" }}>Delete</button>
</form>
</div>

@ -143,6 +143,12 @@ App.KvEditController = Ember.Controller.extend({
})
},
cancelEdit: function() {
this.set('isLoading', true);
this.transitionToRoute('kv.show', this.get("model").get('parentKey'));
this.set('isLoading', false);
},
deleteKey: function() {
this.set('isLoading', true);
var key = this.get("model");

Loading…
Cancel
Save