This is an automated email from the ASF dual-hosted git repository. zjffdu pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/zeppelin.git
The following commit(s) were added to refs/heads/master by this push: new e2fe764 [ZEPPELIN-4536] Select name when creating a node e2fe764 is described below commit e2fe764dc4bfac6a153f4774618e711f41994aac Author: Frank Oosterhuis <frank.oosterh...@getthere.nl> AuthorDate: Tue Jan 7 14:13:53 2020 +0100 [ZEPPELIN-4536] Select name when creating a node ### What is this PR for? Making life a little easier when creating notes into folders, by selecting only the filename rather than the whole path. ### What type of PR is it? Improvement ### Todos ### What is the Jira issue? https://issues.apache.org/jira/browse/ZEPPELIN-4536 ### How should this be tested? * Test if you can create a note on the rootnode * Test if you can create a note on deeper levels ### Screenshots (if appropriate) ![image](https://user-images.githubusercontent.com/6542403/71891703-77c41680-3147-11ea-9f4c-47952fd30b4b.png) ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? No Author: Frank Oosterhuis <frank.oosterh...@getthere.nl> Closes #3591 from frankivo/ZEPPELIN-4536 and squashes the following commits: f905d49f2 [Frank Oosterhuis] [ZEPPELIN-4536] Restore original selector 049ea0fe2 [Frank Oosterhuis] [ZEPPELIN-4536] Removed variable. 2e74ede7a [Frank Oosterhuis] Merge branch 'master' into ZEPPELIN-4536 091db5001 [Frank Oosterhuis] [ZEPPELIN-4536] Simplify startpos 47292f085 [Frank Oosterhuis] [ZEPPELIN-4536] Calc start 436c199a9 [Frank Oosterhuis] [ZEPPELIN-4536] Im getting frustrated with angular 090f7a764 [Frank Oosterhuis] [ZEPPELIN-4536] Use HTMLInputElement 6af6b9cd0 [Frank Oosterhuis] [ZEPPELIN-4536] Select name in path --- zeppelin-web/src/components/note-create/visible.directive.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zeppelin-web/src/components/note-create/visible.directive.js b/zeppelin-web/src/components/note-create/visible.directive.js index 7ba8db7..2128f6e 100644 --- a/zeppelin-web/src/components/note-create/visible.directive.js +++ b/zeppelin-web/src/components/note-create/visible.directive.js @@ -36,7 +36,9 @@ function modalvisible() { }); element.on('shown.bs.modal', function(e) { if (scope.targetinput) { - angular.element(e.target).find('input#' + scope.targetinput).select(); + let ele = angular.element(e.target).find('input#' + scope.targetinput); + ele[0].focus(); + ele[0].setSelectionRange(ele.val().lastIndexOf('/') + 1, ele.val().length); } postVisibleMethod(); });