diff --git a/views/event.php b/views/event.php
index c485f31..cf86747 100644
--- a/views/event.php
+++ b/views/event.php
@@ -39,6 +39,52 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -95,6 +141,30 @@
var selectedPlacePin;
}
+ $(document).bind('keydown', function(e){
+ // Easter egg: press ctrl+shift+c to reveal a content type selection
+ if(e.keyCode == 67 && e.ctrlKey && e.shiftKey) {
+ $("#content-type-selection").removeClass("hidden");
+ }
+ // Easter egg: press ctrl+shift+m to switch to markdown
+ if(e.keyCode == 77 && e.ctrlKey && e.shiftKey) {
+ switchToMarkdown();
+ }
+ // Enable "presentation mode" which adds a few fields
+ if(e.keyCode == 80 && e.ctrlKey && e.shiftKey) {
+ enablePresentationMode();
+ }
+ });
+
+ function switchToMarkdown() {
+ $("#content-type-selection select").val("text/markdown");
+ $("#content-type-selection").removeClass("hidden");
+ }
+
+ function enablePresentationMode() {
+ $("#presentation-fields").removeClass("hidden");
+ }
+
$(function(){
// Start the event timezone offset in the browser's timezone
$("#start_date .timezone").attr("placeholder", tzOffset);
@@ -240,7 +310,8 @@
name: [$("#event_name").val()],
start: [event_start],
location: (selectedPlace ? selectedPlace : $("#event_location").val()),
- category: tokenfieldToArray("#note_category")
+ category: tokenfieldToArray("#note_category"),
+ content: $("#note_content").val()
};
if(event_end) {
@@ -251,6 +322,26 @@
properties['p3k-channel'] = $("#note_channel").val();
}
+ if(!$("#content-type-selection").hasClass("hidden")) {
+ properties['p3k-content-type'] = $("#note_content_type").val();
+ }
+
+ if(!$("#presentation-fields").hasClass("hidden")) {
+ properties['slides'] = $("#slides").val();
+ properties['slides-embed'] = $("#slides-embed").val();
+ properties['video-link'] = $("#video-link").val();
+ properties['video-embed'] = $("#video-embed").val();
+ if($("#conference-name").val()) {
+ properties['conference'] = {
+ type: 'h-event',
+ properties: {
+ name: $("#conference-name").val(),
+ url: $("#conference-url").val()
+ }
+ };
+ }
+ }
+
$.post("/micropub/postjson", {
data: JSON.stringify({
"type": ["h-event"],