|
Lines 711-716
function _dt_buttons(params){
Link Here
|
| 711 |
); |
711 |
); |
| 712 |
|
712 |
|
| 713 |
if ( table_settings ) { |
713 |
if ( table_settings ) { |
|
|
714 |
const writeToClipboard= async (text, node) => { |
| 715 |
await navigator.clipboard.writeText(text); |
| 716 |
$(node).tooltip({trigger: 'manual', title: __("Copied!")}).tooltip('show'); |
| 717 |
}; |
| 714 |
buttons.push( |
718 |
buttons.push( |
| 715 |
{ |
719 |
{ |
| 716 |
autoClose: true, |
720 |
autoClose: true, |
|
Lines 728-737
function _dt_buttons(params){
Link Here
|
| 728 |
delete state.time; |
732 |
delete state.time; |
| 729 |
let searchParams = new URLSearchParams(window.location.search); |
733 |
let searchParams = new URLSearchParams(window.location.search); |
| 730 |
searchParams.set(table_key + '_state', btoa(state)); |
734 |
searchParams.set(table_key + '_state', btoa(state)); |
|
|
735 |
|
| 731 |
let url = window.location.origin + window.location.pathname + '?' + searchParams.toString() + window.location.hash; |
736 |
let url = window.location.origin + window.location.pathname + '?' + searchParams.toString() + window.location.hash; |
| 732 |
if( navigator.clipboard && navigator.clipboard.writeText){ |
737 |
if( navigator.clipboard && navigator.clipboard.writeText){ |
| 733 |
navigator.clipboard.writeText( url ); |
738 |
writeToClipboard(url, node); |
| 734 |
$(node).tooltip({trigger: 'manual', title: __("Copied!")}).tooltip('show'); |
|
|
| 735 |
} |
739 |
} |
| 736 |
}, |
740 |
}, |
| 737 |
} |
741 |
} |