From acc36c297fc26e9253613c74fafe20615abe6018 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20Tis=C3=A4ter?= Date: Mon, 5 May 2014 01:03:47 +0200 Subject: [PATCH] Add cancel button to key edit --- ui/index.html | 1 + ui/javascripts/app/controllers.js | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/ui/index.html b/ui/index.html index b9db4de0f..f0cd71517 100644 --- a/ui/index.html +++ b/ui/index.html @@ -210,6 +210,7 @@ {{ textarea value=model.valueDecoded class="form-control"}} + diff --git a/ui/javascripts/app/controllers.js b/ui/javascripts/app/controllers.js index 1fd78ba85..29b4910e2 100644 --- a/ui/javascripts/app/controllers.js +++ b/ui/javascripts/app/controllers.js @@ -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");