mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 20:16:44 +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
|
// create Clipboard
|
||||||
// eslint-disable-next-line no-unused-vars
|
new ClipboardJS(selector, {
|
||||||
var cis = new ClipboardJS(selector, {
|
|
||||||
text: text,
|
text: text,
|
||||||
container: containerselector
|
container: containerselector
|
||||||
});
|
});
|
||||||
@ -110,6 +109,9 @@ function inventreeDocReady() {
|
|||||||
$('#launch-about').click(function() {
|
$('#launch-about').click(function() {
|
||||||
launchModalForm(`/about/`, {
|
launchModalForm(`/about/`, {
|
||||||
no_post: true,
|
no_post: true,
|
||||||
|
after_render: function() {
|
||||||
|
attachClipboard('.clip-btn', 'modal-form');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<span style="display: none;" id="about-copy-text">{% include "version.html" %}</span>
|
<span style="display: none;" id="about-copy-text">{% include "version.html" %}</span>
|
||||||
<span class="float-right">
|
<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>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user