From 1b7f9802352fdbda374383d42740ca4efe2b09a7 Mon Sep 17 00:00:00 2001 From: kunw Date: Wed, 13 Jul 2016 17:46:51 +0800 Subject: [PATCH] update for selecting all when click the pull command text. --- .../js/components/repository/pull-command.directive.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/static/resources/js/components/repository/pull-command.directive.js b/static/resources/js/components/repository/pull-command.directive.js index a002f011c..5c8f12bd3 100644 --- a/static/resources/js/components/repository/pull-command.directive.js +++ b/static/resources/js/components/repository/pull-command.directive.js @@ -42,8 +42,13 @@ function link(scope, element, attrs, ctrl) { ctrl.harborRegUrl = $('#HarborRegUrl').val() + '/'; - + + element.find('input[type="text"]').on('click', function() { + $(this).select(); + }); + element.find('a').on('click', clickHandler); + function clickHandler(e) { element.find('input[type="text"]').select(); }