Skip to content
This repository was archived by the owner on Jan 17, 2023. It is now read-only.

Commit d3a00cf

Browse files
author
Alex Collins
committed
Merge pull request #135 from uvgroovy/master
selecting the pull image cmd line to ease copying
2 parents cd1dcc2 + 393f9b0 commit d3a00cf

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

grails-app/views/repository/image-prompts.js.gsp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,14 @@
2525
width: 450,
2626
modal: true
2727
});
28-
dialog.show();
28+
// select the text for easy copy pasting
29+
var selection = window.getSelection();
30+
var range = document.createRange();
31+
range.selectNodeContents(pre.get()[0]);
32+
selection.removeAllRanges();
33+
selection.addRange(range);
34+
35+
dialog.show();
2936
});
3037
});
3138
});

0 commit comments

Comments
 (0)