From 8dec126e7dd19ebb068b1a4f42804f8c0205af9d Mon Sep 17 00:00:00 2001 From: Aaron Parecki Date: Mon, 30 Mar 2020 10:26:46 -0700 Subject: add channel selection to event interface --- views/event.php | 21 +++++++++++++++++++ views/partials/syndication-js.php | 18 ++++++++++++++++ views/settings.php | 43 +++++++++++++++++++++++---------------- 3 files changed, 65 insertions(+), 17 deletions(-) (limited to 'views') diff --git a/views/event.php b/views/event.php index 81742d8..c485f31 100644 --- a/views/event.php +++ b/views/event.php @@ -44,6 +44,24 @@ + channels): ?> +
+ +
+ '; + echo ''; + foreach($this->channels as $ch) { + echo ''; + } + echo ''; + ?> +
+
+ +
@@ -229,6 +247,9 @@ properties.end = event_end; } + if($("#note_channel").val()) { + properties['p3k-channel'] = $("#note_channel").val(); + } $.post("/micropub/postjson", { data: JSON.stringify({ diff --git a/views/partials/syndication-js.php b/views/partials/syndication-js.php index 90331ba..ead1889 100644 --- a/views/partials/syndication-js.php +++ b/views/partials/syndication-js.php @@ -26,3 +26,21 @@ function bind_syndication_buttons() { return false; }); } + + +function reload_channels() { + $.getJSON("/micropub/channels", function(data){ + console.log(data); + if(data.channels) { + $("#channel-container").html(''); + for(var i in data.channels) { + var channel = data.channels[i]; + $("#channel-container select").append(''); + } + } else { + + } + console.log(data); + }); +} + diff --git a/views/settings.php b/views/settings.php index 3ddbcc5..55cbd17 100644 --- a/views/settings.php +++ b/views/settings.php @@ -81,13 +81,37 @@ echo ''; } else { ?>
No syndication targets were found on your site. - Your server can provide a list of supported syndication targets that will appear as checkboxes here.
list of supported syndication targets that will appear as buttons here. +

Channels

+ +
+ +
+ channels) { + echo ''; + } else { + ?>
No channels were found on your site. + Your server can provide a list of channels that will appear as buttons here.
+
+
+ + +

Twitter

Connecting a Twitter account will automatically "favorite" and "retweet" tweets on Twitter when you favorite and retweet a Twitter URL in Quill.

@@ -185,21 +209,6 @@ $(function(){ }); -function reload_syndications() { - $.getJSON("/micropub/syndications", function(data){ - if(data.targets) { - $("#syndication-container").html(''); - for(var i in data.targets) { - var target = data.targets[i].target; - var uid = data.targets[i].uid; - var favicon = data.targets[i].favicon; - $("#syndication-container ul").append('
  • '); - } - bind_syndication_buttons(); - } else { + - } - console.log(data); - }); -} -- cgit v1.2.3