Fixed dialog UI. Added datastar support. Fixed UI on tablet.
This commit is contained in:
parent
9cffd4d981
commit
e60dc87ccc
12 changed files with 86 additions and 23 deletions
|
@ -991,10 +991,18 @@ th.operations, td.operations {
|
|||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.dialog-navbar button{
|
||||
background-color: var(--primary-color);
|
||||
color: white;
|
||||
border-radius: 10px;
|
||||
.dialog-navbar button {
|
||||
background-color: white;
|
||||
color: black;
|
||||
border-radius: 10px;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.dialog-navbar button.default {
|
||||
background-color: var(--primary-color);
|
||||
color: white;
|
||||
border-radius: 10px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.footer-navbar {
|
||||
|
@ -1033,6 +1041,7 @@ dialog {
|
|||
dialog .footer-navbar {
|
||||
position: relative;
|
||||
width: auto;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
dialog header {
|
||||
|
|
13
assets/static/datastar/datastar.js
Normal file
13
assets/static/datastar/datastar.js
Normal file
File diff suppressed because one or more lines are too long
7
assets/static/datastar/datastar.js.map
Normal file
7
assets/static/datastar/datastar.js.map
Normal file
File diff suppressed because one or more lines are too long
1
assets/static/datastar/datastar.json
Normal file
1
assets/static/datastar/datastar.json
Normal file
File diff suppressed because one or more lines are too long
|
@ -136,7 +136,7 @@ function bm_show_confirm_delete(sender, title, message) {
|
|||
document.querySelector("#dialog-confirm-delete").close();
|
||||
});
|
||||
|
||||
document.getElementById("modal-confirm-cancel").addEventListener('click', (event) => {
|
||||
document.getElementById("modal-confirm-delete-cancel").addEventListener('click', (event) => {
|
||||
document.querySelector("#dialog-confirm-delete").close();
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
const cacheVersion = "0.55"
|
||||
const cacheVersion = "0.56"
|
||||
const cacheName = "speedtech-brainminder"
|
||||
const cacheFiles = [
|
||||
"/static/datastar/datastar.js",
|
||||
"/static/easymde/easymde.min.css",
|
||||
'/static/css/slimselect.css',
|
||||
'/static/css/main.css',
|
||||
|
|
|
@ -30,7 +30,7 @@ templates['field-text'] = template({"compiler":[8,">= 4.3.0"],"main":function(co
|
|||
+ alias4(((helper = (helper = lookupProperty(helpers,"type_field_id") || (depth0 != null ? lookupProperty(depth0,"type_field_id") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"type_field_id","hash":{},"data":data,"loc":{"start":{"line":3,"column":90},"end":{"line":3,"column":107}}}) : helper)))
|
||||
+ "-"
|
||||
+ alias4(((helper = (helper = lookupProperty(helpers,"counter") || (depth0 != null ? lookupProperty(depth0,"counter") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"counter","hash":{},"data":data,"loc":{"start":{"line":3,"column":108},"end":{"line":3,"column":119}}}) : helper)))
|
||||
+ "').remove()\" type=\"button\"><i class=\"bi bi-dash-square-fill\"></i></button></div>\n</div>";
|
||||
+ "').remove()\" type=\"button\"><i class=\"icon icon-remove\"></i></button></div>\n</div>";
|
||||
},"useData":true});
|
||||
templates['field-url'] = template({"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) {
|
||||
var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3="function", alias4=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) {
|
||||
|
@ -62,6 +62,6 @@ templates['field-url'] = template({"compiler":[8,">= 4.3.0"],"main":function(con
|
|||
+ alias4(((helper = (helper = lookupProperty(helpers,"type_field_id") || (depth0 != null ? lookupProperty(depth0,"type_field_id") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"type_field_id","hash":{},"data":data,"loc":{"start":{"line":3,"column":90},"end":{"line":3,"column":107}}}) : helper)))
|
||||
+ "-"
|
||||
+ alias4(((helper = (helper = lookupProperty(helpers,"counter") || (depth0 != null ? lookupProperty(depth0,"counter") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"counter","hash":{},"data":data,"loc":{"start":{"line":3,"column":108},"end":{"line":3,"column":119}}}) : helper)))
|
||||
+ "').remove()\" type=\"button\" class=\"delete\"><i class=\"bi bi-dash-square-fill\"></i></button></div>\n</div>";
|
||||
+ "').remove()\" type=\"button\" class=\"delete\"><i class=\"icon icon-remove\"></i></button></div>\n</div>";
|
||||
},"useData":true});
|
||||
})();
|
|
@ -54,7 +54,7 @@
|
|||
|
||||
<div class="dialog-navbar">
|
||||
<button id="modal-confirm-delete"><i class="icon icon-yes"></i><span>Yes</span></button>
|
||||
<button id="modal-confirm-cancel"><i class="icon icon-no"></i><span>No</span></button>
|
||||
<button id="modal-confirm-delete-cancel" class="default" autofocus><i class="icon icon-no"></i><span>No</span></button>
|
||||
</div>
|
||||
</dialog>
|
||||
|
||||
|
@ -65,9 +65,9 @@
|
|||
|
||||
<p style="clear: both"></p>
|
||||
|
||||
<div class="footer-navbar">
|
||||
<div class="dialog-navbar">
|
||||
<button id="modal-confirm"><i class="icon icon-yes"></i><span>Yes</span></button>
|
||||
<button id="modal-confirm-cancel"><i class="icon icon-no"></i><span>No</span></button>
|
||||
<button id="modal-confirm-cancel" class="default" autofocus><i class="icon icon-no"></i><span>No</span></button>
|
||||
</div>
|
||||
</dialog>
|
||||
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
{{define "partial:footer"}}
|
||||
<script src="/static/easymde/easymde.min.js"></script>
|
||||
<script src="/static/js/Sortable.min.js"></script>
|
||||
<script src="/static/js/htmx/htmx.min.js"></script>
|
||||
<script src="/static/js/handlebars.js"></script>
|
||||
<script src="/static/js/templates.js"></script>
|
||||
<script src="/static/js/slimselect.min.js"></script>
|
||||
<script src="/static/js/main.js"></script>
|
||||
<script type="module" defer src="/static/datastar/datastar.js"></script>
|
||||
<script src="/static/easymde/easymde.min.js"></script>
|
||||
<script src="/static/js/Sortable.min.js"></script>
|
||||
<script src="/static/js/htmx/htmx.min.js"></script>
|
||||
<script src="/static/js/handlebars.js"></script>
|
||||
<script src="/static/js/templates.js"></script>
|
||||
<script src="/static/js/slimselect.min.js"></script>
|
||||
<script src="/static/js/main.js"></script>
|
||||
{{end}}
|
||||
|
|
15
go.mod
15
go.mod
|
@ -15,16 +15,23 @@ require (
|
|||
github.com/wneessen/go-mail v0.4.3
|
||||
github.com/yuin/goldmark v1.7.4
|
||||
github.com/yuin/goldmark-highlighting v0.0.0-20220208100518-594be1970594
|
||||
golang.org/x/crypto v0.26.0
|
||||
golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa
|
||||
golang.org/x/text v0.17.0
|
||||
golang.org/x/crypto v0.31.0
|
||||
golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0
|
||||
golang.org/x/text v0.24.0
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/a-h/templ v0.3.865 // indirect
|
||||
github.com/alecthomas/chroma v0.10.0 // indirect
|
||||
github.com/dlclark/regexp2 v1.4.0 // indirect
|
||||
github.com/delaneyj/gostar v0.8.0 // indirect
|
||||
github.com/dlclark/regexp2 v1.11.4 // indirect
|
||||
github.com/goccy/go-json v0.10.5 // indirect
|
||||
github.com/gorilla/securecookie v1.1.2 // indirect
|
||||
github.com/hashicorp/errwrap v1.1.0 // indirect
|
||||
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||
github.com/igrmk/treemap/v2 v2.0.1 // indirect
|
||||
github.com/samber/lo v1.50.0 // indirect
|
||||
github.com/starfederation/datastar v0.21.4 // indirect
|
||||
github.com/valyala/bytebufferpool v1.0.0 // indirect
|
||||
go.uber.org/atomic v1.7.0 // indirect
|
||||
)
|
||||
|
|
24
go.sum
24
go.sum
|
@ -1,5 +1,7 @@
|
|||
filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
|
||||
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
|
||||
github.com/a-h/templ v0.3.865 h1:nYn5EWm9EiXaDgWcMQaKiKvrydqgxDUtT1+4zU2C43A=
|
||||
github.com/a-h/templ v0.3.865/go.mod h1:oLBbZVQ6//Q6zpvSMPTuBK0F3qOtBdFBcGRspcT+VNQ=
|
||||
github.com/alecthomas/chroma v0.10.0 h1:7XDcGkCQopCNKjZHfYrNLraA+M7e0fMiJ/Mfikbfjek=
|
||||
github.com/alecthomas/chroma v0.10.0/go.mod h1:jtJATyUxlIORhUOFNA9NZDWGAQ8wpxQQqNSB4rjA/1s=
|
||||
github.com/alexedwards/flow v0.1.0 h1:2JY6lesAFIxB5uEcm4coM6FM8tLNGZovVXqRRTic8a4=
|
||||
|
@ -7,14 +9,21 @@ github.com/alexedwards/flow v0.1.0/go.mod h1:RtjEm3RTnsKqwE98bem/60/9cxEyZ0AQEz8
|
|||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
|
||||
github.com/delaneyj/gostar v0.8.0 h1:uT1JR+77P5ePL4BVTXsKNLtwUUtMAu/dNLryjEk95RA=
|
||||
github.com/delaneyj/gostar v0.8.0/go.mod h1:mlxRWAVbntRR2VWlpXAzt7y9HY+bQtEm/lsyFnGLx/w=
|
||||
github.com/dlclark/regexp2 v1.4.0 h1:F1rxgk7p4uKjwIQxBs9oAXe5CqrXlCduYEJvrF4u93E=
|
||||
github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc=
|
||||
github.com/dlclark/regexp2 v1.11.4 h1:rPYF9/LECdNymJufQKmri9gV604RvvABwgOA8un7yAo=
|
||||
github.com/dlclark/regexp2 v1.11.4/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
|
||||
github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A=
|
||||
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
|
||||
github.com/go-playground/form/v4 v4.2.1 h1:HjdRDKO0fftVMU5epjPW2SOREcZ6/wLUzEobqUGJuPw=
|
||||
github.com/go-playground/form/v4 v4.2.1/go.mod h1:q1a2BY+AQUUzhl6xA/6hBetay6dEIhMHjgvJiGo6K7U=
|
||||
github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y=
|
||||
github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg=
|
||||
github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4=
|
||||
github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
|
||||
github.com/golang-migrate/migrate/v4 v4.17.1 h1:4zQ6iqL6t6AiItphxJctQb3cFqWiSpMnX7wLTPnnYO4=
|
||||
github.com/golang-migrate/migrate/v4 v4.17.1/go.mod h1:m8hinFyWBn0SA4QKHuKh175Pm9wjmxj3S2Mia7dbXzM=
|
||||
github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
|
||||
|
@ -28,6 +37,8 @@ github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY
|
|||
github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
|
||||
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
|
||||
github.com/igrmk/treemap/v2 v2.0.1 h1:Jhy4z3yhATvYZMWCmxsnHO5NnNZBdueSzvxh6353l+0=
|
||||
github.com/igrmk/treemap/v2 v2.0.1/go.mod h1:PkTPvx+8OHS8/41jnnyVY+oVsfkaOUZGcr+sfonosd4=
|
||||
github.com/jmoiron/sqlx v1.4.0 h1:1PLqN7S1UYp5t4SrVVnt4nUVNemrDAtxlulVe+Qgm3o=
|
||||
github.com/jmoiron/sqlx v1.4.0/go.mod h1:ZrZ7UsYB/weZdl2Bxg6jCRO9c3YHl8r3ahlKmRT4JLY=
|
||||
github.com/justinas/nosurf v1.1.1 h1:92Aw44hjSK4MxJeMSyDa7jwuI9GR2J/JCQiaKvXXSlk=
|
||||
|
@ -40,6 +51,11 @@ github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o
|
|||
github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
|
||||
github.com/samber/lo v1.50.0 h1:XrG0xOeHs+4FQ8gJR97zDz5uOFMW7OwFWiFVzqopKgY=
|
||||
github.com/samber/lo v1.50.0/go.mod h1:RjZyNk6WSnUFRKK6EyOhsRJMqft3G+pg7dCWHQCWvsc=
|
||||
github.com/starfederation/datastar v0.21.4 h1:Njp0dYokG27WCEWrgAbs5NNU0CVPQDheb8R0NjoPSi0=
|
||||
github.com/starfederation/datastar v0.21.4/go.mod h1:QRVnnH5KxIIcOzq0b2Dpl7QnV/G70Wsr3+2RiH4X+Mw=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
|
@ -47,6 +63,8 @@ github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gt
|
|||
github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
||||
github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce h1:fb190+cK2Xz/dvi9Hv8eCYJYvIGUTN2/KLq1pT6CjEc=
|
||||
github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce/go.mod h1:o8v6yHRoik09Xen7gje4m9ERNah1d1PPsVq1VEx9vE4=
|
||||
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
|
||||
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
|
||||
github.com/wneessen/go-mail v0.4.3 h1:FN4Ge0lpPxKkXuw4PgJSffXlruDdMo25bamfkMzm+FE=
|
||||
github.com/wneessen/go-mail v0.4.3/go.mod h1:zxOlafWCP/r6FEhAaRgH4IC1vg2YXxO0Nar9u0IScZ8=
|
||||
github.com/yuin/goldmark v1.4.5/go.mod h1:rmuwmfZ0+bvzB24eSC//bk1R1Zp3hM0OXYv/G2LIilg=
|
||||
|
@ -58,10 +76,16 @@ go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw=
|
|||
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
|
||||
golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw=
|
||||
golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54=
|
||||
golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U=
|
||||
golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=
|
||||
golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa h1:ELnwvuAXPNtPk1TJRuGkI9fDTwym6AYBu0qzT8AcHdI=
|
||||
golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa/go.mod h1:akd2r19cwCdwSwWeIdzYQGa/EZZyqcOdwWiwj5L5eKQ=
|
||||
golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 h1:R84qjqJb5nVJMxqWYb3np9L5ZsaDtB+a39EqjV0JSUM=
|
||||
golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0/go.mod h1:S9Xr4PYopiDyqSyp5NjCrhFrqg6A5zA2E/iPHPhqnS8=
|
||||
golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc=
|
||||
golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
|
||||
golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0=
|
||||
golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
|
|
|
@ -330,7 +330,7 @@ func renderFieldValues(values map[int]string, widget string) template.HTML {
|
|||
values_a = append(values_a, renderFieldValueAsString(value, widget))
|
||||
}
|
||||
|
||||
return template.HTML(strings.Join(values_a, ","))
|
||||
return template.HTML(strings.Join(values_a, ", "))
|
||||
}
|
||||
|
||||
return template.HTML("")
|
||||
|
|
Loading…
Add table
Reference in a new issue