mirror of
https://github.com/status-im/consul.git
synced 2025-01-10 13:55:55 +00:00
ui: add delete key functionality
This commit is contained in:
parent
be2675815f
commit
b650892899
@ -111,9 +111,7 @@
|
||||
{{ textarea value=newKey.value class="form-control"}}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<button {{ action "createKey"}} {{bind-attr disabled=newKey.isInvalid }} {{ bind-attr class=":btn newKey.isValid:btn-success:btn-default" }}>Create</button>
|
||||
</div>
|
||||
<button {{ action "createKey"}} {{bind-attr disabled=newKey.isInvalid }} {{ bind-attr class=":btn newKey.isValid:btn-success:btn-default" }}>Create</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@ -159,9 +157,8 @@
|
||||
<div class="form-group">
|
||||
{{ textarea value=model.value class="form-control"}}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button {{ action "updateKey"}} {{bind-attr disabled=isLoading }} {{ bind-attr class=":btn isLoading:btn-warning:btn-success" }}>Update</button>
|
||||
</div>
|
||||
<button {{ action "updateKey"}} {{bind-attr disabled=isLoading }} {{ bind-attr class=":btn isLoading:btn-warning:btn-success" }}>Update</button>
|
||||
<button {{ action "deleteKey"}} {{bind-attr disabled=isLoading }} {{ bind-attr class=":btn :pull-right isLoading:btn-warning:btn-danger" }}>Delete</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -114,6 +114,16 @@ App.KvEditController = Ember.Controller.extend({
|
||||
this.set('isLoading', false)
|
||||
}, 500);
|
||||
|
||||
},
|
||||
|
||||
deleteKey: function() {
|
||||
var key = this.get("model");
|
||||
this.set('isLoading', true);
|
||||
|
||||
Ember.run.later(this, function() {
|
||||
this.set('isLoading', false)
|
||||
}, 500);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -222,6 +222,7 @@ Socket connect timed out
|
||||
<a href="#" class="btn btn-primary">Primary button</a>
|
||||
<a href="#" class="btn btn-success">Success button</a>
|
||||
<a href="#" class="btn btn-warning">Warning button</a>
|
||||
<a href="#" class="btn btn-danger">Danger button</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -55,4 +55,17 @@
|
||||
|
||||
}
|
||||
|
||||
&.btn-danger {
|
||||
color: $red;
|
||||
background-color: transparent;
|
||||
border: 2px solid $red;
|
||||
|
||||
&:hover {
|
||||
background-color: lighten($red, 38%);
|
||||
color: darken($red, 10%);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user