diff --git a/assets/static/css/main.css b/assets/static/css/main.css index 398b153..66ea6c4 100644 --- a/assets/static/css/main.css +++ b/assets/static/css/main.css @@ -1136,6 +1136,14 @@ dialog .content h5 { } } +.col.left { + text-align: left; +} + +.col.right { + text-align: right; +} + /* Small */ @media (min-width:577px) and (max-width: 767px) { } @@ -1213,6 +1221,54 @@ dialog .content h5 { .slider.round:before { border-radius: 50%; } + + .col.s1 { + width: 8.33333% + } + + .col.s2 { + width: 16.66666% + } + + .col.s3 { + width: 24.99999% + } + + .col.s4 { + width: 33.33333% + } + + .col.s5 { + width: 41.66666% + } + + .col.s6 { + width: 49.99999% + } + + .col.s7 { + width: 58.33333% + } + + .col.s8 { + width: 66.66666% + } + + .col.s9 { + width: 74.99999% + } + + .col.s10 { + width: 83.33333% + } + + .col.s11 { + width: 91.66666% + } + + .col.s12 { + width: 99.99999% + } } /* Medium */ @@ -1225,13 +1281,11 @@ dialog .content h5 { width: 16.66666% } - .col.m3, - .quarter { + .col.m3 { width: 24.99999% } - .col.m4, - .third { + .col.m4 { width: 33.33333% } @@ -1239,8 +1293,7 @@ dialog .content h5 { width: 41.66666% } - .col.m6, - .half { + .col.m6 { width: 49.99999% } @@ -1248,13 +1301,11 @@ dialog .content h5 { width: 58.33333% } - .col.m8, - .twothird { + .col.m8 { width: 66.66666% } - .col.m9, - .w3-threequarter { + .col.m9 { width: 74.99999% } diff --git a/assets/static/js/main.js b/assets/static/js/main.js index e885101..f10f928 100644 --- a/assets/static/js/main.js +++ b/assets/static/js/main.js @@ -215,7 +215,10 @@ function bm_element_list_undelete(sender, element_name, element_name_remove) { } } -function bm_showMessage() { +function bm_showMessage(msg = "") { + if(msg !== "") { + document.getElementById('message').innerHTML = msg; + } document.getElementById('message').show(); setTimeout(() => { document.getElementById('message').close(); @@ -260,6 +263,16 @@ document.addEventListener("DOMContentLoaded", function(event){ openDialog.remove(); } } + + if (event.target.classList.contains("copy-to-clipboard")) { + let prefix = event.target.dataset.clipboardPrefix; + let text = document.getElementById(event.target.dataset.clipboardFieldId).value; + navigator.clipboard.writeText(prefix + text).then((value) => { + bm_showMessage("

Item sharing url copied to clipboard

"); + }).catch((err) => { + console.error(err); + }); + } }); document.querySelector('body').addEventListener("showModalDialog", function(evt){ diff --git a/assets/static/js/serviceWorker.js b/assets/static/js/serviceWorker.js index 95d6543..e2c4a60 100644 --- a/assets/static/js/serviceWorker.js +++ b/assets/static/js/serviceWorker.js @@ -1,4 +1,4 @@ -const cacheVersion = "0.29" +const cacheVersion = "0.31" const cacheName = "speedtech-brainminder" const cacheFiles = [ '/static/bootstrap-icons/font/bootstrap-icons.min.css', diff --git a/assets/templates/items/share.tmpl b/assets/templates/items/share.tmpl index d4df542..b0ffb9f 100644 --- a/assets/templates/items/share.tmpl +++ b/assets/templates/items/share.tmpl @@ -26,8 +26,15 @@

- {{ .publicBaseUrl }}/item/share/ - + {{ .publicBaseUrl }}/item/shared/ +
+
+ +
+
+ +
+

diff --git a/assets/templates/items/share_edit.tmpl b/assets/templates/items/share_edit.tmpl index 06e851d..c3f8544 100644 --- a/assets/templates/items/share_edit.tmpl +++ b/assets/templates/items/share_edit.tmpl @@ -26,8 +26,15 @@

- {{ .publicBaseUrl }}/item/share/ - + {{ .publicBaseUrl }}/item/shared/ +
+
+ +
+
+ +
+

diff --git a/assets/templates/items/shares.tmpl b/assets/templates/items/shares.tmpl index f8e6f21..1f2c838 100644 --- a/assets/templates/items/shares.tmpl +++ b/assets/templates/items/shares.tmpl @@ -14,27 +14,27 @@ {{ $share_name := printf "%s%v" "Share-" .Id }} {{ $share_name_remove := printf "%s%v" "ItemShare-ToRemove-" .Id }} - + {{ .Token }} - + {{ if eq .PermissionEdit 1}} {{ else }} {{ end }} - - {{ .StartDatetime }} + + {{ .StartDatetime }}  - - {{ .EndDatetime }} + + {{ .EndDatetime }}  - - - - + + + + {{ end }}