File tree Expand file tree Collapse file tree 4 files changed +12
-13
lines changed
Expand file tree Collapse file tree 4 files changed +12
-13
lines changed Original file line number Diff line number Diff line change 8383 'runbot/static/lib/jquery/jquery.js' ,
8484 'runbot/static/lib/bootstrap/js/bootstrap.bundle.js' ,
8585
86- # legacy
87- 'runbot/static/src/js/runbot.js' ,
88-
8986 # module loader
9087 'web/static/src/module_loader.js' ,
9188 'runbot/static/src/public/**/*' ,
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -7,6 +7,9 @@ export class Runbot extends DelegatedInteractionLite {
77 "[data-runbot]" : {
88 "t-on-click.prevent" : this . onDataRunbotClick ,
99 } ,
10+ "[data-clipboard-copy]" : {
11+ "t-on-click" : this . onClipboardCopy ,
12+ } ,
1013 } ;
1114
1215 async onDataRunbotClick ( { delegatedTarget } ) {
@@ -36,4 +39,12 @@ export class Runbot extends DelegatedInteractionLite {
3639 window . location . reload ( ) ;
3740 }
3841 }
42+
43+ onClipboardCopy ( { delegatedTarget } ) {
44+ if ( ! navigator . clipboard ) {
45+ console . warn ( "Clipboard not supported" ) ;
46+ return ;
47+ }
48+ navigator . clipboard . writeText ( delegatedTarget . dataset . clipboardCopy ) ;
49+ }
3950}
Original file line number Diff line number Diff line change 423423 </template >
424424
425425 <template id =" runbot.branch_copy_button" >
426- <button t-attf-class =" btn btn-default {{btn_size or 'btn-ssm'}}" title =" Copy Bundle name" aria-label =" Copy Bundle name" t-attf-onclick = " copyToClipboard('{{ bundle.name.split(':')[-1] }}') " >
426+ <button t-attf-class =" btn btn-default {{btn_size or 'btn-ssm'}}" title =" Copy Bundle name" aria-label =" Copy Bundle name" t-att-data-clipboard-copy = " bundle.name.split(':')[-1]" >
427427 <i t-attf-class =" fa fa-clipboard" />
428428 </button >
429429 </template >
You can’t perform that action at this time.
0 commit comments