diff --git a/beat/web/reports/static/reports/app/directives/editableLabel.js b/beat/web/reports/static/reports/app/directives/editableLabel.js index c18dde2a2ff2426990d442daadd19877d1430bcf..5fe652eeae078468b931cd32a9df2d864b9ebdf2 100644 --- a/beat/web/reports/static/reports/app/directives/editableLabel.js +++ b/beat/web/reports/static/reports/app/directives/editableLabel.js @@ -32,29 +32,17 @@ angular.module('reportApp').directive("editableLabel", [function(){ field: '@' }, link: function(scope){ - scope.editingGroupName = false; - scope.toggleEditingGroupName = () => { - scope.editingGroupName = !scope.editingGroupName; - }; }, template: ` -<span ng-if='!editingGroupName' ng-click='toggleEditingGroupName()'> - <span>{{ obj[field] }}</span> - <span style='cursor: pointer;' class='glyphicon glyphicon-pencil'></span> +<span style='display: inline-block;'> + <input + style='display: inline;' + required + type='text' + class='form-control' + placeholder='A label...' + ng-model='obj[field]'/> </span> -<form class='form-inline' role='form' style='display: inline;' ng-if='editingGroupName'> - <span class='input-group'> - <input - required - type='text' - class='form-control' - placeholder='A label...' - ng-model='obj[field]'/> - <span class='input-group-btn' ng-click='toggleEditingGroupName()'> - <button type='submit' class='btn btn-default'>Save</button> - </span> - </span> -</form> ` }; }]);