Skip to content

Commit 66369a8

Browse files
committed
Clipboard buttons.
Changelog excerpt: - Added some 'copy to clipboard' buttons to the homepage and statistics page.
1 parent 8799d35 commit 66369a8

31 files changed

+127
-67
lines changed

Changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ __*Why "v3.0.0" instead of "v1.0.0?"*__ Prior to phpMussel v3, the "phpMussel Co
99
[2020.07.31; Maikuolan]: Improved the way that the (generated by ...) notice, displayed at the footer of HTML pages, is rendered.
1010

1111
[2020.08.04; Maikuolan]: Addressed a potential compatibility problem with installations where PHP has its output proxied through to a different host. Also slightly improved the aesthetics of the front-end, and changed the logout link to a logout button.
12+
13+
[2020.10.08; Maikuolan]: Added some 'copy to clipboard' buttons to the homepage and statistics page.

assets/default/_home.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
<small>{label_your_ua} <code>{UA}</code></small>
3737
</li>
3838
</ul>
39+
<hr />
40+
<input type="button" value="{link_copy_to_clipboard}" class="auto" onclick="javascript:if(navigator.clipboard){var doCopy='{HomeCopyData}';navigator.clipboard.writeText(doCopy);alert(doCopy)}else{alert('{response_failed}')}" />
3941
</div></td>
4042
</tr>
4143
</table>

assets/default/_statistics.html

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,61 +7,62 @@
77
<table><tr><td class="spanner">
88
<form id="statForm" action="?phpmussel-page=statistics" method="POST">
99
<input name="ClearStats" type="hidden" value="1" />
10-
<input onclick="{Confirm-ClearAll}" type="button" value="{field_clear_all}" class="auto" />
10+
<input type="button" value="{link_copy_to_clipboard}" class="auto" onclick="javascript:if(navigator.clipboard){var doCopy='Web\n{label_events} – {Web-Events}\n{label_scanned_uploads} – {Web-Scanned}\n{label_blocked} – {Web-Blocked}\n{label_quarantined} – {Web-Quarantined}\n\nCLI\n{label_events} – {CLI-Events}\n{label_scanned_objects} – {CLI-Scanned}\n{label_flagged} – {CLI-Flagged}\n\nAPI\n{label_events} – {API-Events}\n{label_scanned_objects} – {API-Scanned}\n{label_flagged} – {API-Flagged}\n\n{label_other}\n{label_other-Since} – {Other-Since}\n{label_other-Active} – {Other-Active}\n';navigator.clipboard.writeText(doCopy);alert(doCopy)}else{alert('{response_failed}')}" />
11+
<input type="button" value="{field_clear_all}" class="auto" onclick="{Confirm-ClearAll}" />
1112
</form>
1213
</td></tr></table>
1314
<table>
1415
<tr><td class="center h4f" colspan="2"><div class="s">Web</div></td></tr>
1516
<tr>
1617
<td class="h3"><div class="s">{label_events}</div></td>
17-
<td class="h3f">{Web-Events}</td>
18+
<td class="h3f"><div class="s">{Web-Events}</div></td>
1819
</tr>
1920
<tr>
2021
<td class="h3"><div class="s">{label_scanned_uploads}</div></td>
21-
<td class="h3f">{Web-Scanned}</td>
22+
<td class="h3f"><div class="s">{Web-Scanned}</div></td>
2223
</tr>
2324
<tr>
2425
<td class="h3"><div class="s">{label_blocked}</div></td>
25-
<td class="h3f">{Web-Blocked}</td>
26+
<td class="h3f"><div class="s">{Web-Blocked}</div></td>
2627
</tr>
2728
<tr>
2829
<td class="h3"><div class="s">{label_quarantined}</div></td>
29-
<td class="h3f">{Web-Quarantined}</td>
30+
<td class="h3f"><div class="s">{Web-Quarantined}</div></td>
3031
</tr>
3132
<tr><td class="center h4f" colspan="2"><div class="s">CLI</div></td></tr>
3233
<tr>
3334
<td class="h3"><div class="s">{label_events}</div></td>
34-
<td class="h3f">{CLI-Events}</td>
35+
<td class="h3f"><div class="s">{CLI-Events}</div></td>
3536
</tr>
3637
<tr>
3738
<td class="h3"><div class="s">{label_scanned_objects}</div></td>
38-
<td class="h3f">{CLI-Scanned}</td>
39+
<td class="h3f"><div class="s">{CLI-Scanned}</div></td>
3940
</tr>
4041
<tr>
4142
<td class="h3"><div class="s">{label_flagged}</div></td>
42-
<td class="h3f">{CLI-Flagged}</td>
43+
<td class="h3f"><div class="s">{CLI-Flagged}</div></td>
4344
</tr>
4445
<tr><td class="center h4f" colspan="2"><div class="s">API</div></td></tr>
4546
<tr>
4647
<td class="h3"><div class="s">{label_events}</div></td>
47-
<td class="h3f">{API-Events}</td>
48+
<td class="h3f"><div class="s">{API-Events}</div></td>
4849
</tr>
4950
<tr>
5051
<td class="h3"><div class="s">{label_scanned_objects}</div></td>
51-
<td class="h3f">{API-Scanned}</td>
52+
<td class="h3f"><div class="s">{API-Scanned}</div></td>
5253
</tr>
5354
<tr>
5455
<td class="h3"><div class="s">{label_flagged}</div></td>
55-
<td class="h3f">{API-Flagged}</td>
56+
<td class="h3f"><div class="s">{API-Flagged}</div></td>
5657
</tr>
5758
<tr><td class="center h4f" colspan="2"><div class="s">{label_other}</div></td></tr>
5859
<tr>
5960
<td class="h3"><div class="s">{label_other-Since}</div></td>
60-
<td class="h3f">{Other-Since}</td>
61+
<td class="h3f"><div class="s">{Other-Since}</div></td>
6162
</tr>
6263
<tr>
6364
<td class="h3"><div class="s">{label_other-Active}</div></td>
64-
<td class="h3f">{Other-Active}</td>
65+
<td class="h3f"><div class="{Class-Active}">{Other-Active}</div></td>
6566
</tr>
6667
</table>
6768
</td>

