mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Fix broken copy (#3314)
* update clipboard version * attach clipboard to about model * make definition simpler * make version text copyable
This commit is contained in:
parent
4b0b76ecc5
commit
e314e879da
File diff suppressed because one or more lines are too long
@ -40,8 +40,7 @@ function attachClipboard(selector, containerselector, textElement) {
|
||||
}
|
||||
|
||||
// create Clipboard
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
var cis = new ClipboardJS(selector, {
|
||||
new ClipboardJS(selector, {
|
||||
text: text,
|
||||
container: containerselector
|
||||
});
|
||||
@ -110,6 +109,9 @@ function inventreeDocReady() {
|
||||
$('#launch-about').click(function() {
|
||||
launchModalForm(`/about/`, {
|
||||
no_post: true,
|
||||
after_render: function() {
|
||||
attachClipboard('.clip-btn', 'modal-form');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -81,7 +81,7 @@
|
||||
<td>
|
||||
<span style="display: none;" id="about-copy-text">{% include "version.html" %}</span>
|
||||
<span class="float-right">
|
||||
<button class="btn clip-btn-version" type="button" data-bs-toggle='tooltip' title='{% trans "copy to clipboard" %}'><em class="fas fa-copy"></em> {% trans "copy version information" %}</button>
|
||||
<button class="btn clip-btn" type="button" data-bs-toggle='tooltip' title='{% trans "copy to clipboard" %}'><em class="fas fa-copy"></em> {% trans "copy version information" %}</button>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
Loading…
Reference in New Issue
Block a user