summaryrefslogtreecommitdiff
path: root/views/partials/syndication-js.php
diff options
context:
space:
mode:
authorAaron Parecki <aaron@parecki.com>2020-03-30 10:26:46 -0700
committerAaron Parecki <aaron@parecki.com>2020-03-30 10:26:46 -0700
commit8dec126e7dd19ebb068b1a4f42804f8c0205af9d (patch)
tree03b978cc4772db3e1819e27aa76cccd742a89488 /views/partials/syndication-js.php
parent3759383e91344a6e10d23d4dbd90b9eda513d79c (diff)
add channel selection to event interface
Diffstat (limited to 'views/partials/syndication-js.php')
-rw-r--r--views/partials/syndication-js.php18
1 files changed, 18 insertions, 0 deletions
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('<select class="form-control" name="channel"></select>');
+ for(var i in data.channels) {
+ var channel = data.channels[i];
+ $("#channel-container select").append('<option value="'+htmlspecialchars(channel)+'">'+htmlspecialchars(channel)+'</option>');
+ }
+ } else {
+
+ }
+ console.log(data);
+ });
+}
+