assets/fullmoon/_home.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,6 @@
3434
<small>{label_your_ua} <code>{UA}</code></small>
3535
</li>
3636
</ul>
37+
<hr />
38+
<input type="button" value="{link_copy_to_clipboard}" class="auto" onclick="javascript:if(navigator.clipboard){var doCopy='{HomeCopyData}';navigator.clipboard.writeText(doCopy);alert(doCopy)}else{alert('{response_failed}')}" />
3739
</div>

assets/fullmoon/_statistics.html

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,60 +4,61 @@
44
<table><tr><td class="spanner">
55
<form id="statForm" action="?phpmussel-page=statistics" method="POST">
66
<input name="ClearStats" type="hidden" value="1" />
7-
<input onclick="{Confirm-ClearAll}" type="button" value="{field_clear_all}" class="auto" />
7+
<input type="button" value="{link_copy_to_clipboard}" class="auto" onclick="javascript:if(navigator.clipboard){var doCopy='Web\n{label_events} – {Web-Events}\n{label_scanned_uploads} – {Web-Scanned}\n{label_blocked} – {Web-Blocked}\n{label_quarantined} – {Web-Quarantined}\n\nCLI\n{label_events} – {CLI-Events}\n{label_scanned_objects} – {CLI-Scanned}\n{label_flagged} – {CLI-Flagged}\n\nAPI\n{label_events} – {API-Events}\n{label_scanned_objects} – {API-Scanned}\n{label_flagged} – {API-Flagged}\n\n{label_other}\n{label_other-Since} – {Other-Since}\n{label_other-Active} – {Other-Active}\n';navigator.clipboard.writeText(doCopy);alert(doCopy)}else{alert('{response_failed}')}" />
8+
<input type="button" value="{field_clear_all}" class="auto" onclick="{Confirm-ClearAll}" />
89
</form>
910
</td></tr></table>
1011
<table>
1112
<tr><td class="center h4f" colspan="2"><div class="s">Web</div></td></tr>
1213
<tr>
1314
<td class="h3"><div class="s">{label_events}</div></td>
14-
<td class="h3f">{Web-Events}</td>
15+
<td class="h3f"><div class="s">{Web-Events}</div></td>
1516
</tr>
1617
<tr>
1718
<td class="h3"><div class="s">{label_scanned_uploads}</div></td>
18-
<td class="h3f">{Web-Scanned}</td>
19+
<td class="h3f"><div class="s">{Web-Scanned}</div></td>
1920
</tr>
2021
<tr>
2122
<td class="h3"><div class="s">{label_blocked}</div></td>
22-
<td class="h3f">{Web-Blocked}</td>
23+
<td class="h3f"><div class="s">{Web-Blocked}</div></td>
2324
</tr>
2425
<tr>
2526
<td class="h3"><div class="s">{label_quarantined}</div></td>
26-
<td class="h3f">{Web-Quarantined}</td>
27+
<td class="h3f"><div class="s">{Web-Quarantined}</div></td>
2728
</tr>
2829
<tr><td class="center h4f" colspan="2"><div class="s">CLI</div></td></tr>
2930
<tr>
3031
<td class="h3"><div class="s">{label_events}</div></td>
31-
<td class="h3f">{CLI-Events}</td>
32+
<td class="h3f"><div class="s">{CLI-Events}</div></td>
3233
</tr>
3334
<tr>
3435
<td class="h3"><div class="s">{label_scanned_objects}</div></td>
35-
<td class="h3f">{CLI-Scanned}</td>
36+
<td class="h3f"><div class="s">{CLI-Scanned}</div></td>
3637
</tr>
3738
<tr>
3839
<td class="h3"><div class="s">{label_flagged}</div></td>
39-
<td class="h3f">{CLI-Flagged}</td>
40+
<td class="h3f"><div class="s">{CLI-Flagged}</div></td>
4041
</tr>
4142
<tr><td class="center h4f" colspan="2"><div class="s">API</div></td></tr>
4243
<tr>
4344
<td class="h3"><div class="s">{label_events}</div></td>
44-
<td class="h3f">{API-Events}</td>
45+
<td class="h3f"><div class="s">{API-Events}</div></td>
4546
</tr>
4647
<tr>
4748
<td class="h3"><div class="s">{label_scanned_objects}</div></td>
48-
<td class="h3f">{API-Scanned}</td>
49+
<td class="h3f"><div class="s">{API-Scanned}</div></td>
4950
</tr>
5051
<tr>
5152
<td class="h3"><div class="s">{label_flagged}</div></td>
52-
<td class="h3f">{API-Flagged}</td>
53+
<td class="h3f"><div class="s">{API-Flagged}</div></td>
5354
</tr>
5455
<tr><td class="center h4f" colspan="2"><div class="s">{label_other}</div></td></tr>
5556
<tr>
5657
<td class="h3"><div class="s">{label_other-Since}</div></td>
57-
<td class="h3f">{Other-Since}</td>
58+
<td class="h3f"><div class="s">{Other-Since}</div></td>
5859
</tr>
5960
<tr>
6061
<td class="h3"><div class="s">{label_other-Active}</div></td>
61-
<td class="h3f">{Other-Active}</td>
62+
<td class="h3f"><div class="{Class-Active}">{Other-Active}</div></td>
6263
</tr>
6364
</table>

