diff --git a/site/themes/s2b_hugo_theme/assets/css/cal/addevent.css b/site/themes/s2b_hugo_theme/assets/css/cal/addevent.css index 6e166085..605f8cca 100644 --- a/site/themes/s2b_hugo_theme/assets/css/cal/addevent.css +++ b/site/themes/s2b_hugo_theme/assets/css/cal/addevent.css @@ -26,6 +26,10 @@ width:100%; background:white; padding: 8px 16px; + text-align: center; +} +.caledit-content { + text-align: center; } .unpublished-event { diff --git a/site/themes/s2b_hugo_theme/assets/css/theme.css b/site/themes/s2b_hugo_theme/assets/css/theme.css index be85f913..2130668c 100644 --- a/site/themes/s2b_hugo_theme/assets/css/theme.css +++ b/site/themes/s2b_hugo_theme/assets/css/theme.css @@ -511,6 +511,12 @@ body.boxed .navbar-affixed-top.affix { #login-modal { overflow: hidden; } +.modal-header { + text-align: center; +} +.modal-body { + padding: 5px 15px; +} #login-modal .modal-header h4 { text-transform: uppercase; } diff --git a/site/themes/s2b_hugo_theme/assets/js/cal/addevent.js b/site/themes/s2b_hugo_theme/assets/js/cal/addevent.js index 6223b082..6e9286c2 100644 --- a/site/themes/s2b_hugo_theme/assets/js/cal/addevent.js +++ b/site/themes/s2b_hugo_theme/assets/js/cal/addevent.js @@ -10,7 +10,13 @@ $.fn.getAddEventForm = function(id, secret, callback) { // TODO: loading spinner - if (id && secret) { + const editing = id && secret; + + // why do we have one page for editing and creating events? + $('.page-title').text(editing ? 'Edit Event' : 'Add Event'); + document.title = (editing ? 'Edit Event - Shift' : 'Add Event - Shift'); + + if (editing) { let url = new URL(API_RETRIEVE_URL); url.searchParams.set('id', id); url.searchParams.set('secret', secret); @@ -151,8 +157,7 @@ } if (shiftEvent.published) { - $('.published-save-button').show(); - $('.duplicate-button').show(); + $('.published-button').show(); // show the user's selected image after they select it: // first, attach to the input button. @@ -203,8 +208,7 @@ success: function(returnVal) { if (returnVal.published) { $('.unpublished-event').remove(); - $('.published-save-button').show(); - $('.duplicate-button').show(); + $('.published-button').show(); _isFormDirty = false; } if (!isNew) { diff --git a/site/themes/s2b_hugo_theme/layouts/caledit/single.html b/site/themes/s2b_hugo_theme/layouts/caledit/single.html index 50697b31..5c3282dc 100644 --- a/site/themes/s2b_hugo_theme/layouts/caledit/single.html +++ b/site/themes/s2b_hugo_theme/layouts/caledit/single.html @@ -1,26 +1,22 @@ {{ define "page_body" }} -
- - {{ partial "alert_banner.html" . }} - -
- {{ .Content }} - - {{ if isset .Params "pp" }} - {{ partial "cal/pp-header.html" . }} - {{ end }} -
- - -
- -
+
+
+ {{ if isset .Params "pp" }} + {{ partial "cal/pp-header.html" . }} + {{ end }} +
+
+
+ {{ .Content }} +
+ {{ partial "alert_banner.html" . }} +
{{ end }} {{ define "postscript" }} - {{ partial "cal/scripts.html" . }} - {{ partial "cal/edit.html" . }} +{{ partial "cal/scripts.html" . }} +{{ partial "cal/edit.html" . }} - + {{ end }} \ No newline at end of file diff --git a/site/themes/s2b_hugo_theme/layouts/partials/breadcrumbs.html b/site/themes/s2b_hugo_theme/layouts/partials/breadcrumbs.html index 6630f318..1df35f5a 100644 --- a/site/themes/s2b_hugo_theme/layouts/partials/breadcrumbs.html +++ b/site/themes/s2b_hugo_theme/layouts/partials/breadcrumbs.html @@ -7,7 +7,7 @@
-

{{ .Title }}

+

{{ .Title }}

diff --git a/site/themes/s2b_hugo_theme/layouts/partials/cal/edit.html b/site/themes/s2b_hugo_theme/layouts/partials/cal/edit.html index 9fb6e7b6..9362f89c 100644 --- a/site/themes/s2b_hugo_theme/layouts/partials/cal/edit.html +++ b/site/themes/s2b_hugo_theme/layouts/partials/cal/edit.html @@ -23,9 +23,16 @@

Are you sure you want to cancel?