Go to file
jordi fita mas 5a16fa44a6 Change media picker from <div> to <dialog> and make it modal
Have to call Dialog.showModal when HTMx loaded the dialog in the DOM,
so had to add a onLoad event listened that checks whether the loaded
element is actually a DIALOG.

Had to restrict the margin: 0 for all elements (*) to exclude dialog,
because the browser sets it to auto, and i did not want to set it again
just because i was too overzealous with my “reset”.

The rest of the CSS is just to have a sticky header and footer, and see
the cancel button, that works as a “close”, all the time.

Finally, i realized that if i add the dialog at the end of the fieldset
and let HTMx inherit its hx-target and hx-swap, i no longer need to set
them in the dialog, as HTMx will always replace the fieldset, and i can
have the dialog side by side the current content of the fieldset, that
it was very confusing seeing it disappear when trying to select a new
media.

The cancel button could now just remove the dialog instead of making the
POST, but in local it makes no difference; we’lls see what happens on
production.
2023-09-22 02:11:03 +02:00
cmd/camper Manage all media uploads in a single place 2023-09-21 01:56:44 +02:00
debian Add the sample campsite types to the demo file 2023-09-10 03:57:46 +02:00
demo Manage all media uploads in a single place 2023-09-21 01:56:44 +02:00
deploy Manage all media uploads in a single place 2023-09-21 01:56:44 +02:00
pkg Add the upload form to the media picker 2023-09-22 01:40:22 +02:00
po Change media picker from <div> to <dialog> and make it modal 2023-09-22 02:11:03 +02:00
revert Manage all media uploads in a single place 2023-09-21 01:56:44 +02:00
test Manage all media uploads in a single place 2023-09-21 01:56:44 +02:00
verify Manage all media uploads in a single place 2023-09-21 01:56:44 +02:00
web Change media picker from <div> to <dialog> and make it modal 2023-09-22 02:11:03 +02:00
.gitignore Add the sample campsite types to the demo file 2023-09-10 03:57:46 +02:00
Makefile Manage all media uploads in a single place 2023-09-21 01:56:44 +02:00
go.mod Copy RecordArray from pgtype to database 2023-09-12 21:58:30 +02:00
go.sum Copy RecordArray from pgtype to database 2023-09-12 21:58:30 +02:00
sqitch.conf Add empty Sqitch configuration anq plan files 2023-07-20 23:43:23 +02:00
sqitch.plan Manage all media uploads in a single place 2023-09-21 01:56:44 +02:00