l10n/ar.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# License: GNU/GPLv2
88
# @see LICENSE.txt
99
#
10-
# This file: Arabic language data (last modified: 2020.07.16).
10+
# This file: Arabic language data (last modified: 2020.10.06).
1111
##/
1212

1313
config_core: "التكوين العام (أي التكوين الأساسي لا ينتمي إلى فئات أخرى)."
@@ -178,6 +178,7 @@ link_accounts: "حسابات"
178178
link_cache_data: "بيانات ذاكرة التخزين المؤقت"
179179
link_chat: "دردشة"
180180
link_config: "التكوين"
181+
link_copy_to_clipboard: "نسخ إلى الحافظة"
181182
link_documentation: "توثيق"
182183
link_home: "الرئيسية"
183184
link_log_out: "خروج"

l10n/bn.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# License: GNU/GPLv2
88
# @see LICENSE.txt
99
#
10-
# This file: Bangla language data (last modified: 2020.07.16).
10+
# This file: Bangla language data (last modified: 2020.10.06).
1111
##/
1212

1313
config_core: "সাধারণ কনফিগারেশন (অন্য কোনও বিভাগের অন্তর্ভুক্ত নয় এমন কোনও কনফিগারেশন)।"
@@ -178,6 +178,7 @@ link_accounts: "অ্যাকাউন্ট"
178178
link_cache_data: "ক্যাশ ডেটা"
179179
link_chat: "চ্যাট"
180180
link_config: "কনফিগারেশন"
181+
link_copy_to_clipboard: "ক্লিপবোর্ডে অনুলিপি করুন"
181182
link_documentation: "ডকুমেন্টেশনটি"
182183
link_home: "হোম পেজ"
183184
link_log_out: "প্রস্থান"

