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"}}
|
{{ textarea value=model.valueDecoded class="form-control"}}
|
||||||
</div>
|
</div>
|
||||||
<button {{ action "updateKey"}} {{bind-attr disabled=isLoading }} {{ bind-attr class=":btn isLoading:btn-warning:btn-success" }}>Update</button>
|
<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>
|
<button {{ action "deleteKey"}} {{bind-attr disabled=isLoading }} {{ bind-attr class=":btn :pull-right isLoading:btn-warning:btn-danger" }}>Delete</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</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() {
|
deleteKey: function() {
|
||||||
this.set('isLoading', true);
|
this.set('isLoading', true);
|
||||||
var key = this.get("model");
|
var key = this.get("model");
|
||||||
|
|
Loading…
Reference in New Issue