diff options
author | Aaron Parecki <aaron@parecki.com> | 2020-03-30 10:26:46 -0700 |
---|---|---|
committer | Aaron Parecki <aaron@parecki.com> | 2020-03-30 10:26:46 -0700 |
commit | 8dec126e7dd19ebb068b1a4f42804f8c0205af9d (patch) | |
tree | 03b978cc4772db3e1819e27aa76cccd742a89488 /views/partials | |
parent | 3759383e91344a6e10d23d4dbd90b9eda513d79c (diff) |
add channel selection to event interface
Diffstat (limited to 'views/partials')
-rw-r--r-- | views/partials/syndication-js.php | 18 |
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); + }); +} + |