KEYCLOAK-205 fix for the key textarea
This commit is contained in:
parent
96c807d761
commit
e4376604c5
2 changed files with 24 additions and 1 deletions
|
@ -653,6 +653,28 @@ module.directive('kcReset', function ($compile, Notifications) {
|
|||
}
|
||||
});
|
||||
|
||||
/*
|
||||
* Used to select the element (invoke $(elem).select()) on specified action list.
|
||||
* Usages kc-select-action="click mouseover"
|
||||
* When used in the textarea element, this will select/highlight the textarea content on specified action (i.e. click).
|
||||
*/
|
||||
module.directive('kcSelectAction', function ($compile, Notifications) {
|
||||
return {
|
||||
restrict: 'A',
|
||||
compile: function (elem, attrs) {
|
||||
|
||||
var events = attrs.kcSelectAction.split(" ");
|
||||
|
||||
for(var i=0; i < events.length; i++){
|
||||
|
||||
elem.bind(events[i], function(){
|
||||
elem.select();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
module.filter('remove', function() {
|
||||
return function(input, remove, attribute) {
|
||||
if (!input || !remove) {
|
||||
|
|
|
@ -27,7 +27,8 @@
|
|||
<label for="publicKey">Public key</label>
|
||||
|
||||
<div class="controls">
|
||||
<textarea type="text" id="publicKey" name="publicKey" class="xlarge" rows="5">{{realm.publicKey}}</textarea>
|
||||
<textarea type="text" id="publicKey" name="publicKey" class="xlarge" rows="5"
|
||||
kc-select-action="click" readonly>{{realm.publicKey}}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
|
Loading…
Reference in a new issue