l10n/de.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# License: GNU/GPLv2
88
# @see LICENSE.txt
99
#
10-
# This file: German language data (last modified: 2020.07.16).
10+
# This file: German language data (last modified: 2020.10.06).
1111
##/
1212

1313
config_core: "Allgemeine Konfiguration (jede Kernkonfiguration, die nicht zu anderen Kategorien gehört)."
@@ -180,6 +180,7 @@ link_accounts: "Konten"
180180
link_cache_data: "Datencache"
181181
link_chat: "Chat"
182182
link_config: "Konfiguration"
183+
link_copy_to_clipboard: "In die Zwischenablage kopieren"
183184
link_documentation: "Dokumentation"
184185
link_home: "Startseite"
185186
link_log_out: "Ausloggen"

l10n/en.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# License: GNU/GPLv2
88
# @see LICENSE.txt
99
#
10-
# This file: English language data (last modified: 2020.07.16).
10+
# This file: English language data (last modified: 2020.10.06).
1111
##/
1212

1313
config_core: "General configuration (any core configuration not belonging to other categories)."
@@ -180,6 +180,7 @@ link_accounts: "Accounts"
180180
link_cache_data: "Cache Data"
181181
link_chat: "Chat"
182182
link_config: "Configuration"
183+
link_copy_to_clipboard: "Copy to clipboard"
183184
link_documentation: "Documentation"
184185
link_home: "Home"
185186
link_log_out: "Log Out"

l10n/es.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# License: GNU/GPLv2
88
# @see LICENSE.txt
99
#
10-
# This file: Spanish language data (last modified: 2020.07.16).
10+
# This file: Spanish language data (last modified: 2020.10.06).
1111
##/
1212

1313
config_core: "Configuración general (cualquier configuración que no pertenezca a otras categorías)."
@@ -180,6 +180,7 @@ link_accounts: "Cuentas"
180180
link_cache_data: "Datos de Caché"
181181
link_chat: "Chat"
182182
link_config: "Configuración"
183+
link_copy_to_clipboard: "Copiar al portapapeles"
183184
link_documentation: "Documentación"
184185
link_home: "Página Principal"
185186
link_log_out: "Cerrar Sesión"

0 commit comments

Comments
 (0)