Add cancel button to key edit
This commit is contained in:
parent
6758a260a3
commit
acc36c297f
|
@ -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…
Reference in New Issue